/* Observatoire des Prix - Styles personnalisés */
/* Version 3.3 - Ajout des styles pour le système d'emails */

:root {
    /* Palette de couleurs personnalisée - Thème Mauve */
    --primary-color: rgb(19, 6, 40); /* Mauve foncé */
    --primary-light: rgb(100, 30, 80); /* Mauve moyen */
    --primary-lighter: rgb(150, 45, 121); /* Mauve clair */
    --primary-dark: rgb(15, 5, 30); /* Mauve très foncé */
    --secondary-color: #059669; /* Vert émeraude */
    --accent-color: #f59e0b; /* Orange ambré */
    --danger-color: #dc2626; /* Rouge moderne */
    --warning-color: #f59e0b; /* Orange pour les avertissements */
    --success-color: #10b981; /* Vert succès moderne */
    --info-color: #0ea5e9; /* Bleu ciel */
    
    /* Couleurs de fond */
    --bg-light: #f8fafc; /* Fond très clair */
    --bg-card: #ffffff; /* Fond des cartes */
    --bg-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Bordures arrondies */
    --radius-sm: 0.375rem; /* 6px */
    --radius-md: 0.5rem; /* 8px */
    --radius-lg: 0.75rem; /* 12px */
}

/* Système de notifications Flash en overlay */
.flash-messages-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.flash-message {
    position: relative;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    overflow: hidden;
    pointer-events: auto;
    animation: slideInRight 0.5s ease-out, fadeInScale 0.5s ease-out;
    transform-origin: top right;
    transition: all 0.3s ease;
}

.flash-message:hover {
    transform: translateX(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 8px 15px rgba(0, 0, 0, 0.15);
}

.flash-success {
    border-left-color: var(--success-color);
}

.flash-warning {
    border-left-color: var(--warning-color);
}

.flash-danger {
    border-left-color: var(--danger-color);
}

.flash-info {
    border-left-color: var(--info-color);
}

.flash-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.flash-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.flash-success .flash-icon {
    color: var(--success-color);
}

.flash-warning .flash-icon {
    color: var(--warning-color);
}

.flash-danger .flash-icon {
    color: var(--danger-color);
}

.flash-info .flash-icon {
    color: var(--info-color);
}

.flash-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #374151;
    font-weight: 500;
}

.flash-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.flash-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 12px 12px;
    animation: progressBar 5s linear forwards;
}

.flash-success .flash-progress {
    background: var(--success-color);
}

.flash-warning .flash-progress {
    background: var(--warning-color);
}

.flash-danger .flash-progress {
    background: var(--danger-color);
}

.flash-info .flash-progress {
    background: var(--info-color);
}

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

