/* ==========================================================================
   Solum ERP - Feuille de Style Centralisée pour les Barres d'Outils
   ========================================================================== */

/* Structure Générale de la Barre d'Outils */
.solum-toolbar,
.tiptap-toolbar {
    border-radius: 0 !important;
    border: 1px solid #cbd5e1;
    background-color: #e2e8f0;
    padding: 6px;
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    row-gap: 0 !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
    position: relative;
    overflow-x: auto !important;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
}

/* Scrollbar Horizontale Solum */
.solum-toolbar::-webkit-scrollbar,
.tiptap-toolbar::-webkit-scrollbar {
    height: 6px;
}

.solum-toolbar::-webkit-scrollbar-track,
.tiptap-toolbar::-webkit-scrollbar-track {
    background: #cbd5e1;
}

.solum-toolbar::-webkit-scrollbar-thumb,
.tiptap-toolbar::-webkit-scrollbar-thumb {
    background: #914e8d;
    border-radius: 0 !important;
}

.solum-toolbar::-webkit-scrollbar-thumb:hover,
.tiptap-toolbar::-webkit-scrollbar-thumb:hover {
    background: #733c70;
}

/* Groupes de la Barre d'Outils */
.solum-toolbar-group,
.tiptap-toolbar-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding: 0;
    border: none !important;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0 !important;
}

/* Suppression de tout trait séparateur horizontal */
.solum-toolbar-group::before,
.tiptap-toolbar-group::before,
.solum-toolbar-group::after,
.tiptap-toolbar-group::after {
    display: none !important;
    content: none !important;
}

/* Séparateur Vertical entre Groupes */
.solum-toolbar-divider,
.tiptap-toolbar-divider {
    width: 1px;
    height: 92px;
    background-color: #cbd5e1;
    margin: 0 6px;
    flex-shrink: 0 !important;
    border: none !important;
}

/* Champs Sélecteurs & Inputs (Maintenus à 22px de hauteur) */
.tiptap-select-tight,
.solum-toolbar-select,
.solum-toolbar-input {
    border-radius: 0 !important;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 400 !important;
    height: 22px !important;
    padding: 1px 4px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.tiptap-select-tight option,
.solum-toolbar-select option {
    font-weight: 400 !important;
}

.tiptap-select-tight:focus,
.solum-toolbar-select:focus,
.solum-toolbar-input:focus {
    border-color: #914e8d;
}

/* Boutons Carrés (Formatting, Alignements, Effacer) : Hauteur 26px */
.tiptap-btn-sq,
.solum-toolbar-btn-sq {
    border-radius: 0 !important;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 26px !important;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.tiptap-btn-sq:hover,
.solum-toolbar-btn-sq:hover {
    background-color: #f3ebf3;
    border-color: #914e8d;
    color: #914e8d;
}

.tiptap-btn-sq.is-active,
.solum-toolbar-btn-sq.is-active {
    background-color: #914e8d !important;
    border-color: #914e8d !important;
    color: #ffffff !important;
}

/* Boutons en Ligne (Zones Liste, Insertion, Undo/Redo, Balises) : Revenus à 26px de hauteur */
.tiptap-btn-row,
.solum-toolbar-btn-row {
    border-radius: 0 !important;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    padding: 1px 5px;
    font-size: 0.75rem;
    font-weight: 700 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 26px !important;
    width: 100%;
    transition: all 0.15s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.tiptap-btn-row:hover,
.solum-toolbar-btn-row:hover {
    background-color: #f3ebf3;
    border-color: #914e8d;
    color: #914e8d;
}

.tiptap-btn-row.is-active,
.solum-toolbar-btn-row.is-active {
    background-color: #914e8d !important;
    border-color: #914e8d !important;
    color: #ffffff !important;
}

/* Boutons d'Action / Neutres de la Barre d'Outils (#b5b4b0 sans cadre) */
.tiptap-btn-action,
.solum-toolbar-btn-action {
    border-radius: 0 !important;
    border: none !important;
    background-color: #b5b4b0;
    color: #ffffff;
    padding: 1px 5px;
    font-size: 0.75rem;
    font-weight: 400 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px !important;
    width: 100%;
    transition: all 0.15s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.tiptap-btn-action:hover,
.solum-toolbar-btn-action:hover {
    background-color: #a1a09c;
    color: #ffffff;
}
