/*
Theme Name: MVM System Pro
Theme URI: https://mvmsystempro.com
Author: MVM System Pro
Description: Thème WordPress premium noir & or pour MVM System Pro — plateforme éducative MLM avec liens dynamiques par référent.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Proprietary
Text Domain: mvm-theme
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Palette — Noir profond & Or luxueux */
    --noir:         #0B0B14;
    --noir-card:    #12121F;
    --noir-surface: #1A1A2E;
    --noir-hover:   #22223A;
    --noir-border:  rgba(201,168,76,0.15);
    --or:           #C9A84C;
    --or-light:     #E4CC7A;
    --or-glow:      rgba(201,168,76,0.25);
    --or-subtle:    rgba(201,168,76,0.08);
    --blanc:        #F2EDE4;
    --blanc-soft:   #C4BFB6;
    --gris:         #7A7786;
    --rouge:        #E74C3C;
    --vert:         #27AE60;
    --bleu:         #3498DB;

    /* Typography */
    --font-display: 'Playfair Display', 'Georgia', serif;
    --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 100px;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--blanc);
    background: var(--noir);
    overflow-x: hidden;
}

/* Gold grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

::selection {
    background: var(--or);
    color: var(--noir);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--or); text-decoration: none; transition: color var(--duration) var(--ease-out); }
a:hover { color: var(--or-light); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--blanc);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1em; color: var(--blanc-soft); }
strong { color: var(--blanc); font-weight: 600; }

.text-gold { color: var(--or); }
.text-center { text-align: center; }

/* Elegant divider */
.mvm-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--or), transparent);
    margin: var(--space-lg) auto;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.mvm-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.mvm-container--narrow { max-width: 800px; }
.mvm-container--wide { max-width: 1400px; }

.mvm-section {
    padding: var(--space-3xl) 0;
}

.mvm-grid {
    display: grid;
    gap: var(--space-xl);
}
.mvm-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.mvm-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mvm-grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.mvm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all var(--duration) var(--ease-out);
    background: rgba(11, 11, 20, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
}

.mvm-header.scrolled {
    border-bottom-color: var(--noir-border);
    background: rgba(11, 11, 20, 0.92);
}

.mvm-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.mvm-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--or);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.mvm-logo span { color: var(--blanc); font-weight: 300; }

.mvm-nav { display: flex; align-items: center; gap: var(--space-xl); }
.mvm-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--blanc-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    padding: var(--space-xs) 0;
}
.mvm-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--or);
    transition: width var(--duration) var(--ease-out);
}
.mvm-nav a:hover { color: var(--or); }
.mvm-nav a:hover::after { width: 100%; }

/* Mobile menu toggle */
.mvm-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}
.mvm-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--or);
    margin: 5px 0;
    transition: all var(--duration);
}

@media (max-width: 768px) {
    .mvm-menu-toggle { display: block; }
    .mvm-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--noir-card);
        flex-direction: column;
        justify-content: center;
        padding: var(--space-xl);
        transition: right var(--duration) var(--ease-out);
        border-left: 1px solid var(--noir-border);
    }
    .mvm-nav.open { right: 0; }
    .mvm-nav a { font-size: 1.1rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.mvm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 36px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Gold primary button */
.mvm-btn--gold {
    background: linear-gradient(135deg, var(--or), #B8942F);
    color: var(--noir);
    box-shadow: 0 4px 20px var(--or-glow);
}
.mvm-btn--gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201,168,76,0.4);
    color: var(--noir);
}
.mvm-btn--gold:active { transform: translateY(0); }

/* Outline ghost button */
.mvm-btn--outline {
    background: transparent;
    color: var(--or);
    border: 1px solid var(--or);
}
.mvm-btn--outline:hover {
    background: var(--or);
    color: var(--noir);
}

/* Large button */
.mvm-btn--lg {
    padding: 18px 48px;
    font-size: 1.05rem;
}

/* Shimmer effect */
.mvm-btn--gold::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s var(--ease-out);
}
.mvm-btn--gold:hover::before { left: 125%; }

