:root {
    --noir: #0e0e0e;
    --blanc: #f5f2eb;
    --jaune: #f0c040;
    --jaune-pale: #fdf3c0;
    --rouge: #e84040;
    --bleu: #2563eb;
    --vert: #22c55e;
    --violet: #7c3aed;
    --gris: #2a2a2a;
    --gris-mid: #444;
    --border: 2px solid #0e0e0e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--blanc);
    color: var(--noir);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
}

/* NAV */
nav {
    background: var(--noir);
    color: var(--blanc);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--jaune);
}

.nav-logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.nav-logo span {
    color: var(--jaune);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--blanc);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--jaune);
}

/* HERO */
.hero {
    background: var(--noir);
    color: var(--blanc);
    min-height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

.hero-left {
    padding: 5rem 3rem 4rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    background: var(--jaune);
    color: var(--noir);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    padding: 0.35rem 0.9rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.0;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero h1 em {
    font-style: normal;
    color: var(--jaune);
    display: block;
}

.hero-sub {
    font-size: 1.05rem;
    color: #aaa;
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--jaune);
    color: var(--noir);
    padding: 0.85rem 2rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.5px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 4px 4px 0 var(--blanc);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--blanc);
}

.btn-secondary {
    background: transparent;
    color: var(--blanc);
    padding: 0.85rem 2rem;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--blanc);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
    background: var(--blanc);
    color: var(--noir);
}

.hero-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.hero-code-block {
    background: #111;
    border: 2px solid #333;
    padding: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    color: #aaa;
    line-height: 1.9;
    max-width: 400px;
    width: 100%;
    position: relative;
}

.hero-code-block::before {
    content: '● ● ●';
    display: block;
    color: #555;
    margin-bottom: 1rem;
    font-size: 0.7rem;
    letter-spacing: 3px;
}

.code-kw {
    color: #c084fc;
}

.code-fn {
    color: #60a5fa;
}

.code-str {
    color: #4ade80;
}

.code-cm {
    color: #555;
}

.code-num {
    color: #f59e0b;
}

.hero-deco {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid var(--jaune);
    bottom: 2rem;
    right: 2rem;
    opacity: 0.15;
}

/* STAT BAR */
.stat-bar {
    background: var(--jaune);
    color: var(--noir);
    padding: 1.2rem 4rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    border-top: 3px solid var(--noir);
    border-bottom: 3px solid var(--noir);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap;
    justify-content: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    max-width: 100px;
    line-height: 1.3;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    justify-self: center;
}

/* SECTION TITLES */
section {
    padding: 5rem 4rem;
}

.section-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gris-mid);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-title span {
    color: var(--rouge);
}

.section-sub {
    font-size: 1rem;
    color: var(--gris-mid);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* THEMES SECTION */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: var(--border);
}

.theme-card {
    padding: 2.5rem;
    border-right: var(--border);
    border-bottom: var(--border);
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
}

.theme-card:nth-child(2n) {
    border-right: none;
}

.theme-card:nth-last-child(-n+2) {
    border-bottom: none;
}

.theme-card:hover {
    background: var(--jaune-pale);
}

.theme-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--gris-mid);
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
}

.theme-icon {
    width: 52px;
    height: 52px;
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    background: var(--noir);
    color: var(--jaune);
}

.theme-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
}

.theme-card p {
    font-size: 0.9rem;
    color: var(--gris-mid);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    border: 1.5px solid var(--noir);
    letter-spacing: 0.5px;
}

.tag-html {
    background: #fee2e2;
}

.tag-js {
    background: #fef9c3;
}

.tag-css {
    background: #dbeafe;
}

.tag-py {
    background: #dcfce7;
}

.tag-game {
    background: #ede9fe;
}

.tag-pc {
    background: #f1f5f9;
}



/* RULES / ENGAGEMENT */
.rules-section {
    background: var(--noir);
    color: var(--blanc);
}

.rules-section .section-tag {
    color: #777;
}

.rules-section .section-title span {
    color: var(--jaune);
}

.rules-section .section-sub {
    color: #aaa;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.rule-card {
    border: 1.5px solid #333;
    padding: 1.8rem;
    position: relative;
}

.rule-card.highlight {
    border-color: var(--jaune);
    background: rgba(240, 192, 64, 0.05);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rule-icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.rule-card h4 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.rule-card p {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
}

.rule-card.highlight p {
    color: #bbb;
}

/* PROGRESSION */
.progress-section {
    background: #f9f5ee;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: var(--border);
    max-width: 860px;
}

.step-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    border-bottom: var(--border);
    transition: background 0.15s;
}

.step-item:last-child {
    border-bottom: none;
}

.step-item:hover {
    background: var(--jaune-pale);
}

.step-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--gris-mid);
    padding: 1.5rem 1.2rem;
    border-right: var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 1.6rem;
    letter-spacing: 1px;
}

.step-content {
    padding: 1.5rem 2rem;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.3px;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--gris-mid);
    line-height: 1.5;
}

/* INSCRIPTION */
.inscription-section {
    background: var(--jaune);
    color: var(--noir);
    text-align: center;
    padding: 5rem 3rem;
}

.inscription-section .section-title {
    letter-spacing: -2px;
}

.inscription-section .section-sub {
    color: #5a4a00;
    margin: 0 auto 2.5rem;
}

.cta-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    background: var(--noir);
    color: var(--blanc);
    padding: 2.5rem 3.5rem;
    max-width: 420px;
}

.cta-box p {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.6;
}

.cta-box strong {
    color: var(--jaune);
}

.btn-jaune-inv {
    background: var(--jaune);
    color: var(--noir);
    padding: 0.9rem 2.5rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: 4px 4px 0 var(--blanc);
    transition: transform 0.15s;
    text-decoration: none;
}

.btn-jaune-inv:hover {
    transform: translate(-2px, -2px);
}

/* FOOTER */
footer {
    background: var(--gris);
    color: #777;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    border-top: 3px solid var(--jaune);
}

footer span {
    color: var(--jaune);
}

/* ANIMATIONS */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--jaune);
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 2px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-right {
        display: none;
    }

    .themes-grid {
        grid-template-columns: 1fr;
    }

    .theme-card {
        border-right: none !important;
        border-bottom: var(--border) !important;
    }

    .theme-card:last-child {
        border-bottom: none !important;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    section {
        padding: 3.5rem 1.5rem;
    }

    .stat-bar {
        padding: 1rem 1.5rem;
        grid-template-columns: 1fr auto 1fr;
        gap: 0.5rem 0;
    }

    .stat-bar .stat-divider:nth-child(4) {
        display: none;
    }

    .stat-bar .stat-item:nth-child(7) {
        grid-column: 1 / -1;
        justify-content: center;
    }

    footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}