/* ============================================================
   XKS PUBLISHING — Feuille de styles principale
   ============================================================ */

/* --- Variables globales --- */
:root {
    --primary-color: #7c4dff;
    --primary-light: #b47cff;
    --primary-dark: #3f1dcb;
    --accent-color: #ffd600;
    --bg-dark: #0a0a0c;
    --bg-surface: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #a0a0ab;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.10);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-shadow: 0 0 20px rgba(124, 77, 255, 0.3);
}

/* --- Reset & base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: top 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.skip-link:focus {
    top: 1rem;
}

/* Focus visible — navigation clavier */
:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 3px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: padding 0.3s ease, background 0.3s ease;
}

/* État au scroll — appliqué par JS via classe CSS */
header.scrolled {
    padding: 1rem 5%;
    background: rgba(10, 10, 12, 0.97);
}

/* Hamburger aligné à droite dans la 3e colonne */
.mobile-menu-toggle {
    justify-self: end;
}

/* Logo */
.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-main), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

/* Nav desktop */
nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

nav ul li a:hover {
    color: var(--primary-light);
}

/* ============================================================
   MENU HAMBURGER (MOBILE)
   ============================================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    border-color: var(--primary-light);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    transform-origin: center;
}

/* État ouvert — animation X */
.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 5%;
    background:
        linear-gradient(180deg, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 1) 100%),
        url('assets/hero.png') no-repeat center center / cover;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(124, 77, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
    animation: fadeInDown 0.9s ease both;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 0.95;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.9s ease both;
    animation-delay: 0.1s;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.9s ease both;
    animation-delay: 0.2s;
}

.hero-actions {
    animation: fadeInUp 0.9s ease both;
    animation-delay: 0.3s;
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: var(--glow-shadow);
}

.cta-button:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(124, 77, 255, 0.5);
}

.cta-button:active {
    transform: translateY(-1px);
}

/* ============================================================
   ACTIVITÉS
   ============================================================ */
.activities {
    padding: 8rem 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* État initial (avant scroll reveal) */
.activity-card {
    position: relative;
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

/* Décalage d'entrée en cascade */
.activity-card:nth-child(1) { transition-delay: 0s; }
.activity-card:nth-child(2) { transition-delay: 0.12s; }
.activity-card:nth-child(3) { transition-delay: 0.24s; }

/* État visible (déclenché par IntersectionObserver) */
.activity-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.activity-card:hover,
.activity-card:focus-within {
    border-color: var(--primary-light);
    box-shadow: var(--glow-shadow);
}

.card-image {
    position: absolute;
    inset: 0;
    transition: transform 0.6s ease;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) grayscale(20%);
    transition: filter 0.5s ease, transform 0.6s ease;
}

.activity-card:hover .card-image img,
.activity-card:focus-within .card-image img {
    transform: scale(1.08);
    filter: brightness(0.75) grayscale(0%);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 2.5rem;
    width: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 12, 0.92) 100%);
    z-index: 5;
}

.card-content h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.card-content p {
    color: var(--text-dim);
    font-size: 0.9rem;
    transform: translateY(16px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.activity-card:hover .card-content p,
.activity-card:focus-within .card-content p {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-cta {
    padding: 10rem 5%;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a2e, #0a0a0c);
}

.contact-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.contact-box h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.contact-box p {
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.email-link {
    color: var(--primary-light);
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.email-link:hover {
    border-color: var(--primary-light);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    background: var(--bg-dark);
}

.footer-logo {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: block;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}

.footer-nav a:hover {
    color: var(--primary-light);
}

.copyright {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
    /* Hamburger visible, nav cachée par défaut */
    .mobile-menu-toggle {
        display: flex;
    }

    nav#navbar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 999;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    nav#navbar.open {
        display: flex;
    }

    nav#navbar ul {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    nav#navbar ul li a {
        font-size: 2rem;
        font-weight: 700;
        color: var(--text-main);
    }

    nav#navbar ul li a:hover {
        color: var(--primary-light);
    }

    /* Hero */
    .hero h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero p {
        font-size: 1rem;
    }

    /* Activities */
    .activities {
        padding: 5rem 5%;
        gap: 2rem;
    }

    .activity-card {
        height: 300px;
    }

    /* Descriptions toujours visibles sur mobile (pas de hover sur tactile) */
    .activity-card.visible .card-content p {
        transform: translateY(0);
        opacity: 1;
    }

    /* Contact */
    .contact-cta {
        padding: 6rem 5%;
    }

    .contact-box {
        padding: 2.5rem 1.5rem;
    }

    .contact-box p {
        font-size: 1rem;
    }

    /* Footer */
    .footer-nav {
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 4%;
    }

    .logo {
        font-size: 1.4rem;
    }

    .activity-card {
        height: 280px;
    }

    .cta-button {
        padding: 0.9rem 1.8rem;
        font-size: 0.85rem;
    }
}
