/* ============================================================
   BRICKAS - Base CSS
   ============================================================
   Styles fondamentaux partagés PC et Mobile
   ============================================================ */

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BODY ===== */
html,
body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--sky-blue) 0%, #e8f4fc 100%);
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile */
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent browser zoom gestures */
    touch-action: pan-x pan-y;
    -webkit-touch-callout: none;
    -ms-touch-action: pan-x pan-y;
}

/* ===== CANVAS CONTAINER ===== */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-canvas);
    /* IMPORTANT: Disable ALL browser gestures on canvas - game handles them */
    touch-action: none;
    -ms-touch-action: none;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* ===== LOGO ===== */
.logo {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-pink);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    z-index: var(--z-ui);
    pointer-events: none;
    user-select: none;
}

/* ===== INSTRUCTIONS ===== */
.instructions {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-xl);
    font-size: 14px;
    color: var(--text-muted);
    box-shadow: var(--shadow);
    z-index: var(--z-ui);
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== HIDDEN UTILITY ===== */
.hidden {
    display: none !important;
}

/* ===== SCROLLBAR (Desktop) ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===== ANIMATIONS COMMUNES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PLATFORM CLASSES ===== */
body.platform-desktop {
    /* Styles spécifiques desktop ici si nécessaire */
}

body.platform-mobile {
    /* Styles spécifiques mobile ici si nécessaire */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}