/**
 * Styles Personnalisés Mbangupay - FICHIER GLOBAL UNIQUE
 * Tous les styles DataTables, boutons, tables doivent être ici
 * Ne pas dupliquer dans les pages individuelles
 */

/* ============================================
   DATATABLES - BARRE D'OUTILS (Length + Buttons + Search sur une ligne)
   ============================================ */

/* Forcer la barre d'outils DataTables sur une seule ligne */
.dataTables_wrapper {
    width: 100%;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_filter {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    margin-bottom: 0.75rem !important;
}

.dataTables_wrapper .dataTables_length {
    float: left !important;
    margin-right: 0.75rem !important;
}

.dataTables_wrapper .dt-buttons {
    float: left !important;
    gap: 0 !important;
    margin-right: 0.75rem !important;
}

.dataTables_wrapper .dataTables_filter {
    float: right !important;
}

/* Clearfix pour la ligne d'outils */
.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   DATATABLES - BOUTONS EXPORT (Compacts)
   ============================================ */

/* Style uniforme pour tous les boutons DataTables */
.dt-buttons .dt-button {
    min-width: auto !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.35rem 0.75rem !important;
    margin: 0 !important;
    border-radius: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    text-align: center !important;
    white-space: nowrap !important;
    border: none !important;
    transition: opacity 0.2s ease;
}

/* Hover effect */
.dt-buttons .dt-button:hover {
    opacity: 0.85;
}

/* Coins arrondis uniquement aux extrémités */
.dt-buttons .dt-button:first-child {
    border-radius: 0.25rem 0 0 0.25rem !important;
}

.dt-buttons .dt-button:last-child {
    border-radius: 0 0.25rem 0.25rem 0 !important;
}

/* Couleurs des boutons selon template Otika */
.dt-buttons .buttons-excel {
    background-color: #28a745 !important;
    color: white !important;
}

.dt-buttons .buttons-pdf {
    background-color: #dc3545 !important;
    color: white !important;
}

.dt-buttons .buttons-print {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* ============================================
   DATATABLES - BOUTONS ACTIONS DANS TABLES
   ============================================ */

/* Forcer les boutons d'actions à rester sur une seule ligne */
.dataTable td .btn-group {
    white-space: nowrap !important;
}

.dataTable td .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
}

/* Empêcher le retour à la ligne dans la colonne actions */
.dataTable td:last-child {
    white-space: nowrap !important;
}

/* ============================================
   DATATABLES - CONFIGURATION GÉNÉRALE
   ============================================ */

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.75rem !important;
}

/* Info */
.dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
}

/* Search */
.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    height: 34px;
}

/* Length select - même hauteur que les boutons */
.dataTables_wrapper .dataTables_length select {
    height: 34px;
}

/* ============================================
   SECTIONS DE FILTRES - STYLE STANDARD GLOBAL
   ============================================ */

/* Classe standard pour toutes les sections de filtres manuelles
   (les filtres via page_wrapper utilisent déjà ce style en inline) */
.filter-section,
.search-section,
.filter-container,
.filter-panel {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Résumé/statistiques - même style cohérent */
.summary-box,
.search-results-summary {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.summary-box p {
    margin: 0.5rem 0;
    font-weight: 600;
}

.summary-box span,
.stat-item strong {
    color: #007bff;
    font-size: 1.1rem;
}

.stat-item {
    text-align: center;
}

.stat-item small {
    color: #6c757d;
}