/* ===================== */
/* HISTORIQUE XP */
/* ===================== */

.xp-history-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.xp-header h1 {
    color: var(--color-warning-bright);
    margin: 0;
}

/* Carte résumé XP */
.xp-summary-card {
    background: linear-gradient(135deg, var(--color-surface), var(--color-bg));
    padding: 25px;
    border-radius: var(--radius-2xl);
    border: 2px solid var(--warning-bright-a30);
}

.xp-summary-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.current-level {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-summary-card .level-badge {
    background: var(--color-warning-bright);
    color: var(--color-black);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.xp-summary-card .xp-total {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-warning-bright);
    text-align: center;
}

.xp-summary-card .xp-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-summary-card .xp-bar-container {
    background: var(--color-border);
    height: 15px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.xp-summary-card .xp-bar {
    background: linear-gradient(90deg, var(--color-warning-bright), var(--color-warning-dark));
    height: 100%;
    transition: width 0.3s ease;
    border-radius: var(--radius-lg);
}

.xp-summary-card .xp-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.xp-summary-card .level-up-notification {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4px 8px;
    border-radius: var(--radius-2xl);
    font-size: 12px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

/* Liste des logs XP */
.xp-logs-section h2 {
    color: var(--color-warning-bright);
    margin-bottom: 20px;
}

.xp-logs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xp-log-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--color-warning-bright);
    padding: 20px;
    transition: all 0.2s ease;
}

.xp-log-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--warning-bright-a20);
}

.xp-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.xp-amount {
    font-size: 18px;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 15px;
}

.xp-positive {
    background: var(--primary-a20);
    color: var(--color-primary);
}

.xp-negative {
    background: var(--danger-a20);
    color: var(--color-danger);
}

.xp-date {
    font-size: 14px;
    color: var(--color-text-muted);
}

.xp-log-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-source {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 14px;
}

.source-icon {
    font-size: 16px;
}

.xp-description {
    color: var(--color-text-secondary);
    font-style: italic;
    font-size: 14px;
}

.level-change {
    background: var(--primary-a10);
    color: var(--color-primary);
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    font-weight: bold;
    font-size: 14px;
}

.xp-metadata {
    font-size: 12px;
    color: var(--color-text-soft);
}

.xp-metadata a {
    color: var(--color-primary);
}

/* État vide */
.no-xp-logs {
    background: var(--overlay-white-05);
    border-radius: var(--radius-2xl);
    padding: 40px;
}

.empty-state {
    text-align: center;
}

.empty-state h3 {
    color: var(--color-warning-bright);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

/* Statistiques XP */
.xp-stats-section h2 {
    color: var(--color-warning-bright);
    margin-bottom: 20px;
}

.xp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.xp-stats-grid .stat-card {
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius-2xl);
    border: 2px solid var(--warning-bright-a20);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all var(--transition-default);
}

.xp-stats-grid .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--warning-bright-a30);
}

.xp-stats-grid .stat-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--warning-bright-a20);
    font-size: 22px;
}

.xp-stats-grid .stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xp-stats-grid .stat-value {
    font-size: 22px;
    font-weight: bold;
    color: var(--color-warning-bright);
    line-height: 1;
}

.xp-stats-grid .stat-label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .xp-summary-info {
        flex-direction: column;
        align-items: stretch;
    }

    .xp-summary-card .xp-progress-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .xp-log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
