/* style.css - Styles pour le module de gestion des utilisateurs. */

/* Toolbar styles */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-container input {
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    padding: 0.5rem;
    outline: none;
    width: 250px;
}

.search-container button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.filters {
    display: flex;
    gap: 0.5rem;
}

.filters select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    outline: none;
}

/* Table styles */
.table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
}

.table-responsive {
    overflow-x: auto;
    max-height: 140vh;
}

.table td {
    vertical-align: middle;
}

/* Status badges */
.badge {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-pending {
    background-color: #fff3cd;
    color: #856404;
}

.badge-inactive {
    background-color: #f8d7da;
    color: #842029;
}

/* Role badges */
.role-badge {
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.role-admin {
    background-color: #cff4fc;
    color: #055160;
}

.role-tresorier {
    background-color: #e2e3e5;
    color: #41464b;
}

.role-dirigeant {
    background-color: #d3d3ff;
    color: #4b0082;
}

.role-encadrant {
    background-color: #d1e7dd;
    color: #0f5132;
}

.role-reporter {
    background-color: #f3e2f3;
    color: #6f2c91;
}

.role-adherent {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.35rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Licences count badge */
.licences-badge {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .filters {
        width: 100%;
        justify-content: space-between;
    }
    
    .filters select {
        width: 48%;
    }
    
    .actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* Styles supplémentaires pour le module de gestion des utilisateurs */

/* Styles pour la page détail */
.user-details {
    padding: 1rem 0;
}

.user-details .row > div {
    margin-bottom: 0.5rem;
}

.user-details strong {
    color: #495057;
}

/* Styles pour les formulaires */
.account-card .form-label {
    font-weight: 500;
    color: #495057;
}

.account-card h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary-color);
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.account-card h3:first-child {
    margin-top: 0;
}

.form-text {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Styles pour la carte principale */
.account-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.account-card .card-title {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

/* Styles pour les alertes */
.alert {
    margin-bottom: 1.5rem;
}

/* Style pour l'entête avec l'icône */
.account-heading-with-icon {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.heading-icon {
    background-color: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.heading-text h1 {
    color: #333;
    margin: 0;
    font-size: 1.8rem;
}

.heading-text p {
    color: #6c757d;
    margin: 0.25rem 0 0;
}

/* Styles responsive */
@media (max-width: 768px) {
    .account-heading-with-icon {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .heading-icon {
        margin-bottom: 0.5rem;
    }
    
    .account-card {
        padding: 1rem;
    }
    
    .user-details .row > div {
        margin-bottom: 1rem;
    }
}

/* Styles pour le bouton d'export Excel */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-success:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    opacity: 0.65;
}

/* Amélioration de la toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar .actions {
    display: flex;
    gap: 10px;
}

.toolbar .actions .btn {
    white-space: nowrap;
}

/* Responsive pour la toolbar */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar .search-container,
    .toolbar .filters,
    .toolbar .actions {
        width: 100%;
        justify-content: center;
    }
    
    .toolbar .actions {
        flex-direction: column;
    }
}