/**
 * Modern Theme 1.2.0 - charte Devoteam : Red Poppy #f8485e, Dark Grey #3c3c3a
 * (dernière section du fichier : couche « Charte Devoteam »)
 *
 * Toutes les règles ciblent la palette par défaut de GLPI (Auror) :
 * les autres palettes ne sont jamais modifiées.
 *
 * Police : Montserrat, police officielle Devoteam (SIL Open Font License 1.1,
 * voir ../fonts/OFL.txt)
 */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
        U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ======================================================================
 * Variables de couleur (anciennement palette « moderntheme_light »).
 *
 * Le thème s'applique par-dessus la palette par défaut de GLPI (Auror),
 * uniquement quand le plugin est actif : rien n'est écrit dans la
 * configuration ni dans files/_themes. Plugin désactivé = GLPI d'origine.
 * Un utilisateur qui choisit une autre palette la retrouve telle quelle.
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    --mt-accent: #f8485e;
    --mt-accent-rgb: 248, 72, 94;
    --mt-accent-hover: #e03a50;
    --mt-accent-strong: #c93246;
    --mt-accent-strong-rgb: 200, 36, 59;
    --mt-accent-soft: #fdecee;
    --mt-accent-softer: #fddade;
    --mt-ring: 0 0 0 4px rgba(248, 72, 94, .25);

    --tblr-primary: #f8485e;
    --tblr-primary-rgb: 248, 72, 94;
    --tblr-primary-fg: #fff;
    --tblr-primary-darken: #e03a50;
    --tblr-primary-lt: #fdecee;
    --tblr-secondary: #6b6b68;
    --tblr-secondary-rgb: 107, 107, 112;
    --tblr-link-color: #c93246;
    --tblr-link-color-rgb: 200, 36, 59;
    --tblr-link-hover-color: #a82a3b;
    --tblr-link-hover-color-rgb: 165, 29, 49;
    --tblr-info: #6b6b68;
    --tblr-info-rgb: 107, 107, 112;
    --tblr-azure: #6b6b68;
    --tblr-azure-rgb: 107, 107, 112;
    --tblr-blue: #6b6b68;
    --tblr-blue-rgb: 107, 107, 112;
    --tblr-cyan: #6b6b68;
    --tblr-cyan-rgb: 107, 107, 112;
    --tblr-body-color-rgb: 60, 60, 58;
    --tblr-danger: #c93246;
    --tblr-danger-rgb: 180, 35, 24;

    --tblr-body-bg: #f6f6f5;
    --tblr-bg-surface: #ffffff;
    --tblr-bg-surface-secondary: #f9f9f8;
    --tblr-bg-surface-tertiary: #efeeee;
    --tblr-body-color: #3c3c3a;
    --tblr-muted: #6b6b68;
    --tblr-border-color: #e4e3e1;
    --tblr-border-color-translucent: rgba(60, 60, 58, .08);
    --tblr-border-radius: 8px;
    --tblr-border-radius-lg: 12px;

    --tblr-font-sans-serif: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --glpi-mainmenu-bg: #ffffff;
    --glpi-mainmenu-fg: #4f4f4c;
    --glpi-mainmenu-fg-muted: #6b6b68;
    --glpi-mainmenu-active-bg: #fdecee;
    --glpi-logo: var(--glpi-logo-dark);
    --glpi-logo-reduced: var(--glpi-logo-dark-reduced);

    --glpi-tabs-bg: #f9f9f8;
    --glpi-tabs-fg: #6b6b68;
    --glpi-tabs-border-color: #e4e3e1;
    --glpi-tabs-active-bg: #ffffff;
    --glpi-tabs-active-fg: #c93246;
    --glpi-tabs-active-border-color: #e4e3e1;

    --glpi-form-header-fg: #c93246;
    --glpi-badge-bg: #fdecee;
    --glpi-badge-fg: #c93246;
    --glpi-search-bg: #efeeee;
    --glpi-search-border-color: #e4e3e1;
    --glpi-itil-secondary-bg: #f9f9f8;
    --glpi-hover-bg: rgba(248, 72, 94, .06);

    --glpi-timeline-fup-bg: #efeeee;
    --glpi-timeline-fup-fg: #4f4f4c;
    --glpi-timeline-fup-border-color: #e4e3e1;
    --glpi-timeline-task-bg: #efeadc;
    --glpi-timeline-task-fg: #3c3c3a;
    --glpi-timeline-task-border-color: #fcc354;
    --glpi-timeline-solution-bg: #d7ebe7;
    --glpi-timeline-solution-fg: #3c3c3a;
    --glpi-timeline-solution-border-color: #b5d9d1;
    --glpi-timeline-itil-content-bg: #d7ebe7;
    --glpi-timeline-itil-content-fg: #3c3c3a;
    --glpi-timeline-itil-content-border-color: #b5d9d1;

    --glpi-helpdesk-header: #fddade;
    --glpi-helpdesk-tiles-section-bg: #f6f6f5;
    --glpi-helpdesk-tabs-section-bg: #ffffff;

    --glpi-palette-color-1: #3c3c3a;
    --glpi-palette-color-2: #ffffff;
    --glpi-palette-color-3: #f8485e;
    --glpi-palette-color-4: #fcc354;
}

/* ======================================================================
 * « La barre au milieu » : barre de défilement native du menu latéral.
 * GLPI force overflow-y: scroll sur aside.sidebar, ce qui affiche une
 * piste grise pleine hauteur (Chrome/macOS, barres toujours visibles).
 * On la masque ; le menu reste défilable à la molette / au trackpad.
 * Appliqué à toutes les palettes du plugin.
 * ====================================================================== */
:root[data-glpi-theme="auror"] body:not(.navbar-collapsed) aside.sidebar {
    overflow-y: auto !important;
}

:root[data-glpi-theme="auror"] aside.sidebar {
    scrollbar-width: none !important;
    -ms-overflow-style: none;

    &::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

:root[data-glpi-theme="auror"] {
    /* Accent : défini plus haut (variables de couleur), valeurs reprises ici */
    --mt-accent: #f8485e;
    --mt-accent-rgb: 248, 72, 94;
    --mt-accent-hover: #e03a50;
    --mt-accent-strong: #c93246;
    --mt-accent-soft: #fdecee;
    --mt-accent-softer: #fddade;
    --mt-slate-50: #f9f9f8;
    --mt-slate-100: #efeeee;
    --mt-slate-200: #e4e3e1;
    --mt-slate-400: #8a8a87;
    --mt-slate-500: #6b6b68;
    --mt-slate-700: #4f4f4c;
    --mt-slate-900: #3c3c3a;
    --mt-radius: 14px;
    --mt-radius-lg: 18px;
    --mt-shadow-sm: 0 1px 2px rgba(60, 60, 58, .04), 0 1px 3px rgba(60, 60, 58, .05);
    --mt-shadow: 0 1px 3px rgba(60, 60, 58, .04), 0 6px 16px -4px rgba(60, 60, 58, .08);
    --mt-shadow-lg: 0 20px 45px -12px rgba(60, 60, 58, .18);
    --mt-ring: 0 0 0 4px rgba(var(--mt-accent-rgb), .25);
    --glpi-content-margin: 32px;

    /* ------------------------------------------------------------------
     * Typographie
     * ------------------------------------------------------------------ */
    & body {
        font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: .875rem;
        -webkit-font-smoothing: antialiased;
        background: var(--tblr-body-bg);
        color: var(--mt-slate-900);
    }

    & h1, & h2, & h3, & .h1, & .h2, & .h3 {
        letter-spacing: -.01em;
        font-weight: 600;
    }

    /* ------------------------------------------------------------------
     * Menu latéral : clair, entrées en pilule
     * ------------------------------------------------------------------ */
    & aside.sidebar {
        background: #fff !important;
        border: 0 !important;
        box-shadow: none !important;

        & .navbar-brand {
            padding: 22px 0 14px;
        }

        & .trigger-fuzzy {
            margin: 4px 14px 14px;
            width: calc(100% - 28px);
            padding: 9px 12px;
            border-radius: 10px;
            background: var(--mt-slate-100);
            color: var(--mt-slate-500);
            border: 1px solid var(--mt-slate-200);
            font-weight: 500;
        }

        & .navbar-nav {
            padding: 0 12px;
            gap: 2px;
        }

        & #navbar-menu > ul .nav-item > .nav-link,
        & #navbar-menu > ul .dropdown-item {
            border-left: 0 !important;
            border-radius: 10px;
            padding: 10px 14px;
            color: var(--mt-slate-700);
            font-weight: 500;
            transition: background-color .15s ease, color .15s ease;
            position: relative;

            & > i,
            & .ti {
                font-size: 1.3rem;
                width: 1.5rem;
                margin-right: 10px;
                color: var(--mt-slate-400);
            }

            &:hover {
                background: var(--mt-slate-100);
                color: var(--mt-slate-900);

                & > i, & .ti { color: var(--mt-slate-700); }
            }
        }

        /* Section ouverte */
        & .nav-item.active > .nav-link,
        & .nav-item > .nav-link.show {
            background: transparent;
            color: var(--mt-slate-900);
            font-weight: 600;

            & > i { color: var(--mt-accent); }
        }

        /* Sous-menu déplié : aéré, sans bordure de couleur (navigation uniquement) */
        & #navbar-menu > ul .dropdown-menu {
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
            padding: 2px 0 10px 0;
            margin: 0;

            & .dropdown-header {
                display: none;
            }

            & .dropdown-item {
                padding: 8px 14px 8px 18px;
                font-size: .85rem;

                & > i { font-size: 1.1rem; }
            }
        }

        /* Entrée active : fond accent très léger + texte accent + barre d'accent */
        & #navbar-menu > ul .dropdown-item.active,
        & #navbar-menu > ul .dropdown-item:active {
            background: var(--mt-accent-soft) !important;
            color: var(--mt-accent-strong) !important;
            font-weight: 600;

            & > i { color: var(--mt-accent) !important; }

            &::before {
                content: "";
                position: absolute;
                left: 0;
                top: 8px;
                bottom: 8px;
                width: 3px;
                border-radius: 3px;
                background: var(--mt-accent);
            }
        }

        /* Supprime la barre verticale colorée native du sous-menu */
        & .nav-item.active,
        & .nav-item.active > .dropdown-menu {
            border-left: 0 !important;
            box-shadow: none !important;
        }

        & .nav-item.active::before,
        & .nav-item.active::after {
            display: none !important;
        }

        & .reduce-menu,
        & .navbar-collapse > .mt-auto .nav-link {
            color: var(--mt-slate-500);
        }
    }

    /* ------------------------------------------------------------------
     * Barre du haut : blanche et épurée
     * ------------------------------------------------------------------ */
    & header.navbar {
        background: #fff !important;
        border-bottom: 1px solid var(--mt-slate-200);
        box-shadow: none !important;
        min-height: 64px;

        & .breadcrumb {
            font-size: .9rem;
            font-weight: 500;

            & .breadcrumb-item a { color: var(--mt-slate-500); }
            & .breadcrumb-item a.here { color: var(--mt-slate-900); font-weight: 600; }
        }

        & .header-container {
            flex-wrap: nowrap !important;
            gap: 12px;
        }

        & .breadcrumb {
            flex-wrap: nowrap;
            white-space: nowrap;
            margin: 0;
        }

        & .navbar-nav.border-start {
            border-left: 0 !important;
            flex-wrap: nowrap !important;
            align-items: center;

            & .btn { min-height: 32px; white-space: nowrap; }
        }

        /* Recherche globale mise en avant */
        & form[role="search"] .input-group {
            width: 340px;
            background: var(--mt-slate-100);
            border: 1px solid transparent;
            border-radius: 999px;
            padding: 0 6px 0 4px;
            transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease;

            &:focus-within {
                background: #fff;
                border-color: rgba(var(--mt-accent-rgb), .5);
                box-shadow: var(--mt-ring);
            }

            & .form-control,
            & .input-group-text {
                background: transparent !important;
                border: 0 !important;
                box-shadow: none !important;
                min-height: 40px;
            }

            & .form-control { padding-left: 14px; }

            @media (max-width: 1599.98px) { width: 260px; }
        }

        & .user-menu .avatar {
            border-radius: 999px !important;
        }
    }

    /* ------------------------------------------------------------------
     * Contenu : plus aéré, titres plus présents
     * ------------------------------------------------------------------ */
    & .page-body {
        padding: 8px 32px 40px !important;
    }

    & .main-header .card-title {
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: -.01em;
        color: var(--mt-slate-900);

        & .status {
            display: inline-flex;
            align-items: center;
            background: transparent !important;
            border: 0 !important;
            padding: 0;
            gap: 12px;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--mt-slate-900);

            & > i {
                display: inline-grid;
                place-items: center;
                width: 40px;
                height: 40px;
                border-radius: 12px;
                background: var(--mt-accent-soft);
                color: var(--mt-accent);
                font-size: 1.3rem;
            }
        }
    }

    /* Cartes : sans bordure, arrondies, ombres douces */
    & .card {
        border: 0;
        border-radius: var(--mt-radius);
        box-shadow: var(--mt-shadow);
    }

    & .card > .card-header:first-child { border-radius: var(--mt-radius) var(--mt-radius) 0 0; }
    & .card > .card-footer:last-child { border-radius: 0 0 var(--mt-radius) var(--mt-radius); }

    & .card-header,
    & .card-footer {
        border-color: var(--mt-slate-100);
    }

    /* ------------------------------------------------------------------
     * Onglets : contrôle segmenté (pilules)
     * ------------------------------------------------------------------ */
    & .nav-tabs:not(.flex-md-column) {
        display: inline-flex;
        width: fit-content;
        gap: 4px;
        padding: 4px;
        background: #e8e7e6;
        border: 0 !important;
        border-radius: 12px;

        & .nav-link {
            border: 0 !important;
            border-radius: 9px !important;
            padding: 7px 14px;
            color: var(--mt-slate-500);
            font-weight: 500;
            background: transparent;
            margin: 0 !important;

            &:hover { color: var(--mt-slate-900); }

            &.active {
                background: #fff !important;
                color: var(--mt-slate-900) !important;
                font-weight: 600;
                box-shadow: none;
            }
        }
    }

    /* Onglets verticaux des fiches : liste de pilules dans une carte */
    & .card-tabs.vertical {
        gap: 20px;

        & > .nav-tabs.flex-md-column {
            align-self: flex-start;
            background: #fff;
            border: 0 !important;
            border-radius: var(--mt-radius);
            box-shadow: var(--mt-shadow);
            padding: 8px;
            min-width: 230px !important;

            & .nav-item { margin: 0 !important; }

            & .nav-link {
                border: 0 !important;
                border-radius: 10px !important;
                padding: 9px 12px;
                color: var(--mt-slate-700);
                font-weight: 500;
                background: transparent;
                margin: 1px 0;

                & i { color: var(--mt-slate-400); font-size: 1.15rem; }

                &:hover { background: var(--mt-slate-100); }

                &.active {
                    background: var(--mt-accent-soft) !important;
                    color: var(--mt-accent-strong) !important;
                    font-weight: 600;

                    & i { color: var(--mt-accent); }
                }
            }
        }

        & > .tab-content {
            border: 0 !important;
            border-radius: var(--mt-radius) !important;
            padding: 12px 16px !important;
        }
    }

    /* ------------------------------------------------------------------
     * Listes de recherche
     * ------------------------------------------------------------------ */
    & .search-card {
        border-radius: var(--mt-radius-lg);
        box-shadow: var(--mt-shadow);
        overflow: hidden;

        & .search-header {
            background: #fff;
            border-bottom: 1px solid var(--mt-slate-100);
            padding: 14px 18px !important;
        }
    }

    & .search-controls .btn,
    & .search-header .btn {
        background: transparent;
        border: 1px solid transparent;
        color: var(--mt-slate-700);
        border-radius: 10px;
        font-weight: 500;
        box-shadow: none;

        &:hover {
            background: var(--mt-slate-100);
            color: var(--mt-slate-900);
        }

        &.active,
        &.btn-secondary.active {
            background: var(--mt-accent-soft) !important;
            color: var(--mt-accent-strong) !important;
        }
    }

    & .search-results {
        --tblr-table-striped-bg: transparent;

        & > thead > tr > th {
            background: var(--mt-slate-50) !important;
            color: var(--mt-slate-500) !important;
            font-size: .72rem;
            font-weight: 600;
            border-bottom: 1px solid var(--mt-slate-200) !important;
            padding-top: 12px;
            padding-bottom: 12px;
            white-space: nowrap;
        }

        & > tbody > tr > td {
            padding-top: 14px;
            padding-bottom: 14px;
            border-bottom: 1px solid var(--mt-slate-100);
            vertical-align: middle;
        }

        & > tbody > tr:nth-of-type(odd) > * {
            --tblr-table-accent-bg: transparent;
            box-shadow: none;
        }

        & > tbody > tr:hover > * {
            --tblr-table-accent-bg: rgba(var(--mt-accent-rgb), .045) !important;
            background-color: rgba(var(--mt-accent-rgb), .045);
        }

        & a { font-weight: 500; }
    }

    & .search-footer {
        background: #fff;
        border-top: 0;
        padding: 14px 18px;
    }

    /* Tuiles de statistiques au-dessus des listes */
    & .dashboard-card {
        background: transparent;
        box-shadow: none;
    }

    & .dashboard .card,
    & .grid-stack-item .card {
        border-radius: var(--mt-radius) !important;
        box-shadow: var(--mt-shadow-sm);
    }

    /* ------------------------------------------------------------------
     * Formulaires
     * ------------------------------------------------------------------ */
    & .form-control,
    & .form-select,
    & .select2-container--default .select2-selection--single,
    & .select2-container--default .select2-selection--multiple {
        min-height: 40px;
        background-color: var(--mt-slate-50);
        border: 1px solid var(--mt-slate-200);
        border-radius: 10px !important;
        transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    }

    & .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 38px;
    }

    & .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 38px;
    }

    & .form-control:hover,
    & .form-select:hover,
    & .select2-selection:hover {
        border-color: #cfcecd;
    }

    & .form-control:focus,
    & .form-select:focus,
    & .select2-container--focus .select2-selection,
    & .select2-container--open .select2-selection {
        background-color: #fff;
        border-color: rgba(var(--mt-accent-rgb), .6) !important;
        box-shadow: var(--mt-ring) !important;
    }

    & .form-label,
    & .form-field > label,
    & .col-form-label {
        color: var(--mt-slate-700);
        font-weight: 500;
    }

    & .input-group > .btn:not(.btn-primary):not(.btn-danger):not(.btn-success),
    & .input-group > .input-group-text:not([class*="bg-"]) {
        border-radius: 10px;
        margin-left: 4px;
        border-color: var(--mt-slate-200);
        background: #fff;
    }

    /* ------------------------------------------------------------------
     * Boutons : primaires pleins, secondaires "ghost"
     * ------------------------------------------------------------------ */
    & .btn {
        border-radius: 10px;
        font-weight: 600;
        min-height: 38px;
        transition: background-color .15s ease, box-shadow .15s ease, transform .05s ease;

        &:active { transform: translateY(1px); }
    }

    & .btn-sm { min-height: 32px; border-radius: 9px; }

    & .btn-primary {
        background: var(--mt-accent);
        border-color: var(--mt-accent);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);

        &:hover { background: var(--mt-accent-hover); border-color: var(--mt-accent-hover); }
    }

    & .btn-secondary,
    & .btn-outline-secondary,
    & .btn-ghost-secondary {
        background: transparent;
        border-color: var(--mt-slate-200);
        color: var(--mt-slate-700);

        &:hover {
            background: var(--mt-slate-100);
            border-color: var(--mt-slate-200);
            color: var(--mt-slate-900);
        }
    }

    & .btn-ghost-secondary { border-color: transparent; }

    & .btn-outline-warning,
    & .btn-outline-danger {
        background: transparent;
        border-color: transparent;

        &:hover { border-color: currentColor; }
    }

    /* Pied de formulaire (Sauvegarder / Corbeille) */
    & .form-button-separator,
    & .card-tabs .card-footer {
        background: var(--mt-slate-50);
        border-top: 1px solid var(--mt-slate-100) !important;
    }

    /* ------------------------------------------------------------------
     * Tickets : timeline en bulles de messagerie
     * ------------------------------------------------------------------ */
    & .itil-object > .itil-left-side {
        border-top: 0 !important;
    }

    & .itil-right-side {
        background: var(--mt-slate-50) !important;
        border-left: 1px solid var(--mt-slate-100);
    }

    & .itil-timeline {
        gap: 6px;

        & .timeline-item .avatar {
            border-radius: 999px !important;
            box-shadow: 0 0 0 3px #fff, var(--mt-shadow-sm);
        }

        & .timeline-content {
            border: 0 !important;
            border-radius: var(--mt-radius-lg) !important;
            box-shadow: var(--mt-shadow-sm);
            max-width: 760px;

            & > .card-body { padding: 14px 18px !important; }

            & .card-header {
                border: 0;
                background: transparent;
                font-size: 1rem;
                font-weight: 600;
            }

            & .timeline-header .badge {
                background: rgba(255, 255, 255, .65);
                color: var(--mt-slate-500);
                border-radius: 999px;
                font-weight: 500;
                padding: 4px 10px;
            }

            /* Pointe des bulles */
            &::before,
            &::after { display: none !important; }
        }

        & .timeline-content.left { border-top-left-radius: 6px !important; }
        & .timeline-content.t-right { border-top-right-radius: 6px !important; }

        /* Description du ticket */
        & .ITILContent .timeline-content {
            background: #fff !important;
            color: var(--mt-slate-900) !important;
            box-shadow: var(--mt-shadow);

            & .card-header { color: var(--mt-slate-900) !important; }
        }

        /* Suivi : bleu-indigo pastel */
        & .ITILFollowup .timeline-content {
            background: #efeeee !important;
            color: #3c3c3a !important;
        }

        /* Tâche : ambre pastel */
        & .ITILTask .timeline-content {
            background: #efeadc !important;
            color: #3c3c3a !important;
        }

        /* Solution : vert menthe pastel */
        & .ITILSolution .timeline-content {
            background: #d7ebe7 !important;
            color: #3c3c3a !important;
        }

        /* Document : lilas pastel */
        & .Document_Item .timeline-content {
            background: #fdecee !important;
            color: #3c3c3a !important;
        }

        /* Validation : cyan pastel */
        & .ITILValidation .timeline-content {
            background: #efeeee !important;
            color: #3c3c3a !important;
        }
    }

    /* Barre d'actions du ticket (Répondre...) */
    & .itil-footer {
        background: #fff;
        border-top: 1px solid var(--mt-slate-200) !important;

        & .buttons-bar { align-items: center; }
        & .timeline-buttons,
        & .form-buttons { align-items: center; flex-wrap: nowrap !important; }
        & .main-actions { align-self: center; }
        & .main-actions > .btn { min-height: 38px; height: 38px; }
        & .form-buttons { background: transparent; }
    }

    & .itil-right-side .form-field > label,
    & .itil-right-side .col-form-label {
        word-break: normal;
        overflow-wrap: normal;
        hyphens: auto;
        font-size: .8rem;
    }

    /* ------------------------------------------------------------------
     * Divers
     * ------------------------------------------------------------------ */
    & .badge {
        border-radius: 999px;
        font-weight: 500;
    }

    & .dropdown-menu {
        border: 1px solid var(--mt-slate-200);
        border-radius: 12px;
        box-shadow: var(--mt-shadow-lg);
        padding: 6px;

        & .dropdown-item { border-radius: 8px; }
    }

    & .modal-content {
        border: 0;
        border-radius: var(--mt-radius-lg);
        box-shadow: var(--mt-shadow-lg);
    }

    & .alert {
        border-radius: 12px;
        border: 0;
        box-shadow: var(--mt-shadow-sm);
    }
}

