.coin-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
.coin-page h2{
    margin-bottom: 5px;
}

.coin-header {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    background: linear-gradient(2deg, #ffffff 0%, #eee 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.coin-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.coin-basic-info {
    display: flex;
    gap: 45px;
}

.coin-logo {
    width: 85px;
    height: 85px;
}

.coin-identity {
    display: flex;
    align-items: center;
    gap: 15px;
}

.coin-title {
    display: flex;
    flex-direction: column;
}

.coin-title h1 {
    font-size: 3.5em;
    margin: 0;
    line-height: 1.2;
}

.coin-symbol {
    color: var(--text-secondary);
    font-size: 1.3em;
    font-weight: 500;
    margin-top: -7px;
}

.coin-rank {
    font-size: 3em;
    font-weight: 700;
    color: var(--text-primary);
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 20px;
    display: inline-block;
    background: linear-gradient(180deg, #eee 0%, #ddd 100%);
    display: flex;
    align-items: center;
}

.coin-price-info {
    text-align: right;
}

.coin-price {
    font-size: 3em;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.price-changes {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.price-changes .period {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.price-changes .percentage-change {
    margin: 0 4px;
}

.value.positive {
    color: var(--color-positive);
}

.value.negative {
    color: var(--color-negative);
}

.coin-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: 1fr;
    gap: 10px;
    align-items: start;
}

.coin-main-content {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-sidebar-container {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-sidebar2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.coin-card:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), 0 4px 8px rgba(0, 0, 0, 0.02);
}

.description-content{
    font-size: 0.8rem;
}

.description-content h3 {
    padding: 10px 0 10px;
    text-transform: uppercase;
    font-size: medium;
    letter-spacing: 0.04rem;
}

.description-content ul {
    padding-left: 20px;
    padding: 6px;
    padding-left: 20px;
}

.coin-card.descriptions {
    margin-top: 0px;
}

.description-header {
    margin-bottom: 0px;
}

.coin-short-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 0px;
}

.coin-long-description {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-secondary);
}

.coin-long-description h2 {
    font-size: 1.4em;
    margin: 20px 0 15px;
    color: var(--text-primary);
}

.coin-long-description h3 {
    font-size: 1.2em;
    margin: 15px 0 10px;
    color: var(--text-primary);
}

.coin-long-description p {
    margin-bottom: 15px;
}

.coin-long-description ul {
    margin: 15px 0;
    padding-left: 20px;
}

.coin-long-description li {
    margin-bottom: 8px;
}

.coin-long-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.coin-long-description em {
    font-style: italic;
}

.coin-long-description a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.coin-long-description a:hover {
    text-decoration: underline;
}

.chart-container {
    position: relative;
    height: 490px;
}

.chart-wrapper {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
}

.chart-wrapper #priceChart{
    margin: 30px;
}

.chart-header {
    align-items: center;
    margin-bottom: 20px;
}

.coin-card.chart-container.tradingview-enabled {
    height: 590px;
}

.coin-card.chart-container.tradingview-enabled .chart-header {
    display: block;
    align-items: center;
    margin-bottom: 20px;
}

.chart-periods {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.period-btn {
    background: #f0f2f5;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    background: #e4e6e9;
}

.period-btn.active {
    background: #007bff;
    color: white;
}

.technical-info .data-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.data-item:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.data-item .label {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 500;
}

.data-item .value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

.coin-card.market-data h2,
.coin-card.additional-info h2 {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.coin-card.market-data .data-item, .coin-card.additional-info .data-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.03));
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    margin: 10px 0;
}

.coin-card.market-data .data-item:hover, .coin-card.additional-info .data-item:hover {
    border-color: #ddd;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.19), rgba(0, 0, 0, 0.08));
}

