* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

html, body {
    height: 100%;
    font-family: "Courier New", "Lucida Console", Consolas, monospace;
    font-weight: bold;
    background-color: #1a1033;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 2px, transparent 2px),
        radial-gradient(ellipse at top, #3a1f6b 0%, #1a1033 60%, #0a051a 100%);
    background-size: 32px 32px, 32px 32px, 100% 100%;
    color: #f0e7c7;
    overflow-x: hidden;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 60px;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, #fff, transparent),
        radial-gradient(2px 2px at 25% 70%, #ffd966, transparent),
        radial-gradient(2px 2px at 50% 15%, #fff, transparent),
        radial-gradient(2px 2px at 70% 50%, #ffd966, transparent),
        radial-gradient(2px 2px at 85% 25%, #fff, transparent),
        radial-gradient(2px 2px at 90% 80%, #fff, transparent),
        radial-gradient(2px 2px at 40% 90%, #ffd966, transparent),
        radial-gradient(2px 2px at 15% 50%, #fff, transparent);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 0;
    animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* === Barre de navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: #0a051a;
    border-bottom: 4px solid #ffd966;
    box-shadow: 0 4px 0 0 #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    z-index: 10;
}

.nav-left {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-right {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-tab {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 16px;
    color: #f0e7c7;
    background-color: #2a1a55;
    border: none;
    padding: 10px 22px;
    cursor: pointer;
    letter-spacing: 3px;
    text-shadow: 1px 1px 0 #000;
    text-decoration: none;
    display: inline-block;
    box-shadow:
        inset -3px -3px 0 0 #1a0a3a,
        inset 3px 3px 0 0 #4a3a85,
        0 0 0 3px #000;
    transition: transform 0.05s ease, box-shadow 0.05s ease, background-color 0.1s ease;
}

.nav-tab:hover {
    background-color: #3a2a75;
}

.nav-tab.active {
    background-color: #ffd966;
    color: #1a1033;
    text-shadow: 1px 1px 0 rgba(192, 57, 43, 0.6);
    box-shadow:
        inset -3px -3px 0 0 #b89640,
        inset 3px 3px 0 0 #fff3a8,
        0 0 0 3px #000;
}

.nav-tab.login {
    background-color: #c0392b;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    padding: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset -3px -3px 0 0 #7a1f14,
        inset 3px 3px 0 0 #e06556,
        0 0 0 3px #000;
}

.nav-tab.login:hover {
    background-color: #d44a3a;
}

.nav-tab.login svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}

.nav-tab.login.connected {
    background-color: #c0392b;
}

.nav-tab.login.connected::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background-color: #6abe6e;
    box-shadow: 0 0 0 2px #000;
}

.nav-tab.login {
    position: relative;
}

.nav-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-tab.settings {
    background-color: #2a1a55;
    color: #ffd966;
    padding: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset -3px -3px 0 0 #1a0a3a,
        inset 3px 3px 0 0 #4a3a85,
        0 0 0 3px #000;
}

.nav-tab.settings:hover {
    background-color: #3a2a75;
}

.nav-tab.settings svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}

.nav-tab.settings[hidden] {
    display: none;
}

/* === Modale paramètres === */
.settings-section {
    margin-bottom: 24px;
}

.settings-section:last-of-type {
    margin-bottom: 12px;
}

.settings-section h3 {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 14px;
    color: #ffd966;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px dashed #ffd966;
}

.modal h2.modal-title {
    font-family: "Courier New", Consolas, monospace;
    font-size: 22px;
    color: #ffd966;
    letter-spacing: 4px;
    text-align: center;
    text-shadow:
        2px 2px 0 #c0392b,
        4px 4px 0 #000;
    margin-bottom: 28px;
}

/* === Header === */
header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

h1 {
    font-family: "Courier New", Consolas, monospace;
    font-size: clamp(40px, 9vw, 110px);
    line-height: 1.1;
    color: #ffd966;
    text-shadow:
        4px 0 0 #c0392b,
        8px 0 0 #8b1e0f,
        4px 4px 0 #c0392b,
        8px 8px 0 #8b1e0f,
        0 4px 0 #c0392b,
        0 8px 0 #8b1e0f,
        12px 12px 0 #000;
    letter-spacing: 6px;
    font-weight: 900;
}

.subtitle {
    margin-top: 36px;
    font-size: 16px;
    color: #a0d8ef;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 3px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.tab-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.tab-panel.active {
    display: flex;
}

/* Pré-positionnement (avant que le JS swap les classes "active") pour éviter
 * que la page jeux s'affiche furtivement lorsqu'on arrive sur #classements. */
html.preload-jeux #panel-classements,
html.preload-classements #panel-jeux {
    display: none;
}

html.preload-classements #panel-classements {
    display: flex;
}

html.preload-classements > body > header {
    display: none;
}

.pixel-btn {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 28px;
    color: #fff;
    background-color: #3a7d44;
    border: none;
    padding: 24px 56px;
    cursor: pointer;
    position: relative;
    letter-spacing: 6px;
    text-shadow: 3px 3px 0 #000;
    box-shadow:
        inset -6px -6px 0 0 #1e5128,
        inset 6px 6px 0 0 #6abe6e,
        0 0 0 6px #000,
        10px 10px 0 0 #000;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.pixel-btn:hover {
    background-color: #4a9d54;
}

.pixel-btn:active {
    transform: translate(6px, 6px);
    box-shadow:
        inset -6px -6px 0 0 #1e5128,
        inset 6px 6px 0 0 #6abe6e,
        0 0 0 6px #000,
        4px 4px 0 0 #000;
}

.pixel-frame {
    border: 4px solid #f0e7c7;
    padding: 40px;
    background-color: rgba(10, 5, 26, 0.6);
    box-shadow:
        0 0 0 4px #000,
        inset 0 0 0 4px #000;
    position: relative;
}

.pixel-frame::before,
.pixel-frame::after,
.pixel-frame .corner {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ffd966;
    box-shadow: 0 0 0 2px #000;
}

.pixel-frame::before { top: -8px; left: -8px; }
.pixel-frame::after { top: -8px; right: -8px; }
.pixel-frame .corner.bl { bottom: -8px; left: -8px; }
.pixel-frame .corner.br { bottom: -8px; right: -8px; }

/* === Cadre des jeux === */
.games-frame {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: stretch;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
}

.games-frame .pixel-btn {
    flex: 0 1 auto;
}

/* === Classements === */
.leaderboards {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
}

/* Carte fusionnée par jeu */
.game-board {
    padding: 32px;
    width: 100%;
}

.game-board-title {
    font-family: "Courier New", Consolas, monospace;
    font-size: clamp(26px, 4vw, 40px);
    color: #ffd966;
    text-align: center;
    letter-spacing: 4px;
    text-shadow:
        2px 2px 0 #c0392b,
        4px 4px 0 #000;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px dashed #ffd966;
    font-weight: 900;
}

.sub-boards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.sub-board h3 {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 13px;
    color: #ffd966;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px dotted rgba(255, 217, 102, 0.5);
}

.sub-board ol {
    list-style: none;
    counter-reset: rank;
}

.sub-board li {
    counter-increment: rank;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #f0e7c7;
    text-shadow: 1px 1px 0 #000;
    border-bottom: 2px dotted rgba(240, 231, 199, 0.15);
}

.sub-board li:last-child { border-bottom: none; }

.sub-board li::before {
    content: counter(rank, decimal-leading-zero);
    color: #a0d8ef;
    margin-right: 8px;
    min-width: 24px;
}

.sub-board li:nth-child(1)::before { color: #ffd966; }
.sub-board li:nth-child(2)::before { color: #c0c0c0; }
.sub-board li:nth-child(3)::before { color: #cd7f32; }

.sub-board .player {
    flex: 1;
    color: #f0e7c7;
    text-decoration: none;
}

.sub-board a.player:hover {
    color: #ffd966;
    text-shadow: 2px 2px 0 #c0392b;
}

.sub-board .score {
    color: #6abe6e;
}

.leaderboard {
    padding: 24px;
}

.leaderboard h2 {
    font-family: "Courier New", Consolas, monospace;
    font-size: 20px;
    color: #ffd966;
    text-align: center;
    letter-spacing: 3px;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px dashed #ffd966;
}

.leaderboard ol {
    list-style: none;
    counter-reset: rank;
}

.leaderboard li {
    counter-increment: rank;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 14px;
    letter-spacing: 2px;
    color: #f0e7c7;
    text-shadow: 2px 2px 0 #000;
    border-bottom: 2px dotted rgba(240, 231, 199, 0.2);
}

.leaderboard li:last-child {
    border-bottom: none;
}

.leaderboard li::before {
    content: counter(rank, decimal-leading-zero);
    color: #a0d8ef;
    margin-right: 12px;
    min-width: 32px;
}

.leaderboard li:nth-child(1)::before { color: #ffd966; }
.leaderboard li:nth-child(2)::before { color: #c0c0c0; }
.leaderboard li:nth-child(3)::before { color: #cd7f32; }

.leaderboard .player {
    flex: 1;
    color: #f0e7c7;
    text-decoration: none;
}

a.player:hover {
    color: #ffd966;
    text-shadow: 2px 2px 0 #c0392b;
}

.leaderboard .score {
    color: #6abe6e;
}

.empty-leaderboard {
    text-align: center;
    color: #888;
    font-size: 12px;
    letter-spacing: 2px;
    padding: 16px 8px;
    font-style: normal;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #e8e8e8;
}

.stats-table th,
.stats-table td {
    padding: 8px 10px;
    border-bottom: 2px solid #2a2a2a;
    text-align: left;
}

.stats-table thead th {
    color: #ffd966;
    border-bottom: 2px solid #c0392b;
    font-size: 10px;
}

.stats-table tbody tr:hover {
    background: #1d1d1d;
}

/* Masquer le titre principal sur l'onglet Classements */
body.tab-classements > header {
    display: none;
}

/* === Page placeholder (Profils) === */
.page-placeholder {
    text-align: center;
    color: #a0d8ef;
    font-size: 18px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 #000;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.page-placeholder h1 {
    font-size: clamp(32px, 6vw, 72px);
    margin-bottom: 24px;
}

/* === Carte profil === */
.profile-card {
    padding: 40px 48px;
    margin-top: 40px;
    min-width: 360px;
    max-width: 90vw;
    position: relative;
    z-index: 1;
}

.profile-name {
    font-size: clamp(28px, 5vw, 56px);
    color: #ffd966;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #ffd966;
    text-shadow:
        2px 2px 0 #c0392b,
        4px 4px 0 #000;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-stats > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 8px;
    border-bottom: 2px dotted rgba(240, 231, 199, 0.25);
    font-size: 14px;
    letter-spacing: 2px;
}

.profile-stats > div:last-child {
    border-bottom: none;
}

.profile-stats dt {
    color: #a0d8ef;
    text-shadow: 1px 1px 0 #000;
}

.profile-stats dd {
    color: #6abe6e;
    text-shadow: 1px 1px 0 #000;
    font-size: 16px;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    border: 4px solid #ffd966;
    box-shadow: 0 0 0 4px #000;
    background-color: #0a051a;
    overflow: hidden;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
}

.profile-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-empty span {
    font-size: 80px;
    color: #4a3a85;
    text-shadow: 4px 4px 0 #000;
}

.profile-avatar.small {
    width: 96px;
    height: 96px;
    margin: 0;
    flex-shrink: 0;
}

.profile-avatar.small.profile-avatar-empty span {
    font-size: 48px;
}

/* === Carte profil mini (liste profils) === */
.profile-card-mini {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    margin-top: 40px;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
    transition: transform 0.08s ease;
    cursor: pointer;
}

.profile-card-mini:hover {
    transform: translate(-2px, -2px);
}

.profile-card-mini:active {
    transform: translate(2px, 2px);
}

.profile-name-inline {
    font-family: "Courier New", Consolas, monospace;
    font-size: clamp(24px, 4vw, 40px);
    color: #ffd966;
    letter-spacing: 4px;
    text-shadow:
        2px 2px 0 #c0392b,
        4px 4px 0 #000;
    font-weight: 900;
    margin: 0;
    flex: 1 1 auto;
}

/* === Liste des profils (page profils) === */
.profiles-header {
    text-align: center;
    margin: 24px auto 0;
    max-width: 800px;
}

.profiles-header h1 {
    margin-bottom: 8px;
}

.profiles-count {
    color: #a0d8ef;
    text-shadow: 1px 1px 0 #000;
    font-size: 14px;
    letter-spacing: 2px;
}

.profiles-cta {
    max-width: 800px;
    margin: 16px auto 0;
    text-align: center;
}

.profiles-cta p {
    color: #a0d8ef;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 16px;
}

.profiles-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-card-mini.is-self {
    border-color: #6abe6e;
}

.profile-self-tag {
    font-family: "Courier New", Consolas, monospace;
    font-size: 12px;
    letter-spacing: 2px;
    color: #0a051a;
    background-color: #6abe6e;
    padding: 4px 8px;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    font-weight: 900;
    flex-shrink: 0;
}

/* === Page détail profil === */
.profile-detail-page {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-detail-page .profile-card {
    margin-top: 0;
    flex: 1 1 auto;
}

.back-link {
    display: inline-block;
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 13px;
    color: #a0d8ef;
    background-color: #2a1a55;
    padding: 8px 16px;
    margin: 0;
    letter-spacing: 2px;
    text-decoration: none;
    text-shadow: 1px 1px 0 #000;
    flex-shrink: 0;
    box-shadow:
        inset -3px -3px 0 0 #1a0a3a,
        inset 3px 3px 0 0 #4a3a85,
        0 0 0 3px #000;
}

.back-link:hover {
    background-color: #3a2a75;
    color: #ffd966;
}

/* === Page paramètres === */
.settings-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.settings-page-title {
    font-family: "Courier New", Consolas, monospace;
    font-size: clamp(36px, 6vw, 64px);
    color: #ffd966;
    text-align: center;
    letter-spacing: 6px;
    text-shadow:
        3px 0 0 #c0392b,
        6px 0 0 #8b1e0f,
        3px 3px 0 #c0392b,
        6px 6px 0 #8b1e0f,
        0 3px 0 #c0392b,
        0 6px 0 #8b1e0f,
        9px 9px 0 #000;
    margin-bottom: 8px;
}

.settings-card {
    padding: 28px;
}

.settings-card h3 {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 14px;
    color: #ffd966;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #ffd966;
}

.avatar-row {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border: 4px solid #ffd966;
    box-shadow: 0 0 0 4px #000;
    background-color: #0a051a;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-empty {
    font-size: 56px;
    color: #4a3a85;
    text-shadow: 3px 3px 0 #000;
}

.avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 180px;
}

.file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
}

.pixel-btn-sm.danger {
    background-color: #c0392b;
    box-shadow:
        inset -3px -3px 0 0 #7a1f14,
        inset 3px 3px 0 0 #e06556,
        0 0 0 3px #000;
}

.pixel-btn-sm.danger:hover {
    background-color: #d44a3a;
}

.pixel-btn-sm.danger:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    box-shadow:
        inset -3px -3px 0 0 #2a2a2a,
        inset 3px 3px 0 0 #777,
        0 0 0 3px #000;
}

/* === Modale d'authentification === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background-color: #1a1033;
    border: 4px solid #ffd966;
    box-shadow:
        0 0 0 4px #000,
        12px 12px 0 0 rgba(0, 0, 0, 0.6);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
}

.modal::before,
.modal::after,
.modal .corner {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ffd966;
    box-shadow: 0 0 0 2px #000;
}

.modal::before { top: -8px; left: -8px; }
.modal::after { top: -8px; right: -8px; }
.modal .corner.bl { bottom: -8px; left: -8px; }
.modal .corner.br { bottom: -8px; right: -8px; }

.modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 32px;
    height: 32px;
    background-color: #c0392b;
    color: #fff;
    border: none;
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
    box-shadow:
        inset -3px -3px 0 0 #7a1f14,
        inset 3px 3px 0 0 #e06556,
        0 0 0 3px #000;
    z-index: 2;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.modal-tab {
    flex: 1;
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 13px;
    color: #f0e7c7;
    background-color: #2a1a55;
    border: none;
    padding: 12px 8px;
    cursor: pointer;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
    box-shadow:
        inset -3px -3px 0 0 #1a0a3a,
        inset 3px 3px 0 0 #4a3a85,
        0 0 0 3px #000;
}

.modal-tab.active {
    background-color: #ffd966;
    color: #1a1033;
    text-shadow: 1px 1px 0 rgba(192, 57, 43, 0.6);
    box-shadow:
        inset -3px -3px 0 0 #b89640,
        inset 3px 3px 0 0 #fff3a8,
        0 0 0 3px #000;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #ffd966;
    text-shadow: 1px 1px 0 #000;
}

.auth-form input {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 16px;
    color: #f0e7c7;
    background-color: #0a051a;
    border: none;
    padding: 12px;
    letter-spacing: 2px;
    box-shadow:
        inset 3px 3px 0 0 #000,
        inset -3px -3px 0 0 #2a1a55,
        0 0 0 3px #000;
    outline: none;
}

.auth-form input:focus {
    box-shadow:
        inset 3px 3px 0 0 #000,
        inset -3px -3px 0 0 #4a3a85,
        0 0 0 3px #ffd966;
}

.password-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.password-row input {
    flex: 1;
}

.pwd-toggle {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 11px;
    color: #ffd966;
    background-color: #2a1a55;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
    box-shadow:
        inset -3px -3px 0 0 #1a0a3a,
        inset 3px 3px 0 0 #4a3a85,
        0 0 0 3px #000;
}

.pwd-toggle:hover {
    background-color: #3a2a75;
}

.auth-error {
    color: #ff6b6b;
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
    min-height: 16px;
    text-align: center;
}

.auth-error.success {
    color: #6abe6e;
}

.pixel-btn-sm {
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 16px;
    color: #fff;
    background-color: #3a7d44;
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    letter-spacing: 3px;
    text-shadow: 1px 1px 0 #000;
    box-shadow:
        inset -3px -3px 0 0 #1e5128,
        inset 3px 3px 0 0 #6abe6e,
        0 0 0 3px #000;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.pixel-btn-sm:hover {
    background-color: #4a9d54;
}

.pixel-btn-sm:active {
    transform: translate(2px, 2px);
}

/* === Menu utilisateur connecté === */
.user-menu {
    position: fixed;
    top: 76px;
    right: 24px;
    background-color: #1a1033;
    border: 3px solid #ffd966;
    box-shadow: 0 0 0 3px #000;
    padding: 8px;
    display: none;
    min-width: 180px;
    z-index: 11;
}

.user-menu.open {
    display: block;
}

.user-menu-header {
    padding: 8px 12px;
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 12px;
    color: #ffd966;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 2px;
    border-bottom: 2px dashed #ffd966;
    margin-bottom: 4px;
}

.user-menu-item {
    width: 100%;
    text-align: left;
    font-family: "Courier New", Consolas, monospace;
    font-weight: 900;
    font-size: 13px;
    color: #f0e7c7;
    background: transparent;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
}

.user-menu-item:hover {
    background-color: #2a1a55;
    color: #ffd966;
}

footer {
    margin-top: auto;
    padding-top: 60px;
    font-size: 12px;
    color: #888;
    text-shadow: 2px 2px 0 #000;
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}
