/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs */
    --parchment: #f4e4c1;
    --parchment-dark: #d4c4a1;
    --ink: #2c1810;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --blood: #8b1a1a;
    --blood-light: #c0392b;
    --forest: #2d5016;
    --magic: #6c3483;
    --magic-light: #a569bd;
    --shadow: rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(44, 24, 16, 0.7);
    --glass-border: rgba(201, 168, 76, 0.4);
    --panel-border: #c9a84c;

    /* Espacement */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Typographie */
    --font-size-sm: 0.85rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.2rem;
    --font-size-xl: 1.5rem;

    /* Bordures & rayons */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s ease;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: #0a0a0a;
    color: var(--parchment);
    line-height: 1.7;
    font-size: 18px;
}

/* === PARTICLES === */
#particles {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    display: none;
}

#particles.active {
    display: block;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: ember-rise var(--dur, 6s) ease-in var(--delay, 0s) infinite;
    filter: blur(var(--blur, 0.8px));
    box-shadow: 0 0 var(--glow, 4px) var(--color, #ff6600);
    background: var(--color, #ff6600);
}

@keyframes ember-rise {
    0%   { opacity: 0;   transform: translateY(0)       translateX(0)       scale(0.4); }
    10%  { opacity: 0.9; }
    30%  { transform: translateY(-25vh)  translateX(6px)  scale(1); }
    55%  { transform: translateY(-50vh)  translateX(-8px) scale(0.85); }
    80%  { opacity: 0.4; transform: translateY(-75vh)  translateX(5px)  scale(0.6); }
    100% { opacity: 0;   transform: translateY(-100vh) translateX(-4px) scale(0.2); }
}

/* === SCREENS === */
.screen {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1;
}

.screen.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 0;
    overflow-y: auto;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

