/* Styles personnalisés pour l'application Gestion Mosquée */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --success-color: #10b981;
    --success-dark: #059669;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --warning-color: #f59e0b;
    --light-bg: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Corps de page */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

/* ============================================
   NAVBAR MODERNE
   ============================================ */

.modern-navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-modern:hover {
    transform: translateY(-2px);
}

.brand-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.modern-nav-links .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-nav-links .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.modern-nav-links .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
}

.modern-nav-links .nav-link:hover::before {
    width: 60%;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.5rem 1.25rem !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-dropdown:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-avatar i {
    font-size: 1.5rem;
}

.user-phone {
    font-weight: 600;
    font-size: 0.9rem;
}

.modern-dropdown {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.modern-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modern-dropdown .dropdown-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* ============================================
   DASHBOARD HEADER
   ============================================ */

.dashboard-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.header-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-right: 1.5rem;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================
   STAT CARDS (STATISTIQUES)
   ============================================ */

.stat-card {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-inner {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stat-card-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: white;
}

.stat-card-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: white;
}

.stat-card-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-decoration {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.action-btn {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.action-btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: white;
}

.action-btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: white;
}

.action-btn-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.action-btn-content {
    flex: 1;
}

.action-btn-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.action-btn-text {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-btn-arrow {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.action-btn:hover .action-btn-arrow {
    transform: translateX(5px);
}

/* ============================================
   TRANSACTION CARDS
   ============================================ */

.transaction-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.transaction-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.transaction-header {
    padding: 1.5rem 2rem;
    color: white;
    font-weight: 600;
}

.transaction-header-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
}

.transaction-header-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
}

.transaction-header-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    backdrop-filter: blur(10px);
}

/* ============================================
   LISTE DES TRANSACTIONS
   ============================================ */

.list-group-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    padding: 1.25rem 1.5rem;
}

.list-group-item:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    transform: translateX(5px);
    border-left: 3px solid var(--primary-color);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Items de transaction avec icônes animées */
.list-group-item .bi-chevron-right {
    transition: transform 0.3s ease;
}

.list-group-item:hover .bi-chevron-right {
    transform: translateX(5px);
}

/* ============================================
   ALERTES MODERNES
   ============================================ */

.alert {
    border-radius: 15px;
    border: none;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* ============================================
   BOUTONS MODERNES
   ============================================ */

.btn {
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 15px;
}

/* ============================================
   FORMULAIRES MODERNES
   ============================================ */

.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
    transform: translateY(-2px);
}