/* ======================================================================
 * Page de connexion : deux colonnes, panneau dégradé indigo à gauche
 * ====================================================================== */
:root[data-glpi-theme="auror"] body.welcome-anonymous {
    min-height: 100vh;
    background: #f6f6f5;

    /* Panneau dégradé */
    &::before {
        content: "";
        position: fixed;
        inset: 0 auto 0 0;
        width: 46vw;
        background: #f8485e;
        z-index: 0;
    }

    /* Accroche */
    &::after {
        content: var(--mt-text-tagline);
        white-space: pre-line;
        position: fixed;
        left: 6vw;
        bottom: 14vh;
        width: 34vw;
        color: #fff;
        font-size: clamp(1.4rem, 2.2vw, 2.2rem);
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -.01em;
        z-index: 1;
    }

    & .page-anonymous {
        position: relative;
        z-index: 2;
        margin-left: 46vw;
        width: 54vw;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    & .page-anonymous > .flex-fill {
        width: 100%;
        margin: 0 !important;
    }

    & .container-tight {
        max-width: 440px !important;
        padding: 0 !important;
    }

    /* Logo blanc posé sur le panneau dégradé */
    & .page-anonymous .text-center .glpi-logo {
        --logo: var(--glpi-logo-light-login) !important;

        position: fixed;
        left: 6vw;
        top: 9vh;
        width: 170px;
        height: auto;
        margin: 0 !important;
        background: none !important;
    }

    & .main-content-card {
        border: 0;
        border-radius: 20px;
        box-shadow: none;
        padding: 12px 8px;

        & > .card-header { display: none; }

        & .col-md-5 {
            flex: 0 0 100%;
            max-width: 100%;
        }

        & h2 {
            font-size: 1.6rem;
            font-weight: 600;
            letter-spacing: -.01em;
            margin: 0 !important;
            text-align: left;
        }

        & .card-header.mb-4 {
            border: 0;
            padding-left: 0;
            padding-right: 0;
        }

        & .btn-primary {
            width: 100%;
            min-height: 46px;
            font-size: .95rem;
        }

        & .form-control,
        & .select2-selection {
            min-height: 44px;
        }
    }

    & .page-anonymous a {
        color: var(--mt-slate-500);
    }

    @media (max-width: 991.98px) {
        &::before { width: 100vw; height: 180px; inset: 0 0 auto 0; }
        &::after { display: none; }
        & .page-anonymous { margin-left: 0; width: 100%; padding: 200px 16px 32px; }
        & .page-anonymous .text-center .glpi-logo { top: 50px; left: 24px; }
    }
}

/* ======================================================================
 * 0.3.0 - Échelle "Zendesk" : typographie plus grande, très aéré,
 * pas de bordures grises (espacement + ombres très légères).
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    --tblr-body-font-size: 14px;
    --tblr-body-line-height: 1.6;
    --tblr-body-bg: #f6f6f5;
    --tblr-border-color: #e8e7e6;
    --tblr-border-color-translucent: rgba(60, 60, 58, .05);
    --mt-shadow: 0 1px 2px rgba(60, 60, 58, .03), 0 4px 12px -2px rgba(60, 60, 58, .05);
    --mt-shadow-sm: 0 1px 2px rgba(60, 60, 58, .04);

    & body {
        font-size: 14px;
        line-height: 1.6;
        background: #f6f6f5;
    }

    & .page-wrapper { background: #f6f6f5; }

    & .form-control, & .form-select, & .btn, & .dropdown-item,
    & .select2-container, & .select2-results__option, & .table, & .nav-link,
    & .breadcrumb, & .form-label, & .col-form-label, & label {
        font-size: 14px;
    }

    & .btn-sm, & .badge, & .timeline-header .badge { font-size: 13px; }

    /* --- Menu latéral : blanc, aucun séparateur --- */
    & aside.sidebar {
        & .nav-item > .nav-link { font-size: 14px; padding: 11px 14px; }
        & .dropdown-menu .dropdown-item { font-size: 14.5px; padding: 9px 14px 9px 18px; }
        & .trigger-fuzzy { font-size: 14px; }
    }

    /* Menu replié : icônes centrées, pas de marges de pilule */
    & body.navbar-collapsed aside.sidebar {
        & .navbar-nav { padding: 0 8px; }
        & .nav-item > .nav-link { justify-content: center; padding: 11px 0; }
        & .nav-item > .nav-link > i { margin-right: 0; }
        @media (min-width: 992px) {
            & .container-fluid > span:has(> .trigger-fuzzy) { display: block !important; width: 100%; }
        }
        & .trigger-fuzzy {
            display: flex !important;
            width: 44px !important;
            height: 40px;
            margin: 4px auto 14px !important;
            padding: 0 !important;
            justify-content: center;
            align-items: center;
        }
        & .trigger-fuzzy > i { margin: 0 !important; }
        & .trigger-fuzzy .menu-label { display: none !important; }
    }

    /* --- Barre du haut : 64 px, recherche large au centre --- */
    & header.navbar {
        height: 64px;
        min-height: 64px;
        background: #fff !important;
        border-bottom: 0 !important;
        box-shadow: none !important;

        & .header-container { height: 64px; align-items: center; }

        & .breadcrumb { font-size: 14px; }

        & .header-container > div:has(> form[role="search"]) {
            flex: 1 1 auto !important;
            display: flex !important;
            justify-content: center;
            margin: 0 24px !important;
            min-width: 0;
        }

        & .user-menu { flex-shrink: 0; }

        & form[role="search"] {
            width: 100%;
            max-width: 520px;

            & .input-group {
                width: 100% !important;
                background: #efeeee;
                border-radius: 12px;
                padding: 0 8px;

                & .form-control { min-height: 44px; font-size: 14px; }
            }
        }
    }

    /* --- Contenu --- */
    & .page-body { padding: 24px 40px 48px !important; }

    & .main-header .card-title,
    & .main-header .card-title .status {
        font-size: 28px !important;
        letter-spacing: -.01em;
    }

    & .itil-object ~ * h3, & .card-title { font-size: 18px; }

    & .card,
    & .search-card,
    & .card-tabs.vertical > .nav-tabs.flex-md-column {
        border: 0 !important;
        box-shadow: var(--mt-shadow);
    }

    & .card-header, & .card-footer, & .search-header, & .search-footer,
    & .form-button-separator, & .card-tabs .card-footer,
    & .itil-footer, & .itil-right-side {
        border-color: transparent !important;
    }

    & .card-tabs.vertical > .nav-tabs.flex-md-column {
        min-width: 250px !important;
        padding: 10px;

        & .nav-link { font-size: 14px; padding: 10px 14px; }
    }

    /* --- Tableaux : lignes de 48 px, sans quadrillage --- */
    & .search-container,
    & .search_page > .col { min-width: 0; }

    & .search-card { max-width: 100%; }

    & .search-results {
        & > thead > tr > th {
            font-size: 12px;
            background: #fff !important;
            border-bottom: 1px solid #efeeee !important;
            padding-top: 14px;
            padding-bottom: 14px;
        }

        & > tbody > tr > td {
            height: 52px;
            padding-top: 12px;
            padding-bottom: 12px;
            font-size: 14px;
            border-bottom: 1px solid #efeeee !important;
            border-top: 0 !important;
        }

        & > tbody > tr:last-child > td { border-bottom: 0 !important; }

        /* En-têtes sur une ligne ; le titre garde une largeur confortable */
        & > thead > tr > th { white-space: nowrap; }
        & > tbody > tr > td[data-searchopt-content-id="1"] { min-width: 240px; }
    }

    & .table > :not(caption) > * > * { border-color: #efeeee; }

    /* --- Champs et boutons : 42 px --- */
    & .form-control,
    & .form-select,
    & .select2-container--default .select2-selection--single,
    & .select2-container--default .select2-selection--multiple {
        min-height: 42px;
        background-color: #fff;
        border-color: #e4e3e1;
    }

    & .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; }
    & .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }

    & .btn { min-height: 42px; padding-left: 16px; padding-right: 16px; }
    & .btn-sm { min-height: 34px; padding-left: 12px; padding-right: 12px; }
    & .btn-icon, & .input-group > .btn { padding-left: 10px; padding-right: 10px; }

    & .itil-footer .main-actions > .btn { height: 42px; min-height: 42px; }

    /* --- Ticket : propriétés empilées (libellé au-dessus du champ) --- */
    & .itil-right-side {
        background: #f9f9f8 !important;

        & .form-field.row {
            flex-direction: column;
            align-items: stretch !important;
            margin-bottom: 14px !important;

            & > * {
                width: 100% !important;
                max-width: 100% !important;
                flex: 0 0 auto !important;
            }

            & > label,
            & > .col-form-label {
                text-align: left !important;
                justify-content: flex-start !important;
                font-size: 13px;
                font-weight: 600;
                color: var(--mt-slate-500);
                padding: 0 0 6px !important;
                hyphens: none;
            }
        }
    }

    & .itil-timeline .timeline-content {
        font-size: 14px;
        line-height: 1.65;

        & .card-header { font-size: 18px; }
    }

    & .rich_text_container { font-size: 14px; line-height: 1.65; }
}

