/* Styles personnalisés pour le panel d'administration */



/* Variables CSS */
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

/* Layout général */
html, body {
    height: 100%;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    
}
button, a, *{
    border-radius: 0 !important;
}
body {
    display: flex;
    flex-direction: column;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background-attachment: fixed;
}

/* Page de connexion */
.login-page {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page .card {
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.login-page .card-header {
    border-radius: 1rem 1rem 0 0 !important;
    background: linear-gradient(45deg, var(--primary-color), #6c7ae0) !important;
}

/* Dashboard */
.dashboard-page {
    background-color: var(--light-color);
}

/* Cartes avec bordure colorée */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--danger-color) !important;
}

/* Cartes avec animation au hover */
.card {
    transition: all 0.3s ease;
    border: 0;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Navigation */
.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
}

.navbar-nav .nav-link {
    font-weight: 600;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Boutons */
.btn {
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #6c7ae0);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #3d5bdb, #5a67d8);
}

/* Alertes */
.alert {
    border-radius: 0.75rem;
    border: none;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(231, 74, 59, 0.95));
    color: #fff;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.95), rgba(28, 200, 138, 0.95));
    color: #fff;
    border-left: 4px solid #198754;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(253, 195, 30, 0.95));
    color: #000;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.95), rgba(54, 185, 204, 0.95));
    color: #fff;
    border-left: 4px solid #0dcaf0;
}

/* Alertes flottantes (pour les messages flash) */
.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 350px;
    max-width: 450px;
    transform: translateX(100%);
    animation: slideInRight 0.4s ease-out forwards;
}

.alert-floating.alert-hide {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Animations pour les alertes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

/* Icônes pour les alertes */
.alert-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.alert-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-message {
    flex: 1;
    line-height: 1.5;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* Responsive pour les alertes */
@media (max-width: 768px) {
    .alert-floating {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
        animation: slideInTop 0.4s ease-out forwards;
    }
    
    .alert-floating.alert-hide {
        animation: slideOutTop 0.3s ease-in forwards;
    }
    
    @keyframes slideInTop {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOutTop {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100%);
            opacity: 0;
        }
    }
}

/* Formulaires */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e3e6f0;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

/* Modales */
.modal-content {
    border-radius: 1rem;
    border: none;
}

.modal-header {
    border-radius: 1rem 1rem 0 0;
    background: linear-gradient(45deg, var(--primary-color), #6c7ae0);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Tables */
.table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--secondary-color);
    border-top: none;
}

/* Footer */
footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .h5 {
        font-size: 1rem;
    }
}

/* Accessibilité */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .text-muted {
        color: #a0aec0 !important;
    }
}

/* Utilitaires */
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.text-xs {
    font-size: 0.75rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: var(--dark-color) !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Scroll personnalisé */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}