@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --bg: #323437;
    --bg-alt: #2c2e31;
    --bg-hover: #3c3e41;
    --text: #d1d0c5;
    --muted: #646669;
    --accent: #e2b714;
    --erreur: #ca4754;
    --radius: 8px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: var(--bg);
    padding: 8px 16px;
    font-family: 'Roboto Mono', monospace;
    font-weight: bold;
    z-index: 100;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Roboto Mono', monospace;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 40px 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.erreur {
    color: var(--erreur);
    text-align: center;
    margin-top: 100px;
}
.erreur h1 { font-weight: normal; }

.profil-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--muted);
    overflow: hidden;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s;
}
.user-details h1:hover { color: var(--accent); }
.user-details h1:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}
.user-details h1.copied::after {
    content: ' ✓';
    color: var(--accent);
    font-size: 1.5rem;
}

.user-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 5px 0 0;
}

.stats-section { margin-bottom: 40px; }

.stats-section > h2 {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: normal;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-item { display: flex; flex-direction: column; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.stat-val { font-size: 1.8rem; color: var(--accent); font-weight: bold; }

.pb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.pb-box {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: var(--radius);
}
.pb-box h3 {
    margin: 0 0 10px;
    font-weight: normal;
    font-size: 1rem;
    color: var(--muted);
}
.pb-large {
    font-size: 3rem;
    color: var(--text);
    line-height: 1;
}
.pb-small {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 5px 0 0;
}

footer { margin-top: 60px; }

nav.page-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--text); }
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

@media (max-width: 600px) {
    .profil-header { flex-direction: column; text-align: center; }
    .user-details h1 { font-size: 1.8rem; }
    .pb-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .stats-grid { grid-template-columns: 1fr; }
}