/* ======================================================================
 * 0.3.0 - passe 1 : barre du haut, menu, liste des tickets, ticket
 * (les classes mt-* sont ajoutées par js/moderntheme.js)
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    --tblr-body-bg: #f6f6f5;

    & body,
    & .page-wrapper { background: #f6f6f5; }

    /* Micro-interactions */
    & a, & .btn, & .nav-link, & .dropdown-item, & .form-control, & .form-select,
    & .card, & .mt-round-btn, & .badge_block {
        transition: background-color .15s ease, color .15s ease, border-color .15s ease,
            box-shadow .15s ease, transform .15s ease, opacity .15s ease;
    }

    & :focus-visible {
        outline: 2px solid rgba(var(--mt-accent-rgb), .55) !important;
        outline-offset: 2px;
    }

    /* ---------------- Menu latéral ---------------- */
    & aside.sidebar {
        & > .container-fluid { min-height: 100%; align-items: stretch; }

        & nav.navbar-collapse {
            flex-direction: column;
            align-items: stretch;
            flex: 1 1 auto;
        }

        & .mt-nav-title {
            list-style: none;
            padding: 18px 14px 6px;
            font-size: 11px;
            font-weight: 600;
            color: var(--mt-slate-400);
        }

        & .mt-user-slot {
            padding: 12px 12px 4px;

            & .user-menu { width: 100%; }
            & .nav-item { width: 100%; }

            & .user-menu-dropdown-toggle {
                display: flex !important;
                flex-direction: row-reverse;
                justify-content: flex-end;
                align-items: center;
                gap: 10px;
                width: 100%;
                padding: 8px 10px !important;
                border-radius: 12px;
                color: var(--mt-slate-900) !important;
                line-height: 1.25 !important;

                &::after { display: none; }
                &:hover { background: var(--mt-slate-100); }

                & > .pe-2 {
                    display: block !important;
                    padding: 0 !important;
                    min-width: 0;
                    font-size: 14px;
                    font-weight: 600;

                    & .small {
                        font-size: 12px;
                        font-weight: 400;
                        color: var(--mt-slate-500) !important;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        max-width: 150px;
                    }
                }

                & .avatar {
                    width: 36px;
                    height: 36px;
                    flex: 0 0 36px;
                    border-radius: 999px !important;
                    font-size: 13px;
                    font-weight: 600;
                }
            }

            /* Le menu du profil s'ouvre au-dessus, hors de la zone qui défile */
            & .user-menu > .nav-item > .dropdown-menu {
                position: fixed !important;
                left: 12px !important;
                right: auto !important;
                top: auto !important;
                bottom: 72px !important;
                transform: none !important;
                margin: 0 !important;
                min-width: 280px;
                max-height: calc(100vh - 100px);
                overflow-y: auto;
                z-index: 1060;
            }
        }
    }

    & body.navbar-collapsed aside.sidebar {
        & .mt-nav-title { display: none; }

        & .mt-user-slot {
            padding: 12px 0 4px;

            & .user-menu-dropdown-toggle {
                justify-content: center;
                padding: 6px 0 !important;

                & > .pe-2 { display: none !important; }
            }
        }
    }

    /* ---------------- Barre du haut ---------------- */
    & header.navbar .header-container {
        justify-content: center;
        gap: 16px;
    }

    & header.navbar .header-container > div:has(> form[role="search"]) {
        margin: 0 !important;

        & form[role="search"] { max-width: 640px; }
    }

    & .mt-top-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        padding-right: 8px;
    }

    & .mt-round-btn {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 999px;
        background: #efeeee;
        color: var(--mt-slate-700);
        font-size: 20px;
        text-decoration: none;

        &:hover { background: var(--mt-slate-200); color: var(--mt-slate-900); }
    }

    & .mt-round-btn-primary {
        background: var(--mt-accent);
        color: #fff;
        box-shadow: none;

        &:hover { background: var(--mt-accent-hover); color: #fff; transform: translateY(-1px); }
    }

    /* ---------------- En-tête de page ---------------- */
    & .mt-page-header {
        padding: 12px 0 20px;

        & .breadcrumb {
            margin: 0 0 4px;
            padding: 0;
            font-size: 13px;
            background: transparent;

            & .breadcrumb-item a { color: var(--mt-slate-500); text-decoration: none; }
            & .breadcrumb-item a:hover { color: var(--mt-accent); }
            & .breadcrumb-item a.here { color: var(--mt-slate-700); font-weight: 600; }
            & .breadcrumb-item .ti { font-size: 15px; }
        }
    }

    & .mt-page-header-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 16px;
        min-height: 44px;
    }

    & .mt-page-title {
        margin: 0;
        font-size: 30px;
        line-height: 1.2;
        font-weight: 600;
        letter-spacing: -.01em;
        color: var(--mt-slate-900);
    }

    /* Les fiches ont déjà leur propre titre */
    & .page-body:has(.card-tabs.vertical) .mt-page-title,
    & .page-body:has(.navigationheader) .mt-page-title { display: none; }

    & .page-body:has(.card-tabs.vertical) .mt-page-header,
    & .page-body:has(.navigationheader) .mt-page-header { padding-bottom: 8px; }

    & .mt-page-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 8px;
        margin: 0 0 0 auto !important;
        padding: 0 !important;
        border: 0 !important;

        & .nav-item { list-style: none; }

        & .btn {
            min-height: 40px;
            padding: 0 16px !important;
            margin: 0 !important;
            gap: 6px;
            font-size: 14px;
            border-radius: 10px;
        }

        & .btn .d-none { display: inline !important; }

        & .btn-ghost-secondary {
            background: #fff;
            box-shadow: var(--mt-shadow-sm);
            border: 1px solid #e8e7e6;
        }
    }

    /* ---------------- Liste des tickets (style « inbox ») ---------------- */
    & .search-card .search-header {
        padding: 12px 16px !important;
    }

    & .search-results {
        & > tbody > tr > td[data-searchopt-content-id="1"] a {
            font-weight: 600;
            color: var(--mt-slate-900);

            &:hover { color: var(--mt-accent); }
        }

        /* Statut en pastille colorée */
        & td > span.text-nowrap:has(> i.itilstatus) {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 12px 4px 8px;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.2;
            background: #efeeee;
            color: #4f4f4c;

            & i.itilstatus { font-size: 14px; margin: 0 !important; color: currentColor !important; }
        }

        & td > span:has(> i.itilstatus.new) { background: #d7ebe7; color: #3c3c3a; }
        & td > span:has(> i.itilstatus.assigned) { background: var(--mt-accent-soft); color: var(--mt-accent-strong); }
        & td > span:has(> i.itilstatus.planned) { background: #efeeee; color: #4f4f4c; }
        & td > span:has(> i.itilstatus.waiting) { background: #efeadc; color: #3c3c3a; }
        & td > span:has(> i.itilstatus.solved) { background: #d7ebe7; color: #3c3c3a; }
        & td > span:has(> i.itilstatus.closed) { background: #efeeee; color: #6b6b68; }

        /* Priorité en badge doux */
        & .badge_block {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 12px 3px 9px;
            border: 0 !important;
            border-radius: 999px;
            background: #f9f9f8;
            box-shadow: inset 0 0 0 1px #e8e7e6;
            font-size: 13px;
            font-weight: 600;
            color: var(--mt-slate-700);

            & > span {
                display: inline-block;
                width: 8px;
                height: 8px;
                border-radius: 999px;
                filter: saturate(4) brightness(.85);
            }
        }

        /* Demandeur / technicien avec avatar */
        & .mt-actor-cell {
            white-space: nowrap;

            & .dropdown_tooltip { opacity: 0; margin-left: 2px; }
        }

        & tr:hover .mt-actor-cell .dropdown_tooltip { opacity: .6; }
    }

    & .mt-avatar {
        display: inline-grid;
        place-items: center;
        width: 28px;
        height: 28px;
        margin-right: 8px;
        border-radius: 999px;
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .02em;
        vertical-align: middle;
    }

    /* Tuiles chiffrées au-dessus des listes : cartes blanches, accent coloré */
    & .dashboard.mini .grid-stack-item-content,
    & .dashboard.mini .card {
        border-radius: 14px !important;
    }

    & .dashboard-card > .card-body { padding: 0 !important; }

    /* ---------------- Fiches : onglets en pilules horizontales ---------------- */
    & .card-tabs.vertical {
        position: relative;
        flex-direction: column !important;
        gap: 16px;

        & > .nav-tabs.flex-md-column {
            display: flex !important;
            flex-direction: row !important;
            align-self: stretch;
            width: 100%;
            min-width: 0 !important;
            max-width: 100%;
            /* une seule ligne défilante, sans barre : flèches, fondus, molette,
               glisser et menu « Tous les onglets » (moderntheme.js) */
            position: relative;
            flex-wrap: nowrap;
            overflow-x: auto;
            overflow-y: hidden;
            scrollbar-width: none !important;
            scroll-behavior: smooth;
            gap: 4px;
            padding: 6px !important;
            border-radius: 14px;

            &::-webkit-scrollbar { display: none !important; }
            &.mt-tabs-ready { padding-right: 52px !important; }
            &.mt-tabs-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
            &.mt-tabs-dragging .nav-link { cursor: grabbing; }

            & > .nav-item { flex: 0 0 auto; }

            & .nav-link {
                white-space: nowrap;
                padding: 8px 14px !important;
                font-size: 14px !important;
                gap: 6px;
                margin: 0 !important;
            }
        }

        & > .tab-content { width: 100%; }
    }

    /* ---------------- Ticket : conversation + propriétés ---------------- */
    & .navigationheader {
        padding: 4px 0 8px;

        & .navigationheader-title {
            font-size: 24px;
            font-weight: 600;
            letter-spacing: -.01em;
            color: var(--mt-slate-900);
        }
    }

    & .card-tabs > .tab-content:has(.itil-object) {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    & .itil-object {
        & > .itil-left-side {
            padding-right: 24px !important;
        }

        & > .itil-right-side {
            background: #fff !important;
            border: 0 !important;
            border-radius: 16px !important;
            box-shadow: var(--mt-shadow);
            padding: 8px 4px !important;
        }
    }

    & .itil-timeline .timeline-content {
        max-width: 720px;
    }

    /* Barre de réponse : flottante et arrondie */
    & .itil-footer {
        margin: 16px 0 0 !important;
        border: 0 !important;
        border-radius: 16px;
        background: #fff !important;
        box-shadow: none;

        & .buttons-bar { padding: 10px 12px !important; }
        & .form-buttons { border: 0 !important; }
    }
}

/* ---- passe 1 : ajustements ---- */
:root[data-glpi-theme="auror"] {
    & .page-body { margin-top: 0 !important; padding-top: 12px !important; }

    /* Fiches : fil d'Ariane et actions sur une seule ligne */
    & .page-body:has(.card-tabs.vertical) .mt-page-header,
    & .page-body:has(.navigationheader) .mt-page-header {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 4px 0 12px;

        & > nav { flex: 1 1 auto; min-width: 0; }
        & .breadcrumb { margin: 0; font-size: 14px; }
        & .mt-page-header-row { flex: 0 0 auto; min-height: 0; }
    }

    /* Tuiles « grand nombre » : cartes blanches, accent de la couleur d'origine */
    & .grid-stack-item .card.big-number {
        --mt-accent: color-mix(in srgb, var(--mt-tile, #f8485e) 75%, #3c3c3a);

        background: #fff !important;
        color: var(--mt-slate-900) !important;
        border: 0 !important;
        border-left: 4px solid var(--mt-tile, #f8485e) !important;
        border-radius: 14px !important;
        box-shadow: var(--mt-shadow) !important;

        & .number, & .formatted-number { color: var(--mt-slate-900) !important; font-weight: 600; }
        & .label { color: var(--mt-slate-500) !important; font-weight: 500; }
        & i, & .main-icon { color: var(--mt-accent) !important; opacity: .9; }

        &:hover { transform: translateY(-2px); box-shadow: none !important; }
    }
}

/* ---- passe 1 : correctifs ---- */
:root[data-glpi-theme="auror"] {
    /* Le tableau défile horizontalement dans sa carte si nécessaire */
    & .search-card { overflow: visible; }
    & .search-card .table-responsive-lg {
        overflow-x: auto;
        border-radius: 0 0 var(--mt-radius-lg) var(--mt-radius-lg);
    }
    & .search-card .search-results > thead > tr > th { position: static !important; top: auto !important; }

    /* Tableaux de bord : les widgets ont une taille fixe, on garde leur échelle */
    /* Widgets : échelle d'origine de GLPI (hauteurs calculées pour ~14 px) */
    & .grid-stack-item .card {
        font-size: 14px !important;
        line-height: 1.4286;
    }

    & .grid-stack-item .card .main-label {
        font-size: 14px !important;
        font-weight: 600;
        color: var(--mt-slate-700);
    }

    & .grid-stack-item .card.big-number { padding-left: 12px !important; }

    & .mt-top-actions { padding-right: 24px; }
}

/* Barres de défilement discrètes : invisibles tant que la zone n'est pas survolée */
:root[data-glpi-theme="auror"] {
    & * {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }

    & *:hover {
        scrollbar-color: rgba(107, 107, 112, .35) transparent;
    }

    & *::-webkit-scrollbar { width: 6px !important; height: 6px !important; }
    & *::-webkit-scrollbar-track { background: transparent !important; }
    & *::-webkit-scrollbar-thumb { background: transparent !important; border-radius: 6px; }
    & *:hover::-webkit-scrollbar-thumb { background: rgba(107, 107, 112, .35) !important; }

    /* Le menu latéral reste sans barre du tout */
    & aside.sidebar,
    & aside.sidebar:hover { scrollbar-width: none !important; }
}

/* ======================================================================
 * 0.4.0 - Accueil et tableaux de bord
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    /* ---------------- En-tête d'accueil ---------------- */
    & .mt-title-box { display: flex; flex-direction: column; gap: 2px; }

    & .mt-page-subtitle {
        font-size: 14px;
        color: var(--mt-slate-500);
        font-weight: 500;
    }

    /* Vues (Tableau de bord, Vue personnelle...) en contrôle segmenté, à droite du titre */
    & .mt-page-header-row > .nav-tabs.mt-view-switch {
        margin-left: auto;
        display: inline-flex;
        flex-wrap: wrap;
        background: #e8e7e6;
        box-shadow: none;
        padding: 4px;
        border-radius: 12px;

        & .nav-link {
            padding: 7px 14px !important;
            font-size: 14px !important;

            & i { font-size: 16px; }
        }
    }

    /* Le conteneur d'onglets d'origine n'a plus de barre à afficher */
    & .card-tabs.horizontal:not(:has(> .nav-tabs)) { gap: 0; }

    & .card-tabs.horizontal > .tab-content {
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
    }

    /* Avertissements (mot de passe par défaut...) : bandeau doux */
    & .alert-warning,
    & .alert.alert-important.alert-warning {
        background: #efeadc !important;
        color: #3c3c3a !important;
        border: 0 !important;
        border-left: 4px solid #fcc354 !important;
        border-radius: 12px;
        box-shadow: var(--mt-shadow-sm);

        & a { color: #3c3c3a !important; font-weight: 600; }
        & .alert-icon, & > i, & .ti { color: #fcc354 !important; }
    }

    & .alert-info {
        background: var(--mt-slate-100) !important;
        color: var(--mt-slate-900) !important;
        border: 0 !important;
        border-radius: 12px;

        & .alert-icon, & > i, & .ti { color: var(--mt-slate-500) !important; }

        & .btn-info {
            background: #fff !important;
            color: var(--mt-slate-900) !important;
            border: 1px solid var(--mt-slate-200) !important;
            box-shadow: none;

            &:hover { border-color: var(--mt-accent) !important; color: var(--mt-accent-strong) !important; }
        }
    }

    /* ---------------- Bandeau du tableau de bord ---------------- */
    & .dashboard.mt-dash {
        padding-top: 0 !important;

        & > .mt-dash-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin: 0 4px 16px;
            padding: 10px 12px 10px 18px;
            background: #fff;
            border-radius: 16px;
            box-shadow: var(--mt-shadow);
        }

        & .mt-dash-bar .toolbar {
            position: static !important;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        & .mt-dash-bar-start .left-toolbar {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        & .change-dashboard { align-items: center; }

        /* Nom du tableau de bord en grand, avec le select natif par-dessus */
        & .mt-dash-picker {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin: 0;
            padding: 4px 10px 4px 2px;
            border-radius: 10px;
            cursor: pointer;

            &:hover { background: var(--mt-slate-100); }

            & .mt-dash-name {
                font-size: 20px;
                font-weight: 600;
                letter-spacing: -.01em;
                color: var(--mt-slate-900);
            }

            & .mt-dash-chevron { font-size: 18px; color: var(--mt-slate-500); }

            & select.dashboard_select {
                position: absolute;
                inset: 0;
                width: 100% !important;
                height: 100%;
                min-height: 0;
                opacity: 0;
                cursor: pointer;
                font-size: 16px;
            }
        }

        & .mt-dash-bar-start .edit-dashboard-properties .dashboard-name {
            min-height: 38px;
            font-size: 16px;
            font-weight: 600;
        }

        /* Actions : icônes rondes discrètes */
        & .mt-dash-action,
        & .mt-icon-btn {
            display: inline-grid !important;
            place-items: center;
            width: 38px;
            height: 38px;
            min-height: 38px;
            padding: 0 !important;
            margin: 0 !important;
            border-radius: 999px !important;
            border: 0 !important;
            background: transparent;
            color: var(--mt-slate-500) !important;
            font-size: 19px !important;
            cursor: pointer;

            &:hover { background: var(--mt-slate-100) !important; color: var(--mt-slate-900) !important; }
            &.active, &.btn-primary, &.btn-secondary { background: var(--mt-accent-soft) !important; color: var(--mt-accent) !important; }
        }

        /* Menu « … » */
        & .mt-dash-menu {
            min-width: 260px;
            padding: 6px;

            & .mt-dash-menu-item {
                display: flex !important;
                align-items: center;
                gap: 12px;
                width: 100%;
                height: auto;
                padding: 9px 12px !important;
                margin: 0 !important;
                border: 0 !important;
                border-radius: 8px !important;
                background: transparent;
                color: var(--mt-slate-700) !important;
                font-size: 18px !important;
                text-align: left;
                cursor: pointer;

                &::before { width: 20px; text-align: center; color: var(--mt-slate-500); }
                &:hover { background: var(--mt-slate-100) !important; color: var(--mt-slate-900) !important; }
                &.delete-dashboard { color: #c93246 !important; }
                &.delete-dashboard::before { color: #c93246; }
            }

            & .mt-dash-menu-label {
                font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
                font-size: 14px;
                font-weight: 500;
                font-style: normal;
            }
        }

        & .filters_toolbar { margin: 0 4px 12px !important; }
        & .placeholder_info { margin: 0 4px; }
    }

    /* ---------------- Widgets ---------------- */
    & .dashboard .grid-stack > .grid-stack-item > .grid-stack-item-content {
        inset: 8px !important;
    }

    & .dashboard .grid-stack-item .card {
        background: #fff !important;
        background-image: none !important;
        color: var(--mt-slate-900) !important;
        border: 0 !important;
        border-radius: 16px !important;
        box-shadow: none !important;
        padding: 12px 14px !important;
    }

    & .dashboard .grid-stack-item .card .main-label {
        font-size: 14px !important;
        font-weight: 600;
        color: var(--mt-slate-700) !important;
    }

    /* Tuiles KPI : grand chiffre, libellé gris, icône dans une pastille douce */
    & .dashboard .grid-stack-item .card.big-number {
        --mt-soft: color-mix(in srgb, var(--mt-tile, #f8485e) 22%, #fff);
        --mt-accent: color-mix(in srgb, var(--mt-tile, #f8485e) 60%, #4f4f4c);

        border-left: 0 !important;
        padding: 12px 14px 10px 16px !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 4px;

        /* Taille fixe et lisible (GLPI la recalcule sinon selon la place) */
        & .formatted-number { font-size: 16px !important; width: auto !important; }

        & .formatted-number .number,
        & .formatted-number .suffix {
            font-size: 26px !important;
            line-height: 1.1;
            font-weight: 600 !important;
            letter-spacing: -.01em;
            color: var(--mt-slate-900) !important;
        }

        & .label {
            padding-right: 36px;
            font-size: 13px !important;
            font-weight: 500;
            color: var(--mt-slate-500) !important;
            white-space: nowrap;
        }

        & .main-icon {
            top: auto !important;
            bottom: 10px !important;
            inset-inline-end: 10px !important;
            display: grid;
            place-items: center;
            width: 30px;
            height: 30px;
            border-radius: 9px;
            background: var(--mt-soft);
            color: var(--mt-accent) !important;
            font-size: 17px !important;
            opacity: 1;
        }
    }

    & .dashboard.mini .grid-stack-item .card.big-number {
        padding: 8px 10px 6px 12px !important;

        & .formatted-number .number,
        & .formatted-number .suffix { font-size: 22px !important; }

        & .main-icon { bottom: 6px !important; inset-inline-end: 6px !important; width: 26px; height: 26px; font-size: 15px !important; border-radius: 8px; }
        & .label { padding-right: 30px; font-size: 12px !important; }
    }

    /* Icône décorative des graphiques : discrète */
    & .dashboard .grid-stack-item .card:not(.big-number) .main-icon {
        font-size: 22px !important;
        color: var(--mt-slate-400) !important;
        opacity: .7;
        inset-inline-end: 12px !important;
        bottom: 10px !important;
    }

    /* Mode édition : contrôles de carte lisibles */
    & .dashboard .grid-stack-item .controls {
        z-index: 5;

        & i {
            background: #fff;
            border-radius: 999px;
            box-shadow: var(--mt-shadow-sm);
            padding: 4px;
        }
    }
}

/* Mode nuit des tableaux de bord : sans objet avec ce thème.
   Bouton masqué partout ; un tableau resté en mode nuit garde des cartes claires. */
:root[data-glpi-theme="auror"] .dashboard .night-mode { display: none !important; }

/* Tableau de bord posé dans une carte de page (ex. Assistance) : enveloppe transparente */
:root[data-glpi-theme="auror"] .page-body .card:has(.dashboard.mt-dash):not(.grid-stack-item .card) {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;

    & > .card-body { padding: 0 !important; }
}

/* Tuiles étroites (< 150 px, classe posée par le JS) : on retire la pastille pour
   laisser la place au libellé. Pas de container query: combinée aux
   backdrop-filter, elle fait planter WebKit (Safari) en mode mobile. */
:root[data-glpi-theme="auror"] .dashboard .card.big-number.mt-narrow {
    padding-right: 12px !important;

    & .main-icon { display: none !important; }
    & .label { padding-right: 0 !important; }
}

/* ======================================================================
 * 0.4.1 - Menu latéral : colonne flex pleine hauteur
 *   en-tête (logo + recherche) fixe / liste qui défile seule / profil en pied.
 *   En mode réduit, rien ne défile : les sous-menus flottants de GLPI
 *   (affichés au survol) doivent pouvoir déborder à droite du menu.
 * ====================================================================== */
@media (min-width: 992px) {
    :root[data-glpi-theme="auror"] {
        & aside.sidebar {
            height: 100vh;
            max-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden !important;
        }

        & aside.sidebar > .container-fluid {
            flex: 1 1 auto;
            min-height: 0;
            display: flex !important;
            flex-direction: column !important;
            flex-wrap: nowrap !important;
            align-items: stretch !important;
            padding-bottom: 8px;

            & > * { flex: none; }
        }

        & aside.sidebar #navbar-menu {
            flex: 1 1 auto !important;
            min-height: 0;
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            overflow: hidden;
        }

        & aside.sidebar #navbar-menu > ul.navbar-nav {
            flex: 1 1 auto;
            min-height: 0;
            flex-wrap: nowrap;
            overflow-x: hidden;
            overflow-y: auto;
            scrollbar-width: none;
            padding-top: 6px;
            padding-bottom: 8px;
            -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);

            &::-webkit-scrollbar { display: none; }
        }

        & aside.sidebar .mt-user-slot {
            flex: none;
            position: static !important;
            margin: 0 !important;
            background: #fff;
        }

        & aside.sidebar #navbar-menu > p {
            flex: none;
            margin: 2px 0 0;
        }

        /* Entrée de section active : pas de fond gris pleine largeur */
        & aside.sidebar .nav-item.active { background: transparent !important; }

        /* ---------------- Mode réduit ---------------- */
        & body.navbar-collapsed aside.sidebar,
        & body.navbar-collapsed aside.sidebar #navbar-menu,
        & body.navbar-collapsed aside.sidebar #navbar-menu > ul.navbar-nav {
            overflow: visible !important;
        }

        & body.navbar-collapsed aside.sidebar {
            & #navbar-menu > ul.navbar-nav { -webkit-mask-image: none; mask-image: none; }
            & .navbar-brand { margin-bottom: 8px !important; }

            & #navbar-menu > ul.navbar-nav { padding: 0 !important; gap: 4px; }

            & #navbar-menu .nav-item { position: relative; }

            & #navbar-menu .nav-item > .nav-link {
                width: 44px;
                height: 44px;
                margin: 0 auto;
                padding: 0 !important;
                justify-content: center;
                border-radius: 12px;

                & > i { margin: 0 !important; width: auto; font-size: 1.35rem; }
            }

            & #navbar-menu .nav-item:hover > .nav-link,
            & #navbar-menu .nav-item.active > .nav-link {
                background: var(--mt-accent-soft) !important;
                color: var(--mt-accent-strong) !important;

                & > i { color: var(--mt-accent) !important; }
            }

            /* Sous-menu flottant : carte blanche à droite du menu (navigation uniquement) */
            & #navbar-menu > ul .nav-item .nav-link + .dropdown-menu {
                left: calc(100% + 10px) !important;
                top: -8px !important;
                min-width: 250px;
                padding: 8px !important;
                margin: 0 !important;
                background: #fff !important;
                color: var(--mt-slate-900) !important;
                border: 1px solid #efeeee !important;
                border-radius: 14px !important;
                box-shadow: var(--mt-float) !important;

                /* Pont invisible : le survol ne se perd pas entre l'icône et le sous-menu */
                &::before {
                    content: "" !important;
                    position: absolute !important;
                    left: -14px !important;
                    top: 0 !important;
                    width: 14px !important;
                    height: 100% !important;
                    background: transparent !important;
                }

                & .dropdown-header {
                    display: block !important;
                    padding: 6px 10px 8px;
                    font-size: 11px;
                    font-weight: 600;
                    color: var(--mt-slate-400);
                }

                & .dropdown-menu-columns { display: flex; flex-direction: row; gap: 4px; }

                & .dropdown-item {
                    padding: 8px 12px !important;
                    font-size: 14px;
                    border-left: 0 !important;
                    border-radius: 8px;
                    color: var(--mt-slate-700);

                    &:hover { background: var(--mt-slate-100) !important; }
                    &::before { display: none !important; }
                }

                & .dropdown-item.active {
                    background: var(--mt-accent-soft) !important;
                    color: var(--mt-accent-strong) !important;
                }
            }

            & .mt-user-slot { padding: 8px 0 0; }
            & #navbar-menu > p .reduce-menu { margin: 0 auto !important; }
        }
    }
}

/* Tableaux de bord : toute la largeur, marges latérales de 24 px */
:root[data-glpi-theme="auror"] .page-body:has(.dashboard.mt-dash) {
    padding-left: 24px !important;
    padding-right: 24px !important;
    max-width: none !important;

    & .container, & .container-xl, & .container-lg, & .container-tight { max-width: none !important; }
    & .card-tabs.horizontal > .tab-content > .tab-pane > .col,
    & .card-tabs.horizontal .col:has(> .dashboard) { padding-left: 0 !important; padding-right: 0 !important; }
    & .dashboard.mt-dash > .mt-dash-bar,
    & .dashboard.mt-dash .placeholder_info,
    & .dashboard.mt-dash .filters_toolbar { margin-left: 8px !important; margin-right: 8px !important; }
}

:root[data-glpi-theme="auror"] .page-body .card:has(> .dashboard.mt-dash) {
    padding: 0 !important;
}

/* ======================================================================
 * 0.5.0 - Fiches « hero », liste des tickets, connexion
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    /* ---------------- En-tête « hero » des fiches ---------------- */
    & .main-header:has(.mt-hero) {
        margin: 0 0 4px !important;
        padding: 18px 20px !important;
        background: #fff;
        border: 0 !important;
        border-radius: 16px;
        box-shadow: var(--mt-shadow);
        align-items: center !important;
    }

    & .main-header > h3.card-title.mt-has-hero {
        padding: 0 !important;
        margin: 0;
        gap: 12px;
        flex-wrap: wrap;

        & > span.status:not(#header-is-deleted) { display: none !important; }

        & > #header-is-deleted {
            align-items: center;
            gap: 6px;
            padding: 4px 12px !important;
            border-radius: 999px !important;
            background: #fdecee !important;
            color: #c93246 !important;
            font-size: 13px !important;
            font-weight: 600;
        }
    }

    /* GLPI ne masque le badge « Supprimé » que via display:none : on le respecte */
    & .navigationheader:not(.asset-deleted) #header-is-deleted { display: none !important; }
    & .navigationheader.asset-deleted #header-is-deleted { display: inline-flex !important; }


    & .mt-hero {
        display: flex;
        align-items: center;
        gap: 16px;
        min-width: 0;
    }

    & .mt-hero-icon {
        flex: none;
        display: grid;
        place-items: center;
        width: 56px;
        height: 56px;
        border-radius: 16px;
        background: var(--mt-accent-soft);
        color: var(--mt-accent);
        font-size: 28px;
        box-shadow: inset 0 0 0 1px rgba(var(--mt-accent-rgb), .08);
    }

    & .mt-hero-text { min-width: 0; }

    & .mt-hero-meta {
        font-size: 13px;
        font-weight: 600;
        color: var(--mt-slate-500);
    }

    & .mt-hero-name {
        margin: 2px 0 0;
        font-size: 26px;
        line-height: 1.2;
        font-weight: 600;
        letter-spacing: -.01em;
        color: var(--mt-slate-900);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    & .mt-hero-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 12px 5px 10px;
        border-radius: 999px;
        background: #d7ebe7;
        color: #3c3c3a;
        font-size: 13px;
        font-weight: 600;

        &::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: currentColor;
        }

        &:empty, &.is-empty { display: none; }
    }

    & .main-header:has(.mt-hero) .btn-group .btn {
        border-radius: 10px;
        background: #fff;
        border: 1px solid #e4e3e1;
    }

    /* ---------------- Liste des tickets : tient dans la carte en 1440 px ---------------- */
    & .search-results > thead > tr > th {
        white-space: normal !important;
        vertical-align: bottom;
        line-height: 1.3;
        min-width: 64px;
    }

    & .search-results > tbody > tr > td[data-searchopt-content-id="1"] { min-width: 220px; }
}

/* ---------------- Connexion ---------------- */
:root[data-glpi-theme="auror"] body.welcome-anonymous {
    background: #fff;

    /* Panneau Red Poppy uni (charte Devoteam : ni dégradé ni motif) */
    &::before { background: #f8485e; }

    &::after {
        content: var(--mt-text-tagline);
        bottom: 12vh;
    }

    /*
     * Les deux cercles Devoteam : même couleur secondaire (Poppy Light),
     * tailles différentes, débordant toujours du bord de la page.
     */
    & .page-anonymous::before,
    & .page-anonymous::after {
        content: "";
        position: fixed;
        border-radius: 50%;
        background: #fca2ae;
        z-index: 1;
        pointer-events: none;
    }

    /* Grand cercle : déborde en bas du panneau */
    & .page-anonymous::before {
        width: 30vw;
        height: 30vw;
        left: 14vw;
        bottom: -17vw;
    }

    /* Petit cercle : déborde en haut */
    & .page-anonymous::after {
        width: 11vw;
        height: 11vw;
        left: 31vw;
        top: -5vw;
    }

    /* Formulaire : panneau blanc épuré, sans carte lourde */
    & .main-content-card {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;

        & h2 { font-size: 28px !important; line-height: 1.2; }

        & h2::after {
            content: var(--mt-text-welcome);
            display: block;
            margin-top: 8px;
            font-size: 15px;
            font-weight: 400;
            letter-spacing: 0;
            color: var(--mt-slate-500);
        }

        & .card-header.mb-4 { margin-bottom: 28px !important; }

        & .form-label { font-weight: 600; font-size: 14px; color: var(--mt-slate-700); }

        & .form-control,
        & .select2-selection {
            min-height: 48px !important;
            border-radius: 12px !important;
            background-color: #f9f9f8 !important;
            font-size: 15px;
        }

        & .form-control:focus { background-color: #fff !important; }

        & #login_name,
        & #login_password {
            padding-left: 44px;
            background-repeat: no-repeat !important;
            background-position: 14px 50% !important;
            background-size: 18px 18px !important;
        }

        & #login_name {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3C/svg%3E") !important;
        }

        & #login_password {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 1 1 8 0v4'/%3E%3C/svg%3E") !important;
        }

        & .btn-primary {
            min-height: 50px !important;
            border-radius: 12px !important;
            font-size: 16px !important;
            background: var(--mt-accent) !important;
            border: 0 !important;
            box-shadow: none !important;

            &:hover { transform: translateY(-1px); }
        }
    }

    & .page-anonymous .text-muted,
    & .page-anonymous a[href*="glpi-project"],
    & .page-anonymous .copyright { font-size: 12px; color: var(--mt-slate-400) !important; }

    @media (max-width: 991.98px) {
        & .page-anonymous::before,
        & .page-anonymous::after { display: none; }
    }
}

/* ======================================================================
 * 0.5.1 - En-tête de fiche / ticket : une seule carte
 *   - la carte englobe le titre (hero) ET la navigation (retour aux
 *     résultats, précédent, n/N, suivant), regroupée à droite ;
 *   - même largeur et même bord gauche que les onglets et le formulaire ;
 *   - contexte d'empilement propre (z-index 1010) au-dessus de la barre
 *     d'onglets de GLPI (position: relative; z-index: 1000), pour que le
 *     menu « Actions » passe devant.
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    & .navigationheader {
        position: relative;
        z-index: 1010;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-start !important;
        gap: 12px;
        margin: 0 0 16px !important;
        padding: 14px 16px 14px 20px !important;
        background: #fff;
        border-radius: 16px;
        box-shadow: var(--mt-shadow);
        min-height: 72px;
    }

    /* Titre : à gauche, prend toute la place disponible */
    & .navigationheader > .main-header,
    & .navigationheader > .navigationheader-title {
        order: 1 !important;
        flex: 1 1 auto !important;
        min-width: 0;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        align-self: center !important;
    }

    & .navigationheader > .navigationheader-title {
        justify-content: flex-start !important;
        text-align: left;
        font-size: 22px !important;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    & .navigationheader > .main-header > h3.card-title { flex: 1 1 auto; min-width: 0; }
    & .navigationheader > .main-header .btn-group { margin-left: 12px; flex: none; }

    /* Navigation regroupée à droite : [« ‹ ☰]  [n/N › »] */
    & .navigationheader > .pagination-left { order: 2 !important; }
    & .navigationheader > .pagination-right { order: 3 !important; }

    & .navigationheader > .pagination-left,
    & .navigationheader > .pagination-right {
        flex: none;
        display: flex !important;
        align-items: center;
        gap: 2px;
        padding: 3px;
        border-radius: 12px;
        background: var(--mt-slate-100);

        &:empty,
        &:not(:has(> :not(.bs-invisible, script))) { display: none !important; }

        /* GLPI garde la place des boutons inutiles (visibility: hidden) : on les retire */
        & > .bs-invisible { display: none !important; }

        & .btn {
            width: 32px;
            height: 32px;
            min-height: 32px;
            margin: 0 !important;
            padding: 0 !important;
            border: 0;
            border-radius: 9px;
            color: var(--mt-slate-500);
            background: transparent;

            & i { font-size: 18px !important; }

            &:hover { background: #fff; color: var(--mt-slate-900); box-shadow: var(--mt-shadow-sm); }
        }

        & > span {
            padding: 0 8px !important;
            font-size: 13px;
            font-weight: 600;
            color: var(--mt-slate-500);
            white-space: nowrap;
        }
    }

    /* Les menus déroulants de l'en-tête passent devant tout le contenu */
    & .navigationheader .dropdown-menu { z-index: 1020; }

    /* ---------------- Barre du haut : rien ne déborde à droite ---------------- */
    & header.navbar .header-container {
        padding-right: 20px !important;
        min-width: 0;
    }

    & header.navbar .header-container > div:has(> form[role="search"]) {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    & .mt-top-actions { flex: none; padding-right: 0; }
}

/* ======================================================================
 * 0.6.0 - Menu utilisateur (profil en bas du menu latéral) : vraie carte
 *   s'ouvre vers le haut, au-dessus du profil, hors de la colonne qui
 *   défile (position: fixed), au-dessus du menu et du contenu.
 * ====================================================================== */
:root[data-glpi-theme="auror"] aside.sidebar .mt-user-slot {
    & .user-menu > .nav-item > .dropdown-menu {
        position: fixed !important;
        left: 12px !important;
        right: auto !important;
        top: auto !important;
        bottom: 76px !important;
        transform: none !important;
        width: 280px;
        min-width: 260px;
        margin: 0 !important;
        padding: 6px !important;
        background: #fff !important;
        color: var(--mt-slate-900) !important;
        border: 1px solid #e8e7e6 !important;
        border-radius: 14px !important;
        box-shadow: var(--mt-float) !important;
        overflow: visible !important;
        z-index: 1080 !important;
    }

    & .dropdown-menu .dropdown-header {
        display: block !important;
        padding: 8px 12px 6px;
        font-size: 12px;
        font-weight: 600;
        color: var(--mt-slate-500);
    }

    & .dropdown-menu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 38px;
        padding: 8px 12px !important;
        border: 0 !important;
        border-radius: 8px !important;
        font-size: 14px;
        font-weight: 500;
        color: var(--mt-slate-700);
        background: transparent;
        white-space: normal;

        & > i, & > .ti { font-size: 18px; width: 20px; margin: 0 !important; color: var(--mt-slate-500); }

        &:hover, &:focus { background: var(--mt-slate-100) !important; color: var(--mt-slate-900); }
        &::before { display: none !important; }
    }

    & .dropdown-menu .dropdown-item.active {
        background: var(--mt-accent-soft) !important;
        color: var(--mt-accent-strong) !important;
    }

    & .dropdown-menu .dropdown-divider { margin: 6px 4px; border-color: #efeeee; }

    /* Sous-menus (changement de profil...) : cartes à droite */
    & .dropdown-menu .dropdown-menu {
        position: absolute !important;
        left: calc(100% + 6px) !important;
        right: auto !important;
        top: 0 !important;
        bottom: auto !important;
        transform: none !important;
        min-width: 220px;
        padding: 6px !important;
        background: #fff !important;
        border: 1px solid #e8e7e6 !important;
        border-radius: 12px !important;
        box-shadow: var(--mt-float) !important;
        z-index: 1081 !important;
    }
}

/* Menu réduit : la carte s'ouvre à droite de l'avatar */
:root[data-glpi-theme="auror"] body.navbar-collapsed aside.sidebar .mt-user-slot .user-menu > .nav-item > .dropdown-menu {
    left: 78px !important;
    bottom: 16px !important;
}

/* Le menu du profil n'obéit pas aux règles des sous-menus de navigation de GLPI
   en mode réduit (ouverture au survol, .show masqué) : clic uniquement */
:root[data-glpi-theme="auror"] body.navbar-collapsed aside.sidebar #navbar-menu .mt-user-slot .nav-item {
    &:hover .nav-link + .dropdown-menu:not(.show) { display: none !important; }
    & .nav-link + .dropdown-menu.show { display: block !important; }
}

:root[data-glpi-theme="auror"] aside.sidebar .mt-user-slot {
    & .user-menu-dropdown-toggle,
    & .user-menu-dropdown-toggle.show,
    & .user-menu-dropdown-toggle.active {
        border-left: 0 !important;
        box-shadow: none !important;
    }

    & .user-menu-dropdown-toggle.show { background: var(--mt-slate-100) !important; }

    & .nav-item.active,
    & .nav-item:has(> .show) { background: transparent !important; border-left: 0 !important; }

    & .dropdown-menu-arrow::before,
    & .dropdown-menu-arrow::after { display: none !important; }
}

/* ======================================================================
 * 0.6.0 - Pied des fiches : boutons seuls, sur une ligne, collant en bas
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    & .mt-hero-dates {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
        font-size: 13px;
        font-weight: 400;
        letter-spacing: 0;
        color: var(--mt-slate-500);

        & .ti { font-size: 15px; color: var(--mt-slate-400); }
    }

    /* Dates déplacées dans le hero : l'ancien pied disparaît */
    & .card-footer.mt-dates-moved { display: none !important; }

    /* Sans hero : une ligne méta discrète (secours) */
    & .card-tabs .tab-pane form > .card-footer.mx-n2:not(.mt-dates-moved) {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 16px;
        background: transparent !important;
        border-top: 1px solid #efeeee !important;
        font-size: 13px;
        color: var(--mt-slate-500);

        & > .row { display: contents; }
        & [class*="col-"] { flex: 0 0 auto; width: auto; max-width: none; padding: 0; }
    }

    /* Boutons : une ligne à droite, collée en bas de la fenêtre pour les longs formulaires */
    & .form-button-separator {
        position: sticky;
        bottom: 0;
        z-index: 5;
        display: flex !important;
        flex-direction: row-reverse !important;
        align-items: center !important;
        gap: 8px;
        margin-top: 8px !important;
        padding: 14px 20px !important;
        background: rgba(255, 255, 255, .96) !important;
        border-top: 1px solid #efeeee !important;
        border-radius: 0 0 var(--mt-radius) var(--mt-radius);

        & .btn { margin: 0 !important; }
    }

    /* Corbeille / suppression : bouton discret, rouge seulement au survol */
    & .form-button-separator .btn-outline-warning,
    & .form-button-separator .btn-outline-danger,
    & .form-button-separator .btn-warning,
    & .form-button-separator .btn-danger {
        background: transparent !important;
        border: 1px solid transparent !important;
        color: var(--mt-slate-500) !important;
        box-shadow: none !important;

        & .ti { color: inherit !important; }

        &:hover, &:focus-visible {
            background: #fdecee !important;
            border-color: #fca2ae !important;
            color: var(--tblr-danger, #c93246) !important;
        }
    }

    @media (max-width: 575.98px) {
        & .form-button-separator {
            flex-direction: column-reverse !important;
            align-items: stretch !important;

            & .btn { width: 100%; min-height: 44px; justify-content: center; }
        }
    }
}

/* ======================================================================
 * Groupes de boutons (btn-group) : un seul bloc
 *   Mes rayons/ombres par bouton écrasaient les coins carrés de Bootstrap :
 *   on rétablit sa logique (coins intérieurs à 0, aucun écart, pas
 *   d'ombre individuelle) pour tous les groupes du thème.
 * ====================================================================== */
:root[data-glpi-theme="auror"] .btn-group {
    border-radius: 10px;

    & > .btn { box-shadow: none !important; transform: none !important; margin-left: 0 !important; margin-right: 0 !important; }

    & > .btn:not(:last-child):not(.dropdown-toggle),
    & > .btn.dropdown-toggle-split:first-child,
    & > .btn-group:not(:last-child) > .btn {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    & > .btn:nth-child(n+3),
    & > :not(.btn-check) + .btn,
    & > .btn-group:not(:first-child) > .btn {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

    /* Séparateur fin entre deux parties pleines (ex. Répondre | ▾) */
    & > .btn-primary + .btn-primary {
        border-left: 1px solid rgba(255, 255, 255, .35) !important;
    }

    & > .btn-primary:hover { background: var(--mt-accent-hover) !important; border-color: var(--mt-accent-hover); }
}

/* Ombre unique portée par le groupe de la barre de réponse */
:root[data-glpi-theme="auror"] .itil-footer .main-actions {
    box-shadow: none;

    & > .btn { height: 42px; min-height: 42px; }
    & > .dropdown-toggle-split { padding: 0 12px !important; }
}

/* Menu des autres actions du ticket : entrées neutres, couleur en pastille d'icône */
:root[data-glpi-theme="auror"] .itil-footer .main-actions > .dropdown-menu {
    min-width: 240px;
    padding: 6px;

    & .dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px !important;
        border-radius: 8px;
        background: transparent !important;
        color: var(--mt-slate-700) !important;
        font-size: 14px;
        font-weight: 500 !important;

        &:hover, &:focus { background: var(--mt-slate-100) !important; color: var(--mt-slate-900) !important; }

        & > i {
            display: grid;
            place-items: center;
            width: 28px;
            height: 28px;
            margin: 0 !important;
            border-radius: 8px;
            font-size: 16px;
            background: var(--mt-slate-100);
            color: var(--mt-slate-500);
        }

        &.action-task > i { background: #efeadc; color: #3c3c3a; }
        &.action-solution > i { background: #d7ebe7; color: #3c3c3a; }
        &.action-document > i { background: #fdecee; color: #3c3c3a; }
        &.action-validation > i { background: #efeeee; color: #4f4f4c; }
    }
}

/* Sous-titre de connexion selon la langue de la page */
:root[data-glpi-theme="auror"] {
    --mt-text-tagline: "Your IT service desk,\A simple and modern.";
    --mt-text-ticket-solved: "Ticket solved";
    --mt-text-welcome: "Welcome back! Sign in to continue.";
}

:root[data-glpi-theme="auror"]:lang(fr) {
    --mt-text-tagline: "Votre centre de services IT,\A simple et moderne.";
    --mt-text-ticket-solved: "Ticket résolu";
    --mt-text-welcome: "Bon retour ! Connectez-vous pour continuer.";
}

/* ======================================================================
 * 0.6.0 - Cohérence Devoteam : plus de bleu
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    /* Bouton actif d'un groupe à bascule (ex. vue tableau / carte des listes) */
    & .btn-check:checked + .btn,
    & .btn-check:active + .btn,
    & .btn.active:not(.btn-primary) {
        background: var(--mt-accent-soft) !important;
        border-color: transparent !important;
        color: var(--mt-accent-strong) !important;
    }

    /* États vides (« Aucun résultat trouvé ») : discrets, centrés, sans fond */
    & .search-card .alert-info,
    & .search-display-data .alert-info,
    & .tab-pane .alert-info.mb-0,
    & .tab-pane .alert-info.rounded-0 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 36px 16px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        color: var(--mt-slate-500) !important;
        font-size: 14px;
        text-align: center;

        &::before {
            content: "";
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: var(--mt-slate-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center / 20px no-repeat;
        }

        & > i, & .ti, & .alert-icon { display: none !important; }
        & .alert-title, & h4 { font-size: 14px; font-weight: 500; color: var(--mt-slate-500) !important; margin: 0; }
    }

    /* Onglets horizontaux : pilules sans bordure, actif = accent doux */
    & .nav-tabs .nav-link { border-color: transparent !important; box-shadow: none; }
    & .card-tabs .nav-tabs .nav-link.active,
    & .mt-view-switch .nav-link.active {
        background: var(--mt-accent-soft) !important;
        color: var(--mt-accent-strong) !important;
        box-shadow: none !important;

        & i { color: var(--mt-accent) !important; }
    }
    & .mt-page-header-row > .nav-tabs.mt-view-switch { background: var(--mt-slate-100); }
}

/* Titres de section des onglets (« Carte SIM éléments », « Lignes téléphoniques »…) */
:root[data-glpi-theme="auror"] .tab-pane table.table > thead > tr:first-child > th:only-child {
    position: relative;
    padding: 6px 0 8px 14px !important;
    background: transparent !important;
    border-bottom: 1px solid var(--mt-slate-200) !important;
    color: var(--mt-slate-900) !important;
    font-size: 13px !important;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;

    &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 7px;
        bottom: 9px;
        width: 3px;
        border-radius: 3px;
        background: var(--mt-accent);
    }
}

/* État vide dans une cellule de tableau */
:root[data-glpi-theme="auror"] .tab-pane table td > .alert-info:only-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 28px 16px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--mt-slate-500) !important;
    font-size: 14px;

    &::before {
        content: "";
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: var(--mt-slate-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13h4l2 3h4l2-3h4'/%3E%3Cpath d='M4 13l2.5-7h11L20 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / 20px no-repeat;
    }
}

:root[data-glpi-theme="auror"] .tab-pane table.table:has(td > .alert-info:only-child) > tbody > tr > td { border: 0 !important; padding: 0 !important; }

/* ======================================================================
 * Formulaire ITIL (création / modification)
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    /* « Ticket sera ajouté à l'entité … » : ligne discrète */
    & .alert-info:has(> span > .glpi-badge) {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        margin: 0 0 12px;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--mt-slate-500) !important;
        font-size: 13px;

        &::before {
            content: "";
            width: 16px;
            height: 16px;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 9h1M14 9h1M9 13h1M14 13h1M9 17h1M14 17h1'/%3E%3C/svg%3E") center / contain no-repeat;
        }

        & > span { margin: 0 !important; }

        & .glpi-badge {
            display: inline-flex;
            padding: 2px 10px;
            border-radius: 999px;
            background: var(--mt-slate-100) !important;
            color: var(--mt-slate-700) !important;
            font-size: 12px;
            font-weight: 600;
        }
    }

    /* Zone de pièces jointes */
    & .fileupload.draghoverable {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 20px 16px !important;
        border: 1.5px dashed var(--mt-slate-200) !important;
        border-radius: 12px;
        background: var(--mt-slate-50) !important;
        text-align: center;
        transition: border-color .15s ease, background-color .15s ease;

        &::before {
            content: "";
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f8485e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3Cpath d='M7 9l5-5 5 5'/%3E%3Cpath d='M12 4v12'/%3E%3C/svg%3E") center / 18px no-repeat;
            box-shadow: var(--mt-shadow-sm);
        }

        &:hover, &.dragover, &.drag-over { border-color: var(--mt-accent) !important; background: var(--mt-accent-soft) !important; }

        /* « Fichier(s) (20 Mio maximum) » : discret */
        & > b {
            order: 3;
            font-size: 12px;
            font-weight: 400;
            color: var(--mt-slate-500);

            & a { color: var(--mt-slate-400) !important; }
        }

        & > br { display: none; }

        & > .b {
            font-size: 14px;
            font-weight: 500;
            color: var(--mt-slate-900);
        }

        /* Champ natif conservé : son bouton devient un lien d'accent, le texte « aucun fichier » est masqué */
        & > input[type="file"] {
            width: auto;
            max-width: 100%;
            min-height: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            color: transparent;
            font-size: 14px;
            cursor: pointer;

            &::file-selector-button,
            &::-webkit-file-upload-button {
                margin: 0;
                padding: 6px 14px;
                border: 1px solid var(--mt-slate-200);
                border-radius: 999px;
                background: #fff;
                color: var(--mt-accent-strong);
                font: inherit;
                font-weight: 600;
                cursor: pointer;
            }

            &:hover::file-selector-button,
            &:hover::-webkit-file-upload-button { border-color: var(--mt-accent); }
        }

        & .fileupload_info { order: 4; width: 100%; color: var(--mt-slate-700); }
    }

    /* Barre du bas : boutons à droite, élargir/replier le panneau groupés discrètement */
    & .itil-footer .buttons-bar {
        align-items: center;

        & > .timeline-buttons { flex: 1 1 auto !important; }
    }

    & .itil-footer .form-buttons {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        justify-content: flex-end !important;
        align-items: center;
        gap: 12px;
        margin: 0 !important;
        padding: 0 12px 0 0 !important;

        & > span:has(.switch-panel-width) {
            display: inline-flex !important;
            gap: 2px;
            margin: 0 !important;
            padding: 3px;
            border-radius: 10px;
            background: var(--mt-slate-100);

            & .btn {
                width: 32px;
                height: 32px;
                min-height: 32px;
                margin: 0 !important;
                border-radius: 8px;
                color: var(--mt-slate-500);

                &:hover { background: #fff; color: var(--mt-slate-900); }
            }
        }
    }
}

/* Panneau de propriétés : chevron explicite sur les en-têtes de section repliables */
:root[data-glpi-theme="auror"] #itil-data .accordion-header > .accordion-button {
    position: relative;
    padding-right: 40px !important;
    cursor: pointer;

    &::after {
        content: "" !important;
        position: absolute;
        right: 14px;
        top: 50%;
        width: 18px !important;
        height: 18px !important;
        margin: -9px 0 0 !important;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat !important;
        transform: rotate(0deg);
        transition: transform .15s ease;
        display: block !important;
    }

    &.collapsed::after { transform: rotate(-90deg); }

    &:hover { background: var(--mt-slate-50) !important; }
}

/* ======================================================================
 * 0.7.0 - Ticket : colonne de conversation
 *   Toutes les entrées à gauche, pleine largeur ; cartes blanches avec
 *   bordure gauche colorée selon le type ; en-tête sur une ligne.
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    --mt-type-content: var(--mt-accent);
    --mt-type-followup: #6b6b68;
    --mt-type-task: #fcc354;
    --mt-type-solution: #5ab891;
    --mt-type-document: #8a8a87;
    --mt-type-validation: #6b6b68;
    --mt-label-content: "Description";
    --mt-label-followup: "Follow-up";
    --mt-label-task: "Task";
    --mt-label-solution: "Solution";
    --mt-label-document: "Document";
    --mt-label-validation: "Approval";
}

:root[data-glpi-theme="auror"]:lang(fr) {
    --mt-label-followup: "Suivi";
    --mt-label-task: "Tâche";
    --mt-label-validation: "Validation";
}

:root[data-glpi-theme="auror"] .itil-timeline {
    position: relative;
    width: 100%;
    align-items: stretch !important;
    gap: 14px;

    /* Fine ligne de temps reliant les avatars */
    &::before {
        content: "";
        position: absolute;
        left: 15px;
        top: 16px;
        bottom: 16px;
        width: 2px;
        border-radius: 2px;
        background: #e8e7e6;
    }

    & > .timeline-item {
        --mt-type: var(--mt-type-followup);
        --mt-type-label: var(--mt-label-followup);

        position: relative;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;

        &.ITILContent { --mt-type: var(--mt-type-content); --mt-type-label: var(--mt-label-content); }
        &.ITILTask { --mt-type: var(--mt-type-task); --mt-type-label: var(--mt-label-task); }
        &.ITILSolution { --mt-type: var(--mt-type-solution); --mt-type-label: var(--mt-label-solution); }
        &.Document_Item { --mt-type: var(--mt-type-document); --mt-type-label: var(--mt-label-document); }
        &.ITILValidation { --mt-type: var(--mt-type-validation); --mt-type-label: var(--mt-label-validation); }

        & > .row {
            flex-wrap: nowrap;
            align-items: flex-start;
            gap: 12px;
            margin: 0;
        }

        /* Avatar à gauche, toujours (la description n'a pas la classe user-part) */
        & > .row > .col-auto:has(.avatar),
        & .user-part {
            order: 0 !important;
            flex: none;
            width: 32px;
            margin: 0 !important;
            padding: 0 !important;
            z-index: 1;

            & .avatar {
                width: 32px !important;
                height: 32px !important;
                border-radius: 999px !important;
                font-size: 12px;
                box-shadow: 0 0 0 3px var(--tblr-body-bg, #f6f6f5) !important;
            }
        }

        & .todo-list-state:not(:has(input)) { display: none !important; }

        & .content-part,
        & > .row > .col-12.col-sm {
            order: 1 !important;
            flex: 1 1 auto !important;
            width: auto !important;
            min-width: 0;
            max-width: none !important;
            padding: 0 !important;
        }

        & .timeline-content {
            width: 100%;
            max-width: none !important;
            margin: 0 !important;
            background: #fff !important;
            color: var(--mt-slate-900) !important;
            border: 1px solid #e4e3e1 !important;
            border-left: 3px solid var(--mt-type) !important;
            border-radius: 14px !important;
            box-shadow: none !important;

            &.accepted { background: #ebf5f3 !important; }

            & > .card-body { padding: 14px 18px !important; }
        }

        /* En-tête : nom · type · date, actions au survol */
        & .timeline-header {
            align-items: center;
            gap: 8px;
            margin: 0 0 8px;
            min-height: 28px;
        }

        & .creator .badge {
            display: flex !important;
            align-items: center;
            flex-wrap: wrap;
            gap: 0;
            padding: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            border: 0 !important;
            font-size: 0 !important;   /* masque « Créé : » et « par » */
            color: var(--mt-slate-500) !important;

            & i.ti { display: none !important; }

            & > span[id^="user_"] { order: 1; margin-right: 8px; font-size: 14px; font-weight: 600; }
            & > span[id^="user_"] a { color: var(--mt-slate-900) !important; text-decoration: none; }

            &::after {
                content: var(--mt-type-label);
                order: 2;
                margin-right: 8px;
                display: inline-flex;
                align-items: center;
                padding: 2px 9px 2px 20px;
                border-radius: 999px;
                background: var(--mt-slate-100) radial-gradient(circle at 10px 50%, var(--mt-type) 0 3.5px, transparent 4px);
                color: var(--mt-slate-700);
                font-size: 12px;
                font-weight: 600;
                line-height: 1.5;
            }

            & > span[data-bs-toggle] { order: 3; font-size: 13px; }
            & > span[data-bs-toggle] a { color: var(--mt-slate-500) !important; text-decoration: none; }
        }

        & .timeline-item-buttons {
            opacity: 0;
            transition: opacity .15s ease;
        }

        &:hover .timeline-item-buttons,
        & .timeline-item-buttons:focus-within { opacity: 1; }

        /* État de la tâche (case à cocher) intégré à l'en-tête */
        & .timeline-header > .todo-list-state {
            order: -1;
            padding: 0 !important;
            margin: 0 !important;

            & .form-check-input { margin: 0; width: 18px; height: 18px; cursor: pointer; }
        }

        /* Corps */
        & .rich_text_container,
        & .content {
            font-size: 15px;
            line-height: 1.6;
            color: var(--mt-slate-900);
        }

        &.ITILContent .card-title.card-header {
            margin: 0 0 6px !important;
            padding: 0 !important;
            border: 0 !important;
            background: none !important;
            font-size: 17px !important;
            font-weight: 600 !important;
            color: var(--mt-slate-900) !important;
        }

        /* Pied : puces méta discrètes */
        & .timeline-content .badge:not(.creator .badge) {
            background: var(--mt-slate-100) !important;
            color: var(--mt-slate-500) !important;
            border: 0 !important;
            border-radius: 999px;
            padding: 2px 9px;
            font-size: 12px;
            font-weight: 500;

            & i { color: var(--mt-slate-400) !important; }
            & a { color: inherit !important; }
        }
    }
}

@media (hover: none) {
    :root[data-glpi-theme="auror"] .itil-timeline .timeline-item-buttons { opacity: 1; }
}

/* Compositeur intégré en bas de la conversation (déclenche les vrais boutons GLPI) */
:root[data-glpi-theme="auror"] .mt-composer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px 44px;
    padding: 8px 8px 8px 14px;
    background: #fff;
    border: 1px solid #e4e3e1;
    border-radius: 14px;
    box-shadow: var(--mt-float);

    & .mt-composer-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 40px;
        padding: 0 12px;
        border: 0;
        border-radius: 10px;
        background: var(--mt-slate-50);
        color: var(--mt-slate-500);
        font-size: 15px;
        text-align: left;
        cursor: text;

        &:hover { background: var(--mt-slate-100); }
    }

    & .mt-composer-actions { display: flex; gap: 4px; flex: none; }

    & .mt-composer-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 36px;
        padding: 0 10px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: var(--mt-slate-700);
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;

        & i { font-size: 17px; }
        &:hover { background: var(--mt-slate-100); color: var(--mt-slate-900); }
        &.is-task i { color: var(--mt-type-task); }
        &.is-solution i { color: var(--mt-type-solution); }
        &.is-document i { color: var(--mt-type-document); }
        &.is-validation i { color: var(--mt-type-validation); }
    }
}

:root[data-glpi-theme="auror"] .itil-left-side.mt-composing .mt-composer { display: none; }

/* Boutons du compositeur : icônes seules (libellé en infobulle), le champ garde la place */
:root[data-glpi-theme="auror"] .mt-composer .mt-composer-btn {
    width: 36px;
    padding: 0;
    justify-content: center;

    & span { display: none; }
}

/* Vue ticket : hauteur ajustée à la fenêtre (variable posée par le JS),
   chaque colonne défile en interne, le compositeur reste en bas */
@media (min-width: 992px) {
    :root[data-glpi-theme="auror"] .itil-object.mt-fit {
        /* GLPI place les deux colonnes côte à côte via flex-direction: column
           + flex-wrap: wrap + hauteur fixe : on ne change que la hauteur */
        height: var(--mt-itil-h) !important;
        min-height: 260px;

        & > .itil-right-side { margin-top: 0 !important; }

        & > .itil-left-side,
        & > .itil-right-side {
            height: 100% !important;
            max-height: 100%;
            overflow-y: auto !important;
            overscroll-behavior: contain;
        }
    }
}

/* Formulaires de réponse (suivi, tâche, solution...) ouverts dans la conversation :
   même carte que les entrées, avatar à gauche */
:root[data-glpi-theme="auror"] .itil-left-side [id^="new-"][id$="-block"].timeline-item {
    --mt-type: var(--mt-type-followup);

    width: 100% !important;
    max-width: none !important;
    margin: 0 0 12px !important;

    &.ITILTask { --mt-type: var(--mt-type-task); }
    &.ITILSolution { --mt-type: var(--mt-type-solution); }
    &.Document_Item { --mt-type: var(--mt-type-document); }
    &.ITILValidation { --mt-type: var(--mt-type-validation); }

    & > .row { flex-wrap: nowrap; gap: 12px; margin: 0; align-items: flex-start; }
    & .todo-list-state:not(:has(input)) { display: none !important; }

    & .user-part {
        order: 0 !important;
        flex: none;
        width: 32px;
        padding: 0 !important;
        margin: 0 !important;

        & .avatar { width: 32px !important; height: 32px !important; border-radius: 999px !important; font-size: 12px; }
    }

    & .content-part { order: 1 !important; flex: 1 1 auto !important; min-width: 0; padding: 0 !important; }

    & .timeline-content {
        margin: 0 !important;
        background: #fff !important;
        color: var(--mt-slate-900) !important;
        border: 1px solid #e4e3e1 !important;
        border-left: 3px solid var(--mt-type) !important;
        border-radius: 14px !important;
        box-shadow: none !important;

        & > .card-body { padding: 14px 18px !important; }
        & .card-footer { background: var(--mt-slate-50) !important; border-top: 1px solid #efeeee !important; border-radius: 0 0 14px 14px; }
    }
}

/* ======================================================================
 * Mobile et tablette (< 992 px : menu en tiroir natif de GLPI)
 * ====================================================================== */
@media (max-width: 991.98px) {
    :root[data-glpi-theme="auror"] {
        /* Barre mobile : burger | logo | profil sur une ligne */
        & aside.sidebar > .container-fluid {
            flex-direction: row !important;
            flex-wrap: wrap !important;
            align-items: center !important;
            gap: 8px;
            padding: 8px 12px !important;
            min-height: 56px;
        }

        & aside.sidebar .navbar-toggler { order: 0; padding: 8px; border: 0; }

        & aside.sidebar .navbar-brand {
            order: 1;
            flex: 1 1 auto;
            margin: 0 !important;
            padding: 0 !important;
            text-align: left;

            & .glpi-logo { width: 132px !important; height: 38px !important; background-position: left center !important; }
        }

        & aside.sidebar .container-fluid > .d-lg-none { order: 2; }
        & aside.sidebar .container-fluid > span:has(> .trigger-fuzzy) { display: none !important; }

        & aside.sidebar #navbar-menu { order: 3; flex-basis: 100%; }
        & aside.sidebar .mt-user-slot { display: none; }
        & aside.sidebar .reduce-menu { display: none !important; }

        /* Barre du haut : recherche + bouton + */
        & header.navbar .header-container { padding: 0 12px !important; gap: 10px; }
        & header.navbar .header-container > div:has(> form[role="search"]) { display: flex !important; }
        & .mt-top-actions { padding: 0; }

        /* Contenu */
        & .page-body { padding: 8px 16px 32px !important; }
        & .mt-page-title { font-size: 24px; }
        & .mt-page-header-row { gap: 10px; }
        & .mt-page-actions { flex-wrap: wrap; margin-left: 0 !important; }

        /* Vues de l'accueil : GLPI affiche son sélecteur sur mobile */
        & .mt-page-header-row > .nav-tabs.mt-view-switch { display: none !important; }

        /* Bandeau du tableau de bord */
        & .dashboard.mt-dash > .mt-dash-bar { flex-wrap: wrap; padding: 8px 10px 8px 14px; }
        & .mt-dash-bar-start, & .mt-dash-bar-start .left-toolbar { min-width: 0; flex-wrap: wrap; }

        /* En-tête de fiche / ticket : titre puis navigation dessous */
        & .navigationheader {
            flex-wrap: wrap !important;
            padding: 12px 14px !important;
            gap: 8px;
        }
        & .navigationheader > .main-header,
        & .navigationheader > .navigationheader-title { flex-basis: 100% !important; }
        & .navigationheader > .navigationheader-title { white-space: normal; font-size: 19px !important; }
        & .navigationheader > .main-header { flex-wrap: wrap !important; gap: 10px; }
        & .navigationheader > .main-header .btn-group { margin-left: 0; }
        & .mt-hero-name { white-space: normal; font-size: 22px; }

        /* Listes : barre d'outils sur plusieurs lignes, tableau défilable dans sa carte */
        & .search-card .search-header { flex-wrap: wrap; min-width: 0; }
        & .search-card .search-controls { flex-wrap: wrap; gap: 4px; min-width: 0; }
        & .search-card, & .search-display-data, & .ajax-container { min-width: 0; max-width: 100%; }

        /* Barre du bas du ticket : sur plusieurs lignes si besoin */
        & .itil-footer .buttons-bar { flex-wrap: wrap; gap: 8px; }
        & .itil-footer .timeline-buttons,
        & .itil-footer .form-buttons { flex: 1 1 auto !important; width: auto !important; min-width: 0; flex-wrap: wrap !important; }
        & .mt-composer { margin-left: 0; }
    }
}

@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] {
        /* Actions de page : icônes seules */
        & .mt-page-actions .btn { padding: 0 12px !important; }
        & .mt-page-actions .btn > span { display: none !important; }

        /* Cibles tactiles */
        & .btn, & .form-control, & .form-select, & .select2-selection { min-height: 44px; }
        & .mt-round-btn { width: 44px; height: 44px; }
    }
}

/* ======================================================================
 * Conversation : avatar dans l'en-tête de carte, plus de colonne d'avatars
 * ni de ligne de temps ; cartes sur toute la largeur de la colonne.
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    & .itil-timeline::before { display: none !important; }

    & .itil-left-side .timeline-item {
        & > .row { gap: 0 !important; }
        & > .row > .mt-avatar-moved { display: none !important; }
    }

    & .mt-card-avatar {
        display: inline-flex;
        align-items: center;
        flex: none;
        margin-right: 10px;

        & a { display: inline-flex; }

        & .avatar {
            width: 30px !important;
            height: 30px !important;
            border-radius: 999px !important;
            font-size: 11px !important;
            box-shadow: none !important;
        }
    }

    /* En-tête : [avatar] nom · type · date … [fait] [actions] */
    & .itil-timeline .timeline-header {
        & > .mt-card-avatar { order: -2; }
        & > .creator { order: -1; min-width: 0; }
        & > .todo-list-state { order: 4 !important; margin-left: auto !important; }
        & > .timeline-item-buttons { order: 5; }
    }

    /* Formulaires ouverts : avatar à gauche du bouton fermer */
    & .itil-left-side [id^="new-"][id$="-block"] .card-body > .clearfix > .mt-card-avatar { float: left; }

    /* Compositeur : avatar de l'utilisateur courant */
    & .mt-composer { margin-left: 0 !important; }
    & .mt-composer .mt-composer-avatar { margin-right: 2px; }
}

/* Case « fait » de la tâche : à droite de l'en-tête (avant les actions) */
:root[data-glpi-theme="auror"] .itil-timeline > .timeline-item .timeline-header > .todo-list-state {
    order: 4 !important;
    margin-left: auto !important;
}

/* Formulaires de réponse dans une colonne étroite (panneau élargi) : éditeur et champs empilés */
:root[data-glpi-theme="auror"] .itil-left-side:is(.col-xl-5, .col-lg-6) [id^="new-"][id$="-block"] .row > .col-12.col-xl-7,
:root[data-glpi-theme="auror"] .itil-left-side:is(.col-xl-5, .col-lg-6) [id^="new-"][id$="-block"] .row > .col-12.col-xl-5 {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
}

:root[data-glpi-theme="auror"] .itil-left-side:is(.col-xl-5, .col-lg-6) [id^="new-"][id$="-block"] .row > .col-12.col-xl-5 {
    order: 2 !important;
    margin-top: 12px;
}

:root[data-glpi-theme="auror"] .itil-timeline > .timeline-item .timeline-header:has(> .todo-list-state) > .timeline-item-buttons {
    margin-left: 8px !important;
    flex: none;
}

@media (max-width: 991.98px) {
    :root[data-glpi-theme="auror"] {
        & .page-body .mt-page-header { flex-wrap: wrap !important; }
        & .page-body .mt-page-header > nav { flex-basis: 100%; }

        /* Bandeaux d'information : le texte et les boutons passent à la ligne */
        & .alert { overflow-wrap: anywhere; }
        & .alert .d-flex { min-width: 0; flex-wrap: wrap; }
        & .alert .btn { white-space: normal; height: auto; text-align: left; }
    }
}

@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] .page-body .mt-page-actions .btn .d-none,
    :root[data-glpi-theme="auror"] .page-body .mt-page-actions .btn > span {
        display: none !important;
    }
}

