/* ════════════════════════════════════════════════════════════════
   ACURTIME — TOPBAR (header)
   Fichier : wwwroot/css/educated-topbar.css — v14
   Fix     : grid-column explicite sur chaque enfant de header-right-side
             caption → col 1 (suite), search → col 2, droite → col 3
   ════════════════════════════════════════════════════════════════ */


/* ── RESET SÉLECTIF ──────────────────────────────────────────── */

.header.navbar-dark,
.header {
    all: unset !important;
    box-sizing: border-box !important;
}

    .header *,
    .header *::before,
    .header *::after {
        box-sizing: border-box !important;
        font-family: "Montserrat", "Public Sans", system-ui, -apple-system, sans-serif !important;
    }


    /* ══════════════════════════════════════════════════════════════
   TOPBAR — grille 3 colonnes
   ┌─────────────────┬──────────────────────┬─────────────────┐
   │ logo + caption  │   barre de recherche  │   droite        │
   └─────────────────┴──────────────────────┴─────────────────┘
   ══════════════════════════════════════════════════════════════ */

    .header.navbar-dark,
    .header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(340px, 520px) minmax(0, 1fr) !important;
        grid-template-rows: 52px !important;
        align-items: center !important;
        /*gap: 16px !important;*/
        padding: 0 16px !important;
        height: 52px !important;
        min-height: 52px !important;
        background: var(--surface-1, #fff) !important;
        border-bottom: 1px solid var(--line, #ECEDF1) !important;
        box-shadow: none !important;
        position: relative !important;
        z-index: 6 !important;
    }

/* ── display:contents → les enfants de header-right-side
       participent directement au grid parent ──────────────── */
.header-right-side {
    display: contents !important;
}


/* ═══════════════════════════════════════════════════════════════
   COL 1 — GAUCHE : logo + séparateur + caption
   ═══════════════════════════════════════════════════════════════ */

/* header-left-side : prend grid-column 1 naturellement */
.header-left-side {
    grid-column: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important; /* séparateur géré via ::after + margin */
    min-width: 0 !important;
    overflow: hidden !important;
    height: 100% !important;
}

    /* Logo */
    .header-left-side a {
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        outline: none !important;
        /*margin-right: 14px !important;*/
    }

.header-logo {
    width: 145px !important;
    height: 34px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    margin: 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
    transition: opacity 120ms !important;
}

.header-left-side a:hover .header-logo {
    opacity: 0.85 !important;
}

/* Séparateur vertical logo | caption */
.header-left-side a::after {
    content: "" !important;
    display: block !important;
    width: 1px !important;
    height: 22px !important;
    background: var(--line-2, #E3E5EA) !important;
    flex-shrink: 0 !important;
    margin-left: 14px !important;
}

/* ── Caption XAF — dans header-right-side mais forcé en col 1 ── */
/* XAF structure : header-right-side > div[role="heading"] > .view-caption-root */

.header-right-side > [role="heading"] {
    grid-column: 1 !important; /* ← collé à la fin de la col 1 */
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
    /* Problème : header-left-side occupe déjà col 1.
       On utilise un sous-grid ou on le place dans le même flux
       via position absolute sur col 1. Solution propre :
       on assigne caption à col 1 et header-left-side aussi,
       le grid les empile — on évite ça avec un wrapper flex.
       → Meilleure approche : caption reste DANS header-left-side
         via JS ou on accepte l'ordre DOM et on gère l'overlap.
       → Solution CSS pure : grid-column:1 + auto-placement
         ne crée PAS de chevauchement, il place le 2e item col1
         sur la même ligne dans la colonne — OK si on accepte
         que col1 devient un mini-flex-row implicite via subgrid.
       En pratique avec grid auto-placement :
         2 items grid-column:1 → ils s'empilent verticalement
         dans la même colonne, ce qui casse la hauteur 52px.
       → VRAIE solution : envelopper logo + caption dans
         un seul conteneur flex = header-left-side.
         Comme XAF les sépare en deux éléments frères,
         on fait : header-left-side { grid-column:1; display:flex }
         et on déplace visuellement le caption DANS ce flex
         via order ou via un workaround position.
    ─────────────────────────────────────────────────────────────
       WORKAROUND RETENU :
       - header-left-side couvre grid-column: 1 / 3 (col 1 + 2)
         avec justify-content:flex-start pour garder logo à gauche
       - gs-trigger (search) est sorti du flux normal via
         position:absolute centré dans la topbar
       - d-flex.ms-auto reste en col 3
    ─────────────────────────────────────────────────────────────
    */
}


/* ═══════════════════════════════════════════════════════════════
   APPROCHE FINALE : position absolute pour le search
   Évite tout conflit d'ordre DOM entre caption et search
   ═══════════════════════════════════════════════════════════════ */

/* Réinitialiser le grid : on n'utilise plus 3 cols symétriques
   mais un flex avec le search en position absolute centré */

.header.navbar-dark,
.header {
    display: flex !important;
    grid-template-columns: unset !important;
    grid-template-rows: unset !important;
    position: relative !important;
}

/* header-right-side redevient un flex normal */
.header-right-side {
    display: contents !important;
}

/* ── COL GAUCHE : logo + caption ────────────────────────────── */

.header-left-side {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 1 !important;
    flex-grow: 0 !important;
    gap: 0 !important;
    min-width: 0 !important;
    width: unset;
    overflow: hidden !important;
}

    /* Logo */
    .header-left-side a {
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        outline: none !important;
    }

.header-logo {
    width: 145px !important;
    height: 34px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    margin: 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Séparateur logo | caption */
.header-left-side a::after {
    content: "" !important;
    display: inline-block !important;
    width: 1px !important;
    height: 18px !important; /* légèrement moins haut, plus élégant */
    background: var(--line-2, #E3E5EA) !important;
    flex-shrink: 0 !important;
    margin: 0 12px !important; /* 12px de chaque côté — plus serré */
}

/* Caption de vue */
[role="heading"] {
    display: flex !important;
    align-items: center !important;
    width: unset !important;
    min-width: 0 !important;
    max-width: unset !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
}

.view-caption-root {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

    .view-caption-root .xaf-caption-icon-container {
        width: 20px !important;
        height: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        opacity: 0.5 !important;
    }

    .view-caption-root .xaf-caption-icon {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
    }

    .view-caption-root .xaf-caption-container {
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
    }

    .view-caption-root .xaf-view-caption-sm {
        font-size: 11px !important;
        font-weight: 400 !important;
        color: var(--ink-3, #858B99) !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .view-caption-root .xaf-object-caption {
        font-size: 13.5px !important;
        font-weight: 600 !important;
        color: var(--ink-0, #0F1115) !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        letter-spacing: -0.005em !important;
    }


/* ── SEARCH : centré en position absolute ───────────────────── */

.gs-trigger {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(520px, 38%) !important;
    /* reset bouton */
    appearance: none !important;
    border: 1px solid var(--line, #ECEDF1) !important;
    background: var(--surface-2, #F9FAFC) !important;
    border-radius: 10px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 8px 0 12px !important;
    cursor: pointer !important;
    transition: 80ms !important;
    color: var(--ink-3, #858B99) !important;
    z-index: 1 !important;
}

    .gs-trigger:hover,
    .gs-trigger:focus-within {
        background: var(--surface-1, #fff) !important;
        border-color: var(--brand) !important;
        box-shadow: 0 0 0 3px var(--brand-soft, #EBEBF6) !important;
        outline: none !important;
    }

.gs-trigger-icon {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
    color: var(--ink-3, #858B99) !important;
}

.gs-trigger-label {
    flex: 1 !important;
    text-align: left !important;
    font-size: 13px !important;
    color: var(--ink-3, #858B99) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.gs-trigger-kbd {
    font-family: "JetBrains Mono", ui-monospace, monospace !important;
    font-size: 10px !important;
    color: var(--ink-3, #858B99) !important;
    background: var(--surface-1, #fff) !important;
    border: 1px solid var(--line-2, #E3E5EA) !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}


/* ── DROITE : ms-auto pousse tout à droite ──────────────────── */

.header-right-side .d-flex.ms-auto {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}


/* ── PILL ÉTABLISSEMENT ─────────────────────────────────────── */

.school-info {
    display: inline-flex !important;
    align-items: stretch !important;
    height: 36px !important;
    background: var(--surface-2, #F9FAFC) !important;
    border: 1px solid var(--line, #ECEDF1) !important;
    border-radius: 999px !important;
    padding: 0 !important;
    margin-right: 4px !important;
    overflow: hidden !important;
    transition: 120ms !important;
    max-width: 260px !important;
    cursor: pointer !important;
}

    .school-info:hover {
        background: var(--surface-3, #F1F3F7) !important;
    }

    .school-info .school_image {
        width: 30px !important;
        height: 30px !important;
        margin: 3px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        background: var(--surface-1, #fff) !important;
        border: 1px solid var(--line, #ECEDF1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        padding: 2px !important;
    }

        .school-info .school_image img {
            width: 100% !important;
            height: 100% !important;
            object-fit: contain !important;
            display: block !important;
        }

    .school-info > div:not(.school_image) {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding: 0 12px 0 6px !important;
        min-width: 0 !important;
        gap: 1px !important;
    }

    .school-info .SchoolName {
        font-size: 12.5px !important;
        font-weight: 600 !important;
        color: var(--ink-0, #0F1115) !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 160px !important;
        letter-spacing: -0.005em !important;
    }

    .school-info .SchoolAdress {
        font-size: 10.5px !important;
        font-weight: 400 !important;
        color: var(--ink-3, #858B99) !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 160px !important;
    }


/* ── BOUTONS ICÔNE ──────────────────────────────────────────── */

.theme-button,
.btn-header {
    all: unset !important;
    box-sizing: border-box !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--ink-2, #4B5160) !important;
    cursor: pointer !important;
    transition: 80ms !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

    .theme-button:hover,
    .btn-header:hover {
        background: var(--surface-3, #F1F3F7) !important;
        color: var(--ink-0, #0F1115) !important;
    }

    .theme-button .xaf-image,
    .btn-header .xaf-image {
        width: 20px !important;
        height: 20px !important;
        mask-size: 20px !important;
        -webkit-mask-size: 20px !important;
    }


/* ── AVATAR / ACCOUNT ───────────────────────────────────────── */

.account-container .account-button {
    all: unset !important;
    box-sizing: border-box !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--brand-warm), var(--brand)) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 0 2px var(--surface-1, #fff), 0 0 0 3.5px var(--brand-soft, #EBEBF6) !important;
    transition: 120ms !important;
    margin-left: 6px !important;
}

    .account-container .account-button:hover {
        box-shadow: 0 0 0 2px var(--surface-1, #fff), 0 0 0 4px var(--brand-soft, #EBEBF6) !important;
        transform: translateY(-1px) !important;
    }

    .account-container .account-button .xaf-image {
        background-color: #fff !important;
        width: 16px !important;
        height: 16px !important;
        mask-size: 16px !important;
        -webkit-mask-size: 16px !important;
    }


/* ── DROPDOWN ACCOUNT ───────────────────────────────────────── */

.account-main.dropdown-menu {
    background: var(--surface-1, #fff) !important;
    border: 1px solid var(--line, #ECEDF1) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px -4px rgba(15,17,21,0.15), 0 2px 4px rgba(15,17,21,0.06) !important;
    padding: 8px !important;
    min-width: 260px !important;
}

.account-main .user-info-container {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px !important;
    border-radius: 8px !important;
}

.account-main .logo-container {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--brand-warm), var(--brand)) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    .account-main .logo-container .xaf-image {
        background-color: #fff !important;
        width: 22px !important;
        height: 22px !important;
        mask-size: 22px !important;
        -webkit-mask-size: 22px !important;
    }

.account-main .user-info-inner-container {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.account-main .user-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--ink-0, #0F1115) !important;
    margin-bottom: 4px !important;
}

.account-separator {
    height: 1px !important;
    background: var(--line, #ECEDF1) !important;
    margin: 8px 0 !important;
    border: 0 !important;
}

.account-main .dxbl-btn.xaf-btn {
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    width: 100% !important;
    justify-content: flex-start !important;
    border: 0 !important;
    background: transparent !important;
    transition: 120ms !important;
    display: flex !important;
}

    .account-main .dxbl-btn.xaf-btn:hover {
        background: var(--surface-2, #F9FAFC) !important;
    }

.account-main .my-details {
    color: var(--brand) !important;
}

    .account-main .my-details:hover {
        background: var(--brand-soft, #EBEBF6) !important;
    }

.account-main .log-off {
    color: var(--tint-rose-fg, #E11D48) !important;
}

    .account-main .log-off:hover {
        background: var(--tint-rose-bg, #FCDCE5) !important;
    }


/* ── THEME SETTINGS ─────────────────────────────────────────── */

.theme-settings .settings-bar.card {
    background: var(--surface-1, #fff) !important;
    border: 1px solid var(--line, #ECEDF1) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px -6px rgba(15,17,21,0.10) !important;
    padding: 8px !important;
}

.themes-menu .nav.nav-pills {
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 !important;
}

.themes-menu .theme-group {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: var(--ink-3, #858B99) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    padding: 8px 8px 4px !important;
    display: block !important;
}

.theme-settings .size-mode-switcher {
    border-radius: 7px !important;
    border: 1px solid var(--line, #ECEDF1) !important;
    background: var(--surface-1, #fff) !important;
}

    .theme-settings .size-mode-switcher .dxbl-text-edit-input {
        font-size: 13px !important;
        color: var(--ink-1, #1F2330) !important;
    }


/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 1180px) {
    .gs-trigger {
        width: min(420px, 36%) !important;
    }

    .school-info > div:not(.school_image) {
        display: none !important;
    }

    .school-info {
        padding: 3px !important;
        border-radius: 50% !important;
        max-width: 44px !important;
    }
}

@media (max-width: 900px) {
    .gs-trigger {
        width: min(320px, 40%) !important;
    }

    .header-left-side {
        max-width: none !important;
    }
}

@media (max-width: 768px) {
    .header.navbar-dark,
    .header {
        padding: 0 12px !important;
        gap: 8px !important;
    }

    .gs-trigger {
        position: static !important;
        transform: none !important;
        width: auto !important;
        flex: 1 !important;
    }

    .view-caption-root .xaf-view-caption-sm {
        display: none !important;
    }
}


/* ════════════════════════════════════════════════════════════════
   CAPTION — raffinement V5
   · Icône masquée
   · Style breadcrumb horizontal : parent › vue
   · Typographie alignée sur le mockup V5
   ════════════════════════════════════════════════════════════════ */

/* 1 ── Masquer l'icône de vue ──────────────────────────────── */

.view-caption-root .xaf-caption-icon-container {
    display: none !important;
}


/* 2 ── Conteneur caption : disposition horizontale ──────────── */

.view-caption-root .xaf-caption-container {
    flex-direction: row !important; /* horizontal au lieu de colonne */
    align-items: center !important;
    gap: 0 !important;
}


/* 3 ── Parent (breadcrumb) ex: "Médiacom" ───────────────────── */

.view-caption-root .xaf-view-caption-sm {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--ink-3, #858B99) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
}

    /* Séparateur › entre parent et titre — affiché seulement
   quand xaf-view-caption-sm n'est PAS vide               */
    .view-caption-root .xaf-view-caption-sm:not(:empty)::after {
        content: "›" !important;
        display: inline-block !important;
        margin: 0 6px !important;
        color: var(--ink-4, #B5BBC7) !important;
        font-weight: 400 !important;
        font-size: 13px !important;
    }


/* 4 ── Titre de vue ex: "Tableau de bord" ──────────────────── */

.view-caption-root .xaf-object-caption {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--ink-0, #0F1115) !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
}


/* ════════════════════════════════════════════════════════════════
   CAPTION — breadcrumb unifié (v4)
   Couvre les deux structures DOM de XAF :
   · ListView  : .xaf-view-caption-lg  (pas de xaf-view-caption-sm)
   · Dashboard : .xaf-view-caption-sm + .xaf-object-caption
   ════════════════════════════════════════════════════════════════ */

/* Masquer l'icône dans tous les cas */
.view-caption-root .xaf-caption-icon-container {
    display: none !important;
}

/* Conteneur caption : toujours horizontal */
.view-caption-root .xaf-caption-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    max-width: unset !important;
}

/* ── Span groupe injecté par JS ──────────────────────────────── */

.xaf-caption-container [data-acur-breadcrumb] {
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: var(--ink-3, #858B99) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

    /* Séparateur › après le groupe (seulement si non vide) */
    .xaf-caption-container [data-acur-breadcrumb]:not(:empty)::after {
        content: "›" !important;
        margin: 0 5px 0 6px !important; /* légèrement asymétrique : plus près du titre */
        color: var(--ink-4, #B5BBC7) !important;
        font-weight: 300 !important;
        font-size: 13px !important;
    }

/* ── Cas 1 : ListView — xaf-view-caption-lg ─────────────────── */

.view-caption-root .xaf-view-caption-lg {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--ink-0, #0F1115) !important;
    letter-spacing: -0.012em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
}

/* ── Cas 2 : Dashboard — xaf-view-caption-sm masqué,
              xaf-object-caption = titre principal ────────────── */

/* xaf-view-caption-sm = titre dupliqué en cas Dashboard → masquer */
.view-caption-root .xaf-view-caption-sm {
    display: none !important;
}

.view-caption-root .xaf-object-caption {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--ink-0, #0F1115) !important;
    letter-spacing: -0.012em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
}


/* ════════════════════════════════════════════════════════════════════════════
   VERTU LICENSE (repris d'VERTU License) — BARRE DU HAUT · charte VERTU License (teal)   (remplace v14 ci-dessus)
   - Le titre de l'écran n'est plus écrasé : la recherche n'est plus en position
     absolue, elle prend la place restante (centrée par marges automatiques).
   - Hauteur selon le mode XAF : 52 px (Standard) / 46 px (Compact).
   - Recherche en champ teal clair, raccourci affiché « Ctrl K ».
   - Société : vignette carrée arrondie (plus de rond crème), nom visible si la
     largeur le permet.
   ════════════════════════════════════════════════════════════════════════════ */

:root { --tb-h: 52px; }
body.xaf-size-s { --tb-h: 46px; }

.header.navbar-dark,
.header {
    height: var(--tb-h) !important;
    min-height: var(--tb-h) !important;
    grid-template-rows: var(--tb-h) !important;
    border-bottom: 1px solid #E7EDEE !important;
}

/* Titre de l'écran / fil d'Ariane : prend sa place avant la recherche */
.header-right-side > [role="heading"] {
    flex: 0 1 auto !important;
    min-width: 110px !important;
    max-width: 32vw !important;
}

/* Recherche globale */
.gs-trigger {
    position: static !important;
    left: auto !important;
    transform: none !important;
    flex: 0 1 460px !important;
    width: auto !important;
    min-width: 180px !important;
    margin: 0 auto 0 24px !important;
    height: calc(var(--tb-h) - 18px) !important;
    background: #F1F5F5 !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

    .gs-trigger:hover {
        background: #ECF1F2 !important;
        border-color: #D8E2E4 !important;
        box-shadow: none !important;
    }

    .gs-trigger:focus-visible,
    .gs-trigger:focus-within {
        background: #FFFFFF !important;
        border-color: #0A9A85 !important;
        box-shadow: 0 0 0 3px rgba(10,154,133, .14) !important;
    }

.gs-trigger-label { font-size: 12.5px !important; color: var(--ink-3) !important; }

/* Raccourci : « Ctrl K » (postes Windows) au lieu de ⌘K */
.gs-trigger-kbd {
    font-size: 0 !important;
    padding: 3px 6px !important;
    background: #FFFFFF !important;
    border: 1px solid #D8E2E4 !important;
    border-radius: 5px !important;
}

    .gs-trigger-kbd::after {
        content: "Ctrl K";
        font-family: "Montserrat", system-ui, sans-serif !important;
        font-size: 10.5px;
        font-weight: 600;
        color: var(--ink-3);
        letter-spacing: .02em;
    }

/* Bloc de droite */
.header-right-side .d-flex.ms-auto { margin-left: 16px !important; gap: 6px !important; }

/* Société */
.school-info,
.school-info:hover {
    height: calc(var(--tb-h) - 16px) !important;
    max-width: 280px !important;
    padding: 0 12px 0 3px !important;
    gap: 8px !important;
    align-items: center !important;
    border-radius: 10px !important;
    background: #FFFFFF !important;
    border: 1px solid #E4EBEC !important;
}

    .school-info:hover { border-color: #D0DADB !important; background: #FAFCFC !important; }

    .school-info .school_image {
        width: calc(var(--tb-h) - 24px) !important;
        height: calc(var(--tb-h) - 24px) !important;
        margin: 0 !important;
        padding: 2px !important;
        border-radius: 7px !important;
        border: 1px solid #EAEFF0 !important;
        background: #FFFFFF !important;
    }

    .school-info > div:not(.school_image) { padding: 0 !important; }

    .school-info .SchoolName { font-size: 12px !important; color: var(--ink-0) !important; }
    .school-info .SchoolAdress { font-size: 10.5px !important; color: var(--ink-3) !important; }

@media (max-width: 1180px) {
    .school-info,
    .school-info:hover {
        padding: 3px !important;
        border-radius: 10px !important;
        max-width: none !important;
    }
}

/* Boutons ronds : réglages, compte */
.theme-button,
.btn-header {
    width: calc(var(--tb-h) - 20px) !important;
    height: calc(var(--tb-h) - 20px) !important;
    color: var(--ink-3) !important;
}

    .theme-button:hover,
    .btn-header:hover { background: #ECF3F3 !important; color: var(--brand) !important; }

.account-container .account-button {
    width: calc(var(--tb-h) - 20px) !important;
    height: calc(var(--tb-h) - 20px) !important;
    background: linear-gradient(135deg, #0A9A85 0%, #087A69 60%, #066656 100%) !important;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px #D2E9ED !important;
}

    .account-container .account-button:hover { transform: none !important; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #A8DAE2 !important; }


/* ── Bloc société · compte (6.0) ──
   Ordre : réglages · société (nom + ville, information seule) | avatar ▾.
   L'avatar porte les initiales de l'UTILISATEUR (nav-rail.js,
   data-ab6-initials) et ouvre le menu du compte (Mon profil, Se déconnecter).
   La société n'est plus cliquable : elle n'ouvre plus le menu utilisateur. */

.header .d-flex.ms-auto { gap: 4px !important; align-items: center !important; }
.header .d-flex.ms-auto > .theme-settings { order: 1; }
.header .d-flex.ms-auto > .school-info { order: 2; }
.header .d-flex.ms-auto > .account-container {
    order: 3;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    margin-left: 8px !important;
    padding-left: 12px !important;
    border-left: 1px solid #E7EDEE;
    position: relative;
}
.header .d-flex.ms-auto > .modal-backdrop { order: 9; }

/* Société : texte d'information (logo masqué) */
.school-info .school_image { display: none !important; }

.school-info,
.school-info:hover {
    height: auto !important;
    max-width: 240px !important;
    padding: 0 0 0 26px !important;
    margin: 0 0 0 6px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    align-items: center !important;
    cursor: default !important;
    position: relative !important;
}

    .school-info::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 18px;
        height: 18px;
        margin-top: -9px;
        background-color: #75898C;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 7h1M14 7h1M9 11h1M14 11h1M9 15h1M14 15h1M10 21v-3h4v3'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 7h1M14 7h1M9 11h1M14 11h1M9 15h1M14 15h1M10 21v-3h4v3'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    }

    .school-info .SchoolName { font-size: 12px !important; font-weight: 600 !important; color: var(--ink-1, #14292D) !important; max-width: 200px !important; }
    .school-info .SchoolAdress { font-size: 10.5px !important; color: var(--ink-4, #75898C) !important; max-width: 200px !important; }

/* Nom de la société visible dès 1000 px ; en dessous, icône seule */
@media (min-width: 1000px) {
    .school-info > div:not(.school_image) { display: flex !important; }
}

@media (max-width: 999.98px) {
    .school-info > div:not(.school_image) { display: none !important; }
    .school-info, .school-info:hover { padding-left: 18px !important; }
}

/* Avatar : initiales de l'utilisateur au lieu de l'icône générique */
.account-container .account-button .xaf-image { display: none !important; }

.account-container .account-button::after {
    content: attr(data-ab6-initials);
    font: 600 11px/1 "Montserrat", system-ui, sans-serif !important;
    color: #FFFFFF;
    letter-spacing: .03em;
}

/* Chevron du menu du compte, collé à l'avatar */
.header .account-container::after {
    content: "";
    width: 6px;
    height: 6px;
    margin: -3px 2px 0 6px;
    border-right: 1.6px solid var(--ink-4, #75898C);
    border-bottom: 1.6px solid var(--ink-4, #75898C);
    transform: rotate(45deg);
    pointer-events: none;
    transition: border-color 120ms;
}

.header .account-container:hover::after { border-color: var(--brand, #087A69); }

/* Menu du compte : avatar à initiales, nom, société ; actions avec icônes */
.account-main.dropdown-menu {
    min-width: 264px !important;
    padding: 6px !important;
    border: 1px solid #DDE8E9 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px -12px rgba(11,26,69, .28), 0 2px 6px rgba(11,26,69, .06) !important;
}

    .account-main .user-info-container {
        align-items: center !important;
        gap: 12px !important;
        padding: 10px 10px 12px !important;
    }

    .account-main .logo-container {
        width: 40px !important;
        height: 40px !important;
        background: linear-gradient(135deg, #0A9A85 0%, #087A69 60%, #066656 100%) !important;
        box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px #D2E9ED !important;
    }

    .account-main .logo-container[data-ab6-initials] .xaf-image { display: none !important; }

    .account-main .logo-container[data-ab6-initials]::after {
        content: attr(data-ab6-initials);
        font: 600 14px/1 "Montserrat", system-ui, sans-serif;
        color: #FFFFFF;
        letter-spacing: .03em;
    }

    .account-main .user-name {
        font: 600 14px/1.25 "Montserrat", system-ui, sans-serif !important;
        color: #111A1B !important;
        margin: 0 !important;
    }

    .account-main .user-info-inner-container[data-ab6-company]::after {
        content: attr(data-ab6-company);
        display: block;
        margin-top: 3px;
        font: 400 12px/1.3 "Montserrat", system-ui, sans-serif;
        color: #75898C;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Carte d'identité en grille : avatar | nom / société, puis « Mon profil »
       sur toute la largeur, comme « Se déconnecter ». */
    .account-main .user-info-container {
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) !important;
        column-gap: 12px !important;
        row-gap: 0 !important;
        align-items: center !important;
        padding: 10px 4px 4px !important;
    }

        .account-main .user-info-container > .logo-container { grid-column: 1; grid-row: 1 / span 2; margin-left: 6px !important; }
        .account-main .user-info-inner-container { display: contents !important; }
        .account-main .user-name-container { grid-column: 2; grid-row: 1; align-self: end; min-width: 0; }
        .account-main .user-info-inner-container[data-ab6-company]::after { grid-column: 2; grid-row: 2; align-self: start; margin-top: 2px !important; }
        .account-main .user-info-container .dxbl-btn.xaf-btn.my-details { grid-column: 1 / -1; grid-row: 3; margin-top: 10px !important; }

    .account-main .dxbl-btn.xaf-btn.my-details,
    .account-main .dxbl-btn.xaf-btn.log-off {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        height: 36px !important;
        padding: 0 10px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: transparent !important;
        font: 500 13px/1 "Montserrat", system-ui, sans-serif !important;
        text-decoration: none !important;
        justify-content: flex-start !important;
        color: #14292D !important;
    }

        .account-main .dxbl-btn.xaf-btn.my-details .dxbl-btn-caption,
        .account-main .dxbl-btn.xaf-btn.log-off .dxbl-btn-caption { text-decoration: none !important; }

        .account-main .dxbl-btn.xaf-btn.my-details::before,
        .account-main .dxbl-btn.xaf-btn.log-off::before {
            content: "";
            width: 16px;
            height: 16px;
            flex: none;
            background-color: currentColor;
        }

        .account-main .dxbl-btn.xaf-btn.my-details::before {
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
            color: #087A69;
        }

        .account-main .dxbl-btn.xaf-btn.log-off::before {
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
        }

        .account-main .dxbl-btn.xaf-btn.my-details:hover { background: #ECF6F7 !important; color: #087A69 !important; }
        .account-main .dxbl-btn.xaf-btn.log-off { color: #B4233A !important; }
        .account-main .dxbl-btn.xaf-btn.log-off:hover { background: #FDECEF !important; }

    .account-main .account-separator { margin: 4px 6px !important; background: #E7EDEE !important; }


/* ── Bouton Réglages (6.0) : même famille que l'avatar ──
   Rond, même diamètre que l'avatar, filet teal clair ; engrenage au trait
   (SVG en masque, à la place de l'icône XAF pleine grise), encre #4C595B,
   teal au survol avec un quart de tour. */
.header .theme-settings .theme-button {
    border-radius: 50% !important;
    background: #FFFFFF !important;
    box-shadow: inset 0 0 0 1px #D8E2E4 !important;
    transition: background-color 120ms, box-shadow 120ms !important;
}

    .header .theme-settings .theme-button .xaf-image {
        width: 18px !important;
        height: 18px !important;
        background-color: #4C595B !important;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 18px 18px no-repeat !important;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 18px 18px no-repeat !important;
        transition: background-color 120ms, transform 300ms ease !important;
    }

    .header .theme-settings .theme-button:hover {
        background: #ECF6F7 !important;
        box-shadow: inset 0 0 0 1px #A8DAE2 !important;
    }

        .header .theme-settings .theme-button:hover .xaf-image {
            background-color: #087A69 !important;
            transform: rotate(45deg);
        }

    .header .theme-settings .theme-button:focus-visible {
        outline: 2px solid #1DBED6 !important;
        outline-offset: 2px !important;
    }

body.xaf-size-s .header .theme-settings .theme-button .xaf-image {
    width: 16px !important;
    height: 16px !important;
    -webkit-mask-size: 16px 16px !important;
    mask-size: 16px 16px !important;
}