.coin-card.market-data .data-item .label,
.coin-card.additional-info .data-item .label {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coin-card.market-data .data-item .value,
.coin-card.additional-info .data-item .value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

.coin-card.market-data .data-item .value.positive,
.coin-card.additional-info .data-item .value.positive {
    color: var(--color-positive);
}

.coin-card.market-data .data-item .value.negative,
.coin-card.additional-info .data-item .value.negative {
    color: var(--color-negative);
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background: #f0f2f5;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #666;
}

.exchange-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.exchange-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;    
    text-decoration: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.exchange-item.binance-verified {
    border-color: #f0b90b;
}

.exchange-item.coinbase-verified {
    border-color: #0052ff;
}

.exchange-item.etoro-verified {
    border-color: #6aac0e;
}

.exchange-item:hover {
    transform: translateY(-2px);
}

.exchange-item.binance-verified:hover {
    box-shadow: 0 4px 15px rgba(240,185,11,0.15);
}

.exchange-item.coinbase-verified:hover {
    box-shadow: 0 4px 15px rgba(0,82,255,0.15);
}

.exchange-item.etoro-verified:hover {
    box-shadow: 0 4px 15px rgba(106,172,14,0.15);
}

.exchange-title {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #eee;
}

.exchange-item.binance-verified .exchange-title {
    background: #fff;
    border-color: #f0b90b;
    color: #f0b90b;
}

.exchange-item.coinbase-verified .exchange-title {
    background: #fff;
    border-color: #0052ff;
    color: #0052ff;
}

.exchange-item.etoro-verified .exchange-title {
    background: #fff;
    border-color: #6aac0e;
    color: #6aac0e;
}

.exchange-item img {
    width: 32px;
    height: 32px;
    margin-right: 15px;
}

.exchange-info {
    flex: 1;
}

.exchange-info h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.exchange-info p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.btn-buy {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: #fff;
    background: #2ecc71;
    transition: background 0.3s ease;
}

.exchange-item.binance-verified .btn-buy {
    background: #f0b90b;
    color: #000;
}

.exchange-item.coinbase-verified .btn-buy {
    background: #0052ff;
    color: #fff;
}

.exchange-item.etoro-verified .btn-buy {
    background: #85c62a;
    color: #fff;
}

.btn-buy:hover {
    opacity: 0.9;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: #eee solid 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.03));
}

.link-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.21), rgba(0, 0, 0, 0.073));
    transform: translateY(-2px);
    border: #ddd 1px solid;
    box-shadow: rgba(59, 130, 246, 0.3) 0px 0px 10px;
    /* opacity: 0.6; */
}

.link-item i {
    width: 24px;
    margin-right: 10px;
    color: var(--accent-color);
}

.coin-info-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.major-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
}

.detailed-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.major-info .info-item,
.detailed-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item .label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.info-item .value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

.info-item-right{
    text-align: right;
}

.major-info .value {
    font-size: 1.3em;
}

.major-info .date {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.price-range-container {
    background: var(--card-bg);
    border-radius: 12px;
}

.range-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-range-header .label {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
}

.price-range-bar {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    position: relative;
    overflow: visible;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.price-range-progress {
    height: 100%;
    background: linear-gradient(90deg, #ddd, #aaa, var(--secondary-color), var(--primary-color));
    border-radius: 6px 0 0 6px;
    position: relative;
    transition: width 0.3s ease;
    overflow: hidden;
}

.price-marker {
    width: 3px;
    height: 20px;
    background: var(--accent-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    border-radius: 1.5px;
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
}

.min-price {
    color: var(--color-negative);
    font-weight: 500;
}

.max-price {
    color: var(--color-positive);
    font-weight: 500;
}


.similar-coins h2 {
    font-size: 1.4em;
    margin-bottom: 25px;
    color: #000;
    font-weight: 600;
    padding-left: 5px;
}

.similar-coins-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    max-width: 100%;
}

.similar-coin-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.02),
        0 4px 8px rgba(0,0,0,0.02);
}

.similar-coin-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
    border-color: #e0e0e0;
    box-shadow: 
        0 4px 6px rgba(0,0,0,0.04),
        0 8px 16px rgba(0,0,0,0.04);
}

.similar-coin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-bottom: 12px;
}

.similar-coin-header > div {
    flex: 1;
    min-width: 0;
}