/* Entrée de menu en doublon avec le bouton « + » de la barre du haut */
:root[data-glpi-theme="auror"] aside.sidebar #navbar-menu .dropdown-item.mt-dup-hidden { display: none !important; }

/* « Chercher dans le menu » : aspect de champ de recherche (déplié), loupe centrée (réduit) */
:root[data-glpi-theme="auror"] aside.sidebar .trigger-fuzzy {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    height: 40px;
    padding: 0 8px 0 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--mt-slate-100) !important;
    color: var(--mt-slate-500) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-align: left;

    & > i { margin: 0 !important; font-size: 17px; color: var(--mt-slate-400); }
    & .menu-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    & .mt-kbd {
        flex: none;
        padding: 2px 6px;
        border: 1px solid var(--mt-slate-200);
        border-radius: 6px;
        background: #fff;
        box-shadow: none;
        color: var(--mt-slate-500);
        font-family: inherit;
        font-size: 11px;
        font-weight: 600;
    }

    &:hover { background: #e8e7e6 !important; color: var(--mt-slate-700) !important; }
}

:root[data-glpi-theme="auror"] body.navbar-collapsed aside.sidebar .trigger-fuzzy {
    justify-content: center !important;   /* GLPI pose justify-content-start (!important) */
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    gap: 0 !important;

    & .menu-label, & .mt-kbd { display: none !important; }
    & > i { font-size: 19px; }
}

