/**
 * Base Styles
 * ============
 * Reset, éléments de base, et styles globaux
 */

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

/* === HTML & BODY === */
html {
    scroll-behavior: smooth;
    font-size: 13px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    /* Increased from 1.6 */
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-user-select: none;
    user-select: none;
}

/* === SELECTION EXCEPTIONS === */
a,
input,
textarea,
button,
[contenteditable] {
    -webkit-user-select: text;
    user-select: text;
    cursor: auto;
}

a {
    cursor: pointer;
}

button {
    cursor: pointer;
}

img {
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

/* === SELECTION === */
::selection {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* === LINKS === */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* === IMAGES === */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === LISTS === */
ul,
ol {
    list-style: none;
}

/* === BUTTONS === */
button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: var(--z-base);
}

/* === CANVAS BACKGROUND === */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity var(--transition-base);
}




/* === SECTION HEADER === */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    /* Reduced from 2xl */
}

.section-header h2 {
    font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-3xl));
    font-weight: 700;
    color: var(--accent-primary);
    white-space: nowrap;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: var(--accent-primary);
    opacity: 0.3;
}

/* === GLITCH EFFECT === */
.glitch {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    position: relative;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--accent-primary);
}

.glitch::before {
    animation: glitch-1 0.5s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    animation: glitch-2 0.5s infinite linear alternate-reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

.glitch-mini {
    font-weight: 800;
    color: var(--accent-primary);
}

/* === GLITCH ANIMATIONS === */
@keyframes glitch-1 {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-1px);
    }

    80% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes glitch-2 {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(3px);
    }

    40% {
        transform: translateX(-3px);
    }

    60% {
        transform: translateX(1px);
    }

    80% {
        transform: translateX(-2px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }

    10% {
        transform: skew(0.5deg);
    }

    20% {
        transform: skew(-0.5deg);
    }

    30% {
        transform: skew(0deg);
    }

    100% {
        transform: skew(0deg);
    }
}

/* === SUBTITLE === */
.subtitle {
    font-size: var(--font-size-base);
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

/* === BACK BUTTON === */
.back-button-container {
    padding-top: var(--spacing-2xl);
    margin-bottom: calc(var(--spacing-lg) * -1);
    position: relative;
    z-index: var(--z-dropdown);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-bounce);
}

.back-button i {
    font-size: var(--font-size-lg);
    transition: transform var(--transition-base);
}

.back-button:hover {
    background: var(--accent-hover);
    color: var(--text-inverse);
    transform: translateX(-5px);
    box-shadow: 0 10px 20px var(--accent-glow);
    border-color: transparent;
}

.back-button:hover i {
    transform: translateX(-3px);
}

/* === HIGHLIGHT === */
.highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

/* === VISUALLY HIDDEN (Accessibility) === */
.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;
}

/* === SCROLL ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays (up to 10 items) */
.stagger-1 {
    transition-delay: 100ms;
}

.stagger-2 {
    transition-delay: 200ms;
}

.stagger-3 {
    transition-delay: 300ms;
}

.stagger-4 {
    transition-delay: 400ms;
}

.stagger-5 {
    transition-delay: 500ms;
}

.stagger-6 {
    transition-delay: 600ms;
}

.stagger-7 {
    transition-delay: 700ms;
}

.stagger-8 {
    transition-delay: 800ms;
}

.stagger-9 {
    transition-delay: 900ms;
}

.stagger-10 {
    transition-delay: 1000ms;
}