/* ============================================================
   TradeBoard — Custom Styles
   ============================================================ */

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Transitions globales */
a, button, input, select, textarea {
    transition: all 0.15s ease;
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

/* Pulse animation pour les prix live */
@keyframes price-update {
    0% { background-color: transparent; }
    50% { background-color: rgba(59, 130, 246, 0.1); }
    100% { background-color: transparent; }
}
.price-updated {
    animation: price-update 1s ease;
}

/* Badge types d'actifs */
.badge-crypto { background: #f59e0b; color: #fff; }
.badge-etf { background: #3b82f6; color: #fff; }
.badge-action { background: #8b5cf6; color: #fff; }
.badge-obligation { background: #6366f1; color: #fff; }
.badge-matiere_premiere { background: #d97706; color: #fff; }
.badge-opcvm { background: #0891b2; color: #fff; }
.badge-forex { background: #059669; color: #fff; }
.badge-scpi { background: #dc2626; color: #fff; }
.badge-autre { background: #6b7280; color: #fff; }

/* Loading spinner */
.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart container */
.chart-container {
    width: 100%;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Gain / Loss backgrounds */
.bg-gain-light { background-color: rgba(16, 185, 129, 0.1); }
.bg-loss-light { background-color: rgba(239, 68, 68, 0.1); }

/* Mobile responsive table */
@media (max-width: 640px) {
    .responsive-table thead {
        display: none;
    }
    .responsive-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        padding: 0.75rem;
    }
    .responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.25rem 0;
        border: none;
    }
    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
    }
}

/* Landing page gradient */
.hero-gradient {
    background: linear-gradient(135deg, #0f1f35 0%, #1e3a5f 50%, #1e40af 100%);
}