@keyframes fadeInScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.flash-message.dismissing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Responsive pour les notifications */
@media (max-width: 480px) {
    .flash-messages-overlay {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .flash-content {
        padding: 14px 16px;
    }
    
    .flash-text {
        font-size: 13px;
    }
}

/* Styles globaux pour les cartes avec bordures arrondies */
.card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header h4,
.card-header h5,
.card-header h6 {
    color: white;
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
    background: white;
}

/* Cartes avec bordures colorées */
.card.border-secondary {
    border-left: 4px solid var(--secondary-color) !important;
}

.card.border-info {
    border-left: 4px solid var(--info-color) !important;
}

.card.border-danger {
    border-left: 4px solid var(--danger-color) !important;
}

.card.border-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.card.border-success {
    border-left: 4px solid var(--success-color) !important;
}

/* Override Bootstrap avec nos couleurs personnalisées */
.bg-primary {
    background: var(--bg-gradient) !important;
}

.btn-primary {
    background: var(--bg-gradient);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: #6b7280;
    border: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.btn-success {
    background-color: var(--success-color);
    border: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.btn-danger {
    background-color: var(--danger-color);
    border: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.btn-warning {
    background-color: var(--warning-color);
    border: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    border: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

/* Effets hover pour tous les boutons */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Cartes avec coins arrondis et ombres modernes */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    background: var(--bg-card);
    position: relative;
    z-index: 1; /* Z-index inférieur aux dropdowns */
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
    z-index: 2; /* Légèrement plus élevé au hover mais toujours sous les dropdowns */
}

/* Formulaires avec style moderne */
.form-control {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
    background-color: white;
}

.form-select {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Alertes avec coins arrondis */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* Badges modernisés */
.badge {
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-weight: 600;
}

/* Tables avec style moderne */
.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Style spécifique pour les headers du tableau produits */
.ai-products-section .table thead th {
    background-color: #6c757d !important;
    color: white !important;
    border: 1px solid #dee2e6 !important;
    font-weight: 600 !important;
    display: table-cell !important;
    visibility: visible !important;
}

/* Style spécifique pour le tableau produits IA */
.ai-products-table .ai-products-thead th {
    background-color: #495057 !important;
    color: white !important;
    border: 1px solid #dee2e6 !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    padding: 8px 12px !important;
    text-align: center !important;
    display: table-cell !important;
    visibility: visible !important;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Séparateurs de colonnes dans les tableaux - liserets verticaux */
.table-column-separator {
    border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
    position: relative;
}

/* Supprimer le séparateur de la dernière colonne pour éviter la double bordure */
.table th:last-child,
.table td:last-child {
    border-right: none !important;
}

/* Améliorer le styling pour les lignes alternées */
.table-striped > tbody > tr:nth-of-type(odd) > .table-column-separator {
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.table-striped > tbody > tr:nth-of-type(even) > .table-column-separator {
    border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Page de connexion avec fond d'image */
.login-page {
    min-height: 100vh;
    background: linear-gradient(rgba(30, 64, 175, 0.7), rgba(30, 64, 175, 0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%231e40af;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%233b82f6;stop-opacity:0.2"/></linearGradient></defs><rect width="100%" height="100%" fill="url(%23bg)"/><g opacity="0.4"><circle cx="200" cy="150" r="60" fill="%23ffffff" opacity="0.1"/><circle cx="800" cy="300" r="80" fill="%23ffffff" opacity="0.08"/><circle cx="1000" cy="600" r="100" fill="%23ffffff" opacity="0.06"/><rect x="100" y="400" width="150" height="100" rx="10" fill="%23ffffff" opacity="0.1"/><rect x="600" y="500" width="200" height="120" rx="15" fill="%23ffffff" opacity="0.08"/></g></svg>');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><g fill="%23ffffff" opacity="0.03"><circle cx="100" cy="100" r="3"/><circle cx="200" cy="150" r="2"/><circle cx="300" cy="80" r="4"/><circle cx="450" cy="200" r="2"/><circle cx="600" cy="120" r="3"/><circle cx="750" cy="180" r="2"/><circle cx="850" cy="80" r="4"/><circle cx="950" cy="160" r="2"/><rect x="150" y="300" width="40" height="30" rx="5"/><rect x="400" y="350" width="50" height="40" rx="8"/><rect x="700" y="400" width="45" height="35" rx="6"/><path d="M200,450 Q250,430 300,450 T400,450" stroke="%23ffffff" stroke-width="2" fill="none" opacity="0.1"/></g></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

.login-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

/* Pagination moderne */
.pagination .page-link {
    border: none;
    border-radius: var(--radius-md);
    margin: 0 0.125rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: var(--bg-gradient);
    border: none;
}

.pagination .page-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Modales avec style moderne */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Animations d'entrée */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card, .alert {
    animation: slideInUp 0.5s ease;
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .card {
        margin: 0.5rem;
        border-radius: var(--radius-lg);
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .login-page {
        padding: 1rem;
    }
}

/* Effet de focus pour les éléments interactifs */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Style pour les icônes */
.fas, .far {
    transition: all 0.3s ease;
}

.btn:hover .fas,
.btn:hover .far {
    transform: scale(1.1);
}

/* Amélioration des dropdowns */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    z-index: 1055 !important; /* Z-index très élevé pour les dropdowns */
    position: absolute;
}

.navbar .dropdown-menu {
    z-index: 1060 !important; /* Z-index encore plus élevé pour les dropdowns de la navbar */
}

.dropdown-item {
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    margin: 0.125rem 0.5rem;
}

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

/* Navigation avec dégradé - Z-index élevé */
.navbar-dark {
    background: var(--bg-gradient) !important;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    z-index: 1040; /* Z-index pour la navbar */
    position: relative;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Corps de page avec fond subtil */
body {
    background-color: var(--bg-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Container principal avec padding adaptatif */
.container {
    animation: slideInUp 0.6s ease;
}

/* Amélioration des liens */
a {
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===============================================
   RESPONSIVE DESIGN MOBILE
   =============================================== */

/* Mobile - Tableaux */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile - Page de login améliorée */
@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
        position: relative;
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
        align-items: stretch;
    }
    
    .login-container .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .login-container .row {
        margin: 0;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
    }
    
    .login-container .col-md-5 {
        padding: 1rem;
        width: 100%;
        max-width: 400px;
    }
    
    .login-card {
        margin: 1rem 0;
        width: 100%;
        max-width: none;
    }
    
    .login-card .card-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .login-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .shopping-icon {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-outline-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Assurer le scroll sur mobile */
    body.login-body {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    .form-control-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

/* Footer discret */
.footer-discrete {
    background-color: var(--bg-light);
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.footer-discrete .nav-link,
.footer-discrete .link-muted {
    color: #6b7280 !important;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-discrete .nav-link:hover,
.footer-discrete .link-muted:hover,
.footer-discrete .nav-link:focus,
.footer-discrete .link-muted:focus {
    color: var(--primary-lighter) !important;
    text-decoration: none;
    background-color: transparent !important;
}

.footer-discrete .text-muted {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-discrete .nav {
        justify-content: center !important;
        margin-top: 0.75rem;
    }
    
    .footer-discrete .nav-item {
        margin: 0 0.25rem;
    }
    
    .footer-discrete .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   SYSTÈME D'EMAILS - MAILHOG INSPIRED
   ============================================ */

/* Interface de liste d'emails */
.email-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.email-stats {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.email-list {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.email-item {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
}

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

.email-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.email-item.unread {
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
    border-left: 4px solid var(--primary-color);
}

.email-item.unread:hover {
    background: linear-gradient(90deg, #dbeafe 0%, #f8fafc 100%);
}

.email-subject {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.email-item.unread .email-subject {
    color: var(--primary-color);
}

.email-sender {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.email-date {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.email-preview {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Pagination des emails */
.email-pagination .page-link {
    color: var(--primary-color);
    border-color: #e2e8f0;
    border-radius: var(--radius-sm);
    margin: 0 2px;
}

.email-pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.email-pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive pour la liste d'emails */
@media (max-width: 768px) {
    .email-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .email-item {
        padding: 1rem !important;
    }
    
    .email-item:hover {
        transform: none;
    }
    
    .email-subject {
        font-size: 0.95rem;
    }
    
    .email-sender, .email-date {
        font-size: 0.8rem;
    }
    
    .email-preview {
        font-size: 0.8rem;
    }
}

/* Personnalisation Bootstrap avec les couleurs mauve */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(150, 45, 121, 0.25);
}

.navbar-dark .navbar-brand {
    color: rgba(255, 255, 255, 0.9);
}

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

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Styles pour les cartes de statistiques avec couleurs pastelles */
.stats-card-users {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
}

.stats-card-products {
    background: linear-gradient(135deg, #a7c7a7 0%, #8db88d 100%);
    color: white;
    border: none;
}

.stats-card-attributed {
    background: linear-gradient(135deg, #a7c7e7 0%, #8db8d7 100%);
    color: white;
    border: none;
}

.stats-card-unattributed {
    background: linear-gradient(135deg, #e7c7a7 0%, #d7b88d 100%);
    color: white;
    border: none;
}

/* Amélioration des ombres pour les cartes */
.stats-card-users, .stats-card-products, .stats-card-attributed, .stats-card-unattributed {
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card-users:hover, .stats-card-products:hover, .stats-card-attributed:hover, .stats-card-unattributed:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Fix pour éviter que les dropdowns sortent de l'écran */
.navbar .dropdown-menu {
    z-index: 1060 !important;
    max-width: 300px; /* Limite la largeur maximale */
    white-space: normal; /* Permet le wrap du texte si nécessaire */
}

/* Dropdown aligné à droite pour éviter le débordement */
.navbar .dropdown-menu-end {
    right: 0;
    left: auto;
    transform: none !important; /* Désactive les transformations qui pourraient causer des problèmes */
}

/* Media queries pour les petits écrans */
@media (max-width: 768px) {
    .navbar .dropdown-menu {
        position: absolute;
        max-width: calc(100vw - 2rem); /* Largeur maximum basée sur la largeur de l'écran */
        left: auto;
        right: 1rem; /* Marge de sécurité */
        min-width: 200px;
    }
}

@media (max-width: 576px) {
    .navbar .dropdown-menu {
        max-width: calc(100vw - 1rem);
        right: 0.5rem;
        min-width: 180px;
    }
}