/* ============================================================
   CARDS
   ============================================================ */
.mvm-card {
    background: var(--noir-card);
    border: 1px solid var(--noir-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--duration) var(--ease-out);
    position: relative;
    overflow: hidden;
}
.mvm-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--or-glow), transparent);
}
.mvm-card:hover {
    border-color: rgba(201,168,76,0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.mvm-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--or-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
    color: var(--or);
}

.mvm-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.mvm-card__text { color: var(--gris); font-size: 0.95rem; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.mvm-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: var(--space-3xl) var(--space-lg);
    overflow: hidden;
}

/* Radial glow behind hero */
.mvm-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated gold line */
.mvm-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--or), transparent);
    animation: shimmerLine 4s ease-in-out infinite;
}

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

.mvm-hero__content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.mvm-hero__badge {
    display: inline-block;
    padding: 6px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--or);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-lg);
    background: var(--or-subtle);
}

.mvm-hero__title {
    margin-bottom: var(--space-lg);
}

.mvm-hero__subtitle {
    font-size: 1.15rem;
    color: var(--blanc-soft);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.8;
}

.mvm-hero__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   FEATURE SECTIONS
   ============================================================ */
.mvm-features__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.mvm-steps {
    counter-reset: step;
}

.mvm-step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    align-items: start;
}

.mvm-step__number {
    counter-increment: step;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--or);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--or);
    flex-shrink: 0;
}

.mvm-step__title {
    font-size: 1.15rem;
    margin-bottom: var(--space-xs);
    color: var(--blanc);
}

.mvm-step__text {
    color: var(--gris);
    font-size: 0.95rem;
}

/* ============================================================
   PRICING
   ============================================================ */
.mvm-pricing-card {
    background: var(--noir-card);
    border: 1px solid var(--noir-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--duration) var(--ease-out);
}

.mvm-pricing-card--featured {
    border-color: var(--or);
    background: linear-gradient(180deg, rgba(201,168,76,0.05) 0%, var(--noir-card) 100%);
}
.mvm-pricing-card--featured::before {
    content: 'POPULAIRE';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--or);
    color: var(--noir);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 40px;
    transform: rotate(45deg);
}

.mvm-pricing__name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
}

.mvm-pricing__price {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--or);
    margin-bottom: var(--space-sm);
}
.mvm-pricing__price small { font-size: 1rem; color: var(--gris); }

.mvm-pricing__features {
    list-style: none;
    margin: var(--space-xl) 0;
    text-align: left;
}
.mvm-pricing__features li {
    padding: var(--space-sm) 0;
    color: var(--blanc-soft);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mvm-pricing__features li::before {
    content: '✦';
    color: var(--or);
    margin-right: var(--space-sm);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.mvm-testimonial {
    background: var(--noir-card);
    border: 1px solid var(--noir-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
}
.mvm-testimonial::before {
    content: '"';
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--or);
    opacity: 0.3;
    position: absolute;
    top: 10px;
    left: 20px;
    line-height: 1;
}
.mvm-testimonial__text {
    font-style: italic;
    color: var(--blanc-soft);
    margin-bottom: var(--space-md);
    padding-top: var(--space-md);
}
.mvm-testimonial__author {
    font-weight: 600;
    color: var(--or);
    font-size: 0.9rem;
}

/* ============================================================
   FORMS (override plugin forms within theme)
   ============================================================ */
.mvm-form-group { margin-bottom: var(--space-lg); }
.mvm-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--blanc-soft);
    margin-bottom: var(--space-sm);
}

input.mvm-input,
textarea.mvm-input,
.mvm-input {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--blanc);
    background: var(--noir-surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    transition: border-color var(--duration), box-shadow var(--duration);
    outline: none;
}
input.mvm-input:focus,
textarea.mvm-input:focus,
.mvm-input:focus {
    border-color: var(--or);
    box-shadow: 0 0 0 3px var(--or-glow);
}
input.mvm-input::placeholder { color: var(--gris); }

/* ============================================================
   FOOTER
   ============================================================ */
