/**
 * Alkimia : L'Atelier des Runes — Socle Interface Jeu Vidéo Clair & Pop
 * Plein écran 100dvh, zéro header/footer web, boutons stickers tactiles pressables.
 */

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

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
    background-color: var(--bg-sky);
    color: var(--ink-text);
    font-family: var(--font-ui);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-image:
        radial-gradient(circle at 18% 18%, rgba(77, 179, 255, 0.22) 0%, transparent 42%),
        radial-gradient(circle at 84% 82%, rgba(93, 224, 137, 0.18) 0%, transparent 44%),
        radial-gradient(rgba(28, 36, 51, 0.06) 1.5px, transparent 1.5px),
        linear-gradient(180deg, #f6faff 0%, #e1ecf8 100%);
    background-size: 100% 100%, 100% 100%, 24px 24px, 100% 100%;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--pop-blue);
    outline-offset: 2px;
}

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

/* Bouton tactile bombé style Sticker Jeu Vidéo (blanc ou couleur pop + trait noir net) */
.game-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.52rem 0.95rem;
    border-radius: 15px;
    border: 2.5px solid var(--ink-outline);
    background: linear-gradient(180deg, #ffffff 0%, #edf3fa 100%);
    color: var(--ink-text);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 4px 0 var(--ink-outline),
        0 7px 14px rgba(28, 36, 51, 0.14),
        inset 0 2px 0 #ffffff;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.12s ease;
}

.game-btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e3eefb 100%);
}

.game-btn:active {
    transform: translateY(3px);
    box-shadow:
        0 1px 0 var(--ink-outline),
        0 2px 6px rgba(28, 36, 51, 0.16),
        inset 0 2px 0 #ffffff;
}

.game-btn--blue,
.game-btn.is-active {
    background: linear-gradient(180deg, var(--pop-blue-top) 0%, var(--pop-blue) 100%);
    color: var(--ink-on-color);
    text-shadow: 0 1.5px 0 var(--pop-blue-dark);
    box-shadow:
        0 4px 0 var(--ink-outline),
        0 7px 16px rgba(34, 150, 243, 0.28),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.game-btn--blue:hover,
.game-btn.is-active:hover {
    background: linear-gradient(180deg, #63beff 0%, #2aa0ff 100%);
}

.game-btn--emerald {
    background: linear-gradient(180deg, var(--pop-green-top) 0%, var(--pop-green) 100%);
    color: var(--ink-on-color);
    text-shadow: 0 1.5px 0 var(--pop-green-dark);
    box-shadow:
        0 4px 0 var(--ink-outline),
        0 7px 16px rgba(56, 193, 102, 0.28),
        inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.game-btn--emerald:hover {
    background: linear-gradient(180deg, #6de997 0%, #40cc6f 100%);
}

.game-btn--icon {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 16px;
}

.game-btn--round {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
}

/* Logo vectoriel Alkimia flottant nu (haut gauche) */
.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
}

.brand-logo-mount {
    display: inline-flex;
    align-items: center;
    height: clamp(40px, 5.5vw, 54px);
    text-decoration: none;
    border-radius: 10px;
}

.alkimia-logo-svg {
    height: 100%;
    width: auto;
    display: block;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(28, 11, 64, 0.16));
    transition: transform 0.12s ease;
}

.alkimia-logo-svg:active {
    transform: scale(0.96);
}

/* Boutons ronds sticker SVG haut-droite (Plein écran & Menu, constants tous thèmes) */
.menu-icon-btn,
.fullscreen-btn {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.fullscreen-btn[hidden] {
    display: none;
}

@media (max-width: 540px) {
    .menu-icon-btn,
    .fullscreen-btn {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 390px) {
    .brand-logo-mount {
        height: clamp(34px, 9.5vw, 40px);
    }

    .menu-icon-btn,
    .fullscreen-btn {
        width: 38px;
        height: 38px;
    }
}

/* Badge code de référence style sticker pop */
.game-code {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.55rem;
    border-radius: 999px;
    border: 2px solid var(--ink-outline);
    background-color: var(--pop-blue);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.4);
}
