/* ==========================================================================
   DESIGN SYSTEM & VARIABLES — Vitrine Local AI Studio
   ========================================================================== */

:root {
    --bg-dark: #07070a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --border-color: rgba(255, 255, 255, 0.06);
    --accent: #8b5cf6; /* Violet */
    --accent-glow: rgba(139, 92, 246, 0.35);
    --accent-secondary: #06b6d4; /* Cyan */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', sans-serif;
    --success: #10b981;
    --danger: #ef4444;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
}

body {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Glowing Orbs */
.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}
.glow-1 {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}
.glow-2 {
    top: 600px;
    left: -200px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Class Utils */
.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

.text-gradient {
    background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c084fc;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: var(--font-title);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 7, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    font-family: var(--font-title);
    box-shadow: 0 0 10px var(--accent-glow);
}
.logo-text {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}
nav a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
}
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero h1 {
    font-family: var(--font-title);
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    max-width: 800px;
}
.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 36px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 64px;
}

/* Hero Mockup (App Visual simulation) */
.hero-mockup {
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16/10;
    display: flex;
    flex-direction: column;
}
.mockup-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.mockup-title {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-left: 8px;
}
.mockup-body {
    flex: 1;
    background: rgba(0,0,0,0.15);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.mockup-chat {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}
.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}
.chat-msg.assistant .msg-avatar {
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    font-size: 10px;
}
.font-logo {
    font-family: var(--font-title);
}
.msg-text {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 8px 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-primary);
}
.chat-msg.user .msg-text {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
    border-radius: 8px 0 8px 8px;
}

/* Inline Validation UI Simulation */
.mockup-validation {
    margin-top: 12px;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.05);
}
.validation-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}
.tool-tag {
    font-size: 10px;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}
.validation-args {
    font-size: 11.5px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.2);
    padding: 6px 8px;
    border-radius: 4px;
}
.validation-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
}
.btn-mock {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn-approve {
    background: var(--accent);
    color: #fff;
}
.btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Features Grid */
.features {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}
.section-title {
    text-align: center;
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.section-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 64px auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.card {
    padding: 32px;
    border-radius: 12px;
    transition: all 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}
.card-icon {
    font-size: 28px;
    margin-bottom: 20px;
}
.card h3 {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Security Focus Section */
.security-focus {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}
.security-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.security-text h2 {
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
}
.security-text p {
    color: var(--text-secondary);
    font-size: 15.5px;
    margin-bottom: 24px;
    line-height: 1.6;
}
.security-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.security-list li {
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}
.security-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}
.security-list strong {
    color: var(--text-primary);
}

.security-visual {
    border-radius: 12px;
    padding: 32px;
}
.mcp-permissions-mock {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.perm-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-family: var(--font-title);
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}
.tag-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}
.tag-badge.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.tag-badge.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Download Section */
.download {
    padding: 100px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.download h2 {
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.download-desc {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 64px auto;
}
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
.download-card {
    border-radius: 12px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.dl-os {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}
.dl-details {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.btn-dl {
    width: 100%;
}
.github-link-note {
    font-size: 13.5px;
    color: var(--text-muted);
}
.github-link-note a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
    background: #040406;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-left p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}
.footer-right p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 44px;
    }
    .features-grid, .download-grid {
        grid-template-columns: 1fr 1fr;
    }
    .security-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    .hero-desc {
        font-size: 16px;
    }
    .features-grid, .download-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    .footer-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    nav {
        display: none;
    }
}

/* ==========================================================================
   TARIFS (pricing) — ajouté pour l'offre freemium
   ========================================================================== */
.pricing { padding: 100px 0; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
    align-items: stretch;
}
.plan-card { display: flex; flex-direction: column; gap: 18px; position: relative; padding: 32px; }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 50px var(--accent-glow); }
.plan-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
}
.plan-name { font-family: var(--font-title); font-size: 1.3rem; }
.plan-price { font-family: var(--font-title); font-size: 2.4rem; font-weight: 800; }
.plan-price span { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-list li { position: relative; padding-left: 26px; color: var(--text-secondary); font-size: 0.92rem; }
.plan-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.pricing-note { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 32px; }

/* Téléchargement indisponible (mac : en cours d'implémentation) */
.download-card.soon { opacity: 0.6; }
.btn.disabled { pointer-events: none; opacity: 0.7; cursor: default; }

/* ==========================================================================
   MODALES (espace client, compte, téléchargement) + TOAST
   ========================================================================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); padding: 20px;
}
.modal {
    width: min(440px, 100%); position: relative;
    padding: 32px; border-radius: 20px;
    display: flex; flex-direction: column; gap: 14px;
}
.modal h3 { font-family: var(--font-title); font-size: 1.4rem; }
.modal-sub { color: var(--text-secondary); font-size: 0.85rem; }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
}
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal input {
    padding: 12px 15px; border-radius: 12px;
    border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary); font-size: 0.92rem; font-family: inherit; outline: none;
}
.modal input:focus { border-color: var(--accent); }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.85rem; }
.form-error { color: var(--danger); font-size: 0.85rem; }
.account-row { display: flex; justify-content: space-between; font-size: 0.92rem; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.account-row span { color: var(--text-secondary); }
.account-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.btn.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); }
#btn-account { cursor: pointer; font-family: inherit; }

.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
    z-index: 2500; background: #16161f; border: 1px solid var(--border-color);
    color: var(--text-primary); padding: 13px 22px; border-radius: 14px;
    font-size: 0.88rem; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}
[hidden] { display: none !important; }
