/* =========================================================
   Page « Mon compte »
   ========================================================= */

.auth-loading { padding: 80px 0; text-align: center; color: var(--muted); }

.perks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0 0 24px;
    padding: 0 !important;
    list-style: none;
}

.perks li {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
}

.perks strong { display: block; }
.perks span { font-size: 14px; color: var(--muted); }

.auth-card {
    margin: 0 0 18px;
    padding: 24px;
    border-radius: 22px;
    background: radial-gradient(circle at 0% 0%, rgba(255, 43, 43, 0.12), transparent 60%), var(--panel);
    border: 1px solid rgba(255, 43, 43, 0.3);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    color: #1f1f1f;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.google-btn:hover { background: #f1f1f1; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }

.auth-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 6px;
    font-size: 13px;
    color: var(--muted);
}

.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--panel-border); }

.auth-card .site-form label { margin-top: 0; }

/* Profil */
.profile {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.profile-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 50%;
    font-family: var(--display);
    font-size: 36px;
    color: #fff;
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 0 24px var(--red-glow);
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-text { flex: 1; min-width: 0; }
.profile-text h1 { margin: 0 !important; font-size: clamp(34px, 6vw, 52px) !important; overflow-wrap: anywhere; }
.profile-text p { margin: 2px 0 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

.me-form {
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
}

.me-form label { margin-top: 0 !important; }
.me-form label span { font-weight: 400; color: var(--muted); }

/* Sections de statistiques */
.account-section { margin-top: 34px; }
.account-section h2 { margin: 0 0 14px !important; }
.account-page .stats { margin-bottom: 10px; }

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

.bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.bar-label { font-weight: 700; color: #fff; }
.bar-value { text-align: right; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.bar-track { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6d6d, var(--red)); box-shadow: 0 0 12px var(--red-glow); }

.month-chart {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    gap: 10px;
    height: 180px;
    padding: 16px 16px 10px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
}

.month-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.month-bar { display: block; width: 70%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #ff6d6d, var(--red)); }
.month-value { font-size: 13px; font-weight: 700; color: #fff; }
.month-label { font-size: 12px; color: var(--muted); text-transform: capitalize; }

.leaderboard .rank { width: 40px; color: var(--muted) !important; }
.leaderboard tr:nth-child(2) .rank { color: var(--gold) !important; }
.leaderboard .player-cell { display: flex; align-items: center; gap: 10px; }
.leaderboard .avatar { width: 28px; height: 28px; font-size: 13px; }
.leaderboard tr.is-me td { background: rgba(255, 43, 43, 0.08); }

.game-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0 !important;
    list-style: none;
}

.game-history li {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
}

.gh-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }

.gh-mode {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 43, 43, 0.25);
}

.gh-mode.mode-devil { background: rgba(176, 124, 255, 0.28); }
.gh-mode.mode-chaos { background: rgba(232, 164, 90, 0.28); }
.gh-date { font-size: 13px; color: var(--muted); }
.gh-winner { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.gh-winner .avatar { width: 28px; height: 28px; font-size: 13px; }
.gh-winner span { color: var(--muted); }
.gh-meta { margin: 8px 0 0 !important; font-size: 13px; color: var(--muted); }

.empty-state {
    margin-top: 30px;
    padding: 30px 24px;
    text-align: center;
    border-radius: 20px;
    background: var(--panel);
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

.empty-state h2 { margin-top: 0 !important; }

.danger-zone {
    margin-top: 56px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 43, 43, 0.3);
    background: rgba(255, 43, 43, 0.04);
}

.danger-zone h2 { margin: 0 0 6px !important; font-size: 24px !important; }
.danger-zone p { font-size: 14px; color: var(--muted); }

@media (max-width: 700px) {
    .perks { grid-template-columns: 1fr; }
    .auth-card { padding: 18px; }
    .profile { flex-wrap: wrap; }
    .profile-avatar { width: 56px; height: 56px; font-size: 28px; }
    .profile .ghost { width: 100%; }
    .bar-row { grid-template-columns: 70px 1fr 32px; }
    .month-chart { height: 150px; gap: 6px; padding: 12px 8px 8px; }
}
