@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-primary: #0f172a;
    --color-primary-light: #1e3a5f;
    --color-accent: #10b981;
    --color-accent-hover: #059669;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-success-bg: #ecfdf5;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
    --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0b1120;
        --color-surface: #111827;
        --color-text: #f1f5f9;
        --color-muted: #94a3b8;
        --color-border: #1e293b;
        --color-primary: #f1f5f9;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-hover); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; width: auto; height: auto; clip: auto; padding: .5rem 1rem; background: var(--color-accent); color: #fff; z-index: 9999; }

/* Header */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.nav-main { display: none; gap: 1.5rem; }
.nav-main a { color: var(--color-text); text-decoration: none; font-weight: 500; }
.header-actions { display: none; gap: .5rem; }
@media (min-width: 768px) { .nav-main, .header-actions { display: flex; } .nav-toggle { display: none; } }

.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; font-weight: 700; }
.logo-mark { width: 36px; height: 36px; background: var(--color-accent); color: #fff; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.5rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: none; cursor: pointer; font-size: .9375rem; transition: transform var(--transition), opacity var(--transition); font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* Hero */
.hero { padding: 4rem 0 5rem; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); color: #fff; }
.hero-badge { display: inline-block; background: rgba(16,185,129,.2); color: #6ee7b7; padding: .25rem .75rem; border-radius: 999px; font-size: .875rem; font-weight: 600; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin: 0 0 1rem; font-weight: 800; }
.hero-lead { font-size: 1.125rem; opacity: .9; max-width: 540px; margin-bottom: 2rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.hero-demo { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hero-demo input { flex: 1; min-width: 200px; padding: .875rem 1rem; border: 2px solid transparent; border-radius: var(--radius); font-size: 1rem; }
.hero-note { font-size: .875rem; opacity: .7; }
.mockup-card { background: var(--color-surface); color: var(--color-text); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-lg); }
.score-ring { width: 80px; height: 80px; border-radius: 50%; border: 6px solid var(--color-accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.25rem; margin-bottom: 1rem; }
.demo-results { background: rgba(255,255,255,.1); border-radius: var(--radius); padding: 1rem; margin-top: 1rem; }
.demo-result-item { padding: .75rem; background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-sm); margin-bottom: .5rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; margin: 0 0 .5rem; }
.section-lead { text-align: center; color: var(--color-muted); margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat-card { background: var(--color-surface); padding: 1.5rem; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.stat-card strong { display: block; font-size: 2rem; color: var(--color-accent); }

.steps-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card { background: var(--color-surface); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.step-num { display: inline-flex; width: 40px; height: 40px; background: var(--color-accent); color: #fff; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 1rem; }

.metiers-band { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.metier-chip { padding: .5rem 1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; text-decoration: none; color: var(--color-text); font-size: .875rem; transition: border-color var(--transition); }
.metier-chip:hover { border-color: var(--color-accent); }

.cta-box { background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #fff; padding: 3rem; border-radius: var(--radius); text-align: center; }

/* Cards & badges */
.card { background: var(--color-surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--color-border); }
.badge { display: inline-block; padding: .25rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-high, .badge-haute { background: #fef2f2; color: #dc2626; }
.badge-medium, .badge-moyenne { background: #fffbeb; color: #d97706; }
.badge-low, .badge-basse { background: #f0fdf4; color: #16a34a; }

/* Footer */
.site-footer { background: var(--color-primary); color: #94a3b8; padding: 3rem 0 1rem; margin-top: 4rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer h3 { color: #fff; font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 2rem; padding-top: 1rem; font-size: .875rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: .5rem; }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; z-index: 200; box-shadow: 0 -4px 20px rgba(0,0,0,.1); }

/* App layout */
.app-body { background: var(--color-bg); }
.app-shell { display: grid; min-height: 100vh; }
@media (min-width: 768px) { .app-shell { grid-template-columns: 260px 1fr; } }
.app-sidebar { background: var(--color-primary); color: #fff; padding: 1.5rem; }
.app-sidebar .logo { color: #fff; margin-bottom: 2rem; }
.app-sidebar nav { display: flex; flex-direction: column; gap: .25rem; }
.app-sidebar nav a { color: #94a3b8; text-decoration: none; padding: .75rem 1rem; border-radius: var(--radius-sm); transition: background var(--transition); }
.app-sidebar nav a:hover, .app-sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.app-main { padding: 2rem; }
.sidebar-logout { margin-top: 2rem; }

/* Dashboard */
.dashboard-header { margin-bottom: 2rem; }
.score-gauge { width: 160px; height: 160px; position: relative; }
.score-gauge-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; }
.dashboard-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .dashboard-grid { grid-template-columns: 1fr 2fr; } }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .5rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: .75rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; background: var(--color-surface); color: var(--color-text); }
.form-group input:focus, .form-group select:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.alert-success { background: var(--color-success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.table th { font-weight: 600; font-size: .875rem; color: var(--color-muted); }

/* Pricing */
.pricing-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.pricing-card { background: var(--color-surface); border: 2px solid var(--color-border); border-radius: var(--radius); padding: 2rem; }
.pricing-card.featured { border-color: var(--color-accent); }
.pricing-price { font-size: 2.5rem; font-weight: 800; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--color-muted); }

/* Copilot chat */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 8rem); max-height: 600px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.chat-message { max-width: 80%; padding: 1rem; border-radius: var(--radius); }
.chat-message-user { align-self: flex-end; background: var(--color-accent); color: #fff; }
.chat-message-bot { align-self: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); }
.chat-input { display: flex; gap: .5rem; padding: 1rem; border-top: 1px solid var(--color-border); }
.chat-input input { flex: 1; }

/* Admin */
.admin-body { background: #f1f5f9; }
.admin-shell { display: grid; min-height: 100vh; }
@media (min-width: 768px) { .admin-shell { grid-template-columns: 240px 1fr; } }
.admin-sidebar { background: #0f172a; color: #fff; padding: 1.5rem; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: .25rem; margin: 1.5rem 0; }
.admin-sidebar nav a { color: #94a3b8; text-decoration: none; padding: .5rem .75rem; border-radius: var(--radius-sm); }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { padding: 2rem; }

/* Onboarding */
.onboarding-progress { height: 4px; background: var(--color-border); border-radius: 2px; margin-bottom: 2rem; overflow: hidden; }
.onboarding-progress-bar { height: 100%; background: var(--color-accent); transition: width .3s ease; }
.onboarding-card { max-width: 520px; margin: 0 auto; }

/* Obligation list */
.obligation-list { display: flex; flex-direction: column; gap: .75rem; }
.obligation-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: var(--color-surface); border-radius: var(--radius); border: 1px solid var(--color-border); text-decoration: none; color: inherit; transition: border-color var(--transition); }
.obligation-item:hover { border-color: var(--color-accent); }

/* Page content */
.page-header { margin-bottom: 2rem; }
.page-header h1 { margin: 0 0 .5rem; font-size: 2rem; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2rem; }
.disclaimer { background: #fffbeb; border: 1px solid #fde68a; padding: 1rem; border-radius: var(--radius-sm); font-size: .875rem; margin: 2rem 0; }
