/*
 * Barre d'outils de module dans la barre du haut (Gantt, Chiffrage, Budget).
 * Maquette « mise en forme » du client : titre du module a gauche, puis des boutons
 * icone + libelle dessous, separes par groupes. Le Gantt la rend en Twig
 * (navigation/topbar.html.twig) ; le Chiffrage et le Budget la teleportent depuis Vue.
 */
.navbar-custom.has-module-toolbar {
    /* Bleu des grilles du Budget (le « primary » du theme est violet). */
    --module-blue: #3156f6;
}
.navbar-custom.has-module-toolbar .topbar { gap: 12px; }

.topbar-module-start {
    flex: 1 1 auto;
    min-width: 0;
}

.module-toolbar {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 14px;
    min-width: 0;
}

.module-heading {
    align-items: center;
    color: #1f2a44;
    display: flex;
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 700;
    gap: 8px;
    white-space: nowrap;
}

.module-heading > i { color: var(--module-blue); font-size: 22px; line-height: 1; }

/* Titre-menu (Budget) : bascule entre les vues du module. */
.module-heading.dropdown-toggle { background: none; border: 0; padding: 4px 2px; }
.module-heading.dropdown-toggle::after { display: none; }
.module-heading .mdi-chevron-down { color: var(--ct-secondary-color, #6c7585); font-size: 18px; }

.module-actions {
    align-items: center;
    display: flex;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.module-action {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #253044;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    min-width: 58px;
    padding: 5px 8px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.module-action > i { color: var(--module-blue); font-size: 21px; line-height: 1; }
.module-action > span { font-size: 11.5px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.module-action:hover, .module-action:focus-visible { background: rgba(49, 86, 246, .08); color: #253044; outline: 0; }
.module-action.active { background: rgba(49, 86, 246, .12); color: var(--module-blue); }
.module-action.active > span { color: var(--module-blue); }
.module-action:disabled { cursor: default; opacity: .5; }
.module-action:disabled:hover { background: transparent; }

.module-sep {
    align-self: center;
    background: var(--ct-border-color, #dee2e6);
    flex: 0 0 1px;
    height: 30px;
    margin: 0 6px;
}

/* Curseur d'echelle du Gantt, a la place d'une icone */
.module-zoom { cursor: default; min-width: 92px; }
.module-zoom .form-range { height: 21px; margin: 0; width: 80px; }

/* La barre du module prend la place : le nom de l'utilisateur se replie plus tot. */
@media (max-width: 1599.98px) {
    .navbar-custom.has-module-toolbar .nav-user > span.d-lg-flex { display: none !important; }
    .navbar-custom.has-module-toolbar .topbar-menu { gap: .5rem !important; }
}

/* Ecrans etroits : icones seules (le libelle reste en infobulle), puis titre masque. */
@media (max-width: 1199.98px) {
    .module-action { min-width: 40px; padding: 6px; }
    .module-action > span { display: none; }
    .module-zoom > span { display: none; }
}

@media (max-width: 767.98px) {
    .module-heading > span { display: none; }
    .module-toolbar { gap: 6px; }
    .module-sep { margin: 0 2px; }
}

@media print {
    .module-toolbar { display: none !important; }
}
.d-contents { display: contents; }
