/*
Theme Name: CosmicNights
Theme URI: https://cosmicnights.fr
Author: CosmicNights Team
Author URI: https://cosmicnights.fr
Description: Thème WordPress premium e-commerce pour projecteur galaxie astronaute. Design spatial immersif ultra-moderne optimisé conversion maximale.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cosmicnights
Tags: e-commerce, woocommerce, one-page, responsive, modern, space-theme, premium

CosmicNights WordPress Theme, Copyright 2024
CosmicNights is distributed under the terms of the GNU GPL
*/

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --bg-dark: #0a0e27;
    --bg-darker: #060914;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Couleurs accent */
    --cyan: #22d3ee;
    --purple: #a855f7;
    --green: #10b981;
    --orange: #f59e0b;
    --pink: #ec4899;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cosmic: linear-gradient(135deg, #1a1f4d 0%, #0a0e27 100%);
    --gradient-neon: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3);
    
    /* Glow effects */
    --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.5);
    --glow-purple: 0 0 30px rgba(168, 85, 247, 0.6);
    --glow-green: 0 0 25px rgba(16, 185, 129, 0.5);
    
    /* Spacing */
    --container-width: 1280px;
    --section-padding: 120px;
    --section-padding-mobile: 60px;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-primary);
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--purple);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
    overflow: hidden;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   COSMIC BACKGROUND
   ============================================ */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

.stars-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    background-size: 200px 200px;
}

.stars-layer-1 {
    background-image: radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 60px 70px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 50px 50px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 90px 10px, #fff, rgba(0,0,0,0));
    animation: moveStars 120s linear infinite;
    opacity: 0.3;
}

.stars-layer-2 {
    background-image: radial-gradient(1px 1px at 40px 60px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 110px 90px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 170px 30px, #fff, rgba(0,0,0,0));
    animation: moveStars 180s linear infinite;
    opacity: 0.5;
}

.stars-layer-3 {
    background-image: radial-gradient(1px 1px at 75px 125px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 165px 75px, #fff, rgba(0,0,0,0));
    animation: moveStars 240s linear infinite;
    opacity: 0.7;
}

@keyframes moveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-neon);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3);
    animation: gradientShift 8s ease infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.4), var(--glow-cyan);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

/* Button shine effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition-base);
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cyan);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3), var(--glow-cyan);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }
    
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
