/* =========================
   RESET
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   BASE
   ========================= */
html,
body {
    min-height: 100%;
}

body {
    --x: 50%;
    --y: 50%;
    font-family: Arial, sans-serif;
    background: #050b18;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* LUMIÈRE SOURIS */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(
        circle at var(--x) var(--y),
        rgba(96, 165, 250, 0.10),
        transparent 32%
    );
}

/* SCAN */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
        120deg,
        transparent 48%,
        rgba(96, 165, 250, 0.04) 50%,
        transparent 52%
    );
    animation: scan 8s linear infinite;
}

/* =========================
   BACKGROUND ANIMÉ
   ========================= */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(59,130,246,0.18), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(14,165,233,0.15), transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(37,99,235,0.12), transparent 30%),
        linear-gradient(135deg, #020817 0%, #07142b 50%, #081b3d 100%);
}

.bg-gradient {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 50% 50%, rgba(96,165,250,0.12), transparent 25%),
        radial-gradient(circle at 30% 70%, rgba(59,130,246,0.08), transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(14,165,233,0.08), transparent 30%);
    filter: blur(40px);
    animation: pulseGradient 12s ease-in-out infinite alternate;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.16;
    animation: gridMove 18s linear infinite;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.22;
}

.glow-1 {
    width: 400px;
    height: 400px;
    top: 8%;
    left: 8%;
    background: #3b82f6;
    animation: floatGlow1 15s ease-in-out infinite;
}

.glow-2 {
    width: 360px;
    height: 360px;
    top: 16%;
    right: 10%;
    background: #0ea5e9;
    animation: floatGlow2 18s ease-in-out infinite;
}

.glow-3 {
    width: 460px;
    height: 460px;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    animation: floatGlow3 20s ease-in-out infinite;
}

.bg-beam {
    position: absolute;
    width: 45vw;
    height: 120vh;
    top: -10vh;
    background: linear-gradient(to bottom, rgba(96,165,250,0.08), transparent 70%);
    filter: blur(18px);
    opacity: 0.12;
}

.beam-1 {
    left: 8%;
    transform: rotate(18deg);
    animation: beamMove1 12s ease-in-out infinite alternate;
}

.beam-2 {
    right: 4%;
    transform: rotate(-16deg);
    animation: beamMove2 14s ease-in-out infinite alternate;
}

/* =========================
   PARTICLES
   ========================= */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #93c5fd;
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(147, 197, 253, 0.8);
    animation: float 20s linear infinite;
}

.particles span:nth-child(1)  { left: 10%; top: 90%; animation-delay: 0s; }
.particles span:nth-child(2)  { left: 30%; top: 95%; animation-delay: 2s; }
.particles span:nth-child(3)  { left: 50%; top: 85%; animation-delay: 4s; }
.particles span:nth-child(4)  { left: 70%; top: 92%; animation-delay: 1s; }
.particles span:nth-child(5)  { left: 90%; top: 88%; animation-delay: 6s; }
.particles span:nth-child(6)  { left: 20%; top: 95%; animation-delay: 3s; }
.particles span:nth-child(7)  { left: 40%; top: 92%; animation-delay: 5s; }
.particles span:nth-child(8)  { left: 60%; top: 90%; animation-delay: 7s; }
.particles span:nth-child(9)  { left: 80%; top: 93%; animation-delay: 8s; }
.particles span:nth-child(10) { left: 15%; top: 85%; animation-delay: 9s; }
.particles span:nth-child(11) { left: 52%; top: 96%; animation-delay: 10s; }
.particles span:nth-child(12) { left: 88%; top: 86%; animation-delay: 11s; }

/* =========================
   NAVBAR
   ========================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 40px;
    background: rgba(4, 12, 28, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: 0.2s;
}

.nav-links a:hover {
    color: #60a5fa;
}

/* =========================
   MAIN
   ========================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 118px 20px 38px;
    text-align: center;
    position: relative;
    z-index: 3;
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #93c5fd, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 20px rgba(59,130,246,0.3),
        0 0 40px rgba(59,130,246,0.15);
    margin-bottom: 14px;
    transition: text-shadow 0.3s ease;
}

.title:hover {
    text-shadow:
        0 0 30px rgba(59,130,246,0.55),
        0 0 80px rgba(59,130,246,0.25);
}

.subtitle {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 22px;
    opacity: 0.82;
    letter-spacing: 0.5px;
    max-width: 820px;
    line-height: 1.6;
}

.logo {
    width: 150px;
    max-width: 90vw;
    height: auto;
    display: block;
    margin-bottom: 26px;
    border-radius: 20px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(59,130,246,0.2);
    animation: floatLogo 4s ease-in-out infinite;
}

.buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 14px;
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(96,165,250,0.20);
    text-decoration: none;
    color: white;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(59,130,246,0.25);
    box-shadow:
        0 0 25px rgba(96,165,250,0.6),
        0 0 60px rgba(59,130,246,0.3);
}

.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

/* =========================
   STATS
   ========================= */
.stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.stat-card {
    min-width: 130px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96,165,250,0.14);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.stat-card span {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #93c5fd;
    margin-bottom: 6px;
}

.stat-card p {
    color: #dbeafe;
    font-size: 0.86rem;
    opacity: 0.88;
}

/* =========================
   ABOUT GALLERY
   ========================= */
.about-gallery {
    width: 100%;
    margin-top: 20px;
    position: relative;
    z-index: 5;
}

.gallery {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.gallery-card {
    width: 300px;
    height: 255px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    position: relative;
    z-index: 6;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(96,165,250,0.10);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.gallery-card h3 {
    font-size: 15px;
    color: #60a5fa;
    margin-bottom: 6px;
    font-family: 'Orbitron', sans-serif;
}

.gallery-card p {
    font-size: 12px;
    color: #cbd5e1;
    margin-bottom: 10px;
    line-height: 1.45;
    min-height: 34px;
}

.gallery-img {
    width: 100%;
    display: block;
    border-radius: 12px;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.35),
        0 0 20px rgba(59,130,246,0.14);
    transition: 0.3s ease;
}

.gallery-img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 0 28px rgba(96,165,250,0.22),
        0 12px 30px rgba(0,0,0,0.45);
}

/* =========================
   FOOTER
   ========================= */
.footer {
    position: relative;
    z-index: 3;
    background: rgba(4,12,28,0.78);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 26px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.footer-brand-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.footer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-text {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 10px;
    line-height: 1.6;
    max-width: 520px;
}

.footer-section h3 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 6px;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-section a:hover,
.discord-link:hover {
    color: #ffffff;
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.discord-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding: 12px 40px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #94a3b8;
}

.footer-copy,
.footer-note {
    margin: 0;
}

/* =========================
   FIX ABOUT + SOCIAL MINI SCROLL
   ========================= */
body:has(.about-gallery) .main-content {
    justify-content: flex-start;
    padding-top: 104px;
    padding-bottom: 22px;
}

body:has(.about-gallery) .title {
    font-size: 2.35rem;
    margin-bottom: 10px;
}

body:has(.about-gallery) .subtitle {
    font-size: 0.92rem;
    margin-bottom: 16px;
    line-height: 1.45;
    max-width: 760px;
}

body:has(.about-gallery) .gallery {
    gap: 16px;
}

body:has(.about-gallery) .gallery-card {
    width: 285px;
    height: 240px;
    padding: 12px;
}

body:has(.about-gallery) .gallery-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

body:has(.about-gallery) .gallery-card p {
    font-size: 11.5px;
    line-height: 1.35;
    min-height: 28px;
    margin-bottom: 8px;
}

body:has(.stats) .main-content {
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 18px;
}

body:has(.stats) .title {
    font-size: 2.45rem;
    margin-bottom: 8px;
}

body:has(.stats) .subtitle {
    font-size: 0.9rem;
    margin-bottom: 16px;
    max-width: 700px;
}

body:has(.stats) .logo {
    width: 125px;
    margin-bottom: 18px;
}

body:has(.stats) .buttons {
    gap: 10px;
    margin-bottom: 18px;
}

body:has(.stats) .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
}

body:has(.stats) .stat-card {
    padding: 12px 14px;
    min-width: 118px;
}

body:has(.stats) .stat-card span {
    font-size: 0.98rem;
}

body:has(.stats) .stat-card p {
    font-size: 0.8rem;
}

/* =========================
   ANIMATIONS
   ========================= */
@keyframes gridMove {
    from { transform: translateY(0); }
    to   { transform: translateY(60px); }
}

@keyframes float {
    0%   { transform: translateY(0); opacity: 0; }
    15%  { opacity: 0.8; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

@keyframes floatGlow1 {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(40px, -20px); }
    100% { transform: translate(-20px, 20px); }
}

@keyframes floatGlow2 {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(-30px, 20px); }
    100% { transform: translate(20px, -20px); }
}

