/* Variables de base pour le mode clair */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF5722;
    --background-color: #f9f9f9;
    --card-bg-color: #ffffff;
    --text-color: #333333;
    --grey-color: #888888;
    --border-color: #e0e0e0;
}

/* Variables pour le mode sombre */
[data-theme="dark"] {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF5722;
    --background-color: #1a1a1a;
    --card-bg-color: #2a2a2a;
    --text-color: #f0f0f0;
    --grey-color: #aaa;
    --border-color: #444;
    --chart-grid-color: rgba(255, 255, 255, 0.1);
}

/* Style pour regrouper les contrôles */
.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px;
}

/* Style pour le sélecteur de langue */
.language-selector select {
    font-size: 16px;
    padding: 5px 10px 5px 35px; /* Padding à gauche pour l'icône */
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: 10px center, right 10px center;
    background-size: 20px auto, 12px auto;
}

/* .language-selector select[data-current="fr"] {
    background-image: url('https://flagcdn.com/20x15/fr.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.language-selector select[data-current="en"] {
    background-image: url('https://flagcdn.com/20x15/gb.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
} */

/* Style pour les drapeaux dans les options de sélection */
.custom-select-container {
    position: relative;
    display: inline-block;
}

.custom-select-selected {
    font-size: 16px;
    padding: 5px 10px 5px 35px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg-color);
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: 10px center, right 10px center;
    background-size: 20px auto, 12px auto;
    display: block;
}

