body {
    padding-top: 60px; /* Correspond à la hauteur de votre navbar */
}
/* Style spécifique pour la page users */
.main-content {
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.styled-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.role-badge.admin {
    background-color: #f8d7da;
    color: #721c24;
}

.role-badge.comptable {
    background-color: #fff3cd;
    color: #856404;
}

.role-badge.user {
    background-color: #e2e3e5;
    color: #383d41;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.btn-action.view {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.btn-action.edit {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.btn-action.delete {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}
/* Main layout */
#wrapper {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: 250px;
    min-height: 100vh;
    background: #343a40;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#page-content-wrapper {
    flex: 1;
    margin-left: 250px;
    padding-top: 0;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
    position: relative;
}


/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #f8f9fa; /* Couleur de fond */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Ombre légère */
}

.navbar-brand {
    margin-left: 0 !important;
    margin-right: auto;
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 1.0rem;
}

/* Main content container */
.main-content {
    padding-top: 70px; /* Espace pour la navbar */
}

/* Sidebar navigation */
.sidebar-header h4 {
    text-align: left !important;
    width: 100%;
}

.sidebar-nav {
    padding-top: 60px; /* Espace pour la navbar */
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-header h4 {
  text-align: left !important;
  direction: ltr !important;
}

/* Card styles */
.card {
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    position: relative;
    z-index: 1;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 15px 20px;
}

/* Dashboard stats */
.dashboard-stat {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-stat .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    position: absolute;
    right: 15px;
    top: 15px;
}

.dashboard-stat .stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.dashboard-stat .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Table styles */
.table-responsive {
    margin-top: 20px;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

/* Form styles */
.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    padding: 15px;
    border-radius: 5px;
    color: white;
    z-index: 10000;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background-color: #2E7D32;
}

.toast-error {
    background-color: #dc3545;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255,255,255,0.3);
}

.toast-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: white;
    animation: progress 5s linear forwards;
}

/* Dans votre balise <style> ou fichier CSS */
.toast {
    transition: opacity 0.3s ease;
    border-left: 5px solid;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast-body {
    padding: 1rem;
}

#toastMessage {
    font-weight: 500;
}

.input-group-text {
    min-width: 40px;
    justify-content: center;
}
.form-select, .form-control {
    padding: 0.375rem 0.75rem;
}

.modal {
  z-index: 1050 !important;
}
.modal-backdrop {
  z-index: 1040 !important;
}

/* Améliorations spécifiques pour la table utilisateurs */
.table-responsive {
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: middle;
    white-space: nowrap;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* Style personnalisé pour la page users */
.avatar-sm {
    width: 36px;
    height: 36px;
}

.avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    font-weight: 600;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.badge.bg-info {
    color: white;
    font-size: 0.75em;
    vertical-align: middle;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.dashboard-stat {
  padding: 20px;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.dashboard-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #e3e6f0;
        border-radius: 0.35rem;
    }
}

@keyframes progress {
    100% { width: 0; }
}

/* Icônes Bootstrap */
.bi {
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        margin-left: 15px !important;
    }
    
    #page-content-wrapper {
        margin-left: 0;
    }
}