.similar-coin-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 3px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.similar-coin-name {
    font-weight: 600;
    color: #000;
    font-size: 1.05em;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Info-bulle si trop long */
    position: relative;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.similar-coin-name:hover::after {
    content: attr(title);
    position: absolute;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    z-index: 1;
    white-space: normal;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-coin-symbol {
    color: #666;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.similar-coin-price {
    font-size: 1.15em;
    font-weight: 600;
    color: #000;
    margin: 10px 0 8px;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.similar-coin-change {
    font-size: 0.9em;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.similar-coin-change.positive {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.similar-coin-change.negative {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

/* Styles pour l'indicateur de chargement */
.loading-spinner {
    color: var(--text-secondary);
    font-size: 0.9em;
    padding: 10px;
    text-align: center;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Styles pour les échanges vérifiés */
.exchange-item.binance-verified {
    border: 2px solid #f0b90b;
    background: linear-gradient(45deg, rgba(240,185,11,0.1) 0%, rgba(240,185,11,0.05) 100%);
}

.exchange-item.coinbase-verified {
    border: 2px solid #0052ff;
    background: linear-gradient(45deg, rgba(0,82,255,0.1) 0%, rgba(0,82,255,0.05) 100%);
}

.exchange-item.etoro-verified {
    border: 2px solid #85c62a;
    background: #85c62a33;
    background: linear-gradient(45deg, rgba(106,172,14,0.1) 0%, rgba(106,172,14,0.05) 100%);
}

.exchange-item.binance-verified:hover {
    box-shadow: 0 4px 15px rgba(240,185,11,0.2);
    transform: translateY(-2px);
}

.exchange-item.coinbase-verified:hover {
    box-shadow: 0 4px 15px rgba(0,82,255,0.2);
    transform: translateY(-2px);
}

.exchange-item.etoro-verified:hover {
    box-shadow: 0 4px 15px rgba(106,172,14,0.2);
    transform: translateY(-2px);
}

.verified-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f0b90b;
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.verified-badge.coinbase {
    background: #0052ff;
    color: white;
}

.verified-badge.etoro {
    background: #6aac0e;
    color: white;
}

/* Media Queries pour les tablettes et petits écrans */
@media screen and (max-width: 1024px) {
    .coin-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .coin-main-content {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        flex-direction: column;
    }

    .coin-sidebar-container{
        grid-column: 1;
    }

    .coin-sidebar {
        grid-column: 1;
        grid-row: 1;
    }

    .coin-sidebar2 {
        grid-column: 1;
        grid-row: 3;
    }

    .coin-title h1 {
        font-size: 2em;
        margin: 0;
        line-height: 1;
        text-align: left;
    }
    .coin-symbol {
        text-align: left;
        margin-top: -3px;
    }
    .exchange-options {
        display: flex;
        flex-direction: column;
        gap: 0px;
    }
}

/* Ajustements spécifiques pour mobile */
@media screen and (max-width: 768px) {
    .coin-grid {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .coin-page {
        padding: 5px;
    }

    .coin-header-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .coin-basic-info {
        align-items: center;
        flex-direction: column-reverse;
        gap: 15px;
        font-size: 1.4em;
    }

    .coin-rank {
        font-size: 1.4em;
        padding: 10px 20px;
    }

    .coin-price-info {
        text-align: center;
    }

    .price-changes {
        justify-content: center;
    }

    .price-ranges {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .similar-coins-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
    
    .similar-coin-card {
        padding: 14px;
    }
    
    .similar-coin-header img {
        width: 32px;
        height: 32px;
    }
}

@media screen and (max-width: 768px) {
    .coin-grid {
        grid-template-columns: 1fr;
    }
}

/* Style pour le lien Home/Accueil responsive */
@media screen and (max-width: 768px) {
    .hide-if-narrow {
        display: none !important;
    }
}

/* Styles pour le lien de suggestion */
.suggest-edit-link {
    display: inline-block;
    margin-top: 10px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8em;
    opacity: 0.7;
}

.suggest-edit-link:hover {
    color: #007bff;
    text-decoration: none;
    opacity: 1;
}

.suggest-edit-link i {
    font-size: 0.9em;
    margin-right: 2px;
}

/* Styles pour le modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

#suggestionText {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}