/* ============================================
   CORRECTION DU BOUTON DE SÉLECTION DES COLONNES
   Bootstrap Table - data-show-columns="true"
   ULTRA AGRESSIF - Force le style
   ============================================ */

/* CIBLER TOUS LES SÉLECTEURS POSSIBLES */
.bootstrap-table .keep-open.btn-group .btn-secondary,
.bootstrap-table .keep-open.btn-group button,
.bootstrap-table .keep-open button,
.bootstrap-table .columns button,
.bootstrap-table button[name="columns"],
button.btn.btn-secondary[data-toggle="dropdown"],
.fixed-table-toolbar .columns button,
.fixed-table-toolbar button[name="columns"] {
    background-color: #2d5016 !important; /* Vert très foncé */
    background: #2d5016 !important;
    color: white !important;
    border: 1px solid #1a3009 !important;
    border-color: #1a3009 !important;
    padding: 6px 12px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: auto !important;
    max-width: 50px !important;
    width: auto !important;
    font-size: 14px !important;
}

/* Hover du bouton */
.bootstrap-table .keep-open.btn-group .btn-secondary:hover,
.bootstrap-table .keep-open.btn-group button:hover,
.bootstrap-table .keep-open button:hover,
.bootstrap-table .columns button:hover,
button.btn.btn-secondary[data-toggle="dropdown"]:hover,
.fixed-table-toolbar .columns button:hover {
    background-color: #1a3009 !important;
    background: #1a3009 !important;
    border-color: #0d1804 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* État actif/focus du bouton */
.bootstrap-table .keep-open.btn-group .btn-secondary:active,
.bootstrap-table .keep-open.btn-group .btn-secondary:focus,
.bootstrap-table .keep-open.btn-group button:active,
.bootstrap-table .keep-open.btn-group button:focus,
button.btn.btn-secondary[data-toggle="dropdown"]:active,
button.btn.btn-secondary[data-toggle="dropdown"]:focus {
    background-color: #0d1804 !important;
    background: #0d1804 !important;
    border-color: #000 !important;
    box-shadow: 0 0 0 0.2rem rgba(45, 80, 22, 0.5) !important;
}

/* MASQUER TOUT LE TEXTE ET LES ICÔNES EXISTANTES */
.bootstrap-table .keep-open.btn-group .btn-secondary span,
.bootstrap-table .keep-open.btn-group button span,
.bootstrap-table .columns button span,
button.btn.btn-secondary[data-toggle="dropdown"] span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Masquer les icônes FontAwesome/Glyphicon existantes */
.bootstrap-table .keep-open.btn-group .btn-secondary .fa,
.bootstrap-table .keep-open.btn-group .btn-secondary .glyphicon,
.bootstrap-table .keep-open.btn-group button .fa,
.bootstrap-table .keep-open.btn-group button .glyphicon,
.bootstrap-table .columns button .fa,
.bootstrap-table .columns button .glyphicon,
button.btn.btn-secondary[data-toggle="dropdown"] .fa,
button.btn.btn-secondary[data-toggle="dropdown"] .glyphicon {
    display: none !important;
    visibility: hidden !important;
}

/* Masquer les carets par défaut */
.bootstrap-table .keep-open.btn-group .btn-secondary .caret,
.bootstrap-table .keep-open.btn-group button .caret,
.bootstrap-table .columns button .caret,
button.btn.btn-secondary[data-toggle="dropdown"] .caret {
    display: none !important;
    visibility: hidden !important;
}

/* CRÉER UNE SEULE GRANDE FLÈCHE CENTRÉE */
.bootstrap-table .keep-open.btn-group .btn-secondary::before,
.bootstrap-table .keep-open.btn-group button::before,
.bootstrap-table .columns button::before,
button.btn.btn-secondary[data-toggle="dropdown"]::before,
.fixed-table-toolbar button[name="columns"]::before {
    content: "\f107" !important; /* Code FontAwesome pour fa-angle-down */
    font-family: 'FontAwesome' !important;
    font-size: 18px !important;
    color: white !important;
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* Désactiver le ::after pour éviter les doublons */
.bootstrap-table .keep-open.btn-group .btn-secondary::after,
.bootstrap-table .keep-open.btn-group button::after,
button.btn.btn-secondary[data-toggle="dropdown"]::after {
    content: "" !important;
    display: none !important;
}

/* Si la classe btn-info existe (Bootstrap applique parfois cette classe) */
.bootstrap-table button.btn-info,
.bootstrap-table .btn-info {
    background-color: #2d5016 !important;
    border-color: #1a3009 !important;
}

/* STYLE DU DROPDOWN MENU */
.bootstrap-table .keep-open.btn-group .dropdown-menu {
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    padding: 10px 0 !important;
    min-width: 200px !important;
}

.bootstrap-table .keep-open.btn-group .dropdown-menu label {
    padding: 8px 20px !important;
    margin: 0 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.bootstrap-table .keep-open.btn-group .dropdown-menu label:hover {
    background-color: #f8f9fa !important;
}

/* Alternative avec des boutons plus visibles */
.bootstrap-table .columns.btn-group button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bootstrap-table .columns.btn-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Style du menu déroulant des colonnes */
.bootstrap-table .keep-open.btn-group .dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 10px 0;
    min-width: 200px;
}

/* Style des items dans le dropdown */
.bootstrap-table .keep-open.btn-group .dropdown-menu label {
    padding: 8px 20px;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bootstrap-table .keep-open.btn-group .dropdown-menu label:hover {
    background-color: #f8f9fa;
}

/* Style des checkboxes */
.bootstrap-table .keep-open.btn-group .dropdown-menu input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

/* ============================================
   VARIANTES DE COULEURS (Décommenter celle souhaitée)
   ============================================ */

/* VARIANTE 1 : Bouton bleu (Bootstrap primary) */
/*
.bootstrap-table .keep-open.btn-group .btn-secondary {
    background-color: #007bff !important;
    border-color: #0056b3 !important;
}
.bootstrap-table .keep-open.btn-group .btn-secondary:hover {
    background-color: #0056b3 !important;
}
*/

/* VARIANTE 2 : Bouton vert (Bootstrap success) */
/*
.bootstrap-table .keep-open.btn-group .btn-secondary {
    background-color: #28a745 !important;
    border-color: #1e7e34 !important;
}
.bootstrap-table .keep-open.btn-group .btn-secondary:hover {
    background-color: #1e7e34 !important;
}
*/

/* VARIANTE 3 : Bouton orange (style warning) */
/*
.bootstrap-table .keep-open.btn-group .btn-secondary {
    background-color: #fd7e14 !important;
    border-color: #dc6502 !important;
}
.bootstrap-table .keep-open.btn-group .btn-secondary:hover {
    background-color: #dc6502 !important;
}
*/

/* VARIANTE 4 : Bouton rouge (style danger) */
/*
.bootstrap-table .keep-open.btn-group .btn-secondary {
    background-color: #dc3545 !important;
    border-color: #bd2130 !important;
}
.bootstrap-table .keep-open.btn-group .btn-secondary:hover {
    background-color: #bd2130 !important;
}
*/