/* Styles pour les tableaux GridView - Style uniforme pour toutes les pages */

.grid-view table thead th:first-child,
.grid-view table tbody td:first-child {
    width: 120px !important;
    min-width: 120px;
}

/* Amélioration générale du tableau */
.grid-view {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 98%;
    margin: 0 auto;
    max-height: 80vh;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}

.grid-view table {
    margin-bottom: 0;
    width: 100%;
}

.grid-view thead th {
    background: #34495e !important;
    color: #fff !important;
    font-weight: 600;
    padding: 12px 8px;
    border: none;
    text-align: center;
}

.grid-view thead th * {
    color: #fff !important;
}

.grid-view tbody td {
    padding: 10px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.grid-view tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

/* Colonne Actions */
.grid-view tbody td:first-child {
    text-align: center;
}

.grid-view tbody td:first-child a {
    color: #34495e;
    font-size: 16px;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.grid-view tbody td:first-child a:hover {
    color: #2c3e50;
    text-decoration: none;
}

/* Colonne Info - gestion des textes longs */
.grid-view tbody td .info-cell {
    max-width: 300px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #34495e;
}

.grid-view tbody td .info-cell::-webkit-scrollbar {
    width: 6px;
}

.grid-view tbody td .info-cell::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.grid-view tbody td .info-cell::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.grid-view tbody td .info-cell::-webkit-scrollbar-thumb:hover {
    background: #2c3e50;
}

/* Amélioration des boutons */
.grid-view-container p {
    margin-bottom: 20px;
}

.grid-view-container p span {
    display: inline-block;
    margin-right: 20px;
    font-weight: 600;
    color: #495057;
}

.btn-add {
    margin-left: 10px;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Filtres */
.grid-view .filters input,
.grid-view .filters select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 6px 10px;
    transition: border-color 0.3s ease;
}

.grid-view .filters input:focus,
.grid-view .filters select:focus {
    border-color: #34495e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 73, 94, 0.1);
}

/* Colonnes spécifiques */
.grid-view tbody td {
    font-size: 13px;
}

/* Styles pour tablette */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .grid-view {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .grid-view table {
        min-width: 1000px;
    }
    
    .grid-view thead th {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .grid-view tbody td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .grid-view tbody td:first-child {
        width: 100px !important;
        min-width: 100px;
    }
    
    .grid-view tbody td:first-child a {
        font-size: 14px;
        margin: 0 3px;
    }
    
    .grid-view tbody td .info-cell {
        max-width: 200px;
        max-height: 80px;
        padding: 6px;
        font-size: 11px;
    }
    
    .grid-view .filters input,
    .grid-view .filters select {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .grid-view-container > div:first-child {
        width: 100%;
        padding: 10px;
    }
    
    .btn-add {
        padding: 6px 12px;
        font-size: 12px;
    }
}

.grid-view tbody td[style*="text-align: center"] {
    text-align: center !important;
}

/* Montant */
.grid-view tbody td:nth-child(6) {
    font-weight: 600;
    color: #28a745;
    text-align: right;
}

/* Date */
.grid-view tbody td:nth-child(2) {
    color: #495057;
    font-weight: 500;
}

/* Container pour les boutons d'action */
.action-buttons-container {
    margin-bottom: 25px;
    padding: 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 98%;
    margin-left: auto;
    margin-right: auto;
}

.action-buttons-container > div {
    display: flex;
    align-items: center;
    gap: 20px;
}

