/* Dashboard Signals - Styles Responsive */

:root {
    --primary: #8a2be2; /* Couleur principale violette */
    --primary-light: #9d4edd;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --bg-card: #1e1e2d;
    --border-color: #2d2d3a;
    --bg-input: #2a2a3c;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* Conteneur principal */
.dashboard-signals {
    margin-top: 0.5rem;
    width: 100%;
    min-height: 300px;
    position: relative;
}

.dashboard-signals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-signals-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-signals-title i {
    color: var(--primary);
}

.dashboard-signals-refresh {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.dashboard-signals-refresh:hover {
    color: var(--primary);
}

.dashboard-signals-refresh.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Liste des signaux */
.dashboard-signals-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-input);
}

.dashboard-signals-list::-webkit-scrollbar {
    width: 6px;
}

.dashboard-signals-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px;
}

.dashboard-signals-list::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 3px;
}

/* Carte de signal */
.signal-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.signal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.signal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* En-tête de la carte */
.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.signal-token {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.token-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.token-symbol {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.15rem;
    display: inline-block;
}

/* Score du signal */
.signal-score {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.score-high {
    background: rgba(20, 241, 149, 0.1);
    color: #14f195;
}

.score-medium {
    background: rgba(255, 184, 0, 0.1);
    color: #ffb800;
}

.score-low {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

/* Contenu du signal */
.signal-content {
    margin-bottom: 1rem;
}

.signal-content p {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.signal-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.signal-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Actions du signal */
.signal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.signal-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* État de chargement */
.dashboard-loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.dashboard-loading i {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

/* État vide */
.dashboard-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.dashboard-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.dashboard-empty p {
    margin: 0.5rem 0 0 0;
    max-width: 300px;
}

/* Badge de statut */
.signal-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 8px;
}

/* Styles pour les différents types de signaux */
.signal-card.alert .signal-badge {
    background: #ff4757;
}

.signal-card.info .signal-badge {
    background: #3498db;
}

.signal-card.success .signal-badge {
    background: #2ecc71;
}

/* Animation de pulsation pour les nouveaux signaux */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.signal-card.new {
    animation: pulse 2s infinite;
    border-left: 3px solid var(--primary);
}

/* Styles pour les états de chargement et vide */
.dashboard-loading,
.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    min-height: 200px;
}

.dashboard-loading i,
.dashboard-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.dashboard-loading p,
.dashboard-empty p {
    margin: 0.5rem 0 0;
    color: var(--text-secondary);
}

.dashboard-empty .small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Styles pour le pied de page des signaux */
.signal-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.signal-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Styles pour le bouton de rafraîchissement */
.btn-refresh {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-refresh:hover {
    color: var(--primary);
    background: rgba(138, 43, 226, 0.1);
}

.btn-refresh:active {
    transform: scale(0.95);
}

/* Animation de chargement */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Styles responsives */
@media (max-width: 1200px) {
    .dashboard-signals-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-signals {
        min-height: 250px;
    }
    
    .signal-card {
        padding: 0.75rem;
    }
    
    .signal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .signal-actions .btn {
        width: 100%;
    }
}