.form-control-lg {
    border-radius: 15px;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* ============================================
   BADGES MODERNES
   ============================================ */

.badge {
    padding: 0.5em 1em;
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ============================================
   FOOTER MODERNE
   ============================================ */

footer {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.action-btn,
.transaction-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

/* Animation de pulsation pour les éléments importants */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Animation au chargement de la page */
.dashboard-header {
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   ALERTES AVEC ICÔNES
   ============================================ */

.alert-modern {
    border-radius: 18px;
    padding: 1.5rem;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.alert-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.alert-modern .alert-heading {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============================================
   RESPONSIVE DESIGN AMÉLIORÉ
   ============================================ */

@media (max-width: 768px) {
    .dashboard-title {
        font-size: 1.8rem;
    }
    
    .header-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .action-btn {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .action-btn-title {
        font-size: 1.1rem;
    }
    
    .action-btn-text {
        font-size: 0.85rem;
    }
    
    .brand-modern {
        gap: 0.75rem;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    /* ============================================
       LISTES DE TRANSACTIONS SUR MOBILE
       Hauteur limitée avec scroll vertical
       ============================================ */
    
    .transaction-card .list-group-flush {
        max-height: 400px !important;
        overflow-y: auto !important;
    }
    
    /* Amélioration du scroll sur mobile */
    .transaction-card .list-group-flush::-webkit-scrollbar {
        width: 6px;
    }
    
    /* Cartes transactions empilées sur mobile */
    .transaction-card {
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   LISTES DE TRANSACTIONS AVEC SCROLL
   ============================================ */

.transaction-list-scroll {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============================================
   SCROLLBAR MODERNE
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* ============================================
   TRANSITIONS GLOBALES
   ============================================ */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    transition: all 0.3s ease;
}

/* ============================================
   ANIMATIONS D'ENTRÉE
   ============================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.list-group-item {
    animation: slideIn 0.4s ease-out;
}

.list-group-item:nth-child(1) { animation-delay: 0.05s; }
.list-group-item:nth-child(2) { animation-delay: 0.1s; }
.list-group-item:nth-child(3) { animation-delay: 0.15s; }
.list-group-item:nth-child(4) { animation-delay: 0.2s; }
.list-group-item:nth-child(5) { animation-delay: 0.25s; }

/* Page de connexion */
.min-vh-100 {
    min-height: 100vh !important;
}

/* Table responsive */
.table-responsive {
    border-radius: 12px;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Images responsives */
img {
    max-width: 100%;
    height: auto;
}

/* Transitions douces pour tous les éléments interactifs */
a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    h1.display-6 {
        font-size: 1.8rem;
    }
}

/* ============================================
   FILTRES ET GRAPHIQUE
   ============================================ */

/* Style des filtres */
.form-select {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Style des champs de date */
input[type="date"].form-control {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="date"].form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
    transition: filter 0.3s ease;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
    filter: opacity(1);
}

/* Style du graphique */
.chart-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
    overflow: hidden;
}

.chart-wrapper canvas {
    max-height: 100%;
    width: 100% !important;
}

#evolutionChart {
    max-height: 400px;
}

/* Responsive pour mobile */
@media (max-width: 767.98px) {
    .chart-wrapper {
        height: 300px;
    }
    
    #evolutionChart {
        max-height: 300px;
    }
    
    /* Réduire le padding de la card sur mobile */
    .card-body.p-4 {
        padding: 1rem !important;
    }
}

/* Très petits écrans */
@media (max-width: 575.98px) {
    .chart-wrapper {
        height: 250px;
    }
    
    #evolutionChart {
        max-height: 250px;
    }
}

/* Style des champs de recherche */
#search-versements,
#search-retraits {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

#search-versements:focus,
#search-retraits:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #ffffff;
}

/* Animation subtile de l'icône de filtre */
.bi-funnel {
    animation: pulse-subtle 3s infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   LOGOS
   ============================================ */

/* Logo dans la navbar */
.navbar-logo {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Logo dans le header du dashboard */
.dashboard-logo {
    max-width: 120px;
    animation: fadeInRight 0.8s ease;
}

.dashboard-logo img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dashboard-logo img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .navbar-logo {
        width: 35px;
        height: 35px;
    }
    
    .dashboard-logo {
        max-width: 80px;
    }
    
    .dashboard-header .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .dashboard-logo {
        align-self: center;
    }
}

/* ============================================
   PAGE DE CONNEXION - FOND DÉCORATIF
   ============================================ */

/* Fond animé avec formes */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
    z-index: -1;
}

/* Formes décoratives animées */
.login-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: floatShape 20s ease-in-out infinite;
}

.login-shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.login-shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.login-shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

/* Animation des formes flottantes */
@keyframes floatShape {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    75% {
        transform: translate(40px, 20px) scale(1.05);
    }
}

/* Conteneur de la page de connexion */
.login-page {
    position: relative;
    z-index: 1;
}

/* ============================================
   LOGO PAGE DE CONNEXION
   ============================================ */

/* Conteneur principal du logo */
.login-logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Wrapper avec effet de cercle */
.login-logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: logoAppear 0.8s ease;
}

/* Logo lui-même */
.login-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.login-logo-wrapper:hover .login-logo {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Effet de lueur/glow */
.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
    animation: glowPulse 3s ease-in-out infinite;
}

/* Animation du logo à l'apparition */
@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Animation de la lueur */
@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Titre de connexion avec animation */
.login-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleSlideIn 0.8s ease 0.3s both;
    font-size: 2rem;
    letter-spacing: -0.5px;
}

/* Sous-titre */
.login-subtitle {
    animation: subtitleFadeIn 0.8s ease 0.5s both;
    font-size: 1.1rem;
    color: #6b7280;
}

/* Animation titre */
@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation sous-titre */
@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Amélioration de la carte de connexion */
.login-page .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: cardSlideUp 0.8s ease;
}

@keyframes cardSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive pour le logo de connexion */
@media (max-width: 768px) {
    .login-logo-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
}

/* ============================================
   HISTORIQUE DES MODIFICATIONS
   ============================================ */

/* Item d'historique */
.history-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.history-item:hover {
    background-color: #f9fafb;
    border-left-color: #6366f1;
}

/* Liste des changements dans l'historique */
.changes-list ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.changes-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.changes-list li:last-child {
    border-bottom: none;
}

/* Badges d'action */
.badge {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Animation d'apparition de l'historique */
.history-item {
    animation: historySlideIn 0.4s ease;
    animation-fill-mode: both;
}

.history-item:nth-child(1) { animation-delay: 0.05s; }
.history-item:nth-child(2) { animation-delay: 0.1s; }
.history-item:nth-child(3) { animation-delay: 0.15s; }
.history-item:nth-child(4) { animation-delay: 0.2s; }
.history-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes historySlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   BOUTONS D'ACTION (EDIT/DELETE)
   ============================================ */

/* Header avec boutons */
.card-header .btn-group {
    gap: 0.5rem;
}

.card-header .btn-group .btn {
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-header .btn-warning {
    background: #fbbf24;
}

.card-header .btn-warning:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.3);
}

.card-header .btn-danger,
.card-header .btn-dark {
    background: #ef4444;
}

.card-header .btn-danger:hover,
.card-header .btn-dark:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Badge supprimé */
.badge.bg-danger,
.badge.bg-dark {
    animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   PAGES EDIT/DELETE
   ============================================ */

/* Carte avec bordure colorée pour suppression */
.card.border-danger {
    border: 2px solid #ef4444 !important;
}

/* Alertes dans les formulaires edit/delete */
.alert.alert-info.border-0 {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
}

.alert.alert-danger.border-0 {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
}

/* Boutons dans les formulaires */
.btn-lg.flex-grow-1 {
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(251, 191, 36, 0.3);
}

.btn-danger.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive pour les boutons d'action */
@media (max-width: 768px) {
    .card-header .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .card-header .btn-group .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }
}

/* ============================================
   TRANSACTIONS SUPPRIMÉES (DANS LES LISTES)
   ============================================ */

/* Style des éléments supprimés */
.transaction-deleted {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
    opacity: 0.7;
    border-left: 4px solid #ef4444 !important;
    position: relative;
}

.transaction-deleted:hover {
    opacity: 0.85;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
}

/* Badge "Supprimé" dans les listes */
.badge-deleted {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Texte barré pour les montants supprimés (optionnel) */
.transaction-deleted h6 {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

/* Icône "supprimé" dans les listes */
.transaction-deleted .bi-chevron-right {
    color: #dc2626 !important;
}

/* ============================================
   DASHBOARD MATÉRIELS
   ============================================ */
.materials-dashboard .material-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.2);
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(12px);
}

.materials-table thead th {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 2px solid rgba(15, 23, 42, 0.05);
}

.materials-table tbody tr {
    transition: background 0.2s ease, transform 0.1s ease;
}

.materials-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.02);
    transform: translateX(2px);
}

.units-list .unit-item {
    padding: 0.65rem 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.units-list .unit-item:last-child {
    border-bottom: none;
}

.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(15, 23, 42, 0.15);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.4rem;
}

.timeline-icon {
    position: absolute;
    left: -2px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.timeline-content {
    margin-left: 1.5rem;
    background: rgba(15, 23, 42, 0.02);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.materials-chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 280px;
    max-height: 450px;
}

.materials-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

