/* ============================================
   Kryptic Gaming — Feuille de style globale
   ============================================ */

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

:root {
    --bg: #0a0a0a;
    --bg-elevated: #121212;
    --bg-card: #161616;
    --border: #222222;
    --border-strong: #333333;
    --text: #f5f5f5;
    --text-dim: #999999;
    --text-muted: #666666;
    --accent: #f01a14;
    --accent-hover: #ff4d45;
    --accent-dim: rgba(240, 26, 20, 0.1);
    --success: #2ecc71;
    
    --font-display: 'Anton', 'Archivo', sans-serif;
    --font-body: 'Archivo', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --max-width: 1400px;
    --section-padding: 120px;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' /%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.75);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--border);
    padding: 16px 40px;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: white;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.logo-mark span {
    transform: rotate(-45deg);
    font-family: var(--font-body);
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-links a {
    color: var(--text-dim);
    transition: color 0.2s;
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
    padding: 11px 20px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.2s;
    white-space: nowrap;
}

.nav-cta:hover { background: var(--accent-hover); }

.mobile-toggle {
    display: none;
    width: 28px;
    height: 20px;
    position: relative;
}

.mobile-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 9px; }
.mobile-toggle span:nth-child(3) { top: 18px; }

.mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile menu drawer */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    z-index: 99;
}

.mobile-menu.open { display: block; }

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu a {
    display: block;
    padding: 14px 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    border-left: 2px solid transparent;
    color: var(--text-dim);
}

.mobile-menu a.active,
.mobile-menu a:hover {
    background: var(--bg-elevated);
    color: var(--text);
    border-left-color: var(--accent);
}

/* ============================================
   PAGE HEADER (sub-pages)
   ============================================ */
.page-header {
    padding: 180px 40px 80px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 80% 50%, rgba(240, 26, 20, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.page-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--accent); }

.page-title {
    font-family: var(--font-display);
    font-size: clamp(56px, 10vw, 140px);
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.page-title em {
    font-style: italic;
    color: var(--accent);
}

.page-lead {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 640px;
    line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 16px 32px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--text);
    background: var(--bg-elevated);
}

.btn-arrow { width: 16px; height: 16px; transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: var(--section-padding) 40px;
    position: relative;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    margin-bottom: 64px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 60px;
    align-items: end;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-number::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 88px);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.section-title em { font-style: italic; color: var(--accent); }

.section-subtitle {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 420px;
    padding-bottom: 12px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 80px 40px 40px;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo { margin-bottom: 20px; }

.footer-brand p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
    margin-bottom: 24px;
}

.footer-socials { display: flex; gap: 12px; }

.footer-social {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: all 0.2s;
}

.footer-social:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: var(--text-dim);
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.footer-bottom-links a { color: var(--text-muted); transition: color 0.2s; }
.footer-bottom-links a:hover { color: var(--text); }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* État initial : élément invisible, légèrement décalé vers le bas */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* État visible : on revient à la position normale */
[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes d'animation */
[data-animate="fade-left"] { transform: translateX(-40px); }
[data-animate="fade-left"].in-view { transform: translateX(0); }

[data-animate="fade-right"] { transform: translateX(40px); }
[data-animate="fade-right"].in-view { transform: translateX(0); }

[data-animate="zoom"] { transform: scale(0.92); }
[data-animate="zoom"].in-view { transform: scale(1); }

/* Animations en cascade : chaque enfant démarre un peu après le précédent */
[data-animate-children] > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-animate-children].in-view > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(6) { transition-delay: 0.40s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(7) { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(8) { transition-delay: 0.56s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(9) { transition-delay: 0.64s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(10) { transition-delay: 0.72s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(11) { transition-delay: 0.80s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(12) { transition-delay: 0.88s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(13) { transition-delay: 0.96s; opacity: 1; transform: translateY(0); }
[data-animate-children].in-view > *:nth-child(n+14) { transition-delay: 1.04s; opacity: 1; transform: translateY(0); }

/* Désactivation des animations pour les utilisateurs qui préfèrent moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    [data-animate],
    [data-animate-children] > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    :root { --section-padding: 80px; }
    .section-header { grid-template-columns: 1fr; gap: 16px; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root { --section-padding: 64px; }
    .nav { padding: 18px 20px; }
    .nav.scrolled { padding: 14px 20px; }
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .nav-cta { display: none; }
    section { padding: var(--section-padding) 20px; }
    .page-header { padding: 140px 20px 60px; }
    .footer { padding: 60px 20px 30px; }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 700;
    z-index: 9999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

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

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s, background 0.2s;
    z-index: 100;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--accent-hover); transform: translateY(-3px); }
.scroll-top svg { width: 18px; height: 18px; }

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-strong);
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    z-index: 500;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-text { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin: 0; }
.cookie-text a { color: var(--accent); text-decoration: underline; }
.cookie-accept {
    padding: 10px 22px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
    transition: background 0.2s;
    cursor: pointer;
    flex-shrink: 0;
    border: none;
}
.cookie-accept:hover { background: var(--accent-hover); }
@media (max-width: 768px) {
    .cookie-banner { flex-direction: column; padding: 20px; text-align: center; }
    .scroll-top { bottom: 20px; right: 20px; }
}
