/* Header + footer partagés par tous les jeux du hub — chargé APRÈS le style.css propre à
   chaque jeu pour prendre le dessus et garantir un rendu identique partout. */

.hidden {
    display: none !important;
}

/* Lien "Revenir à Japonneige" sous la carte d'accueil de chaque jeu. */
.back-to-hub-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem auto 0;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(184, 193, 219, 0.15);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.back-to-hub-link:hover {
    color: var(--text-white);
    border-color: rgba(114, 164, 242, 0.35);
    background: rgba(114, 164, 242, 0.08);
}

.back-to-hub-link .btn-icon,
.back-to-hub-link .back-to-hub-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.6rem 1.2rem;
    background: var(--gradient-blue);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
}

.nav-user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-user-name {
    font-size: 0.9rem;
    color: #e8eaf6;
}

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-user-link:hover {
    opacity: 0.8;
}

.nav-donor-badge {
    font-size: 0.85rem;
    cursor: default;
}

.nav-staff-badge {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    cursor: default;
    margin-left: 0.35rem;
}

.nav-donor-badge {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff5f5;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    cursor: default;
    margin-left: 0.35rem;
}

.nav-owner-badge {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #14182f;
    background: linear-gradient(135deg, #f7c560, #f2a93b);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    cursor: default;
    margin-left: 0.35rem;
    box-shadow: 0 0 5px rgba(247, 197, 96, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
    .nav-owner-badge {
        animation: ownerBadgeGlow 2.4s ease-in-out infinite;
    }
}

@keyframes ownerBadgeGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(247, 197, 96, 0.45); }
    50%      { box-shadow: 0 0 10px rgba(247, 197, 96, 0.9), 0 0 3px rgba(255, 255, 255, 0.5); }
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.navbar {
    background: transparent;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom-color: rgba(184, 193, 219, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo-beta {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(114, 164, 242, 0.95);
    background: rgba(114, 164, 242, 0.12);
    border: 1px solid rgba(114, 164, 242, 0.3);
    border-radius: 8px;
    padding: 0.15rem 0.4rem;
}

.nav-logo img {
    width: 40px;
    height: 40px;
}

.nav-app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-align: center;
    text-decoration: none;
    user-select: none;
}

.nav-app-title:hover {
    text-decoration: none;
}

.lang-switcher {
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.lang-toggle {
    background: rgba(74, 111, 165, 0.15);
    border: 1px solid rgba(74, 111, 165, 0.3);
    color: var(--text-white);
    cursor: pointer;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease, border-color 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-toggle:hover {
    background: rgba(74, 111, 165, 0.25);
    border-color: rgba(74, 111, 165, 0.5);
}

.globe-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.lang-toggle-text {
    min-width: 60px;
    text-align: left;
}

.lang-chevron {
    width: 10px;
    height: 10px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 25, 50, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 193, 219, 0.15);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 130px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    background: rgba(74, 111, 165, 0.2);
    color: var(--text-white);
}

.lang-btn.active {
    background: rgba(74, 111, 165, 0.3);
    color: var(--text-white);
}

.flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

footer {
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
    z-index: 2;
    margin-top: auto;
    opacity: 0.65;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-sep {
    opacity: 0.4;
}

footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-white);
}

/* Badge Website Carbon */
#wcb.carbonbadge {
    font-size: 11.5px;
    text-align: center;
    line-height: 1.15;
    margin: 0.75rem auto 0;
    width: fit-content;
}

#wcb.carbonbadge sub {
    vertical-align: middle;
    position: relative;
    top: 0.3em;
    font-size: 0.7em;
}

#wcb #wcb_p {
    display: flex;
    justify-content: center;
}

#wcb #wcb_2, #wcb #wcb_a, #wcb #wcb_g {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1em;
    line-height: 1.15;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin: 0.2em 0;
}

#wcb #wcb_a, #wcb #wcb_g {
    padding: 0.5em 0.8em;
    border: 1px solid rgba(184, 193, 219, 0.2);
    transition: color 0.25s ease, border-color 0.25s ease;
}

#wcb #wcb_g {
    border-radius: 999px 0 0 999px;
    background: transparent;
    border-right: 0;
    color: var(--text-gray);
    min-width: 8.2em;
}

#wcb #wcb_a {
    border-radius: 0 999px 999px 0;
    border-left: 0;
    background: transparent;
    color: var(--text-gray);
    font-weight: 600;
}

#wcb:hover #wcb_a,
#wcb:hover #wcb_g {
    color: rgba(114, 164, 242, 0.95);
    border-color: rgba(114, 164, 242, 0.5);
}

#wcb #wcb_2 {
    display: block;
    color: var(--text-gray);
    font-size: 0.85em;
    margin-top: 0.6em;
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

#wcb:hover #wcb_2 {
    opacity: 1;
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-logo img {
        width: 35px;
        height: 35px;
    }

    .nav-app-title {
        font-size: 1.1rem;
    }

    footer {
        font-size: 0.75rem;
        padding: 1.5rem 1rem;
    }
}
