:root {
    --main-purple: rgb(130, 5, 177);
    --dark-purple: rgb(93, 4, 128);
    --light-purple-bg: rgb(204, 141, 248);
    --light-blue-bg: #eef;
    --danger-color: #721c24;
    --danger-bg: #f8d7da;
    --danger-border: #f5c6cb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;

    background-image: url('/images/fond.png');
    background-size: cover;

    background-position: center;

    background-attachment: fixed;

    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 5vh;
}

#app {
    width: 95%;
    max-width: 100%;
    margin: 10px 0;
    background-color: rgba(255, 255, 255, 0.9);

    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#profile-panel {
    background-color: #f8f9fa;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
}

#profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

#profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#profile-username {
    font-size: 2em;
    color: var(--dark-purple);
    margin: 0;
}

#profile-stats h2,
#profile-history h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

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

.stat-box {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: var(--main-purple);
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

#profile-history {
    margin-top: 30px;
}

.history-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item.win {
    border-left: 5px solid #28a745;
}

.history-item.loss {
    border-left: 5px solid #dc3545;
}

.history-item.other {
    border-left: 5px solid #6c757d;
}

.history-details p {
    margin: 0;
}

.history-details .players {
    font-size: 0.9em;
    color: #555;
}

.history-score {
    font-size: 1.2em;
    font-weight: bold;
}

.history-date {
    font-size: 0.8em;
    color: #888;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.chart-box {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
}

.chart-box h3 {
    text-align: center;
    margin-top: 0;
    font-size: 1.1em;
    color: #333;
}

.history-details .game-type {
    font-size: 0.8em;
    font-style: italic;
    color: #555;
    margin-top: 5px;
}

.profile-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.tab-button {
    padding: 12px 20px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    font-size: 1.1em;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.tab-button:hover {
    background-color: #f8f9fa;
    color: #343a40;
}

.tab-button.active {
    color: var(--main-purple);
    border-bottom-color: var(--main-purple);
    font-weight: bold;
}

.tab-content {
    display: none; /* Tous les panneaux sont cachés par défaut */
}

.tab-content.active {
    display: block; /* Seul le panneau actif est visible */
}