/* ======================================================================
 * 0.8.0 - Tableaux de bord du plugin (accueil-modern, assistance-modern)
 *   Disposés sur 24 colonnes logiques ; GridStack de GLPI en a 26 : on étire
 *   la largeur de colonne à 100 % / 24 pour que chaque rangée remplisse
 *   exactement la largeur (rangées de 4 cartes identiques).
 *   En mode édition, la grille d'origine (26) est rétablie pour que le
 *   glisser-déposer de GridStack reste exact.
 *   Sous le point de rupture de GridStack (une seule colonne, .gs-1), la
 *   grille d'origine s'applique : sinon chaque carte ferait 1/24 de large.
 * ====================================================================== */
:root[data-glpi-theme="auror"] .dashboard.mt-grid24:not(.edit-mode) .grid-stack:not(.gs-1) {
    --gs-column-width: calc(100% / 24) !important;
}

:root[data-glpi-theme="auror"] .dashboard.mt-grid24 {
    /* KPI : grand chiffre centré, libellé centré dessous, sans icône */
    & .grid-stack-item .card.big-number {
        align-items: center;
        justify-content: center !important;
        gap: 2px;
        padding: 10px 14px !important;
        text-align: center;

        & .content, & .formatted-number { justify-content: center; width: 100% !important; }

        & .formatted-number .number,
        & .formatted-number .suffix { font-size: 34px !important; line-height: 1.05; }

        & .label {
            width: 100% !important;
            padding: 0 !important;
            text-align: center;
            font-size: 13px !important;
        }

        & .main-icon { display: none !important; }
    }

    /* Graphiques : titre centré en haut avec soulignement d'accent, graphique centré dessous */
    & .grid-stack-item .card.g-chart {
        display: flex !important;
        flex-direction: column;
        padding: 14px 12px 10px !important;

        & > .main-label {
            order: -1;
            position: static !important;
            display: block;
            margin: 0 auto 12px;
            padding-bottom: 8px;
            text-align: center;
            font-size: 14px !important;
            font-weight: 600 !important;
            color: var(--mt-slate-900) !important;
            background: linear-gradient(var(--mt-accent), var(--mt-accent)) center bottom / 40px 2px no-repeat;
        }

        & > .chart { flex: 1 1 auto; min-height: 0; width: 100% !important; }
        & > .main-icon { display: none !important; }
    }
}

