/**
 * CosmicNights Custom Styles
 * Animations avancées et effets premium
 */

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.scrolled {
    background: rgba(10, 14, 39, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: white;
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-neon);
    transition: width 0.3s;
}

.main-navigation a:hover {
    color: var(--cyan);
}

.main-navigation a:hover::after {
    width: 100%;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        transform: translateX(-100%);
        transition: transform 0.3s;
        padding: 2rem;
    }
    
    .main-navigation.active {
        transform: translateX(0);
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .main-navigation a {
        font-size: 1.25rem;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pink);
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cyan);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.hero-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 60px rgba(34, 211, 238, 0.3));
    position: relative;
    z-index: 2;
}

/* Glow effect behind image */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Floating particles */
.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(34, 211, 238, 0.2);
    animation: floatAround 20s infinite;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 70%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

@keyframes floatAround {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(90deg); }
    50% { transform: translate(60px, 0) rotate(180deg); }
    75% { transform: translate(30px, 30px) rotate(270deg); }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta-group {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* ============================================
   TRUST BADGES
   ============================================ */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.trust-icon {
    font-size: 2rem;
    color: var(--cyan);
    flex-shrink: 0;
}

.trust-text h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: white;
}

.trust-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    background: rgba(34, 211, 238, 0.1);
    color: var(--cyan);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   VIDEO SECTION
   ============================================ */
.video-section {
    position: relative;
    padding: 6rem 0;
}

.video-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    max-width: 1000px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper video,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.3) 0%, rgba(10, 14, 39, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-dark);
    transition: all 0.3s;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(255, 255, 255, 0.5);
}

.play-button::before {
    content: '▶';
    margin-left: 5px;
}

/* ============================================
   PRODUCT SHOWCASE
   ============================================ */
.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.product-gallery {
    position: relative;
}

.main-product-image {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.main-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.main-product-image:hover img {
    transform: scale(1.05);
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    aspect-ratio: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.product-info {
    padding: 2rem 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
    color: var(--orange);
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.price-current {
    font-size: 3rem;
    font-weight: 700;
    color: var(--green);
    font-family: var(--font-display);
}

.price-original {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-badge {
    background: var(--orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-features {
    list-style: none;
    margin-bottom: 2rem;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-features li:last-child {
    border-bottom: none;
}

.feature-icon {
    color: var(--green);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.stock-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.stock-text {
    font-weight: 600;
    color: #ef4444;
}

@media (max-width: 1024px) {
    .product-showcase {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FEATURES GRID
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-icon-large {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.feature-card:nth-child(1) .feature-icon-large { animation-delay: 0s; }
.feature-card:nth-child(2) .feature-icon-large { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-icon-large { animation-delay: 0.4s; }
.feature-card:nth-child(4) .feature-icon-large { animation-delay: 0.6s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    font-size: 3rem;
    color: white;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    padding: 2rem;
}

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

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--cyan);
    box-shadow: var(--glow-cyan);
}

.testimonial-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.testimonial-stars {
    color: var(--orange);
    display: flex;
    gap: 0.25rem;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.8;
    color: var(--text-secondary);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(16, 185, 129, 0.2);
    color: var(--green);
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    margin-top: 1rem;
}

/* ============================================
   FAQ
   ============================================ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--cyan);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s;
}

.faq-question:hover {
    color: var(--cyan);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   FINAL CTA
   ============================================ */
.final-cta {
    background: var(--gradient-primary);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

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

.countdown-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
    display: block;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.countdown-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    margin-bottom: 1rem;
}

.footer-about p {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

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

.footer-links a:hover {
    color: var(--cyan);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--cyan);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.5);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-neon);
    z-index: 9999;
    transform-origin: left;
    transition: transform 0.1s;
}

/* ============================================
   ANIMATIONS ON SCROLL
   ============================================ */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s, transform 0.6s;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(-50px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(50px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

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