@keyframes floatGlow3 {
    0%   { transform: translateX(-50%) translateY(0); }
    50%  { transform: translateX(-48%) translateY(-20px); }
    100% { transform: translateX(-52%) translateY(20px); }
}

@keyframes beamMove1 {
    0%   { transform: rotate(18deg) translateX(0); }
    100% { transform: rotate(22deg) translateX(50px); }
}

@keyframes beamMove2 {
    0%   { transform: rotate(-16deg) translateX(0); }
    100% { transform: rotate(-12deg) translateX(-50px); }
}

@keyframes pulseGradient {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.92;
    }
    100% {
        transform: scale(1.08) rotate(4deg);
        opacity: 1;
    }
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 900px) {
    body {
        overflow-y: auto;
    }

    .main-content {
        padding: 110px 20px 40px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 0 24px 20px;
    }

    .footer-bottom {
        padding: 12px 24px 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    body:has(.about-gallery) .gallery {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-title {
        font-size: 1rem;
    }

    .title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .logo {
        width: 120px;
    }

    .buttons {
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats {
        gap: 12px;
    }

    .stat-card {
        width: 100%;
        max-width: 260px;
    }

    .gallery-card {
        width: 100%;
        max-width: 340px;
        height: auto;
    }

    .bg-grid {
        background-size: 40px 40px;
    }

    body:has(.about-gallery) .main-content,
    body:has(.stats) .main-content {
        justify-content: flex-start;
        padding-top: 104px;
        padding-bottom: 28px;
    }
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: rgba(8, 20, 45, 0.92);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 18px 14px;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.sidebar-header span {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 14px;
    transition: 0.2s ease;
    font-size: 0.95rem;
}

.sidebar-nav a:hover {
    background: rgba(96,165,250,0.16);
    color: white;
}

.sidebar-nav a.active {
    position: relative;
    background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(96,165,250,0.15));
    color: #ffffff;
    border: 1px solid rgba(96,165,250,0.35);
    box-shadow:
        0 0 12px rgba(96,165,250,0.25),
        inset 0 0 10px rgba(96,165,250,0.15);
}

.sidebar-nav a.active .sidebar-icon {
    filter: drop-shadow(0 0 6px rgba(96,165,250,0.6));
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Décalage du contenu desktop */
main,
.footer,
.navbar {
    margin-left: 220px;
    width: calc(100% - 220px);
}

/* =========================
   MOBILE SIDEBAR + OVERLAY FIX
   ========================= */
#menu-toggle-checkbox {
    display: none;
}

.menu-toggle {
    display: none;
}

.mobile-title {
    display: none;
}

.desktop-title {
    display: inline;
}

.overlay {
    display: none;
}

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        display: block;
    }

    .overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.58);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1240;
    }

    #menu-toggle-checkbox:checked ~ .overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 260px;
        height: 100vh;
        z-index: 1260;
        transition: left 0.3s ease;
        padding: 88px 14px 18px;
        overflow-y: auto;
    }

    #menu-toggle-checkbox:checked ~ .sidebar {
        left: 0;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0 !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 12px 14px;
        z-index: 1250;
    }

    .nav-left {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 22px;
        line-height: 1;
        color: white;
        cursor: pointer;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(96,165,250,0.18);
        flex-shrink: 0;
        position: relative;
        z-index: 1270;
    }

    .nav-logo {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .desktop-title {
        display: none;
    }

    .mobile-title {
        display: inline;
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-links {
        display: none;
    }

    main,
    .footer,
    .navbar {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .home-page,
    .rules-page,
    .contact-page,
    .payment-page,
    .developer-page {
        margin-left: 0 !important;
        width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    #menu-toggle-checkbox:checked ~ main,
    #menu-toggle-checkbox:checked ~ .footer {
        pointer-events: none;
        user-select: none;
    }

    .hero-section {
        grid-template-columns: 1fr !important;
        text-align: center;
        min-height: auto;
        padding: 34px 0 22px;
        gap: 18px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title {
        font-size: 2.1rem;
        line-height: 1.05;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 100%;
    }

    .hero-logo {
        width: 170px;
        margin: 0 auto;
    }

    .feature-grid,
    .trust-grid,
    .rules-grid {
        grid-template-columns: 1fr !important;
    }

    .discord-card,
    .shop-preview-card {
        grid-template-columns: 1fr !important;
        flex-direction: column;
        text-align: center;
    }

    .shop-preview-text,
    .discord-content {
        text-align: center;
    }

    .discord-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 24px;
        padding: 0 20px 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 20px 14px;
    }
}