.custom-select-selected.fr {
    background-image: url('https://flagcdn.com/20x15/fr.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.custom-select-selected.en {
    background-image: url('https://flagcdn.com/20x15/gb.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.custom-select-selected.es {
    background-image: url('https://flagcdn.com/20x15/es.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.custom-select-selected.hi {
    background-image: url('https://flagcdn.com/20x15/in.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.custom-select-selected.zh {
    background-image: url('https://flagcdn.com/20x15/cn.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.custom-select-selected.ar {
    background-image: url('https://flagcdn.com/20x15/sa.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.custom-select-selected.pt {
    background-image: url('https://flagcdn.com/20x15/pt.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.custom-select-selected.it {
    background-image: url('https://flagcdn.com/20x15/it.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.custom-select-selected.de {
    background-image: url('https://flagcdn.com/20x15/de.png'), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: none;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.custom-select-option {
    padding: 5px 10px 5px 35px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 20px auto;
}

.custom-select-option:hover {
    background-color: var(--border-color);
}

.custom-select-option.fr {
    background-image: url('https://flagcdn.com/20x15/fr.png');
}

.custom-select-option.en {
    background-image: url('https://flagcdn.com/20x15/gb.png');
}

.custom-select-option.es {
    background-image: url('https://flagcdn.com/20x15/es.png');
}
.custom-select-option.hi {
    background-image: url('https://flagcdn.com/20x15/in.png');
}
.custom-select-option.zh {
    background-image: url('https://flagcdn.com/20x15/cn.png');
}
.custom-select-option.ar {
    background-image: url('https://flagcdn.com/20x15/sa.png');
}
.custom-select-option.pt {
    background-image: url('https://flagcdn.com/20x15/pt.png');
}
.custom-select-option.it {
    background-image: url('https://flagcdn.com/20x15/it.png');
}
.custom-select-option.de {
    background-image: url('https://flagcdn.com/20x15/de.png');
}

/* Style pour les langues RTL comme l'arabe */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .custom-select-selected,
.rtl .custom-select-option {
    padding: 5px 35px 5px 10px;
    background-position: right 10px center, left 10px center;
}

.rtl .controls-wrapper {
    flex-direction: row-reverse;
}

.rtl .select-group label {
    margin-right: 0;
    margin-left: 10px;
}

/* Style du bouton de changement de thème */
.theme-toggle {
    position: static;
    /* top: 20px;
    right: 20px; */
}

/* Ajustements pour les écrans étroits */
@media (max-width: 950px) {
    .controls-wrapper {
        margin-left: auto;
    }
}

.theme-toggle button {
    background: var(--card-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle button:hover {
    background: var(--border-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    color: var(--primary-color);
    font-size: 28px;
}

h2 {
    color: var(--secondary-color);
    font-size: 20px;
    margin-bottom: 15px;
}

.server-info {
    text-align: right;
    margin: 10px;
}
.server-info::after {
    content: "";
    display: inline-block;
    height: 24px;
    width: 1px;
    background-color: var(--border-color);
    margin-left: 10px;
    vertical-align: middle;
}

#server-name {
    font-weight: bold;
    color: var(--accent-color);
    margin-right: 10px;
}

.selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

/* Améliorer les sélecteurs en mode sombre */
[data-theme="dark"] select {
    background-color: #333;
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Adapter le select d'intervalle d'actualisation dans le header */
header .select-group {
    margin-left: auto;
    margin-right: 20px;
    min-width: 150px;
    flex-grow: 0;
}

/* Ajouter une indication visuelle pour le refreshing */
.refreshing select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%234CAF50" d="M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-143.6-28.9L288 302.6V120c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v182.6l-72.4-75.5c-9.3-9.7-24.8-9.9-34.3-.4l-10.9 11c-9.4 9.4-9.4 24.6 0 33.9L239 404.3c9.4 9.4 24.6 9.4 33.9 0l132.7-132.7c9.4-9.4 9.4-24.6 0-33.9l-10.9-11c-9.5-9.5-25-9.3-34.3.4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 25px center;
    background-size: 16px 16px;
}

/* Animation pour l'indicateur d'actualisation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refreshing:after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    position: absolute;
    top: 15px;
    right: 110px;
    animation: spin 1s linear infinite;
}

/* Style indiquant un rafraîchissement actif */
#refresh-interval.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Style pour le sélecteur de rafraîchissement */
#refresh-interval {
    text-align: center;
    text-align-last: center; /* Pour Firefox */
    padding-left: 10px; /* Réduire le padding à gauche pour équilibrer */
    background-position: right 10px center; /* Ajuster la position de l'icône de la flèche déroulante pour qu'elle soit alignée */
}

/* S'assurer que les options de la liste déroulée sont alignées à gauche */
#refresh-interval option {
    text-align: left; /* Aligner à gauche le texte des options */
    text-align-last: left;
}
/* Correction pour Firefox qui peut hériter l'alignement */
@-moz-document url-prefix() {
    #refresh-interval option {
        text-align: left !important;
    }
}

/* S'assurer que le texte reste centré même avec l'indicateur de rafraîchissement actif */
.refreshing #refresh-interval {
    background-position: right 10px center;
}

/* Badge pour l'intervalle */
.refresh-badge {
    position: relative;
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    vertical-align: middle;
}

/* Ajuster positions dans le header pour écrans étroits */
@media (max-width: 950px) {
    header {
        flex-wrap: wrap;
    }
    
    header h1 {
        flex-basis: 100%;
        margin-bottom: 15px;
    }
    
    .server-info {
        flex-grow: 1;
    }
    
    header .select-group {
        flex-basis: 150px;
        margin: 0 10px;
    }
    
    .theme-toggle {
        position: static;
    }
}

.select-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    font-size: 16px;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-wrapper {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 12px 15px; /* Réduire le padding vertical */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    
    /* Modifier les propriétés pour un affichage plus compact */
    display: flex;
    flex-direction: column;
    min-height: unset; /* Supprimer la hauteur minimale fixe */
    height: auto; /* Hauteur adaptative */
}

.stat-box h3 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 5px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--grey-color);
    /* Centrer le contenu et lui donner de l'espace pour respirer */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    padding: 10px 0;
}

/* Ajuster l'espacement dans les statistiques à plusieurs lignes */
.stat-value span {
    margin: 0;
    padding: 1px 0;
}

.candlestick-container {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* height: 400px; */
}

/* #candlestick-chart {
    width: 100%;
    height: 100%;
} */

footer {
    text-align: center;
    padding: 20px 0;
    color: #777;
    font-size: 14px;
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Styles pour les prix d'achat et de vente */
.buy-price {
    /* color: #c93131; Rouge pour l'achat */
    color: #f44336;
    font-weight: bold;
}

.sell-price {
    /* color: #2c8e2c; Vert pour la vente */
    color: #4caf50;
    font-weight: bold;
}

/* Style pour améliorer la lisibilité des variations */
#price-change span {
    font-weight: bold;
    display: inline-block;
}

.type-buy {
    color: #f44336; /* rouge pour achat */
}

.type-sell {
    color: #4caf50; /* vert pour vente */
}

#shop-type {
    /* font-weight: bold; */
    /* line-height: 1.3; */
    display: block;
}

/* Styles spécifiques pour le prix avec achat/vente */
#current-price {
    display: block;
}

/* Styles spécifiques pour le prix avec achat/vente */
#price-change {
    display: block;
}

.buy-price, .sell-price {
    margin: 2px 0;
    display: inline-block;
}

.searchable-select-container {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.searchable-select-input {
    width: 100%;
    padding: 10px;
    padding-right: 30px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg-color);
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    /* Ajout d'une petite flèche pour ressembler à un select */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Style du sélecteur en mode sombre */
[data-theme="dark"] .searchable-select-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.searchable-select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.25);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Animation d'apparition */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
}

/* .searchable-select-option {
    padding: 8px;
    cursor: pointer;
} */

/* .searchable-select-option:hover {
    background-color: var(--border-color);
} */


.searchable-select-dropdown[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

.searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.1s;
}

.searchable-select-option:last-child {
    border-bottom: none;
}

.searchable-select-option:hover {
    /* background-color: rgba(76, 175, 80, 0.1); */
    background-color: var(--border-color);
}

/* Barre de défilement personnalisée pour la liste déroulante */
.searchable-select-dropdown::-webkit-scrollbar {
    width: 8px;
}

.searchable-select-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0 4px 4px 0;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

[data-theme="dark"] .searchable-select-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .searchable-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Style lorsqu'aucun résultat n'est trouvé */
.searchable-select-dropdown:empty::after {
    content: "Aucun résultat";
    display: block;
    padding: 10px;
    text-align: center;
    color: var(--grey-color);
    font-style: italic;
}

/* Solution complète pour éviter le saut de ligne */
#stock-info {
    display: inline-block;
    white-space: nowrap;
    font-size: 0; /* Supprimer les espaces invisibles entre les éléments */
    line-height: 1;
}

