/* ========================================
   OPUSWEBCAM - MODERN OVERLAY CSS
   Amélioration visuelle moderne SANS casser les classes existantes
   ======================================== */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === VARIABLES === */
:root {
    --bg-dark: #0a0e27;
    --bg-dark-2: #1a1f3a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-purple: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-blue: linear-gradient(135deg, #4facfe, #00f2fe);
    --gradient-pink: linear-gradient(135deg, #f093fb, #f5576c);
    --gradient-green: linear-gradient(135deg, #43e97b, #38f9d7);
    --gradient-gold: linear-gradient(135deg, #f6d365, #fda085);
}

/* === GLOBAL === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: var(--bg-dark) !important;
    color: #e0e6ed !important;
    position: relative;
    overflow-x: hidden;
}

/* === BACKGROUND ANIMÉ === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 50%, var(--bg-dark) 100%);
}

body::after {
    content: '';
    position: fixed;
    top: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent);
    border-radius: 50%;
    filter: blur(80px);
    animation: float1 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(100px, -100px); }
}

/* Sphères supplémentaires via pseudo-éléments des containers */
.app-container::before {
    content: '';
    position: fixed;
    bottom: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.25), transparent);
    border-radius: 50%;
    filter: blur(80px);
    animation: float2 18s ease-in-out infinite;
    z-index: -1;
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-80px, 80px); }
}

/* === GLASSMORPHISM === */
.sidebar,
.main-content .header,
.content-section,
.video-container,
.results-section,
.stat-card,
.stats-card,
.value-summary,
.user-info,
.kpi-card,
.chart-card,
.stat-card-v2,
.validation-header,
.inventory-header,
.values-header {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* === SIDEBAR === */
.sidebar {
    background: rgba(15, 19, 40, 0.8) !important;
}

.sidebar-section {
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-section:nth-child(1) { animation-delay: 0.1s; }
.sidebar-section:nth-child(2) { animation-delay: 0.2s; }
.sidebar-section:nth-child(3) { animation-delay: 0.3s; }
.sidebar-section:nth-child(4) { animation-delay: 0.4s; }
.sidebar-section:nth-child(5) { animation-delay: 0.5s; }
.sidebar-section:nth-child(6) { animation-delay: 0.6s; }

.sidebar h3 {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 15px !important;
}

.sidebar label {
    color: rgba(255, 255, 255, 0.85) !important;
    cursor: pointer;
}

.sidebar p {
    color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar .user-name {
    color: #fff !important;
    font-weight: 600;
}

.sidebar .user-role {
    font-size: 11px;
}

/* === STAT CARDS === */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.stat-number {
    font-size: 24px !important;
    font-weight: 700 !important;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500;
}

/* === BUTTONS === */
.btn {
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    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.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-purple) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6) !important;
}

.btn-success,
.btn-success-custom {
    background: var(--gradient-green) !important;
    border: none !important;
    color: #0a0e27 !important;
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.4) !important;
}

.btn-danger {
    background: var(--gradient-pink) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4) !important;
}

.btn-outline-primary,
.btn-outline-secondary {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* === TABS === */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: transparent !important;
}

.nav-link {
    border: none !important;
    border-radius: 10px 10px 0 0 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.nav-link.active::after {
    transform: scaleX(1);
}

.tab-badge {
    background: var(--gradient-pink) !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

/* === VIDEO CONTAINER === */
.video-container {
    border-radius: 20px !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5576c;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-indicator.status-online::before {
    background: #43e97b;
}

/* === FORMS === */
input[type="text"],
input[type="search"],
input[type="number"],
input[type="range"],
select,
textarea {
    background: rgba(10, 14, 39, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    color: #e0e6ed !important;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    background: rgba(10, 14, 39, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
    outline: none;
}

/* Placeholders */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Options des selects */
select option {
    background: #0f1328 !important;
    color: #e0e6ed !important;
    padding: 10px !important;
}

select option:checked {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
}

/* Datalist */
datalist {
    background: rgba(10, 14, 39, 0.98) !important;
    color: #e0e6ed !important;
}

/* Button groups */
.btn-group .btn {
    color: #e0e6ed !important;
}

.btn-group .dropdown-toggle {
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Range slider moderne */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-purple);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-purple);
    cursor: pointer;
    border: none;
}

/* Checkbox moderne */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #667eea;
}

/* === KPI CARDS === */
.kpi-card {
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5) !important;
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    background: var(--gradient-purple);
}

