.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    /* Pokédex red gradient */
    background: linear-gradient(180deg, rgba(180, 10, 10, 0.92) 0%, rgba(155, 5, 5, 0.88) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 3px solid rgba(0, 0, 0, 0.35);
    z-index: 200;
    transition: background 0.3s;
    /* Pokéball bottom separator line */
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
}

/* White stripe + Pokéball divider at bottom of header */
.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.0) 0%,
            rgba(255, 255, 255, 0.35) 40%,
            rgba(255, 255, 255, 0.55) 50%,
            rgba(255, 255, 255, 0.35) 60%,
            rgba(255, 255, 255, 0.0) 100%);
    pointer-events: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.22);
    transition: background var(--t), border-color var(--t);
    flex-shrink: 0;
}

.header-left:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.header-pseudo {
    font-size: 1rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

.header-pseudo-empty {
    font-size: 0.95rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    width: fit-content;
}

.header-btn {
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    padding: 4px 56px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: none;
    min-width: unset;
    width: auto;
    flex: none;
    text-transform: none;
    letter-spacing: 0;
    transition: background var(--t), border-color var(--t), transform var(--t);
    white-space: nowrap;
    font-family: var(--font-body, Arial);
}

.header-btn:hover {
    background: rgba(0, 0, 0, 0.42);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.06);
    box-shadow: none;
}

/* ── Language selector ── */
.header-lang-btn {
    font-size: 1rem;
    line-height: 1;
    padding: 2px 6px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: rgba(30, 30, 30, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
    z-index: 1100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: none;
}

.lang-dropdown.open {
    display: block;
}

.lang-dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.lang-dropdown button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lang-dropdown button.active {
    background: rgba(220, 40, 40, 0.3);
}

.header-kofi-btn {
    background: rgba(255, 94, 91, 0.25);
    border-color: rgba(255, 94, 91, 0.55);
    text-decoration: none;
}

.header-kofi-btn:hover {
    background: rgba(255, 94, 91, 0.45);
    border-color: rgba(255, 94, 91, 0.85);
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    z-index: 200;
}

[data-theme="dark"] .site-header {
    background: linear-gradient(180deg, rgba(100, 5, 5, 0.95) 0%, rgba(60, 5, 5, 0.92) 100%);
}

[data-theme="dark"] .header-left {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .header-btn {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── padding-top centralisé ici (header height + marge) ── */
body {
    padding-top: 86px;
}

@media (max-width: 850px) {
    body {
        padding-top: 68px;
    }

    .site-header {
        padding: 6px 12px;
        height: 58px;
    }

    .header-btn .btn-label {
        display: none;
    }

    .header-btn {
        border-radius: 50%;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        font-size: 1.2rem;
        gap: 0;
    }

    .btn-emoji {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 62px;
    }

    .site-header {
        padding: 5px 8px;
        height: 54px;
    }

    .header-left {
        padding: 6px 10px;
        gap: 6px;
    }

    .header-pseudo {
        font-size: 0.8rem;
    }

    .header-pseudo-empty {
        font-size: 0.78rem;
    }

    .header-btn {
        width: 40px;
        height: 40px;
    }

    .btn-emoji {
        font-size: 1.1rem;
    }

    .header-right {
        gap: 6px;
    }
}