/* ======================================================================
 * 0.9.0 - Planning (FullCalendar v4)
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    /* Onglet unique au-dessus d'un contenu : inutile */
    & .card-tabs.horizontal > .nav-tabs:has(> li:only-child) { display: none !important; }

    & #planning_container {
        gap: 20px;
        align-items: flex-start;
    }

    /* ---------------- Panneau de filtres ---------------- */
    & #planning_filter {
        flex: 0 0 300px;
        max-width: 300px;
        min-width: 0;

        & #planning_filter_content { width: auto !important; max-width: 100%; }
        padding: 14px 12px !important;
        background: #fff;
        border-radius: 14px;
        box-shadow: var(--mt-shadow);
        border: 0 !important;

        & h3 {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 4px 4px 8px !important;
            padding: 0 !important;
            background: transparent !important;
            border: 0 !important;
            color: var(--mt-slate-500) !important;
            font-size: 12px !important;
            font-weight: 600 !important;

            & a, & i { color: var(--mt-slate-400) !important; }
        }

        & ul.filters { margin: 0 0 14px; padding: 0; width: 100%; max-width: 100%; }
        & ul.filters > li { max-width: 100%; box-sizing: border-box; }
        & ul.filters > li > span.ms-auto { flex: none; }

        & ul.filters > li {
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 34px;
            padding: 2px 6px !important;
            border-radius: 8px;

            &:hover { background: var(--mt-slate-50); }

            & .form-check-input { flex: none; width: 16px; height: 16px; margin: 0 !important; border-radius: 5px; }

            & label {
                flex: 1 1 auto;
                min-width: 0;
                margin: 0 !important;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                font-size: 14px !important;
                font-weight: 500 !important;
                color: var(--mt-slate-700) !important;
            }
        }

        /* Pastilles de couleur : petits ronds */
        & .color_input input[type="color"] {
            -webkit-appearance: none;
            appearance: none;
            width: 12px !important;
            height: 12px !important;
            min-height: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            border-radius: 999px !important;
            background: none;
            cursor: pointer;
            box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e4e3e1;

            &::-webkit-color-swatch-wrapper { padding: 0; }
            &::-webkit-color-swatch { border: 0; border-radius: 999px; }
            &::-moz-color-swatch { border: 0; border-radius: 999px; }
        }

        & #planning_filter_toggle .toggle { color: var(--mt-slate-400); }
    }

    /* ---------------- Calendrier dans une carte ---------------- */
    & .planning-view.fc {
        min-width: 0;
        padding: 16px 18px 18px;
        background: #fff;
        border-radius: 14px;
        box-shadow: var(--mt-shadow);
    }

    /* Barre d'outils */
    & .fc .fc-toolbar.fc-header-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;

        & > div { display: flex; align-items: center; gap: 8px; margin: 0 !important; float: none !important; }
        /* Ligne 1 : titre de période ; ligne 2 : navigation à gauche, vues à droite */
        & .fc-center { order: -1; flex: 1 1 100%; justify-content: flex-start; gap: 6px; }
        & .fc-left { flex: none; }
        & .fc-right { margin-left: auto !important; }
        & .fc-center #refresh_planning,
        & .fc-center #planning_datepicker { position: static !important; margin: 0 !important; }
        & .fc-clear { display: none; }

        & .fc-center h2 {
            margin: 0 4px 0 0;
            font-size: 22px;
            font-weight: 600;
            letter-spacing: -.01em;
            color: var(--mt-slate-900);
        }

        & .fc-center .ti {
            display: inline-grid;
            place-items: center;
            width: 32px;
            height: 32px;
            border-radius: 9px;
            color: var(--mt-slate-500);
            font-size: 18px;

            &:hover { background: var(--mt-slate-100); color: var(--mt-slate-900); }
        }
    }

    & #planning_container .planning-view .fc-button.fc-button-primary,
    & .fc .fc-button {
        height: 36px;
        min-height: 36px;
        padding: 0 12px;
        border: 1px solid #e4e3e1 !important;
        border-radius: 10px !important;
        background: #fff !important;
        color: var(--mt-slate-700) !important;
        font-size: 14px;
        font-weight: 500;
        text-transform: none;
        box-shadow: none !important;
        opacity: 1;

        &:hover { background: var(--mt-slate-50) !important; color: var(--mt-slate-900) !important; }
        &:disabled { opacity: .55; }
        &:focus-visible { outline: 2px solid rgba(var(--mt-accent-rgb), .55) !important; }
    }

    /* < > en un bloc, « Aujourd'hui » séparé */
    & #planning_container .planning-view .fc-left .fc-button-group,
    & .fc .fc-left .fc-button-group {
        display: flex;
        gap: 0;

        & .fc-prev-button { border-radius: 10px 0 0 10px !important; width: 36px; padding: 0; }
        & .fc-next-button { border-radius: 0 10px 10px 0 !important; width: 36px; padding: 0; margin-left: -1px !important; }
        & .fc-today-button { margin-left: 8px !important; border-radius: 10px !important; }
    }

    /* Vues : contrôle segmenté */
    & #planning_container .planning-view .fc-right,
    & .fc .fc-right {
        gap: 2px !important;
        padding: 3px;
        border-radius: 12px;
        background: var(--mt-slate-100);

        & .fc-button {
            height: 32px;
            min-height: 32px;
            margin: 0 !important;
            border: 0 !important;
            border-radius: 9px !important;
            background: transparent !important;
            color: var(--mt-slate-500) !important;

            &:hover { color: var(--mt-slate-900) !important; }
        }

        & .fc-button.fc-button-active,
        & .fc-button.fc-button-primary:not(:disabled).fc-button-active {
            background: #fff !important;
            color: var(--mt-accent-strong) !important;
            font-weight: 600;
            box-shadow: none !important;
        }
    }

    /* Quadrillage très léger, en-têtes de jours discrets */
    & .fc-unthemed th,
    & .fc-unthemed td,
    & .fc-unthemed thead,
    & .fc-unthemed tbody,
    & .fc-unthemed .fc-divider,
    & .fc-unthemed .fc-row,
    & .fc-unthemed .fc-content,
    & .fc-unthemed .fc-popover,
    & .fc-unthemed .fc-list-view,
    & .fc-unthemed .fc-list-heading td {
        border-color: #efeeee !important;
    }

    & .fc .fc-day-header,
    & .fc .fc-widget-header th {
        padding: 8px 4px !important;
        color: var(--mt-slate-500);
        font-size: 13px;
        font-weight: 600;
    }

    & .fc .fc-axis,
    & .fc .fc-time { color: var(--mt-slate-400); font-size: 12px; }

    /* Jour courant */
    & .fc-unthemed td.fc-today,
    & .fc .fc-bg td.fc-today { background: #fdecee !important; }

    & .fc .fc-day-header.fc-today > *,
    & .fc .fc-day-header.fc-today > a > span,
    & .fc .fc-day-top.fc-today .fc-day-number {
        display: inline-block;
        padding: 2px 9px;
        border-radius: 999px;
        background: var(--mt-accent);
        color: #fff !important;
    }

    & .fc .fc-now-indicator { border-color: var(--mt-accent) !important; }
    & .fc .fc-now-indicator-arrow { border-top-color: transparent !important; border-bottom-color: transparent !important; border-left-color: var(--mt-accent) !important; }

    /* Événements : cartes arrondies, bordure gauche de la couleur du type */
    & .fc .fc-event,
    & .fc .fc-event-dot ~ * {
        border-width: 0 0 0 3px !important;
        border-style: solid !important;
        border-radius: 6px !important;
        background-image: linear-gradient(rgba(255, 255, 255, .72), rgba(255, 255, 255, .72)) !important;
        color: var(--mt-slate-900) !important;
        box-shadow: none;
        font-size: 12px;
        line-height: 1.35;
        overflow: hidden;

        & .fc-time { color: var(--mt-slate-500); font-weight: 600; }
        & .fc-title, & .content { color: var(--mt-slate-900) !important; }
    }

    & .fc .fc-list-item:hover td { background: var(--mt-slate-50) !important; }
    & .fc .fc-list-heading td { background: var(--mt-slate-50) !important; color: var(--mt-slate-700); font-weight: 600; }

    @media (max-width: 991.98px) {
        & #planning_container { flex-direction: column; }
        & #planning_filter { flex: none; max-width: none; width: 100%; }
        & .fc .fc-toolbar.fc-header-toolbar .fc-center { order: -1; flex-basis: 100%; justify-content: flex-start; }
    }
}

/* Planning : lignes de filtres contenues dans la carte ; pastilles et « … » alignés en colonne */
:root[data-glpi-theme="auror"] #planning_filter {
    & #planning_filter_content,
    & #planning_filter_content > div,
    & ul.filters,
    & ul.filters > li { width: auto !important; max-width: 100% !important; box-sizing: border-box; }

    & ul.filters > li > .actor_icon { flex: none; margin: 0 !important; padding: 0 !important; color: var(--mt-slate-400); }

    & ul.filters > li > span.ms-auto {
        flex: none;
        width: 44px;
        justify-content: flex-start;
        gap: 4px;
    }

    & .filter_option {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        color: var(--mt-slate-500);

        &:hover { background: var(--mt-slate-100); }
        & > .ti { font-size: 16px; }
        & > .dropdown-menu { z-index: 1080; }
    }
}

:root[data-glpi-theme="auror"] #planning_filter #planning_filter_content { min-width: 0 !important; }

/* ======================================================================
 * Kanban (tickets, global, projets) façon Jira
 *   Colonnes de largeur fixe sur fond gris, défilement horizontal du
 *   tableau (barre fine, fondus de bord posés par le JS), défilement
 *   vertical propre à chaque colonne, cartes compactes.
 *   Le glisser-déposer (jQuery sortable de GLPI) n'est pas modifié.
 * ====================================================================== */
.mt-kb-meta[hidden] { display: none !important; }