.kpi-value {
    font-size: 28px !important;
    font-weight: 800 !important;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === CHART CARDS === */
.chart-card {
    margin-bottom: 20px;
}

.chart-header {
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.chart-header h5,
.chart-header h6 {
    color: #fff !important;
    font-weight: 700 !important;
}

.chart-body h6 {
    color: #fff !important;
    font-weight: 600 !important;
}

/* Anomaly stats */
.anomaly-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.anomaly-count {
    font-size: 24px;
    font-weight: 700;
    color: #fff !important;
}

.anomaly-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7) !important;
}

.anomaly-icon {
    font-size: 24px;
}

/* Performance metrics */
.perf-label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    margin-bottom: 8px;
}

.perf-value {
    color: #fff !important;
    font-weight: 600;
}

/* === VALUE CARDS === */
.value-amount,
#totalValue,
#totalValueDisplay,
#kpiTotalValue,
#totalMarketValue,
#totalProfitLoss {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

/* === ALERTS === */
.alert {
    background: rgba(10, 14, 39, 0.7) !important;
    border-left: 4px solid #4facfe !important;
    border-radius: 15px !important;
    color: #e0e6ed !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.alert strong {
    color: #fff !important;
}

.alert small {
    color: rgba(255, 255, 255, 0.7) !important;
}

.alert-info {
    border-left-color: #4facfe !important;
    background: rgba(79, 172, 254, 0.1) !important;
}

.alert-success {
    border-left-color: #43e97b !important;
    background: rgba(67, 233, 123, 0.1) !important;
}

.alert-warning {
    border-left-color: #f6d365 !important;
    background: rgba(246, 211, 101, 0.1) !important;
    color: #fff !important;
}

.alert-danger {
    border-left-color: #f5576c !important;
    background: rgba(245, 87, 108, 0.1) !important;
}

/* === BADGES === */
.badge {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    color: #fff !important;
}

.badge-new {
    background: var(--gradient-pink) !important;
    animation: pulse 2s infinite;
    color: #fff !important;
}

.badge.bg-secondary {
    background: rgba(108, 117, 125, 0.8) !important;
    color: #fff !important;
}

.badge.bg-danger {
    background: var(--gradient-pink) !important;
    color: #fff !important;
}

.badge.bg-success {
    background: var(--gradient-green) !important;
    color: #0a0e27 !important;
}

.badge.bg-primary {
    background: var(--gradient-purple) !important;
    color: #fff !important;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(245, 87, 108, 0.4); }
    50% { box-shadow: 0 0 20px rgba(245, 87, 108, 0.8); }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* === DROPDOWN === */
.dropdown-menu {
    background: rgba(10, 14, 39, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    padding: 8px !important;
}

.dropdown-item {
    color: #e0e6ed !important;
    transition: all 0.2s ease;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    margin: 2px 0 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3)) !important;
    color: #fff !important;
    transform: translateX(4px);
}

.dropdown-item:active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5)) !important;
}

/* === TABLES === */
.table {
    color: #e0e6ed !important;
}

.table thead {
    background: rgba(10, 14, 39, 0.6) !important;
    color: #fff !important;
}

.table thead th {
    color: #fff !important;
    font-weight: 600 !important;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3) !important;
}

.table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

.table tbody td {
    color: #e0e6ed !important;
}

