/**
 * Styles pour la page d'accueil
 * ME - Bio Link Platform
 */

:root {
    --primary-color: #5865F2;
    --primary-dark: #4752C4;
    --secondary-color: #5865F2;
    --accent-color: #5865F2;
    --background-color: #1E1F22;
    --surface-color: #2B2D31;
    --card-color: #2B2D31;
    --text-primary: #F2F3F5;
    --text-secondary: #B5BAC1;
    --text-muted: #B5BAC1;
    --border-color: #3C3F45;
    --success-color: #3BA55D;
    --warning-color: #F59E0B;
    --error-color: #ED4245;
    --info-color: #5865F2;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(30, 31, 34, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-login {
    color: var(--text-primary);
}

.nav-register {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-register:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.nav-dashboard {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-dashboard:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--card-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #3C3F45;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 18px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: var(--surface-color);
    border-radius: 40px;
    padding: 20px;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--background-color);
    border-radius: 30px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.mockup-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
}

.mockup-info {
    flex: 1;
}

.mockup-name {
    height: 20px;
    background: var(--text-primary);
    border-radius: 4px;
    margin-bottom: 8px;
    width: 80%;
}

.mockup-bio {
    height: 12px;
    background: var(--text-secondary);
    border-radius: 4px;
    width: 60%;
}

.mockup-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-link {
    height: 50px;
    background: var(--card-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Features */
.features {
    padding: 120px 0;
    background: var(--surface-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Demo */
.demo {
    padding: 120px 0;
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
}

.demo-3d {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 40px 0;
    perspective: 1200px;
    transform-style: preserve-3d;
    min-height: 600px;
}

.demo-phone {
    width: 300px;
    height: 533px; /* Ratio 9:16 exact */
    background: var(--surface-color);
    border-radius: 40px;
    padding: 18px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    border: 3px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
}

.phone-center {
    transform: translateZ(0) scale(1);
    z-index: 3;
    opacity: 1;
}

.phone-left {
    transform: rotateY(-20deg) translateX(-80px) translateZ(-80px) scale(0.9);
    z-index: 1;
    opacity: 0.7;
}

.phone-right {
    transform: rotateY(20deg) translateX(80px) translateZ(-80px) scale(0.9);
    z-index: 1;
    opacity: 0.7;
}

/* Effets hover pour les téléphones */
.demo-phone:hover {
    transform: scale(1.02) !important;
    opacity: 1 !important;
    z-index: 10 !important;
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.phone-left:hover {
    transform: rotateY(-15deg) translateX(-60px) translateZ(-40px) scale(1.02) !important;
}

.phone-right:hover {
    transform: rotateY(15deg) translateX(60px) translateZ(-40px) scale(1.02) !important;
}

.phone-center:hover {
    transform: translateZ(30px) scale(1.02) !important;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--background-color);
    border-radius: 32px;
    padding: 25px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
    position: relative;
}

.bio-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.bio-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 5px;
    text-align: center;
}

.bio-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 18px;
    text-align: center;
}

.bio-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.bio-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.bio-link:hover {
    background: #3C3F45;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.link-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Pricing */
.pricing {
    padding: 120px 0;
    background: var(--surface-color);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
}

.pricing-header {
    margin-bottom: 40px;
}

.pricing-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price-currency {
    font-size: 20px;
    color: var(--text-secondary);
}

.price-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
}

.price-period {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-features {
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    text-align: left;
}

.feature-check {
    color: var(--success-color);
    font-weight: 600;
}

.pricing-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pricing-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* CTA */
.cta {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
}

.cta .btn-primary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cta .btn-primary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.btn-large {
    padding: 20px 40px;
    font-size: 18px;
}

/* Footer */
.footer {
    background: var(--surface-color);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 400px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.brand-icon {
    font-size: 32px;
}

.brand-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer-copyright {
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--surface-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        transition: var(--transition);
        z-index: 999;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    /* Demo responsive - Carousel horizontal */
    .demo-3d {
        flex-direction: row;
        gap: 0;
        padding: 40px 0;
        min-height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .demo-3d::-webkit-scrollbar {
        display: none;
    }
    
    .demo-phone {
        width: 250px;
        height: 444px; /* Ratio 9:16 pour mobile */
        margin: 0 15px;
        scroll-snap-align: center;
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        z-index: 1 !important;
    }
    
    .phone-left,
    .phone-right,
    .phone-center {
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        z-index: 1 !important;
    }
    
    .demo-phone:hover {
        transform: translateY(-5px) scale(1.02) !important;
    }
    
    /* Indicateurs de scroll */
    .demo-container::after {
        content: "← Glissez pour voir plus →";
        display: block;
        text-align: center;
        color: var(--text-secondary);
        font-size: 12px;
        margin-top: 20px;
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 20px 60px;
    }
    
    /* Ajustements pour très petits écrans */
    .demo-phone {
        width: 220px;
        height: 391px; /* Ratio 9:16 pour très petits écrans */
    }
    
    .bio-avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .bio-name {
        font-size: 14px;
    }
    
    .bio-title {
        font-size: 12px;
    }
    
    .bio-link {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 18px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}