/* Sidebar collapsible */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--binance-yellow);
    color: var(--binance-dark);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    cursor: pointer;
    font-size: 1.2rem;
    justify-content: center;
    align-items: center;
}

/* Header amélioré pour mobile */
.mobile-header {
    display: none;
    flex-direction: column;
    width: 100%;
}

.mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
}

.mobile-logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: var(--binance-yellow);
}

.mobile-controls {
    display: flex;
    gap: 10px;
}

/* Le bouton de fermeture de la sidebar ne doit être visible qu'en mode mobile */
.sidebar-close-btn {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--binance-text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
}

/* Styles responsives améliorés */
@media (max-width: 992px) {
    /* Style du header pour mobile */
    header {
        flex-direction: column;
        padding: 10px;
    }
    
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .logo-text {
        display: inline; /* Afficher le nom du site */
        font-size: 1.2rem;
    }
    
    /* Sidebar collapsible */
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-close-btn {
        display: block; /* Visible uniquement en mode mobile */
    }
    
    .dashboard {
        display: block;
        position: relative;
        height: calc(100vh - 100px);
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Caché par défaut */
        width: 280px;
        height: 100vh;
        z-index: 200;
        transition: left 0.3s ease;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0; /* Visible lorsqu'actif */
    }
    
    /* Overlay sombre lorsque le sidebar est ouvert */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 150;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        width: 100%;
        height: calc(100vh - 100px);
    }
    
    /* Amélioration des filtres */
    .filter-section {
        margin-top: 20px;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-row select, 
    .filter-row button {
        width: 100%;
    }
    
    .rank-filter {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    
    /* Amélioration de la vue bulles */
    .bubbles-container {
        height: calc(100vh - 150px);
    }
}

@media (max-width: 768px) {
    .market-indicators {
        display: none; /* Cache les indicateurs de marché sur mobile */
    }
    
    .mobile-header {
        display: flex;
    }
    
    .controls-bar {
        flex-direction: column;
    }
    
    /* Amélioration de l'affichage du tableau */
    .results-table th:nth-child(3),
    .results-table td:nth-child(3),
    .results-table th:nth-child(6),
    .results-table td:nth-child(6),
    .results-table th:nth-child(8),
    .results-table td:nth-child(8) {
        display: none; /* Cache certaines colonnes moins importantes */
    }
}

@media (max-width: 480px) {
    /* Simplification supplémentaire pour très petits écrans */
    .results-table th:nth-child(4),
    .results-table td:nth-child(4),
    .results-table th:nth-child(7),
    .results-table td:nth-child(7) {
        display: none;
    }
    
    .card-grid {
        padding: 10px;
        gap: 10px;
    }
    
    .coin-card {
        padding: 10px;
    }

    /* Amélioration du contenu des cartes */
    .coin-metrics .metric-row:nth-child(5),
    .coin-metrics .metric-row:nth-child(6) {
        display: none; /* Cache certaines métriques moins importantes */
    }
}

/* Vue détaillée du graphique */
@media (max-width: 768px) {
    .chart-detail-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        z-index: 1000;
    }
    
    .chart-detail-header {
        padding: 10px 15px;
    }
    
    .chart-detail-symbol h2 {
        font-size: 1.4rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
    
    .price-change {
        font-size: 0.9rem;
    }
    
    .chart-timeframe-selector {
        overflow-x: auto;
        white-space: nowrap;
        padding: 5px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .timeframe-option {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .detail-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .detail-info-card {
        padding: 8px 10px;
    }
    
    .detail-info-label {
        font-size: 0.8rem;
    }
    
    .detail-info-value {
        font-size: 1rem;
    }
    
    .detail-performance-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .performance-card {
        padding: 8px 10px;
    }
    
    .performance-label {
        font-size: 0.8rem;
    }
    
    .performance-value {
        font-size: 1rem;
    }
}

/* Styles pour la personnalisation des filtres mobiles */
.quick-filter-btn {
    display: none;
}

.quick-filters-container {
    display: none;
    margin-bottom: 15px;
    background: var(--binance-card);
    border-radius: 5px;
    padding: 10px;
}

@media (max-width: 768px) {
    .quick-filter-btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Ajustements pour les notifications sur mobile */
@media (max-width: 480px) {
    .notification {
        top: auto;
        bottom: 70px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}
/* Cacher le header original sur mobile */
@media (max-width: 768px) {
    header {
        display: none; /* Cacher le header principal sur mobile */
    }
    
    .mobile-header {
        display: flex;
    }
    
    .mobile-header-top {
        padding: 8px 10px; /* Réduire le padding pour économiser de l'espace */
    }
}

/* About section */
.about-section {
    margin-top: 15px;
    background-color: var(--binance-card);
    border-radius: 5px;
    padding: 15px;
}

.about-section h3 {
    color: var(--binance-yellow);
    margin-bottom: 10px;
    font-size: 1rem;
}

.about-section p {
    color: var(--binance-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.button-row .btn {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Modals for additional information */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--binance-bg);
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--binance-border);
}

.modal-header h3 {
    margin: 0;
    color: var(--binance-yellow);
}

.modal-close {
    background: none;
    border: none;
    color: var(--binance-text);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-body {
    padding: 15px;
}

.feature-item {
    margin-bottom: 15px;
    border-left: 3px solid var(--binance-yellow);
    padding-left: 10px;
}

.feature-item h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--binance-text);
}

.donate-address {
    background-color: var(--binance-card);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.8rem;
}

.donate-crypto {
    margin-bottom: 15px;
}

.donate-crypto h4 {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.donate-crypto h4 i {
    margin-right: 10px;
}