.mvm-footer {
    background: var(--noir);
    border-top: 1px solid var(--noir-border);
    padding: var(--space-2xl) 0 var(--space-xl);
}

.mvm-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.mvm-footer__brand .mvm-logo { margin-bottom: var(--space-md); }
.mvm-footer__brand p { color: var(--gris); font-size: 0.9rem; max-width: 300px; }

.mvm-footer__col h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--or);
    margin-bottom: var(--space-md);
}
.mvm-footer__col a {
    display: block;
    color: var(--gris);
    padding: var(--space-xs) 0;
    font-size: 0.9rem;
}
.mvm-footer__col a:hover { color: var(--or); }

.mvm-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gris);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .mvm-footer__grid { grid-template-columns: 1fr 1fr; }
    .mvm-footer__bottom { flex-direction: column; gap: var(--space-sm); }
}

/* ============================================================
   MEMBER DASHBOARD OVERRIDES
   ============================================================ */
.mvm-dashboard {
    padding-top: 100px;
}

.mvm-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.mvm-dashboard__welcome {
    font-family: var(--font-display);
    font-size: 1.8rem;
}
.mvm-dashboard__welcome span { color: var(--or); }

/* Override plugin stat cards */
.mvm-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: var(--space-md) !important;
}
.mvm-stat-card {
    background: var(--noir-card) !important;
    border: 1px solid var(--noir-border) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-lg) !important;
    text-align: center;
}
.mvm-stat-number {
    display: block !important;
    font-family: var(--font-display) !important;
    font-size: 2rem !important;
    color: var(--or) !important;
}
.mvm-stat-highlight { border-color: var(--or) !important; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.mvm-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.mvm-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.mvm-stagger > * { opacity: 0; transform: translateY(20px); transition: all 0.6s var(--ease-out); }
.mvm-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.mvm-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.mvm-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.mvm-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.mvm-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.mvm-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }
.mvm-stagger.visible > * { opacity: 1; transform: translateY(0); }

/* Gold pulse ring */
@keyframes goldPulse {
    0% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
    70% { box-shadow: 0 0 0 20px rgba(201,168,76,0); }
    100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}
.mvm-pulse { animation: goldPulse 2s infinite; }

/* Float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.mvm-float { animation: float 3s ease-in-out infinite; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mvm-mb-0 { margin-bottom: 0 !important; }
.mvm-mb-sm { margin-bottom: var(--space-sm); }
.mvm-mb-md { margin-bottom: var(--space-md); }
.mvm-mb-lg { margin-bottom: var(--space-lg); }
.mvm-mb-xl { margin-bottom: var(--space-xl); }
.mvm-mt-xl { margin-top: var(--space-xl); }
.mvm-pt-header { padding-top: 80px; }
.mvm-hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .mvm-hero { padding: var(--space-2xl) var(--space-md); min-height: 90vh; }
    .mvm-section { padding: var(--space-2xl) 0; }
    .mvm-step { grid-template-columns: 50px 1fr; }
    .mvm-step__number { width: 48px; height: 48px; font-size: 1.2rem; }
    .mvm-pricing-card { padding: var(--space-xl); }
}

/* ============================================================
   WORDPRESS ADMIN BAR ADJUSTMENT
   ============================================================ */
body.admin-bar .mvm-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .mvm-header { top: 46px; } }

/* ============================================================
   WP BLOCK EDITOR / CONTENT STYLES
   ============================================================ */
.entry-content { max-width: 800px; margin: 0 auto; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { margin: 2em 0 0.5em; }
.entry-content h3 { margin: 1.5em 0 0.5em; }
.entry-content ul, .entry-content ol {
    margin: 1em 0 1em 1.5em;
    color: var(--blanc-soft);
}
.entry-content blockquote {
    border-left: 3px solid var(--or);
    padding-left: var(--space-lg);
    margin: 1.5em 0;
    font-style: italic;
    color: var(--blanc-soft);
}
.entry-content code {
    font-family: var(--font-mono);
    background: var(--noir-surface);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--or-light);
}