#stock-info span {
    font-size: 24px; /* Restaurer la taille de police */
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
}

/* Garantir que le slash reste collé */
#stock-info .separator {
    margin: 0 2px;
    font-size: 24px;
    display: inline-block;
    vertical-align: middle;
}

/* Styles pour les couleurs de stock */
.stock-critical, .stock-low, .stock-medium, .stock-high {
    display: inline-block !important;
    font-weight: bold;
}

.stock-critical { color: #AA0000; }
.stock-low { color: #FF5555; }
.stock-medium { color: #FFAA00; }
.stock-high { color: #55FF55; }



/* Styles pour l'analyse technique et les tendances de marché */
.market-analysis-container {
    display: none;
    margin-top: 30px;
}

.market-analysis-section {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.trend-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
}

.trend-badge.rising {
    background-color: #4CAF50;
}

.trend-badge.falling {
    background-color: #F44336;
}

.trend-badge.stable {
    background-color: #2196F3;
}

.trend-badge.volatile {
    background-color: #FF9800;
}

.trend-badge.spread_changing {
    background-color: #9C27B0;
}

.trend-badge.unknown {
    background-color: #9E9E9E;
}

.trend-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: var(--grey-color);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
}

.stat-value.positive {
    color: #4CAF50;
}

.stat-value.negative {
    color: #F44336;
}

.indicators-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.indicator-section {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 15px;
    height: auto;
}

.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.forecast-confidence {
    font-size: 14px;
    color: var(--grey-color);
}

.forecast-disclaimer {
    font-size: 12px;
    color: var(--grey-color);
    font-style: italic;
    margin-top: 15px;
    text-align: center;
}

.signals-section {
    margin-bottom: 20px;
}

.signals-section h4 {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.signals-list {
    list-style: none;
    padding: 0;
}

.signal-item {
    display: flex;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--background-color);
}

.signal-item.bullish {
    border-left: 4px solid #4CAF50;
}

.signal-item.bearish {
    border-left: 4px solid #F44336;
}

.signal-item.strong {
    background-color: rgba(76, 175, 80, 0.1);
}

.signal-item.bearish.strong {
    background-color: rgba(244, 67, 54, 0.1);
}

.signal-icon {
    margin-right: 15px;
    font-size: 24px;
    color: var(--grey-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
}

.signal-content {
    flex: 1;
}

.signal-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.signal-description {
    font-size: 14px;
    margin-bottom: 5px;
}

.signal-time {
    font-size: 12px;
    color: var(--grey-color);
}

.levels-section {
    margin-bottom: 20px;
}

.levels-section h4 {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.levels-container {
    display: flex;
    gap: 20px;
}

.resistance-levels, .support-levels {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--background-color);
}

.resistance-levels {
    border-left: 4px solid #F44336;
}

.support-levels {
    border-left: 4px solid #4CAF50;
}

.resistance-levels h5, .support-levels h5 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.resistance-levels ul, .support-levels ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resistance-levels li, .support-levels li {
    padding: 8px;
    margin-bottom: 5px;
    text-align: center;
    font-weight: bold;
    border-radius: 4px;
}

.resistance-levels li {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.support-levels li {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.controls {
    display: flex;
    margin-bottom: 20px;
    gap: 15px;
}

.analyze-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.analyze-btn:hover {
    background-color: #3d8b40;
}

.analyze-btn.active {
    background-color: #f44336;
}

.analyze-btn.active:hover {
    background-color: #d32f2f;
}

.no-data-message {
    text-align: center;
    padding: 30px;
    color: var(--grey-color);
    font-style: italic;
}

@media (max-width: 768px) {
    .indicators-container {
        grid-template-columns: 1fr;
    }
    
    .levels-container {
        flex-direction: column;
    }
}

/* Animation de chargement pour les graphiques */
.loading-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.loading-chart::after {
    content: "Chargement...";
    color: var(--grey-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Ajouts pour le mode sombre dans l'analyse */
[data-theme="dark"] .no-data-message {
    color: #aaaaaa;
}

[data-theme="dark"] .trend-stats .stat-item {
    background-color: #333333;
}

[data-theme="dark"] .signal-item {
    background-color: #333333;
}

[data-theme="dark"] .signal-item.bullish {
    background-color: rgba(76, 175, 80, 0.2);
}

[data-theme="dark"] .signal-item.bearish {
    background-color: rgba(244, 67, 54, 0.2);
}

[data-theme="dark"] .resistance-levels, 
[data-theme="dark"] .support-levels {
    background-color: #333333;
}

[data-theme="dark"] .resistance-levels li {
    background-color: rgba(244, 67, 54, 0.2);
    color: #ff6b6b;
}

[data-theme="dark"] .support-levels li {
    background-color: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

[data-theme="dark"] .forecast-disclaimer {
    color: #999999;
}

[data-theme="dark"] .market-analysis-section {
    background-color: #2a2a2a;
}

[data-theme="dark"] .indicator-section {
    background-color: #333333;
}