:root[data-glpi-theme="auror"] .kanban {
    --mt-kb-col-w: 288px;
    --mt-kb-col-bg: #efeeee;
    --mt-kb-gap: 12px;
    --mt-kb-muted: #6b6b68;
    --toolbar-margin: 12px;
    --toolbar-padding: 0px;

    /* ---- Barre du haut ---- */
    & .kanban-toolbar {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 0 !important;
        margin-bottom: 12px !important;
        box-shadow: none !important;

        & > *, & .btn { margin: 0 !important; }

        & select[name="kanban-board-switcher"] {
            appearance: none !important;
            height: 36px;
            min-width: 120px;
            padding: 0 32px 0 12px;
            font-size: 14px;
            font-weight: 500;
            color: var(--mt-slate-900, #3c3c3a);
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
            border: 1px solid var(--mt-border, #e4e3e1);
            border-radius: 8px;
            cursor: pointer;
        }

        & .search-input {
            flex: 0 1 340px;
            min-width: 200px;
            height: 36px !important;
            min-height: 36px;
            padding: 0 12px 0 36px !important;
            align-items: center;
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9aa0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M14 14l-3.5-3.5'/%3E%3C/svg%3E") 12px center / 16px no-repeat !important;
            border: 1px solid var(--mt-border, #e4e3e1) !important;
            border-radius: 8px !important;
            font-size: 14px;
            overflow: hidden !important;

            &:focus-within {
                border-color: var(--mt-accent) !important;
                box-shadow: 0 0 0 3px var(--mt-accent-soft) !important;
            }

            & .search-input-tag-input {
                min-width: 60px;
                outline: none;
                white-space: nowrap;
            }

            & .search-input-tag-input:empty::before {
                content: attr(data-mt-placeholder);
                color: #8a8a87;
                pointer-events: none;
            }
        }

        /* « Ajouter une colonne » et « … » poussés à droite */
        & > .dropdown:has(.kanban-add-column) { margin-left: auto !important; }

        /* filtre « Epic » (ajouté par le plugin) */
        & select.mt-kb-epic-filter {
            appearance: none;
            height: 36px;
            max-width: 240px;
            padding: 0 32px 0 34px;
            font-size: 14px;
            color: var(--mt-slate-900, #3c3c3a);
            text-overflow: ellipsis;
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 1.5L3 9h5l-1 5.5L13 7H8z'/%3E%3C/svg%3E") 12px center / 15px no-repeat;
            border: 1px solid var(--mt-border, #e4e3e1);
            border-radius: 8px;
            cursor: pointer;

            &.is-active {
                color: var(--mt-accent-strong);
                background-color: var(--mt-accent-soft);
                border-color: rgba(248, 72, 94, .35);
            }
        }

        & .kanban-add-column,
        & .kanban-extra-toolbar-options {
            height: 36px;
            border-radius: 8px !important;
            font-size: 14px;
            font-weight: 500;
        }
    }

    /* ---- Zone défilante ---- */
    & .kanban-container {
        overflow: hidden !important;
        height: var(--mt-kb-h, calc(100vh - 220px)) !important;
        display: flex;
        flex-direction: column;
    }

    & .kanban-columns {
        flex: 1 1 auto;
        height: auto !important;
        min-height: 0;
        gap: var(--mt-kb-gap);
        align-items: stretch;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-bottom: 10px;
        scroll-snap-type: x proximity;
        scroll-behavior: smooth;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
        --mt-kb-fade-l: 0px;
        --mt-kb-fade-r: 0px;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--mt-kb-fade-l), #000 calc(100% - var(--mt-kb-fade-r)), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 var(--mt-kb-fade-l), #000 calc(100% - var(--mt-kb-fade-r)), transparent 100%);

        &:hover { scrollbar-color: #cfcecd transparent; }
        &.mt-kb-more-left { --mt-kb-fade-l: 40px; }
        &.mt-kb-more-right { --mt-kb-fade-r: 56px; }

        &::-webkit-scrollbar { height: 8px; }
        &::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
        &:hover::-webkit-scrollbar-thumb { background: #cfcecd; }
    }

    /* ---- Colonnes ---- */
    & .kanban-column {
        flex: 0 0 var(--mt-kb-col-w);
        width: var(--mt-kb-col-w) !important;
        min-width: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column;
        text-align: left;
        background: var(--mt-kb-col-bg);
        border-radius: 12px;
        scroll-snap-align: start;
        overflow: hidden;
    }

    & .kanban-column[data-drop-only="true"] .kanban-body {
        padding: 6px 14px 12px !important;
        font-size: 13px;
        line-height: 1.45;
        color: var(--mt-kb-muted) !important;
        background: transparent !important;
    }

    & .kanban-column-header {
        position: sticky;
        top: 0;
        z-index: 2;
        flex: 0 0 auto;
        margin: 0 !important;
        background: var(--mt-kb-col-bg);
        box-shadow: none !important;

        & .kanban-column-header-content {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 6px;
            min-height: 44px;
            padding: 8px 8px 6px 10px !important;
        }

        & .content-left {
            flex: 1 1 auto;
            min-width: 0;
            gap: 6px;
        }

        & .kanban-collapse-column {
            flex: 0 0 auto;
            font-size: 12px;
            color: #8a8a87;
            transition: color .15s;
            &:hover { color: var(--mt-kb-muted); }
        }

        & .kanban-column-title {
            display: inline-flex !important;
            align-items: center;
            gap: 8px;
            min-width: 0;
            margin: 0 !important;
            padding: 0 !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            letter-spacing: 0;
            line-height: 1.3;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: var(--mt-kb-muted) !important;
            background: none !important;
            border: 0 !important;
            border-radius: 0 !important;

            /* pastille de statut (couleur d'origine du statut) */
            & > span:first-child {
                flex: 0 0 8px;
                width: 8px !important;
                height: 8px !important;
                min-width: 8px;
                margin: 0 !important;
                padding: 0 !important;
                border-radius: 50%;
                font-size: 0;
            }

            & > span:first-child::before { display: none !important; }
        }

        & .kanban_nb {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 18px;
            margin: 0 !important;
            padding: 0 6px !important;
            font-size: 11px !important;
            font-weight: 600;
            line-height: 1;
            color: #4f4f4c !important;
            background: #e4e3e1 !important;
            border: 0 !important;
            border-radius: 9px !important;
        }

        & .content-right { flex: 0 0 auto; }

        & .kanban-column-toolbar {
            display: flex !important;
            flex-direction: row !important;
            align-items: center;
            gap: 2px;
            margin: 0 !important;
            opacity: 0;
            transition: opacity .15s;

            & .dropdown { display: inline-flex !important; }

            & button {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 26px;
                height: 26px;
                padding: 0;
                font-size: 16px;
                color: var(--mt-kb-muted) !important;
                border-radius: 6px;
                &:hover, &[aria-expanded="true"] { background: #e4e3e1 !important; color: var(--mt-slate-900, #3c3c3a) !important; }
            }
        }
    }

    & .kanban-column:hover .kanban-column-toolbar,
    & .kanban-column:focus-within .kanban-column-toolbar,
    & .kanban-column-toolbar:has([aria-expanded="true"]) { opacity: 1; }

    & .kanban-body {
        flex: 1 1 auto;
        height: auto !important;
        min-height: 60px !important;
        margin: 0;
        padding: 2px 8px 8px !important;
        overflow-y: auto !important;
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
        &:hover { scrollbar-color: #cfcecd transparent; }
    }

    /* ---- Cartes ---- */
    & .kanban-body > .kanban-item,
    & .kanban-body > .kanban-form,
    & .mt-epics-body > .mt-epic-card {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 8px;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 0 8px !important;
        padding: 12px !important;
        background: #fff;
        border: 1px solid rgba(60, 60, 58, .04) !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        cursor: grab;
        transition: box-shadow .15s, border-color .15s;

        &:hover {
            border-color: rgba(60, 60, 58, .08) !important;
            box-shadow: none !important;
        }

        &.filtered-out { display: none !important; }
    }

    & .kanban-body > .kanban-form { display: flex !important; cursor: default; }

    & .kanban-item {
        & > .kanban-item-header {
            grid-column: 1 / -1;
            align-items: flex-start;
            gap: 4px;
            padding: 0 !important;
            font-weight: 600;
        }

        & .kanban-item-title {
            min-width: 0;
            align-items: flex-start !important;
            font-size: 14px;
            line-height: 1.35;
            color: var(--mt-slate-900, #3c3c3a);

            & > i.ti { display: none; }

            & > span {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                overflow-wrap: anywhere;
                &:hover { color: var(--mt-accent-strong); }
            }
        }

        & .kanban-item-overflow-actions {
            margin: -2px -4px 0 0;
            padding: 0 4px !important;
            border-radius: 6px;
            color: var(--mt-kb-muted) !important;
            opacity: 0;
            transition: opacity .15s;
            &:hover { background: #efeeee !important; }
        }

        &:hover .kanban-item-overflow-actions,
        & .kanban-item-overflow-actions[aria-expanded="true"] { opacity: 1; }

        & > .kanban-item-subtitle { grid-column: 1 / -1; padding: 4px 0 0 !important; font-size: 12px; }

        & > .kanban-description-preview {
            grid-column: 1 / -1;
            margin: 4px 0 0 !important;
            padding: 0 !important;
            font-size: 13px;
            line-height: 1.4;
            color: var(--mt-kb-muted);
            white-space: normal !important;
            /* la limite native est propre aux colonnes GLPI : répétée ici pour les copies */
            display: -webkit-box !important;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2 !important;
            max-height: 2.8em;
            overflow: hidden;
            overflow-wrap: anywhere;
        }

        /* contenu de GLPI et des plugins remis à plat dans la grille de la carte */
        & > .kanban-item-content,
        & > .kanban-item-content > .kanban-plugin-content,
        & > .d-flex:has(> .kanban-item-team) { display: contents !important; }

        /* contenu natif de GLPI (ex. « 0 / 1 tâches complétées ») : ligne discrète */
        & > .kanban-item-content > .kanban-core-content {
            grid-column: 1 / -1;
            display: block !important;
            margin: 0 !important;
            font-size: 12px;
            color: var(--mt-kb-muted);
        }
        & > .kanban-item-content > .kanban-core-content:has(.flex-break ~ .flex-break) { margin-top: 6px !important; }

        & .kanban-core-content .flex-break,
        & .kanban-plugin-content:empty { display: none; }

        & .kanban-core-content .progress { grid-column: 1 / -1; margin-top: 8px; }

        & > .kanban-item-content > .kanban-plugin-content > :not(.mt-kb-meta) { grid-column: 1 / -1; }

        & .mt-kb-meta {
            grid-column: 1;
            display: flex !important;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            min-width: 0;
            margin-top: 10px;
            font-size: 12px;
            color: var(--mt-kb-muted);
        }

        & .mt-kb-id { font-weight: 600; font-variant-numeric: tabular-nums; }

        & .mt-kb-prio {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 1px 8px 1px 6px;
            font-weight: 500;
            color: #4f4f4c;
            background: #efeeee;
            border-radius: 10px;

            &::before {
                content: "";
                width: 8px;
                height: 8px;
                border-radius: 50%;
                background: var(--mt-prio, #8a8a87);
                box-shadow: inset 0 0 0 1px rgba(60, 60, 58, .08);
            }
        }

        /* priorités aux couleurs du thème (1 très basse → 6 majeure) */
        & .mt-kb-prio[data-priority="1"] { --mt-prio: #cfcecd; }
        & .mt-kb-prio[data-priority="2"] { --mt-prio: #5ab891; }
        & .mt-kb-prio[data-priority="3"] { --mt-prio: #fcc354; }
        & .mt-kb-prio[data-priority="4"] { --mt-prio: #ec86a3; }
        & .mt-kb-prio[data-priority="5"] { --mt-prio: #f8485e; }
        & .mt-kb-prio[data-priority="6"] { --mt-prio: #c93246; color: #c93246; background: #fdecee; }

        & .mt-kb-due {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            & .ti { font-size: 14px; }
            &.is-late { color: var(--mt-danger, #c93246); font-weight: 600; }
        }

        /* intervenants : avatars ronds à initiales, à droite */
        & .kanban-item-team {
            grid-column: 2;
            justify-self: end;
            margin: 10px 0 0 !important;
            padding: 0 !important;
            min-height: 0;

            & > span {
                margin-right: -6px !important;
                border: 2px solid #fff !important;
                min-height: 0 !important;
                &:last-of-type { margin-right: 0 !important; }
            }

            & .badge {
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
                width: 24px !important;
                height: 24px !important;
                padding: 0 !important;
                font-size: 10px !important;
                font-weight: 600;
                color: #4f4f4c !important;
                border-radius: 50% !important;
            }

            & .badge[data-mt-initials] {
                color: var(--mt-accent-strong) !important;
                background: var(--mt-accent-softer) !important;
            }
            & .badge[data-mt-initials] > i { display: none; }
            & .badge[data-mt-initials]::after { content: attr(data-mt-initials); }
            & img { width: 24px; height: 24px; }
        }

        & .kanban-item-due-date {
            grid-column: 1 / -1;
            margin: 6px 0 0 !important;
            font-size: 12px;
            color: var(--mt-kb-muted);
            &:empty { display: none; }
        }
    }

    /* emplacement de dépôt pendant le glisser-déposer */
    & .sortable-placeholder {
        box-sizing: border-box;
        width: auto !important;
        min-height: 64px;
        margin: 0 0 8px !important;
        background: rgba(248, 72, 94, .06) !important;
        border: 2px dashed rgba(248, 72, 94, .35) !important;
        border-radius: 8px !important;
        visibility: visible !important;
    }

    /* ---- Colonnes repliées : bandeau vertical ---- */
    & .kanban-column.collapsed {
        flex: 0 0 44px;
        width: 44px !important;

        & .kanban-column-header { height: 100%; }

        & .kanban-column-header-content {
            flex-direction: column !important;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            height: 100%;
            padding: 12px 0 !important;
        }

        & .content-left { flex: 0 0 auto; flex-direction: column; align-items: center; }

        & .kanban-collapse-column { margin: 0 !important; transform: none !important; }

        & .kanban-column-title {
            writing-mode: vertical-rl;
            margin: 0 !important;
            padding: 0 !important;
            overflow: visible;
            & > span:first-child { margin-bottom: 2px !important; }
        }

        & .kanban_nb {
            writing-mode: horizontal-tb !important;
            margin: 0 !important;
            padding: 0 6px !important;
        }

        & .content-right, & .kanban-body { display: none !important; }
    }
}

/* Mobile : colonnes à 85 % de la largeur, une colonne à la fois */
@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] .kanban {
        & .kanban-columns { scroll-snap-type: x mandatory; }
        & .kanban-column:not(.collapsed) { --mt-kb-col-w: 85%; }
        & .kanban-toolbar select[name="kanban-board-switcher"] { order: 1; flex: 1 1 auto; min-width: 0; }
        & .kanban-toolbar .dropdown { order: 2; }
        & .kanban-toolbar .search-input { order: 3; flex: 1 1 100%; }
        & .kanban-column-toolbar { opacity: 1; }
    }
}

/* ======================================================================
 * Kanban : panneau latéral enrichi (.mt-kp, rendu par le plugin)
 *   Le contenu d'origine du panneau est masqué uniquement quand le
 *   panneau du plugin est affiché (classe .mt-kp-on posée par le JS).
 * ====================================================================== */
.mt-kp[hidden] { display: none !important; }

/* Panneau ouvert : le tableau se rétrécit (au lieu d'être recouvert) et reste
   défilable jusqu'à la dernière colonne */
:root[data-glpi-theme="auror"] .kanban:has(> .offcanvas) > .kanban-container {
    margin-right: calc(var(--mt-kp-w, 400px) + 12px);
}

:root[data-glpi-theme="auror"] .kanban:has(> .offcanvas .mt-kp-on) { --mt-kp-w: 420px; }

:root[data-glpi-theme="auror"] .kanban .offcanvas:has(.mt-kp-on) {
    width: 420px;
    max-width: 100%;
    border-left: 1px solid rgba(60, 60, 58, .06);
    box-shadow: var(--mt-float);
}

:root[data-glpi-theme="auror"] .item-details-panel.mt-kp-on {
    --mt-kp-muted: #6b6b68;
    --mt-kp-line: #e8e7e6;

    & > .card {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff;
    }

    & .card-header,
    & .card-footer,
    & .card-body > :not(.mt-kp) { display: none !important; }

    & .card-body {
        padding: 0 !important;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

:root[data-glpi-theme="auror"] .mt-kp {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    font-size: 14px;
    color: var(--mt-slate-900, #3c3c3a);

    &.is-busy { cursor: progress; }
    &.is-busy > * { opacity: .7; pointer-events: none; }

    /* ---- En-tête ---- */
    & .mt-kp-head {
        position: sticky;
        top: 0;
        z-index: 3;
        padding: 16px 20px 12px;
        background: #fff;
        border-bottom: 1px solid var(--mt-kp-line);
    }

    & .mt-kp-topline { display: flex; align-items: center; justify-content: space-between; }

    & .mt-kp-id {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .02em;
        color: var(--mt-kp-muted);
    }

    & .mt-kp-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        margin-right: -6px;
        font-size: 18px;
        color: var(--mt-kp-muted);
        background: none;
        border: 0;
        border-radius: 8px;
        &:hover { background: #efeeee; color: var(--mt-slate-900, #3c3c3a); }
    }

    & .mt-kp-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        overflow-wrap: anywhere;
        margin-top: 4px;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.3;
        color: var(--mt-slate-900, #3c3c3a) !important;
        text-decoration: none !important;
        &:hover { color: var(--mt-accent-strong) !important; }
    }

    /* ---- Champs ---- */
    & .mt-kp-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        padding: 16px 20px;
        border-bottom: 1px solid var(--mt-kp-line);
    }

    & .mt-kp-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

    & .mt-kp-label {
        font-size: 11px;
        font-weight: 600;
        color: var(--mt-kp-muted);
    }

    & .mt-kp-value {
        font-size: 13px;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        &.is-empty { color: #8a8a87; font-weight: 400; }
        &.is-late { color: var(--mt-danger, #c93246); font-weight: 600; }
    }

    & .mt-kp-pill {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
        height: 30px;
        padding: 0 8px 0 10px;
        background: #efeeee;
        border-radius: 8px;
        transition: background .15s;
        &:hover, &:focus-within { background: #e8e7e6; }
        & .mt-kp-value { font-size: 13px; }
    }

    & .mt-kp-dot {
        flex: 0 0 8px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--status-color, #8a8a87);
        &::before { display: none !important; }
    }

    & .mt-kp-prio .mt-kp-dot { background: var(--mt-prio, #8a8a87); }
    & .mt-kp-prio[data-priority="1"] { --mt-prio: #cfcecd; }
    & .mt-kp-prio[data-priority="2"] { --mt-prio: #5ab891; }
    & .mt-kp-prio[data-priority="3"] { --mt-prio: #fcc354; }
    & .mt-kp-prio[data-priority="4"] { --mt-prio: #ec86a3; }
    & .mt-kp-prio[data-priority="5"] { --mt-prio: #f8485e; }
    & .mt-kp-prio[data-priority="6"] { --mt-prio: #c93246; }

    & .mt-kp-select {
        min-width: 0;
        max-width: 100%;
        padding: 0 18px 0 0;
        font-size: 13px;
        font-weight: 500;
        color: inherit;
        background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") right center / 12px no-repeat;
        border: 0;
        outline: none;
        appearance: none;
        cursor: pointer;
        text-overflow: ellipsis;
    }

    /* ---- Sections ---- */
    & .mt-kp-section {
        padding: 16px 20px;
        border-bottom: 1px solid var(--mt-kp-line);
    }

    & .mt-kp-section-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 0 12px;
        font-size: 13px;
        font-weight: 600;
        color: var(--mt-slate-900, #3c3c3a);
    }

    & .mt-kp-more {
        font-size: 12px;
        font-weight: 500;
        color: var(--mt-accent-strong) !important;
    }

    & .mt-kp-none { margin: 0; font-size: 13px; color: #8a8a87; }

    /* ---- Personnes ---- */
    & .mt-kp-role + .mt-kp-role { margin-top: 14px; }
    & .mt-kp-role > .mt-kp-label { margin-bottom: 6px; }

    & .mt-kp-chips { display: flex; flex-wrap: wrap; gap: 6px; }

    & .mt-kp-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
        height: 28px;
        padding: 0 4px 0 2px;
        font-size: 13px;
        background: #efeeee;
        border-radius: 14px;
    }

    & .mt-kp-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 4px; }

    & .mt-kp-av {
        flex: 0 0 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        font-size: 10px;
        font-weight: 600;
        color: var(--mt-accent-strong);
        background: var(--mt-accent-softer);
        border-radius: 50%;
        &.is-group { color: #4f4f4c; background: #e4e3e1; font-size: 13px; }
    }

    & .mt-kp-x {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        padding: 0;
        font-size: 12px;
        color: var(--mt-kp-muted);
        background: none;
        border: 0;
        border-radius: 50%;
        &:hover { color: #fff; background: var(--mt-accent); }
    }

    & .mt-kp-role.is-readonly .mt-kp-chip { padding-right: 8px; }

    & .mt-kp-add { position: relative; margin-top: 8px; }

    & .mt-kp-search {
        width: 100%;
        height: 32px;
        padding: 0 10px 0 30px !important;
        font-size: 13px;
        background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239a9aa0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 2v10M2 7h10'/%3E%3C/svg%3E") 10px center / 12px no-repeat;
        border: 1px dashed #cfcecd;
        border-radius: 8px;
        outline: none;
        &:focus {
            border-style: solid;
            border-color: var(--mt-accent);
            box-shadow: 0 0 0 3px var(--mt-accent-soft);
        }
    }

    & .mt-kp-suggest {
        position: absolute;
        z-index: 10;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        max-height: 240px;
        margin: 0;
        padding: 4px;
        overflow-y: auto;
        list-style: none;
        background: #fff;
        border: 1px solid #e4e3e1;
        border-radius: 10px;
        box-shadow: var(--mt-float);
    }

    & .mt-kp-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
        font-size: 13px;
        border-radius: 6px;
        cursor: pointer;
        &:hover { background: #efeeee; }
        &.is-empty { color: #8a8a87; cursor: default; background: none; }
    }

    /* ---- Description ---- */
    & .mt-kp-desc {
        overflow-wrap: anywhere;
        font-size: 13px;
        line-height: 1.5;
        color: #4f4f4c;
        max-height: 9em;
        overflow: auto;
    }

    /* ---- Activité ---- */
    & .mt-kp-entry {
        display: flex;
        gap: 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        background: #f9f9f8;
        border: 1px solid var(--mt-kp-line);
        border-left: 3px solid #cfcecd;
        border-radius: 8px;
        &.is-task { border-left-color: #fcc354; }
        &.is-solution { border-left-color: #5ab891; }
        &.is-followup { border-left-color: #cfcecd; }
    }

    & .mt-kp-entry-body { min-width: 0; flex: 1 1 auto; }

    & .mt-kp-entry-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        font-size: 12px;
        color: var(--mt-kp-muted);
        & strong { font-weight: 600; color: var(--mt-slate-900, #3c3c3a); }
        & time { margin-left: auto; }
    }

    & .mt-kp-kind {
        padding: 0 6px;
        font-size: 11px;
        font-weight: 500;
        background: #e8e7e6;
        border-radius: 6px;
    }

    & .mt-kp-private {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        font-size: 11px;
        color: #3c3c3a;
    }

    & .mt-kp-entry-text {
        overflow-wrap: anywhere;
        margin-top: 4px;
        font-size: 13px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ---- Réponse rapide ---- */
    & .mt-kp-reply {
        margin-top: 12px;
        border: 1px solid #e4e3e1;
        border-radius: 10px;
        background: #fff;
        transition: border-color .15s, box-shadow .15s;

        &:focus-within { border-color: var(--mt-accent); box-shadow: 0 0 0 3px var(--mt-accent-soft); }

        & textarea {
            display: block;
            width: 100%;
            min-height: 64px;
            padding: 10px 12px;
            font: inherit;
            font-size: 13px;
            border: 0;
            border-radius: 10px 10px 0 0;
            outline: none;
            resize: vertical;
        }
    }

    & .mt-kp-reply-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 8px 8px 12px;
    }

    & .mt-kp-check {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: var(--mt-kp-muted);
        cursor: pointer;
        & input { accent-color: var(--mt-accent); }
    }

    /* ---- Pied ---- */
    & .mt-kp-foot {
        position: sticky;
        bottom: 0;
        z-index: 3;
        display: flex;
        gap: 8px;
        margin-top: auto;
        padding: 12px 20px;
        background: #fff;
        border-top: 1px solid var(--mt-kp-line);

        & .btn:first-child { flex: 1 1 auto; }
    }
}

/* Mobile : panneau plein écran */
@media (max-width: 767.98px) {
    :root[data-glpi-theme="auror"] .kanban:has(> .offcanvas) > .kanban-container { margin-right: 0; }

    :root[data-glpi-theme="auror"] .kanban .offcanvas:has(.mt-kp-on) {
        position: fixed !important;
        inset: 0;
        z-index: 1060;
        width: 100%;
        height: 100% !important;
        border: 0;
    }

    :root[data-glpi-theme="auror"] .mt-kp .mt-kp-fields { grid-template-columns: 1fr 1fr; }
}

/* ======================================================================
 * Kanban : epics (lien natif parent / enfant entre tickets)
 * ====================================================================== */
.mt-kb-epic[hidden] { display: none !important; }

:root[data-glpi-theme="auror"] .kanban {
    & .kanban-body > .kanban-item.mt-epic-out { display: none !important; }

    & .kanban-item .mt-kb-epic {
        grid-column: 1 / -1;
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        min-width: 0;
        margin-top: 8px;
    }
}

:root[data-glpi-theme="auror"] .mt-epic-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    height: 22px;
    padding: 0 8px 0 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--mt-epic-fg, #3c3c3a) !important;
    background: var(--mt-epic-bg, #efeeee);
    border-radius: 6px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: filter .15s;

    & > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    & .ti { font-size: 13px; }
    &:hover { filter: brightness(.96); text-decoration: underline !important; }
}

:root[data-glpi-theme="auror"] .mt-kb-epicinfo {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    color: var(--mt-epic-fg, #3c3c3a);
    background: var(--mt-epic-bg, #efeeee);
    border-radius: 6px;

    & .mt-kb-epicinfo-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
    & .ti { font-size: 13px; }

    & .mt-kb-epicinfo-bar {
        flex: 1 1 auto;
        height: 4px;
        min-width: 30px;
        overflow: hidden;
        background: rgba(255, 255, 255, .8);
        border-radius: 2px;
        & > span { display: block; height: 100%; background: currentColor; border-radius: 2px; }
    }

    & .mt-kb-epicinfo-count { font-variant-numeric: tabular-nums; font-weight: 600; }
}

/* Panneau latéral : section Epic */
:root[data-glpi-theme="auror"] .mt-kp {
    & .mt-kp-epic-chip { padding: 0 4px 0 0; background: none; }
    & .mt-kp-epic-chip .mt-epic-pill { height: 26px; font-size: 13px; }
    & .mt-kp-av.is-epic { font-size: 13px; }

    & .mt-kp-progress {
        height: 6px;
        margin: 2px 0 8px;
        overflow: hidden;
        background: #e8e7e6;
        border-radius: 3px;
        & > span { display: block; height: 100%; background: #5ab891; border-radius: 3px; }
    }

    & .mt-kp-children {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    & .mt-kp-child {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
        font-size: 13px;
        border-radius: 6px;
        &:hover { background: #efeeee; }

        & a {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: var(--mt-slate-900, #3c3c3a) !important;
        }

        &.is-done a { color: var(--mt-kp-muted) !important; text-decoration: line-through; }
    }

    & .mt-kp-child-id { font-weight: 600; color: var(--mt-kp-muted); }
}

/* Écran étroit : filtre sur toute la largeur */
@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] .kanban .kanban-toolbar select.mt-kb-epic-filter { order: 3; flex: 1 1 100%; width: 100%; min-width: 0; max-width: none; box-sizing: border-box; }
    :root[data-glpi-theme="auror"] .kanban .kanban-toolbar .search-input { order: 4; }
}

/* ======================================================================
 * Kanban : colonne virtuelle « Epics » (bloc isolé, voir EPICS_COLUMN
 * dans moderntheme.js). Placée à gauche du tableau, hors de la zone
 * défilante : elle reste visible pendant le défilement horizontal.
 * ====================================================================== */
:root[data-glpi-theme="auror"] .kanban {
    & .kanban-container:has(> .mt-epics-col) {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        column-gap: var(--mt-kb-gap);

        & > .kanban-toolbar { grid-column: 1 / -1; }
        & > .kanban-columns { grid-column: 2; grid-row: 2; }
    }

    & .kanban-body > .kanban-item.mt-epic-moved { display: none !important; }

    & .mt-epics-col {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        width: var(--mt-kb-col-w);
        min-height: 0;
        margin-bottom: 10px;
        background: #fdecee;
        border: 1px solid rgba(248, 72, 94, .12);
        border-radius: 12px;
        overflow: hidden;
    }

    & .mt-epics-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 8px 10px 6px;
    }

    & .mt-epics-fold {
        display: inline-flex;
        align-items: center;
        padding: 0;
        font-size: 12px;
        color: #8a8a87;
        background: none;
        border: 0;
        transform: rotate(90deg);
        transition: transform .15s, color .15s;
        &:hover { color: var(--mt-kb-muted); }
    }

    & .mt-epics-title {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 600;
        color: var(--mt-accent-strong);
        & .ti { font-size: 14px; }
    }

    & .mt-epics-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 18px;
        padding: 0 6px;
        font-size: 11px;
        font-weight: 600;
        color: var(--mt-accent-strong);
        background: var(--mt-accent-softer);
        border-radius: 9px;
    }

    & .mt-epics-body {
        flex: 1 1 auto;
        min-height: 0;
        margin: 0;
        padding: 2px 8px 8px;
        overflow-y: auto;
        list-style: none;
        scrollbar-width: thin;
    }

    & .mt-epics-body > .mt-epic-card {
        cursor: pointer;
        max-height: 320px; /* sécurité : contenu inattendu d'un plugin ou d'un ticket */
        overflow: hidden;
        &.mt-epic-out { display: none !important; }
        &.is-focus { border-color: rgba(248, 72, 94, .5) !important; box-shadow: 0 0 0 3px var(--mt-accent-soft) !important; }
    }

    & .mt-epic-status {
        grid-column: 1 / -1;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        justify-self: start;
        margin-top: 6px;
        padding: 1px 8px;
        font-size: 12px;
        font-weight: 500;
        color: #4f4f4c;
        background: #efeeee;
        border-radius: 10px;
    }

    & .mt-epic-status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--status-color, #8a8a87);
        font-size: 0;
    }

    /* colonne repliée : bandeau vertical */
    & .mt-epics-col.is-folded {
        width: 44px;

        & .mt-epics-header { flex-direction: column; gap: 10px; padding: 12px 0; }
        & .mt-epics-fold { transform: none; }
        & .mt-epics-title { writing-mode: vertical-rl; }
        & .mt-epics-body { display: none; }
    }

    /* mise en évidence des tickets d'une epic (survol / panneau ouvert) */
    &.mt-epic-hl .kanban-body > .kanban-item:not(.mt-epic-child) { opacity: .45; }
    &.mt-epic-hl .kanban-body > .kanban-item.mt-epic-child {
        border-color: rgba(248, 72, 94, .5) !important;
        box-shadow: 0 0 0 3px var(--mt-accent-soft) !important;
    }
    & .kanban-body > .kanban-item { transition: opacity .15s, box-shadow .15s, border-color .15s; }
}

/* Écran étroit : colonne Epics au-dessus du tableau, hauteur limitée */
@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] .kanban {
        & .kanban-container:has(> .mt-epics-col) {
            grid-template-columns: minmax(0, 1fr);
            grid-template-rows: auto auto minmax(0, 1fr);

            & > .kanban-columns { grid-column: 1; grid-row: 3; }
        }

        & .mt-epics-col,
        & .mt-epics-col.is-folded {
            grid-column: 1;
            width: auto;
            max-height: 40vh;
            margin-bottom: 10px;
        }

        & .mt-epics-col.is-folded .mt-epics-header { flex-direction: row; padding: 8px 10px; }
        & .mt-epics-col.is-folded .mt-epics-title { writing-mode: horizontal-tb; }
    }
}

/* ======================================================================
 * Listes de tickets : epic parente et badge « Epic · n tickets »
 * ====================================================================== */
:root[data-glpi-theme="auror"] table.search-results {
    & .mt-epic-tags {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
    }

    & .mt-list-epic-pill { height: 20px; font-size: 11.5px; }

    & .mt-list-epicinfo {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 20px;
        padding: 0 8px 0 6px;
        font-size: 11.5px;
        font-weight: 600;
        color: var(--mt-epic-fg, #3c3c3a);
        background: var(--mt-epic-bg, #efeeee);
        border-radius: 6px;
        white-space: nowrap;

        & .mt-list-epicinfo-label { display: inline-flex; align-items: center; gap: 4px; }
        & .ti { font-size: 13px; }
        & .mt-list-epicinfo-count { font-variant-numeric: tabular-nums; }
    }

    & .mt-list-epicinfo-bar {
        width: 48px;
        height: 4px;
        overflow: hidden;
        background: rgba(255, 255, 255, .85);
        border-radius: 2px;
        & > span { display: block; height: 100%; background: currentColor; border-radius: 2px; }
    }
}

@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] table.search-results .mt-list-epicinfo-bar { display: none; }
    :root[data-glpi-theme="auror"] table.search-results .mt-list-epic-pill { max-width: 170px; }
}

/* Bouton « Liste » sur le Kanban : sur la même ligne que « Kanban global » */
:root[data-glpi-theme="auror"] :has(> a.mt-view-list) {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

/* ======================================================================
 * Onglets des fiches : navigation de la ligne défilante (moderntheme.js)
 *   Éléments posés par-dessus la barre d'onglets, sans la déplacer.
 * ====================================================================== */
:root[data-glpi-theme="auror"] .card-tabs.vertical {
    /* la barre d'onglets de GLPI a z-index 1000 */
    & > .mt-tabs-edge {
        position: absolute;
        z-index: 1001;
        top: var(--mt-tabs-top, 0);
        height: var(--mt-tabs-h, 48px);
        width: 56px;
        display: flex;
        align-items: center;
        pointer-events: none;
        opacity: 0;
        transition: opacity .15s;

        &.is-visible { opacity: 1; }
        &.is-visible .mt-tabs-arrow { pointer-events: auto; }

        &.is-left {
            left: 0;
            justify-content: flex-start;
            padding-left: 6px;
            border-radius: 14px 0 0 14px;
            background: linear-gradient(to right, var(--mt-tabs-bg, #fff) 45%, transparent);
        }

        &.is-right {
            right: 48px;
            justify-content: flex-end;
            padding-right: 4px;
            background: linear-gradient(to left, var(--mt-tabs-bg, #fff) 45%, transparent);
        }
    }

    & .mt-tabs-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0;
        font-size: 15px;
        color: #3c3c3a;
        background: #fff;
        border: 1px solid #e4e3e1;
        border-radius: 50%;
        box-shadow: var(--mt-float);
        cursor: pointer;

        &:hover { color: var(--mt-accent-strong); border-color: rgba(248, 72, 94, .35); }
        &:focus-visible { outline: 2px solid var(--mt-accent); outline-offset: 1px; }
    }

    & > .mt-tabs-all {
        position: absolute;
        z-index: 1002;
        top: var(--mt-tabs-top, 0);
        right: 0;
        width: 48px;
        height: var(--mt-tabs-h, 48px);
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--mt-tabs-bg, #fff); /* les onglets défilent dessous sans dépasser */
        border-radius: 0 14px 14px 0;
    }

    & .mt-tabs-all-btn {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        height: 32px;
        padding: 0 6px;
        font-size: 15px;
        color: #3c3c3a;
        background: #fff;
        border: 1px solid #e4e3e1;
        border-radius: 9px;
        cursor: pointer;

        & .ti-chevron-down { font-size: 12px; color: #8a8a87; }
        &:hover, &[aria-expanded="true"] { color: var(--mt-accent-strong); border-color: rgba(248, 72, 94, .35); background: var(--mt-accent-soft); }
        &:focus-visible { outline: 2px solid var(--mt-accent); outline-offset: 1px; }
    }

    & .mt-tabs-menu {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        width: 290px;
        max-width: calc(100vw - 32px);
        max-height: min(60vh, 460px);
        margin: 0;
        padding: 6px;
        overflow-y: auto;
        list-style: none;
        background: #fff;
        border: 1px solid #e4e3e1;
        border-radius: 12px;
        box-shadow: var(--mt-float);

        &[hidden] { display: none; }
    }

    & .mt-tabs-menu-item {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 7px 10px;
        font-size: 13.5px;
        text-align: left;
        color: #3c3c3a;
        background: none;
        border: 0;
        border-radius: 8px;
        cursor: pointer;

        & .ti, & i { flex: none; width: 18px; font-size: 16px; color: #8a8a87; text-align: center; }
        & .mt-tabs-menu-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        & .badge { flex: none; margin-left: auto; }

        &:hover, &:focus-visible { background: #efeeee; outline: 0; }
        &.is-active { color: var(--mt-accent-strong); background: var(--mt-accent-soft); font-weight: 600; }
        &.is-active .ti, &.is-active i { color: var(--mt-accent); }
    }
}

/* ======================================================================
 * Cases à cocher et boutons radio : gris moyen au repos, plus net au survol
 *   La bordure native de Tabler reprend une variable très légère du
 *   thème : bordure explicite, identique partout (listes, formulaires).
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    & .form-check-input {
        background-color: #fff;
        border: 1.25px solid #b8b8b4;
        box-shadow: none;
        cursor: pointer;
        transition: background-color .15s, border-color .15s, box-shadow .15s;

        &:checked,
        &[type="checkbox"]:indeterminate {
            background-color: var(--mt-accent);
            border-color: var(--mt-accent);
        }

        &:focus { outline: 0; box-shadow: none; }
        &:focus:not(:focus-visible):not(:checked):not(:indeterminate) { border-color: #b8b8b4; }

        &:focus-visible {
            border-color: var(--mt-accent);
            box-shadow: 0 0 0 3px var(--mt-accent-soft);
        }

        &:disabled { opacity: .5; cursor: not-allowed; }
    }

    & .form-check-input:hover:not(:disabled):not(:checked),
    & .form-check:hover > .form-check-input:not(:disabled):not(:checked),
    & label:hover > .form-check-input:not(:disabled):not(:checked),
    & table.search-results tr:hover .form-check-input:not(:checked) {
        border-color: #8a8a87;
    }
}

/* ======================================================================
 * Listes de résultats : cellules à valeurs multiples (ex. adresses IP)
 *   limitées à 2 lignes, badge « +N » pour déplier sur place (moderntheme.js)
 * ====================================================================== */
:root[data-glpi-theme="auror"] table.search-results {
    /* valeurs et badge côte à côte : la cellule ne dépasse pas 2 lignes */
    & .mt-cell-wrap {
        display: flex;
        align-items: flex-start;
        gap: 6px;
    }

    /* hauteur de 2 lignes (sans « … » qui rognerait la 2e valeur) */
    & .mt-cell-clip {
        min-width: 0;
        line-height: 1.45;
        max-height: 2.9em;
        overflow: hidden;
        overflow-wrap: break-word; /* sans réduire la colonne: une IP reste entière */
    }

    & td.mt-cell-open .mt-cell-clip { max-height: none; }

    & .mt-cell-more {
        display: inline-flex;
        align-items: center;
        flex: none;
        height: 18px;
        margin-top: 1px;
        padding: 0 7px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
        color: var(--mt-accent-strong);
        background: var(--mt-accent-soft);
        border: 0;
        border-radius: 9px;
        cursor: pointer;

        &:hover { background: var(--mt-accent-softer); }
        &:focus-visible { outline: 2px solid var(--mt-accent); outline-offset: 1px; }
    }
}

/* ======================================================================
 * Liste des projets : arborescence (bloc isolé, voir PROJECT_TREE)
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    & .mt-tree-bar {
        display: flex;
        justify-content: flex-end;
        padding: 8px 12px 0;
    }

    & .mt-tree-switch {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
        font-weight: 500;
        color: var(--mt-slate-700, #4f4f4c);
        background: #fff;
        border: 1px solid #e4e3e1;
        border-radius: 8px;
        cursor: pointer;

        & .ti { font-size: 16px; }
        &:hover { background: #efeeee; }

        &[aria-pressed="true"] {
            color: var(--mt-accent-strong);
            background: var(--mt-accent-soft);
            border-color: rgba(248, 72, 94, .35);
        }
    }

    & table.search-results {
        & tr.mt-tree-hidden { display: none; }

        & td.mt-tree-cell {
            padding-left: calc(12px + var(--mt-tree-depth, 0) * 22px) !important;
        }

        & .mt-tree-head {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            margin-right: 4px;
            vertical-align: middle;

            &[data-state="-"] { visibility: hidden; } /* place réservée: noms alignés */
        }

        & td:not(.mt-tree-cell) .mt-tree-head { display: none; }

        & .mt-tree-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            padding: 0;
            font-size: 14px;
            color: var(--mt-slate-500, #6b6b68);
            background: none;
            border: 0;
            border-radius: 5px;
            cursor: pointer;
            &:hover { color: var(--mt-slate-900, #3c3c3a); background: #e8e7e6; }
        }

        /* connecteur discret : └ en trait gris */
        & .mt-tree-branch {
            display: inline-block;
            width: 10px;
            height: 10px;
            margin: -6px 0 0 4px;
            border-left: 1.5px solid #cfcecd;
            border-bottom: 1.5px solid #cfcecd;
            border-bottom-left-radius: 3px;
        }

        & .mt-tree-parent-pill {
            display: flex;
            width: fit-content;
            max-width: 100%;
            margin-top: 4px;
            padding: 0 8px;
            font-size: 11.5px;
            font-weight: 500;
            line-height: 20px;
            color: var(--mt-slate-700, #4f4f4c) !important;
            background: #efeeee;
            border-radius: 6px;
            text-decoration: none !important;
            white-space: nowrap;

            & > span { overflow: hidden; text-overflow: ellipsis; }
            &:hover { background: #e4e3e1; }
        }
    }
}

@media (max-width: 575.98px) {
    :root[data-glpi-theme="auror"] table.search-results td.mt-tree-cell {
        padding-left: calc(8px + var(--mt-tree-depth, 0) * 14px) !important;
    }
}

/* ======================================================================
 * 1.2.0 - Charte Devoteam (« AI Driven Consulting »)
 *
 * Couche finale, placée en dernier pour l'emporter sur les versions
 * précédentes :
 *  - Montserrat partout, titres Medium, casse de phrase (pas de majuscules) ;
 *  - couleurs primaires (Red Poppy #f8485e, Dark Grey #3c3c3a, blanc) pour
 *    le texte et les actions ; secondaires (Poppy Light / Lighter, Aqua,
 *    Beige, Light Grey) en fonds uniquement ; accents (Intense Fire,
 *    Fresh Mint, Blue Lagoon, Candy, Violet) pour données et statuts ;
 *  - jamais de noir pur, d'ombre portée, de dégradé ni de verre dépoli :
 *    les éléments flottants reçoivent un simple filet (--mt-float) ;
 *  - boutons (CTA) en pilule Red Poppy, texte blanc.
 * ====================================================================== */
:root[data-glpi-theme="auror"] {
    /* Jetons Devoteam */
    --dvt-red-poppy: #f8485e;
    --dvt-red-poppy-hover: #e03a50;
    --dvt-red-poppy-press: #c93246;
    --dvt-dark-grey: #3c3c3a;
    --dvt-poppy-light: #fca2ae;
    --dvt-poppy-lighter: #fddade;
    --dvt-aqua: #d7ebe7;
    --dvt-beige: #efeadc;
    --dvt-light-grey: #efeeee;
    --dvt-grey-30: #cfcecd;
    --dvt-grey-60: #8a8a87;
    --dvt-intense-fire: #fcc354;
    --dvt-fresh-mint: #5ab891;
    --dvt-blue-lagoon: #4a8cca;
    --dvt-candy: #ec86a3;
    --dvt-violet: #63238c;

    --mt-accent: #f8485e;
    --mt-accent-rgb: 248, 72, 94;
    --mt-accent-hover: #e03a50;
    --mt-accent-strong: #c93246;
    --mt-accent-strong-rgb: 201, 50, 70;
    --mt-accent-soft: #fdecee;
    --mt-accent-softer: #fddade;
    --mt-danger: #c93246;

    --mt-slate-50: #f9f9f8;
    --mt-slate-100: #efeeee;
    --mt-slate-200: #e4e3e1;
    --mt-slate-400: #8a8a87;
    --mt-slate-500: #6b6b68;
    --mt-slate-700: #4f4f4c;
    --mt-slate-900: #3c3c3a;

    --mt-radius: 16px;
    --mt-radius-lg: 24px;
    --mt-shadow-sm: none;
    --mt-shadow: none;
    --mt-shadow-lg: none;
    --mt-float: 0 0 0 1px #cfcecd;
    --mt-ring: 0 0 0 3px rgba(248, 72, 94, .25);

    --tblr-font-sans-serif: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --tblr-body-font-size: 14px;
    --tblr-body-color: #3c3c3a;
    --tblr-body-color-rgb: 60, 60, 58;
    --tblr-body-bg: #f6f6f5;
    --tblr-border-color: #e8e7e6;
    --tblr-border-color-translucent: rgba(60, 60, 58, .08);
    --tblr-primary: #f8485e;
    --tblr-primary-rgb: 248, 72, 94;
    --tblr-primary-darken: #e03a50;
    --tblr-primary-lt: #fdecee;
    --tblr-link-color: #c93246;
    --tblr-link-color-rgb: 201, 50, 70;
    --tblr-link-hover-color: #a82a3b;
    --tblr-link-hover-color-rgb: 168, 42, 59;
    --tblr-danger: #c93246;
    --tblr-danger-rgb: 201, 50, 70;
    --tblr-red: #f8485e;
    --tblr-red-rgb: 248, 72, 94;
    --tblr-success: #5ab891;
    --tblr-success-rgb: 90, 184, 145;
    --tblr-green: #5ab891;
    --tblr-green-rgb: 90, 184, 145;
    --tblr-warning: #fcc354;
    --tblr-warning-rgb: 252, 195, 84;
    --tblr-yellow: #fcc354;
    --tblr-yellow-rgb: 252, 195, 84;
    --tblr-orange: #fcc354;
    --tblr-orange-rgb: 252, 195, 84;
    --tblr-pink: #ec86a3;
    --tblr-pink-rgb: 236, 134, 163;
    --tblr-purple: #63238c;
    --tblr-purple-rgb: 99, 35, 140;
    --tblr-dark: #3c3c3a;
    --tblr-dark-rgb: 60, 60, 58;
    --tblr-black: #3c3c3a;
    --tblr-black-rgb: 60, 60, 58;

    --glpi-mainmenu-active-bg: #fdecee;
    --glpi-tabs-active-fg: #c93246;
    --glpi-form-header-fg: #3c3c3a;
    --glpi-badge-bg: #fdecee;
    --glpi-badge-fg: #c93246;
    --glpi-hover-bg: rgba(248, 72, 94, .06);
    --glpi-helpdesk-header: #fddade;

    /* Fil de discussion : fonds secondaires, texte Dark Grey */
    --glpi-timeline-fup-bg: #efeeee;
    --glpi-timeline-fup-fg: #3c3c3a;
    --glpi-timeline-fup-border-color: #e4e3e1;
    --glpi-timeline-task-bg: #efeadc;
    --glpi-timeline-task-fg: #3c3c3a;
    --glpi-timeline-task-border-color: #e2dbc8;
    --glpi-timeline-solution-bg: #d7ebe7;
    --glpi-timeline-solution-fg: #3c3c3a;
    --glpi-timeline-solution-border-color: #bfdcd5;
    --glpi-timeline-itil-content-bg: #d7ebe7;
    --glpi-timeline-itil-content-fg: #3c3c3a;
    --glpi-timeline-itil-content-border-color: #bfdcd5;

    --glpi-palette-color-1: #3c3c3a;
    --glpi-palette-color-2: #ffffff;
    --glpi-palette-color-3: #f8485e;
    --glpi-palette-color-4: #fcc354;

    /* ---------------- Typographie ---------------- */
    & body {
        font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-weight: 400;
        font-size: 14px;
        color: #3c3c3a;
    }

    & h1, & h2, & h3, & .h1, & .h2, & .h3,
    & .main-header .card-title,
    & .main-header .card-title .status,
    & .mt-hero-name {
        font-weight: 500;
        letter-spacing: -.01em;
    }

    & h4, & h5, & h6, & .h4, & .h5, & .h6, & .card-title { font-weight: 600; letter-spacing: 0; }

    & ::selection { background: #fddade; color: #3c3c3a; }

    /* ---------------- Surfaces : à plat, sans verre dépoli ---------------- */
    & header.navbar,
    & .itil-footer {
        background: #fff !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    & .card,
    & .search-card,
    & .dashboard .card,
    & .grid-stack-item .card,
    & .alert,
    & .itil-timeline .timeline-content {
        box-shadow: none !important;
    }

    & .dropdown-menu,
    & .popover,
    & .select2-dropdown,
    & .ui-autocomplete,
    & .flatpickr-calendar {
        border: 0 !important;
        box-shadow: var(--mt-float) !important;
    }

    & .modal-content { border: 0; box-shadow: none !important; }
    & .modal-backdrop { background-color: #3c3c3a; }
    & .modal-backdrop.show { opacity: .45; }

    & .tooltip-inner { background: #3c3c3a; color: #fff; font-weight: 500; }
    & .toast { box-shadow: var(--mt-float) !important; border: 0; }

    /* Pas de soulèvement au survol (charte : ni ombre ni rebond) */
    & .grid-stack-item .card.big-number:hover,
    & .mt-round-btn-primary:hover,
    & .main-content-card .btn-primary:hover { transform: none !important; }

    & .grid-stack-item .card.big-number { border-radius: 16px !important; }

    /* ---------------- Boutons : pilules Red Poppy ---------------- */
    & .btn {
        border-radius: 999px;
        font-weight: 600;
        letter-spacing: 0;

        &:active { transform: none; }
    }

    & .btn-sm { border-radius: 999px; }

    /* Groupes de boutons : seuls les bords extérieurs sont arrondis */
    & .btn-group > .btn:not(:last-child):not(.dropdown-toggle),
    & .btn-group > .btn.dropdown-toggle-split:first-child,
    & .btn-group > .btn-group:not(:last-child) > .btn {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    & .btn-group > .btn:nth-child(n + 2),
    & .btn-group > :not(.btn-check) + .btn,
    & .btn-group > .btn-group:not(:first-child) > .btn {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    & .btn-primary {
        background: #f8485e;
        border-color: #f8485e;
        color: #fff;
        box-shadow: none;

        &:hover, &:focus-visible { background: #e03a50; border-color: #e03a50; color: #fff; }
        &:active, &.active { background: #c93246 !important; border-color: #c93246 !important; }
    }

    & .btn-outline-primary {
        color: #c93246;
        border-color: #f8485e;

        &:hover { background: #f8485e; border-color: #f8485e; color: #fff; }
    }

    & .btn-ghost-primary { color: #c93246; &:hover { background: #fdecee; color: #c93246; } }

    & .btn-danger { background: #c93246; border-color: #c93246; color: #fff; box-shadow: none; }
    & .btn-success { background: #5ab891; border-color: #5ab891; color: #fff; box-shadow: none; }
    & .btn-warning { background: #fcc354; border-color: #fcc354; color: #3c3c3a; box-shadow: none; }

    & .mt-round-btn-primary { background: #f8485e; &:hover { background: #e03a50; } }

    /* ---------------- Formulaires ---------------- */
    & .form-control:focus,
    & .form-select:focus,
    & .select2-container--focus .select2-selection,
    & .select2-container--open .select2-selection {
        border-color: #f8485e !important;
        box-shadow: var(--mt-ring) !important;
    }

    & .form-check-input:checked,
    & .form-check-input:indeterminate {
        background-color: #f8485e;
        border-color: #f8485e;
    }

    & .form-switch .form-check-input:checked { background-color: #f8485e; border-color: #f8485e; }

    /* ---------------- Onglets segmentés en pilule ---------------- */
    & .nav-tabs:not(.flex-md-column) {
        border-radius: 999px;

        & .nav-link { border-radius: 999px !important; }
        & .nav-link.active { box-shadow: none; }
    }

    /* ---------------- Listes : en-têtes en casse de phrase ---------------- */
    & .search-results > thead > tr > th {
        text-transform: none;
        letter-spacing: 0;
        font-size: 12.5px;
        color: #6b6b68 !important;
    }

    /* ---------------- Alertes : fonds secondaires ---------------- */
    & .alert { border: 0; color: #3c3c3a; }
    & .alert-info, & .alert-secondary { background: #efeeee; }
    & .alert-success { background: #d7ebe7; }
    & .alert-warning { background: #efeadc; }
    & .alert-danger, & .alert-error { background: #fddade; }

    /* ---------------- Fiche : pastilles et accent ---------------- */
    & .mt-hero-icon { background: #fddade; box-shadow: none; }

    & .mt-hero-status {
        background: #d7ebe7;
        color: #3c3c3a;

        &::before { background: #5ab891; }
    }

    & .mt-hero-meta { text-transform: none; letter-spacing: 0; }

    /* ---------------- Kanban : cartes à plat, filet visible ---------------- */
    & .kanban-body > .kanban-item {
        border-color: #e4e3e1 !important;

        &:hover { border-color: #cfcecd !important; }
    }

    & .kanban .offcanvas:has(.mt-kp-on) { border-left: 1px solid #e4e3e1 !important; }

    /* Pastilles sur couleurs d'accent claires : texte Dark Grey (contraste) */
    --tblr-warning-fg: #3c3c3a;
    --tblr-success-fg: #3c3c3a;

    & .badge.bg-warning, & .badge.bg-yellow, & .badge.bg-orange,
    & .badge.bg-success, & .badge.bg-green {
        color: #3c3c3a !important;
    }

    & ::placeholder { color: #8a8a87; opacity: 1; }
}

/* ---------------- Connexion : panneau Red Poppy, deux cercles ---------------- */
:root[data-glpi-theme="auror"] body.welcome-anonymous {
    &::before { background: #f8485e; }

    /* Accroche : blanc sur Red Poppy, au-dessus du grand cercle */
    &::after {
        top: 34vh;
        bottom: auto;
        font-weight: 500;
        letter-spacing: -.01em;
        line-height: 1.3;
    }

    & .main-content-card {
        & h2 { font-weight: 500 !important; letter-spacing: -.01em; }

        & .btn-primary {
            border-radius: 999px !important;
            background: #f8485e !important;
            box-shadow: none !important;

            &:hover { background: #e03a50 !important; }
            &:active { background: #c93246 !important; }
        }

        & .form-control,
        & .select2-selection { border-radius: 12px !important; }
    }

    @media (max-width: 991.98px) {
        &::after { display: none; }
    }
}

/* ======================================================================
 * 1.2.1 - En-tête : logo et recherche centrés dans la barre de 64 px
 *   - la barre du haut n'a plus de padding vertical (le conteneur de 64 px
 *     était poussé de 4 px vers le bas : plus d'espace au-dessus de la
 *     recherche qu'en dessous) ;
 *   - le logo occupe une zone de 64 px de haut, centrée dans la largeur
 *     du menu (déplié ou réduit), alignée sur la barre du haut.
 * ====================================================================== */
@media (min-width: 992px) {
    :root[data-glpi-theme="auror"] {
        & header.navbar {
            padding-top: 0 !important;
            padding-bottom: 0 !important;

            & .header-container {
                height: 64px;
                margin-top: 0 !important;
                margin-bottom: 0 !important;
                padding-top: 0 !important;
                padding-bottom: 0 !important;
            }
        }

        & aside.sidebar .navbar-brand {
            height: 64px;
            margin: 0 0 8px !important;
            padding: 0 !important;
            width: 100% !important;
            display: flex !important;
            align-items: center;
            justify-content: center;

            & > a, & .glpi-logo { margin: 0 !important; }
        }

        & body.navbar-collapsed aside.sidebar .navbar-brand .glpi-logo {
            width: 40px !important;
            height: 40px !important;
            background-size: contain !important;
            background-position: center !important;
        }
    }
}
