/* ============================================
   WORKLY - Website
   Couleur principale : #903f9e (Violet)
   Design moderne avec animations
   ============================================ */

/* === VARIABLES CSS === */
:root {
    --primary-color: #903f9e;
    --primary-dark: #6d2d77;
    --primary-light: #b05baf;
    --secondary-color: #1a1a2e;
    --background: #0f0f1e;
    --surface: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d1;
    --accent: #ff6b9d;
    --success: #4ecca3;
    --gradient-1: linear-gradient(135deg, var(--primary-color) 0%, var(--accent) 100%);
    --gradient-2: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    --shadow: 0 10px 40px rgba(144, 63, 158, 0.3);
    --shadow-hover: 0 15px 50px rgba(144, 63, 158, 0.5);
}

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

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(144, 63, 158, 0.2);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 30px rgba(144, 63, 158, 0.4);
}

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

.navbar .logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar .logo:hover {
    transform: scale(1.05);
}

.navbar .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--text-primary);
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 7rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(144, 63, 158, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(50px, 50px) rotate(180deg); }
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* === SECTIONS === */
.section {
    padding: 5rem 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.card {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(144, 63, 158, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.feature-item {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

/* === FOOTER === */
.footer {
    background: var(--surface);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(144, 63, 158, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === SCROLL ANIMATIONS === */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* === API PAGE SPECIFIC === */
.endpoint-card {
    background: var(--surface);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.endpoint-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
}

.endpoint-card h3 {
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.endpoint-card .url {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: var(--success);
    margin: 1rem 0;
    word-break: break-all;
    border: 1px solid rgba(144, 63, 158, 0.3);
}

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

/* === LEGAL PAGES === */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: 20px;
    line-height: 1.8;
}

.legal-content h2 {
    color: var(--primary-light);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.legal-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-content ul {
    color: var(--text-secondary);
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.last-updated {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(144, 63, 158, 0.2);
}