/* === MODAL === */
.modal-content {
    background: rgba(10, 14, 39, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
    color: #e0e6ed !important;
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.modal-header h4,
.modal-header h5,
.modal-title {
    color: #fff !important;
}

.modal-close-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 28px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: #fff !important;
    transform: rotate(90deg);
}

.modal-body {
    color: #e0e6ed !important;
}

.modal-body label,
.modal-body .info-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

.modal-body .info-value {
    color: #fff !important;
}

.modal-body p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.modal-body strong {
    color: #fff !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* === HEADER === */
.header h1 {
    font-weight: 800 !important;
    color: #fff !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header p {
    color: rgba(255, 255, 255, 0.7) !important;
}

.version-badge {
    background: var(--gradient-purple) !important;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white !important;
}

/* Section headers */
h4, h5, h6 {
    color: #fff !important;
}

/* Validation & Inventory headers */
.validation-header h4,
.inventory-header h4,
.values-header h4 {
    color: #667eea !important;
}

.validation-info .text-muted,
.inventory-counts .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Stat values - uses gradient text from validation.css */
.stat-card-v2 .stat-value {
    font-size: 24px;
    font-weight: 700;
}

/* View selector buttons */
.view-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.view-selector button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(10, 14, 39, 0.7) !important;
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    white-space: nowrap;
}

.view-selector button:hover {
    background: rgba(102, 126, 234, 0.3) !important;
    color: #fff !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.view-selector button.active {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    font-weight: 700;
}

/* Stock control */
.stock-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-btn {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(102, 126, 234, 0.4) !important;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stock-btn:hover {
    background: rgba(102, 126, 234, 0.4) !important;
}

/* Form rows dans les modals */
.form-row {
    margin-bottom: 15px;
}

.form-row label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

/* Detail sections */
.detail-section h5 {
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-section p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.detail-section strong {
    color: #fff !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 300px;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    body::after,
    .app-container::before {
        display: none;
    }
}

/* === ANIMATIONS PERSONNALISÉES === */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* === TEXT UTILITIES === */
.text-muted,
small.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.value-label,
.info-label,
.stat-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

.info-value {
    color: #fff !important;
}

/* Fix pour les textes avec couleurs inline */
.recent-matches > div {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Scan stats */
#scanStats {
    color: rgba(255, 255, 255, 0.7) !important;
}

#scanStats span {
    color: #fff !important;
    font-weight: 600;
}

/* Batch stats */
.batch-stats .stats-value {
    color: #fff !important;
}

.batch-stats .count {
    font-size: 24px;
    font-weight: 700;
    color: #fff !important;
}

.batch-stats .label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px;
}

.batch-stats .stats-detail {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 12px;
}

/* Card info summary */
.card-info-summary .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.card-info-summary .info-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card-info-summary .info-value {
    color: #fff !important;
    font-weight: 600;
}

.rarity-value {
    color: #f6d365 !important;
    font-weight: 700 !important;
}

/* Confidence badge */
.confidence-badge {
    background: rgba(67, 233, 123, 0.2) !important;
    color: #43e97b !important;
    border: 1px solid rgba(67, 233, 123, 0.4) !important;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

/* === UTILITIES === */
.glass-effect {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
}

.gradient-text {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   MODULE INVENTAIRE - CORRECTIONS THÈME MODERNE
   ═══════════════════════════════════════════════════════════════ */

/* Light Theme Override - Force readable text on light backgrounds */
[data-theme="default"] .inventory-card,
[data-theme="light"] .inventory-card,
body:not([data-theme]) .inventory-card {
    background: white;
    color: #1f2937;
}

[data-theme="default"] .inventory-card .card-name,
[data-theme="default"] .inventory-card .card-title,
[data-theme="light"] .inventory-card .card-name,
[data-theme="light"] .inventory-card .card-title,
body:not([data-theme]) .inventory-card .card-name,
body:not([data-theme]) .inventory-card .card-title {
    color: #111827 !important;
}

[data-theme="default"] .inventory-card .card-series,
[data-theme="default"] .inventory-card .card-subtitle,
[data-theme="light"] .inventory-card .card-series,
[data-theme="light"] .inventory-card .card-subtitle,
body:not([data-theme]) .inventory-card .card-series,
body:not([data-theme]) .inventory-card .card-subtitle {
    color: #4b5563 !important;
}

[data-theme="default"] .inventory-card .card-details,
[data-theme="light"] .inventory-card .card-details,
body:not([data-theme]) .inventory-card .card-details {
    color: #6b7280 !important;
}

[data-theme="default"] .inventory-table,
[data-theme="light"] .inventory-table,
body:not([data-theme]) .inventory-table {
    color: #1f2937;
}

[data-theme="default"] .inventory-table td,
[data-theme="light"] .inventory-table td,
body:not([data-theme]) .inventory-table td {
    color: #1f2937 !important;
}

[data-theme="default"] .inventory-table .card-name-cell strong,
[data-theme="light"] .inventory-table .card-name-cell strong,
body:not([data-theme]) .inventory-table .card-name-cell strong {
    color: #111827 !important;
}

[data-theme="default"] .inventory-table .card-name-cell .text-muted,
[data-theme="light"] .inventory-table .card-name-cell .text-muted,
body:not([data-theme]) .inventory-table .card-name-cell .text-muted {
    color: #6b7280 !important;
}

/* Inventory Header & Controls */
.inventory-header {
    margin-bottom: 20px;
}

.inventory-counts {
    color: var(--gray-600, #4b5563);
}

[data-theme="dark"] .inventory-counts {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="premium"] .inventory-counts {
    color: var(--silver-dark, #999999);
}

/* Inventory Grid Cards */
.inventory-grid {
    gap: 20px;
}

.inventory-card {
    background: white;
    backdrop-filter: blur(20px);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.inventory-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.3);
    border-color: var(--primary, #667eea);
}

.inventory-card img {
    border-radius: 12px;
}

.inventory-card .card-name,
.inventory-card .card-title {
    color: var(--gray-900, #111827);
    font-weight: 600;
}

.inventory-card .card-series,
.inventory-card .card-subtitle {
    color: var(--gray-600, #4b5563);
}

.inventory-card .card-details {
    color: var(--gray-500, #6b7280);
}

/* Dark mode pour inventory-card */
[data-theme="dark"] .inventory-card {
    background: rgba(10, 14, 39, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .inventory-card:hover {
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.6);
}

[data-theme="dark"] .inventory-card .card-name,
[data-theme="dark"] .inventory-card .card-title {
    color: #fff;
}

[data-theme="dark"] .inventory-card .card-series,
[data-theme="dark"] .inventory-card .card-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .inventory-card .card-details {
    color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .inventory-card .card-number {
    color: rgba(255, 255, 255, 0.9);
}

/* Premium theme pour inventory-card */
[data-theme="premium"] .inventory-card {
    background: var(--gray-100, #141414);
    border-color: rgba(192, 192, 192, 0.2);
}

[data-theme="premium"] .inventory-card .card-name,
[data-theme="premium"] .inventory-card .card-title {
    color: var(--silver-light, #e8e8e8);
}

[data-theme="premium"] .inventory-card .card-series,
[data-theme="premium"] .inventory-card .card-subtitle {
    color: var(--silver-dark, #999999);
}

.quantity-badge {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Inventory Table */
.inventory-table-container {
    background: white;
    backdrop-filter: blur(20px);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 15px;
    overflow: hidden;
}

.inventory-table {
    color: var(--gray-900, #111827);
    margin-bottom: 0;
}

/* Light theme - Override generic .table styles */
.inventory-table th,
.inventory-table thead th {
    background: #f9fafb !important;
    color: #374151 !important;
    border-bottom: 2px solid var(--primary, #667eea) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    border-top: none;
}

.inventory-table td,
.inventory-table tbody td {
    color: #111827 !important;
    border-bottom: 1px solid #e5e7eb !important;
    vertical-align: middle;
    border-top: none;
}

.inventory-table tbody tr {
    background: transparent !important;
}

.inventory-table tbody tr:nth-child(odd) {
    background: #f9fafb !important;
}

.inventory-row {
    background: transparent !important;
    transition: background-color 0.2s ease;
}

.inventory-row:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

/* Table cell content */
.inventory-table .card-name-cell strong {
    color: #111827 !important;
    font-weight: 700;
    font-size: 1rem;
}

.inventory-table .card-name-cell .text-muted {
    color: #4b5563 !important;
    font-size: 0.85rem;
}

/* Dark mode pour inventory-table */
[data-theme="dark"] .inventory-table-container {
    background: rgba(10, 14, 39, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .inventory-table {
    color: #e0e6ed;
}

[data-theme="dark"] .inventory-table th,
[data-theme="dark"] .inventory-table thead th {
    background: rgba(10, 14, 39, 0.95) !important;
    color: #fff !important;
    border-bottom-color: rgba(102, 126, 234, 0.5) !important;
}

[data-theme="dark"] .inventory-table td,
[data-theme="dark"] .inventory-table tbody td {
    color: #e0e6ed !important;
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .inventory-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .inventory-row:hover {
    background: rgba(102, 126, 234, 0.15);
}

[data-theme="dark"] .inventory-table .card-name-cell strong,
[data-theme="dark"] .inventory-table .card-name {
    color: #fff !important;
}

[data-theme="dark"] .inventory-table .card-name-cell .text-muted,
[data-theme="dark"] .inventory-table .card-name-cell small,
[data-theme="dark"] .inventory-table .card-series {
    color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .inventory-table td {
    color: #e0e6ed !important;
}

/* Premium theme pour inventory-table */
[data-theme="premium"] .inventory-table-container {
    background: var(--gray-100, #141414);
    border-color: rgba(192, 192, 192, 0.2);
}

[data-theme="premium"] .inventory-table th,
[data-theme="premium"] .inventory-table thead th {
    background: var(--gray-200, #1f1f1f) !important;
    color: var(--silver-light, #e8e8e8) !important;
}

[data-theme="premium"] .inventory-table td,
[data-theme="premium"] .inventory-table tbody td {
    color: var(--gray-800, #d0d0d0) !important;
    border-bottom-color: rgba(192, 192, 192, 0.1);
}

[data-theme="premium"] .inventory-table .card-name-cell strong {
    color: var(--silver-light, #e8e8e8) !important;
}

[data-theme="premium"] .inventory-table .card-name-cell .text-muted {
    color: var(--silver-dark, #999999) !important;
}

.table-card-image {
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
}

[data-theme="dark"] .table-card-image {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

/* Stock Badges */
.stock-badge {
    background: linear-gradient(135deg, #43e97b, #38f9d7) !important;
    color: #0a0e27 !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.3);
}

.stock-badge.stock-zero {
    background: linear-gradient(135deg, #f5576c, #f093fb) !important;
    color: #fff !important;
}

/* Inventory Objects List */
.inventory-objects-list {
    gap: 15px;
}

.inventory-object {
    background: rgba(10, 14, 39, 0.7) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.inventory-object:hover {
    transform: translateX(8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
}

.object-name {
    color: #fff !important;
    font-weight: 700;
}

.object-details {
    color: rgba(255, 255, 255, 0.7) !important;
}

.object-set {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #a8b9f5 !important;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.object-type {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
}

.object-location {
    color: #4facfe !important;
}

.quantity-display {
    color: #667eea !important;
}

/* Inventory Modal Detail */
.inventory-detail-modal .modal-content {
    background: rgba(10, 14, 39, 0.98) !important;
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7) !important;
}

.inventory-detail-modal .modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.inventory-detail-modal .modal-header h4 {
    color: #fff !important;
    font-weight: 700;
}

.inventory-detail-modal .modal-body {
    background: transparent !important;
    color: #e0e6ed !important;
}

.inventory-detail-modal .detail-section {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
}

.inventory-detail-modal .detail-section h5 {
    color: #667eea !important;
    font-weight: 700;
}

.inventory-detail-modal .form-row label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
}

.inventory-detail-modal .info-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

.inventory-detail-modal .info-value {
    color: #fff !important;
    font-weight: 600;
}

.inventory-detail-modal .modal-footer {
    background: rgba(10, 14, 39, 0.5) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Card Info Summary */
.card-info-summary {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
}

.card-info-summary .info-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.card-info-summary .info-row:last-child {
    border-bottom: none;
}

/* Market Price Box */
.market-price-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15)) !important;
    border: 2px solid rgba(102, 126, 234, 0.4) !important;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
}

.market-price-box h5 {
    color: #fff !important;
}

.market-price-box .price-value {
    color: #43e97b !important;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(67, 233, 123, 0.3);
}

.price-trends {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.trend-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

.trend-value {
    color: #fff !important;
    font-weight: 700;
}

.price-meta {
    color: rgba(255, 255, 255, 0.5) !important;
}

.collection-value {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

/* Stats Summary */
.stats-summary {
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-v2 {
    background: rgba(10, 14, 39, 0.7) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    text-align: center;
}

.stat-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.3) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
}

.stat-card-v2 .stat-value {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 2.5rem;
}

.stat-card-v2 .stat-label {
    color: rgba(255, 255, 255, 0.7) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Condition & Rarity Badges - Amélioration contraste */
.condition-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* Condition badge colors - Light theme (default) */
.condition-M {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}
.condition-NM {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #17a2b8;
}
.condition-EX {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #007bff;
}
.condition-LP {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.condition-MP {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}
.condition-HP {
    background: #f5c6cb;
    color: #721c24;
    border: 1px solid #dc3545;
}
.condition-DMG {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #6c757d;
}

/* Condition badge colors - Dark theme */
[data-theme="dark"] .condition-M {
    background: rgba(67, 233, 123, 0.3);
    color: #43e97b;
    border: 1px solid rgba(67, 233, 123, 0.5);
}
[data-theme="dark"] .condition-NM {
    background: rgba(79, 172, 254, 0.3);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.5);
}
[data-theme="dark"] .condition-EX {
    background: rgba(102, 126, 234, 0.3);
    color: #7c9bff;
    border: 1px solid rgba(102, 126, 234, 0.5);
}
[data-theme="dark"] .condition-LP {
    background: rgba(246, 211, 101, 0.3);
    color: #f6d365;
    border: 1px solid rgba(246, 211, 101, 0.5);
}
[data-theme="dark"] .condition-MP {
    background: rgba(245, 87, 108, 0.3);
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.5);
}
[data-theme="dark"] .condition-HP {
    background: rgba(245, 87, 108, 0.3);
    color: #ff6b81;
    border: 1px solid rgba(245, 87, 108, 0.5);
}
[data-theme="dark"] .condition-DMG {
    background: rgba(150, 150, 150, 0.3);
    color: #bbb;
    border: 1px solid rgba(150, 150, 150, 0.5);
}

/* Rarity badges - Base styling */
.rarity-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Light theme default */
    background: #e5e7eb;
    color: #374151;
    text-transform: none;
    white-space: nowrap;
}

/* Rarity badge colors - Light theme (default) */
.rarity-common {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.rarity-uncommon {
    background: #d1f2eb;
    color: #0c6b58;
    border-color: #20c997;
}

.rarity-rare {
    background: #ffeaa7;
    color: #6c5a0d;
    border-color: #f1c40f;
}

.rarity-holo {
    background: linear-gradient(135deg, #e17055, #fab1a0);
    color: white;
    border-color: #d35400;
}

.rarity-ultra {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border-color: #5f27cd;
}

.rarity-secret {
    background: linear-gradient(135deg, #fd79a8, #a29bfe);
    color: white;
    border-color: #e84393;
    font-weight: 800;
}

/* Rarity badge colors - French names (light theme) */
.rarity-commune {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.rarity-peu {
    background: #d1f2eb;
    color: #0c6b58;
    border-color: #20c997;
}

.rarity-magnifique {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border-color: #5f27cd;
}

.rarity-illustration {
    background: linear-gradient(135deg, #fd79a8, #a29bfe);
    color: white;
    border-color: #e84393;
}

.rarity-high-tecg,
.rarity-high-tech {
    background: linear-gradient(135deg, #4facfe, #43e97b);
    color: white;
    border-color: #00b894;
}

.rarity-hyper {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #4a3000;
    border-color: #f39c12;
    font-weight: 800;
}

.rarity-double {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border-color: #5f27cd;
}

/* Rarity badges - Dark theme */
[data-theme="dark"] .rarity-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(102, 126, 234, 0.3);
    color: #a8b9f5;
}

[data-theme="dark"] .rarity-common {
    background: rgba(150, 150, 150, 0.3);
    color: #ccc;
    border-color: rgba(150, 150, 150, 0.5);
}

[data-theme="dark"] .rarity-uncommon {
    background: rgba(67, 233, 123, 0.3);
    color: #43e97b;
    border-color: rgba(67, 233, 123, 0.5);
}

[data-theme="dark"] .rarity-rare {
    background: rgba(246, 211, 101, 0.3);
    color: #f6d365;
    border-color: rgba(246, 211, 101, 0.5);
}

[data-theme="dark"] .rarity-holo {
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.5), rgba(250, 177, 160, 0.5));
    color: #ffb4a2;
    border-color: rgba(225, 112, 85, 0.7);
}

[data-theme="dark"] .rarity-ultra {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.5), rgba(108, 92, 231, 0.5));
    color: #b5aff5;
    border-color: rgba(162, 155, 254, 0.7);
}

[data-theme="dark"] .rarity-secret {
    background: linear-gradient(135deg, rgba(253, 121, 168, 0.5), rgba(162, 155, 254, 0.5));
    color: #ffa5d5;
    border-color: rgba(253, 121, 168, 0.7);
}

[data-theme="dark"] .rarity-commune {
    background: rgba(150, 150, 150, 0.3);
    color: #ccc;
    border-color: rgba(150, 150, 150, 0.5);
}

[data-theme="dark"] .rarity-peu {
    background: rgba(67, 233, 123, 0.3);
    color: #43e97b;
    border-color: rgba(67, 233, 123, 0.5);
}

[data-theme="dark"] .rarity-magnifique {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.5), rgba(108, 92, 231, 0.5));
    color: #b5aff5;
    border-color: rgba(162, 155, 254, 0.7);
}

[data-theme="dark"] .rarity-illustration {
    background: linear-gradient(135deg, rgba(253, 121, 168, 0.5), rgba(162, 155, 254, 0.5));
    color: #ffa5d5;
    border-color: rgba(253, 121, 168, 0.7);
}

[data-theme="dark"] .rarity-high-tecg,
[data-theme="dark"] .rarity-high-tech {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.5), rgba(67, 233, 123, 0.5));
    color: #4fffb8;
    border-color: rgba(79, 172, 254, 0.7);
}

[data-theme="dark"] .rarity-hyper {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5), rgba(255, 165, 0, 0.5));
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.7);
}

[data-theme="dark"] .rarity-double {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.5), rgba(108, 92, 231, 0.5));
    color: #b5aff5;
    border-color: rgba(162, 155, 254, 0.7);
}

/* Inventory table buttons */
.inventory-table .btn {
    color: #fff !important;
    border: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.inventory-table .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.inventory-table .btn-primary:hover {
    background: linear-gradient(135deg, #764ba2, #667eea) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.inventory-table .btn i {
    color: #fff !important;
}

/* Empty State */
.inventory-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6) !important;
}

.inventory-empty-state h3 {
    color: #fff !important;
    margin-bottom: 15px;
}

.inventory-empty-state p {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Inventory Section Headers */
.inventory-section h5 {
    color: #667eea !important;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mixed View */
.inventory-mixed .inventory-section {
    margin-bottom: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .inventory-detail-modal .modal-body {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* ========================================
   SCANNER - CARTES DÉTECTÉES (Glassmorphic)
   ======================================== */

/* Section Results */
.results-section {
    padding: 24px !important;
}

.results-section h4 {
    color: #fff !important;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Gallery container */
#gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
}

/* Carte détectée - Style glassmorphique */
.hist-card {
    width: 180px;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hist-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.4) !important;
}

/* Image de la carte */
.hist-card .card-img-top {
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
    object-fit: cover;
}

/* Body de la carte */
.hist-card .card-body {
    padding: 12px !important;
    background: transparent !important;
}

.hist-card .card-body small {
    display: block;
}

.hist-card .card-body .fw-bold {
    color: #fff !important;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 4px;
}

.hist-card .card-body .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.75rem;
}

/* Badge de confiance */
.hist-card .confidence-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hist-card .confidence-badge.confidence-excellent {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #0a0e27;
}

.hist-card .confidence-badge.confidence-good {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #0a0e27;
}

.hist-card .confidence-badge.confidence-medium {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #0a0e27;
}

.hist-card .confidence-badge.confidence-low {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
}

/* Texte de confiance */
.hist-card .confidence-text {
    font-size: 0.7rem;
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 8px;
    text-align: center;
}

.hist-card .confidence-text.excellent {
    background: rgba(67, 233, 123, 0.15);
    color: #43e97b;
}

.hist-card .confidence-text.good {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

.hist-card .confidence-text.medium {
    background: rgba(246, 211, 101, 0.15);
    color: #f6d365;
}

.hist-card .confidence-text.low {
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c;
}

/* Fusion badge */
.hist-card .fusion-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(102, 126, 234, 0.9);
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hist-card .fusion-badge .fusion-icon {
    font-size: 0.9rem;
}

.hist-card .fusion-badge .fusion-agreement {
    font-weight: 700;
    color: #fff;
}

.hist-card .fusion-badge .fusion-agreement.excellent {
    color: #43e97b;
}

.hist-card .fusion-badge .fusion-agreement.good {
    color: #4facfe;
}

.hist-card .fusion-badge .fusion-agreement.warning {
    color: #fda085;
}

/* Review warning */
.hist-card .review-warning {
    position: absolute;
    top: 45px;
    left: 10px;
    background: rgba(255, 107, 107, 0.9);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

/* Fusion enabled state */
.hist-card.fusion-enabled {
    border: 2px solid rgba(102, 126, 234, 0.4) !important;
}

.hist-card.fusion-enabled:hover {
    border-color: #667eea !important;
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
}

/* Needs review state */
.hist-card.needs-review {
    border: 2px solid rgba(255, 107, 107, 0.5) !important;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%) !important;
}

.hist-card.needs-review:hover {
    border-color: #ff6b6b !important;
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.3);
}

/* Fusion details */
.hist-card .fusion-details {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.65rem;
}

.hist-card .fusion-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.hist-card .fusion-method:last-child {
    margin-bottom: 0;
}

.hist-card .method-name {
    color: rgba(255, 255, 255, 0.7);
}

.hist-card .method-score {
    color: #4facfe;
    font-weight: 600;
}

/* Message box */
#msg {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 16px 20px !important;
}

#msg strong {
    color: #fff !important;
}

#msg small {
    color: rgba(255, 255, 255, 0.6) !important;
}

#msg.alert-success {
    background: rgba(67, 233, 123, 0.1) !important;
    border-color: rgba(67, 233, 123, 0.3) !important;
}

#msg.alert-danger {
    background: rgba(245, 87, 108, 0.1) !important;
    border-color: rgba(245, 87, 108, 0.3) !important;
}

#msg.alert-warning {
    background: rgba(246, 211, 101, 0.1) !important;
    border-color: rgba(246, 211, 101, 0.3) !important;
}

/* Scan stats */
#scanStats {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#scanStats .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

#scanStats span:not(.text-muted) {
    color: #4facfe;
    font-weight: 600;
}

/* Animation d'entrée */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hist-card {
    animation: cardSlideIn 0.4s ease-out both;
}
