/* =============================================== Containers boutons =============================================== */
/* Permet de formater une div horizontale qui contient un ensemble de boutons */
.bout-container,
.bout-container-vert {
    display: flex;
    flex-direction: row;
    align-items: center;

    border-radius: 4px;
}

/* ----------------------------------------------- Containers de boutons verticaux ----------------------------------------------- */
.bout-container-vert {
    padding: 4px 0 4px 4px;
    scrollbar-width: thin;
}

.bout-container-vert:not(:has(*)) {
    padding: 0;
}

/* =============================================== Style globa boutons =============================================== */
/* Classe principale de style à appliquer aux boutons */
.modu-bout {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    margin-right: 4px;

    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter';
    background-color: #eee;
    color: var(--them-fonc);

    cursor: pointer;
    user-select: none;
    text-align: center;
}

.bout-container-vert > .modu-bout {
    flex-direction: column;
    justify-content: space-evenly;
    margin: 0 4px 0 0;
    padding: 4px;
}

.bout-container-vert > .modu-bout div,
.bout-container-vert > .modu-bout span {
    flex-grow: 0;
    font-size: 11px;
    line-height: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.bout-container-vert > .modu-bout i {
    font-size: 12px;
}

/* .bout-container-vert > button,
.bout-vert {
    margin-right: 0px;
    margin-bottom: 4px;
} */

/* =============================================== Dimensions boutons =============================================== */
/* ----------------------------------------------- Boutons horizontaux ----------------------------------------------- */
/* ----------------------------------------------- Boutons XL ----------------------------------------------- */
.bout-xtra-larg {
    min-width: 200px;
    height: 22px;
    border-radius: 4px;
}
/* ----------------------------------------------- Boutons L ----------------------------------------------- */
.bout-larg {
    min-width: 80px;
    height: 22px;
    border-radius: 4px;
}
/* ----------------------------------------------- Boutons S ----------------------------------------------- */
.bout-peti {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

/* Bouton coloré de module (par exemple : utilisé dans les tables) */
.modu-bout-coul {
    height: 40px;
    padding: 0 16px;
    gap: 10px;
}

/* ----------------------------------------------- Boutons verticaux ----------------------------------------------- */
/* ----------------------------------------------- Boutons verticaux XL ----------------------------------------------- */
.bout-vert-xtra-larg {
    height: 100%;
    min-width: 200px;
    border-radius: 4px;
}
/* ----------------------------------------------- Boutons verticaux L ----------------------------------------------- */
.bout-vert-larg {
    height: 100%;
    min-width: 80px;
    max-width: 80px;
    border-radius: 4px;
}
/* ----------------------------------------------- Boutons verticaux Carrés ----------------------------------------------- */
.bout-vert-carr {
    height: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
}

/* =============================================== Contenu des boutons =============================================== */
/* ----------------------------------------------- Icône ----------------------------------------------- */
.modu-bout > i {
    font-size: 14px;
}
/* ----------------------------------------------- Texte ----------------------------------------------- */
.modu-bout > span,
.modu-bout > div {
    flex-grow: 1;
}

/* =============================================== Rôle des boutons =============================================== */
/* ----------------------------------------------- Suppression ----------------------------------------------- */
.modu-bout.suppr {
    color: red;
}

/* =============================================== États des boutons =============================================== */
/* ----------------------------------------------- Focus ----------------------------------------------- */
.modu-bout:focus {
    outline: none;
}
/* ----------------------------------------------- Désactivé ----------------------------------------------- */
.modu-bout.disabled {
    opacity: 25%;
    cursor: not-allowed;
    &:hover {
        background-color: #eee;
        color: var(--them-fonc);
    }
}
/* ----------------------------------------------- Hover ----------------------------------------------- */
.modu-bout:not(.light-hover):hover {
    color: #fff;
    background-color: var(--noti-fonc);
}

/* ----------------------------------------------- Hover clair ----------------------------------------------- */
.modu-bout.light-hover:hover {
    color: #fff;
    background-color: color-mix(in srgb, var(--noti-fonc) 65%, #FFFFFF 35%);
}
/* ----------------------------------------------- Actif ----------------------------------------------- */
.modu-bout.active {
    color: #fff;
    background-color: var(--noti-fonc);
}
/* ----------------------------------------------- Actif + Suppression ----------------------------------------------- */
.modu-bout.active.suppr {
    background-color: red;
}

/* =============================================== Puces sur boutons =============================================== */
/* ----------------------------------------------- Puces sur boutons horizontaux ----------------------------------------------- */
.bout-container:has(.gene-puce-noti) {
    overflow: visible;
}

.modu-bout:has(.gene-puce-noti) {
    position: relative;
}

.modu-bout > .gene-puce-noti {
    bottom: -4px;
    right: -4px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-weight: 600;
    font-size: 9px;
}

.bout-peti > .gene-puce-noti {
    top: -4px;
}

.modu-bout:hover {
    &:not(.bout-vert-larg) {
        .gene-puce-noti {
            display: none;
        }
    }
}

/* ----------------------------------------------- Puces sur boutons verticaux ----------------------------------------------- */
.modu-bout.bout-vert-larg > .gene-puce-noti {
    right: 2px;
}

.bout-vert-larg:hover, .bout-vert-larg.active {
    .gene-puce-noti {
        background-color: #eee;
        color: var(--noti-fonc);
    }
}