/* Fiche de personnage HORIZIA */
.player-dashboard {
    --profile-gold: #f0d193;
    --profile-mint: #86e4c2;
    --profile-panel: #0d202a;
}

.player-dashboard .account-heading {
    position: relative;
    padding: 12px 0 22px;
    border-bottom: 1px solid #6ba89d42;
}
.player-dashboard .account-heading h1 {
    font: 750 clamp(29px, 4.9vw, 59px)/1.12 Cinzel, Georgia, serif !important;
    color: #ffe5ad;
    letter-spacing: -.025em;
    text-shadow: 0 5px 20px #000b;
    margin: 10px 0;
}
.player-dashboard .profile-heading-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--profile-gold);
}
.profile-heading-kicker span {
    color: var(--profile-mint);
    text-shadow: 0 0 13px #83ffd0;
}
.player-dashboard .dashboard-shortcuts {
    display: flex;
    gap: 8px;
    margin: 0 0 15px;
}
.player-dashboard .dashboard-shortcuts a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    border-radius: 7px;
    background: linear-gradient(#17353a, #10232b);
    color: #e5f3ee;
}
.dashboard-shortcuts svg {
    width: 16px;
    height: 16px;
    color: var(--profile-mint);
}
.player-dashboard .dashboard-shortcuts a:hover {
    background: #1b4548;
    box-shadow: 0 0 16px #73ffd024;
}
.player-dashboard .account-summary {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    scroll-margin-top: 115px;
}
.player-dashboard #dashboard {
    --profile-rank: var(--player-grade-color, #86e4c2);
    --profile-rank-text: color-mix(in srgb, var(--profile-rank) 72%, #fff5da);
}

.player-dashboard .account-summary .account-stat {
    min-width: 0;
    min-height: 210px;
    isolation: isolate;
    border-radius: 12px;
    padding: clamp(17px, 2vw, 25px);
    border-color: #87b6ae46;
    background: radial-gradient(ellipse at 90% 5%, #215b5c45, transparent 70%), linear-gradient(155deg,#132f36,#0b1a25);
}
.player-dashboard .account-summary .identity-stat {
    display: grid;
    grid-template-columns: minmax(80px, 138px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(12px, 2.3vw, 29px);
    border-color: #a98f61;
    background:
        radial-gradient(ellipse at 10% 40%, #28665385, transparent 66%),
        radial-gradient(ellipse at 90% 15%, color-mix(in srgb,var(--profile-rank) 20%,transparent),transparent 70%),
        linear-gradient(145deg,#122d36,#091722);
    box-shadow: inset 0 0 0 3px #0a18237a, 0 14px 26px #0007;
}
.player-dashboard .identity-stat::before {
    height: 100%;
    opacity: .62;
    background:
        linear-gradient(var(--profile-gold),var(--profile-gold)) left 8px top 8px / 16px 1px,
        linear-gradient(var(--profile-gold),var(--profile-gold)) left 8px top 8px / 1px 16px,
        linear-gradient(var(--profile-gold),var(--profile-gold)) right 8px bottom 8px / 16px 1px,
        linear-gradient(var(--profile-gold),var(--profile-gold)) right 8px bottom 8px / 1px 16px;
    background-repeat: no-repeat;
    pointer-events: none;
}
.profile-portrait-wrap {
    min-width: 0;
    display: grid;
    gap: 9px;
    text-align: center;
}
.profile-portrait {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px solid #acb778;
    border-radius: 9px;
    background: repeating-linear-gradient(0deg,#8ef0c90a 0 1px,transparent 1px 13px),
        repeating-linear-gradient(90deg,#8ef0c90a 0 1px,transparent 1px 13px),#0a2028;
    box-shadow: 0 0 22px #6bffbb26,inset 0 0 0 3px #122d35,inset 0 0 0 4px #7adcac45;
    isolation: isolate;
}
.profile-portrait::before,.profile-portrait::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: var(--profile-gold);
    box-shadow: 0 0 9px #ffdc7cb0;
}
.profile-portrait::before { top: 0; left: 0; }
.profile-portrait::after { bottom: 0; right: 0; }
.profile-portrait-glow {
    position: absolute;
    z-index: -1;
    inset: 4px;
    background: radial-gradient(circle at 50% 45%, #70ecc178, transparent 69%);
}
.profile-portrait img,.profile-portrait canvas,.profile-placeholder {
    grid-area: 1 / 1;
    width: 70%;
    height: auto;
    aspect-ratio: 1;
    image-rendering: pixelated;
    filter: drop-shadow(0 8px 6px #0008);
}
.profile-portrait.has-skin .profile-placeholder { display: none; }
.profile-portrait-caption {
    color: #b4cfc7;
    font-size: 10px;
    letter-spacing: .10em;
    text-transform: uppercase;
}
.profile-character { min-width: 0; z-index: 1; }
.player-dashboard .profile-character-label { color: var(--profile-gold); }
.player-dashboard #profile-alias {
    color: var(--profile-rank-text) !important;
    font: 900 clamp(24px, 3.5vw, 49px)/1.12 Nunito, sans-serif !important;
    margin: 9px 0;
    overflow-wrap: anywhere;
}
.player-dashboard #profile-grade { color: var(--profile-rank-text) !important; overflow-wrap: anywhere; }
.player-dashboard #profile-minecraft { color: #d4e4de; opacity: 1; overflow-wrap: anywhere; margin: 6px 0 13px; }
.player-dashboard .profile-character .profile-link-badge {
    margin: 0;
    gap: 7px;
    align-items: center;
    letter-spacing: .025em;
}
.profile-character .profile-link-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--profile-mint);
    box-shadow: 0 0 10px #8fffc5a8;
}
.profile-stat-icon,.profile-section-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--profile-mint);
    background: #102d36;
    border: 1px solid #70c9b368;
    border-radius: 8px;
}
.profile-stat-icon { margin: 0 0 8px; }
.coin-stat .profile-stat-icon {
    color: var(--profile-gold);
    border-color: #c4a56783;
    background: #3c32263d;
    box-shadow: 0 0 17px #d2b76527;
}
.player-dashboard .coin-stat h2 {
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px #e9b94d35;
}
.player-dashboard .coin-stat small { display: inline-block; }
.player-dashboard .profile-section-title {
    display: flex;
    align-items: center;
    gap: 11px;
}
.profile-section-icon { flex: 0 0 38px; }
.player-dashboard .account-columns .auth-card,.player-dashboard .history-card,.player-dashboard .password-card {
    border-radius: 12px;
    background: radial-gradient(ellipse at 90% 5%,#194b4a4a,transparent 62%),linear-gradient(145deg,#132d35,#0b1a24);
}
.player-dashboard .history-card tr:nth-child(even) td { background: #58b7a008; }
.player-dashboard .history-card tbody tr:hover td { background: #71d6ba16; }
.profile-pixels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.profile-pixels i {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 4px;
    height: 4px;
    transform: rotate(45deg);
    background: var(--profile-gold);
    box-shadow: 0 0 10px #ffd88d;
    opacity: .5;
}
.profile-pixels i:nth-child(1) { --x: 5%; --y: 15%; --delay: -1s; }
.profile-pixels i:nth-child(2) { --x: 31%; --y: 10%; --delay: -3s; }
.profile-pixels i:nth-child(3) { --x: 54%; --y: 78%; --delay: -2s; }
.profile-pixels i:nth-child(4) { --x: 88%; --y: 19%; --delay: -5s; }
.profile-pixels i:nth-child(5) { --x: 93%; --y: 72%; --delay: -.4s; }
.profile-pixels i:nth-child(6) { --x: 41%; --y: 89%; --delay: -4s; }

@media (prefers-reduced-motion: no-preference) {
    .profile-portrait img,.profile-portrait canvas,.profile-placeholder { animation: profile-float 4.2s ease-in-out infinite; }
    .profile-portrait-glow { animation: profile-aura 5s ease-in-out infinite; }
    .profile-pixels i { animation: profile-pixel 4.8s var(--delay) ease-in-out infinite; }
    .coin-stat .profile-stat-icon svg { animation: profile-float 3.6s ease-in-out infinite; }
    .profile-portrait.has-skin img,.profile-portrait.has-skin canvas { animation: profile-skin-in .45s ease-out both, profile-float 4.2s .45s ease-in-out infinite; }
    .player-dashboard #dashboard:not([hidden]) .profile-in-view {
        animation: profile-slide-in .52s ease-out both;
    }
    .player-dashboard .dashboard-shortcuts svg { transition: transform .25s ease; }
    .player-dashboard .dashboard-shortcuts a:is(:hover,:focus-visible) svg { transform: translateY(-2px) rotate(-8deg); }
    .player-dashboard .account-stat .profile-stat-icon { transition: transform .28s ease; }
    .player-dashboard .account-stat:hover .profile-stat-icon { transform: scale(1.09) rotate(-6deg); }
}
@keyframes profile-float { 0%,100% { translate: 0 1px; } 50% { translate: 0 -5px; } }
@keyframes profile-aura { 0%,100% { opacity: .58; } 50% { opacity: 1; } }
@keyframes profile-pixel {
    0%,100% { opacity: .2; translate: 0 4px; }
    45% { opacity: .88; translate: 3px -7px; }
}
@keyframes profile-skin-in { from { opacity: .25; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes profile-slide-in { from { opacity: .5; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 900px) {
    .player-dashboard .account-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .player-dashboard .account-summary .identity-stat { grid-column: 1/-1; }
    .player-dashboard .account-summary .account-stat { min-height: 0; }
}
@media (max-width: 520px) {
    .player-dashboard .account-heading { align-items: flex-start; flex-direction: column; }
    .player-dashboard .dashboard-shortcuts a { font-size: 11px; padding: 7px 9px; gap: 5px; }
    .player-dashboard .account-summary { gap: 10px; }
    .player-dashboard .account-summary .identity-stat { grid-template-columns: 82px minmax(0,1fr); }
    .player-dashboard .account-summary .account-stat { padding: 15px; }
    .player-dashboard .account-stat .hz-mini-action { font-size: 11px; padding: 7px 8px; }
    .profile-portrait-caption { font-size: 8px; }
}

.player-dashboard .profile-game-stats {
    margin: 0 0 20px;
    border-color: #74c7ae66;
    background: radial-gradient(ellipse at 2% 10%, #236c5a50, transparent 65%),
        linear-gradient(145deg, #132d35, #0b1a24);
}
.player-dashboard .profile-game-kicker { color: var(--profile-mint); }
.player-dashboard .profile-game-stats h2 { margin-top: 8px; }
.profile-game-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 10px;
}
.profile-game-metrics > div {
    position: relative;
    padding: 13px 16px;
    border: 1px solid #7bc7af40;
    border-radius: 9px;
    background: linear-gradient(130deg, #173a3e91, #0a1c27c9);
}
.profile-game-metrics dt { color: #c7ded8; font-size: 13px; font-weight: 750; }
.profile-game-metrics dd {
    margin: 3px 0;
    color: var(--profile-mint);
    font: 900 clamp(21px, 3.6vw, 32px)/1.2 Nunito, sans-serif;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.profile-game-metrics > div:nth-child(2) dd { color: var(--profile-gold); }
.profile-game-metrics small, #profile-game-status { color: #afc9c5; }
.player-dashboard #profile-game-status { margin: 7px 0 0; }
@media (max-width: 420px) {
    .profile-game-metrics { grid-template-columns: 1fr; }
}
