/* ============================================================
   URLW — Styles custom (App + Landing)
   ============================================================ */

/* --- Variables CSS --- */
:root {
    --uw-brand: #4f46e5;
    --uw-brand-dark: #4338ca;
    --uw-brand-light: #eef2ff;
    --uw-success: #198754;
    --uw-warning: #F59E0B;
    --uw-danger: #DC3545;
    --uw-text: #0F172A;
    --uw-text-secondary: #64748B;
    --uw-text-muted: #94A3B8;
    --uw-surface: #F8FAFC;
    --uw-border: #E2E8F0;
}

/* --- Base body --- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--uw-text);
    background: var(--uw-surface);
    line-height: 1.6;
}

/* ============================================================
   App layout
   ============================================================ */

/* App Navbar */
.uw-app-navbar {
    background: #fff;
    border-bottom: 1px solid var(--uw-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.uw-app-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--uw-text);
    letter-spacing: -0.5px;
}
.uw-app-navbar .nav-link {
    color: var(--uw-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all 0.15s;
}
.uw-app-navbar .nav-link:hover,
.uw-app-navbar .nav-link.active {
    color: var(--uw-brand);
    background: var(--uw-brand-light);
}
.uw-app-navbar .nav-link i { margin-right: 4px; }

/* Cards (app) */
.uw-card {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 12px;
    transition: all 0.2s;
}
.uw-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Counter cards */
.uw-counter {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s;
}
.uw-counter:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.uw-counter h2 { font-size: 2rem; font-weight: 700; margin: 0; }
.uw-counter small { color: var(--uw-text-muted); font-weight: 500; }

/* Tables */
.uw-table { border-radius: 12px; overflow: hidden; }
.uw-table .table { margin-bottom: 0; }
.uw-table .table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--uw-text-secondary);
    border-bottom: 2px solid var(--uw-border);
}
.uw-table .table td { vertical-align: middle; }
.uw-table .table tbody tr { transition: background 0.15s; }
.uw-table .table tbody tr:hover { background: var(--uw-brand-light); }

/* Buttons (app — compact) */
.btn-uw-primary, a.btn-uw-primary, button.btn-uw-primary {
    background: var(--uw-brand) !important;
    color: #fff !important;
    border: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-uw-primary:hover, a.btn-uw-primary:hover, button.btn-uw-primary:hover {
    background: var(--uw-brand-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* Page header */
.uw-page-header h4 {
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--uw-text);
}
.uw-page-header p { color: var(--uw-text-muted); }

/* Quick link cards */
.uw-quick-link {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    color: var(--uw-text);
}
.uw-quick-link:hover {
    border-color: var(--uw-brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.1);
    color: var(--uw-brand);
}
.uw-quick-link i { font-size: 1.5rem; color: var(--uw-brand); }

/* Filters */
.uw-filters {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 12px;
    padding: 12px 16px;
}

/* ============================================================
   Landing page
   ============================================================ */

/* Landing Navbar */
.uw-navbar {
    background: #fff;
    border-bottom: 1px solid var(--uw-border);
    padding: 16px 0;
    z-index: 1050;
}
.uw-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--uw-text);
    letter-spacing: -0.5px;
}
.uw-navbar .nav-link {
    color: var(--uw-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}
.uw-navbar .nav-link:hover { color: var(--uw-brand); }

/* Hero */
.uw-hero {
    padding: 100px 0 80px;
    background: linear-gradient(180deg, var(--uw-brand-light) 0%, #fff 100%);
}
.uw-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--uw-text);
}
.uw-hero .lead {
    font-size: 1.2rem;
    color: var(--uw-text-secondary);
    max-width: 560px;
}

/* Buttons (landing — larger) */
.btn-uw-outline, a.btn-uw-outline, button.btn-uw-outline {
    background: transparent !important;
    color: var(--uw-brand) !important;
    border: 2px solid var(--uw-brand) !important;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-uw-outline:hover, a.btn-uw-outline:hover, button.btn-uw-outline:hover {
    background: var(--uw-brand-light) !important;
    color: var(--uw-brand-dark) !important;
    border: 2px solid var(--uw-brand-dark) !important;
}

/* Sections */
.uw-section {
    padding: 80px 0;
}
.uw-section-alt {
    background: var(--uw-surface);
}
.uw-section h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.uw-section .section-lead {
    font-size: 1.1rem;
    color: var(--uw-text-secondary);
    max-width: 600px;
}

/* Feature icons */
.icon-indigo { background: var(--uw-brand-light); color: var(--uw-brand); }
.icon-green { background: #D1FAE5; color: var(--uw-success); }
.icon-amber { background: #FEF3C7; color: #D97706; }
.icon-red { background: #FEE2E2; color: var(--uw-danger); }

/* Pricing */
.uw-pricing-card {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 16px;
    padding: 40px 32px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.uw-pricing-card > ul:last-of-type {
    margin-bottom: auto !important;
}
.uw-pricing-card > a:last-child,
.uw-pricing-card > div:last-child {
    margin-top: auto;
}
.uw-pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.uw-pricing-card.popular {
    border: 2px solid var(--uw-brand);
    box-shadow: 0 8px 24px rgba(79,70,229,0.12);
}
.uw-pricing-card .price {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}
.uw-pricing-card .price-period {
    color: var(--uw-text-muted);
    font-size: 0.95rem;
}

/* Footer */
.uw-footer {
    background: var(--uw-text);
    color: var(--uw-text-muted);
    padding: 60px 0 40px;
}
.uw-footer a { color: var(--uw-text-muted); text-decoration: none; }
.uw-footer a:hover { color: #fff; }
.uw-footer h6 { color: #fff; font-weight: 600; margin-bottom: 16px; }

/* Final CTA */
.uw-final-cta {
    background: var(--uw-brand);
    color: #fff;
    padding: 80px 0;
}
.uw-final-cta h2 { color: #fff; }
.uw-final-cta p { color: rgba(255,255,255,0.8); }

/* ============================================================
   Toast notifications
   ============================================================ */
#uw-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    min-width: 300px;
    max-width: 380px;
}
.uw-toast {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-bottom: 0.5rem;
}

/* ============================================================
   Empty states
   ============================================================ */
.uw-empty-state {
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--uw-text-secondary);
}
.uw-empty-state .uw-empty-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.55;
}
.uw-empty-state p {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* ============================================================
   Turbo progress bar
   ============================================================ */
.turbo-progress-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--uw-brand) 0%, #818cf8 100%);
}

/* ============================================================
   Page transitions
   ============================================================ */
@keyframes uw-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.uw-page-enter {
    animation: uw-fade-in 0.22s ease-out;
}

/* ============================================================
   Loading state
   ============================================================ */
.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.18s ease;
    position: relative;
}

/* ============================================================
   Link row card
   ============================================================ */
.uw-link-card {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s;
}
.uw-link-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.uw-link-card .short-url {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--uw-brand);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .uw-hero h1 { font-size: 2rem; }
    .uw-hero { padding: 60px 0 40px; }
    .uw-section { padding: 60px 0; }
    .uw-pricing-card { margin-bottom: 16px; }
}

/* ============================================================
   Landing — Hero code block
   ============================================================ */
.uw-hero-code {
    max-width: 680px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: left;
}
.uw-code-header {
    background: #293548;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.uw-code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.uw-code-body {
    padding: 20px;
    margin: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.7;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    overflow-x: auto;
}
.uw-code-body code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* ============================================================
   Landing — Trust strip
   ============================================================ */
.uw-trust-strip {
    background: #fff;
    border-top: 1px solid var(--uw-border);
    border-bottom: 1px solid var(--uw-border);
    padding: 20px 0;
}
.uw-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--uw-text-secondary);
    padding: 6px 16px;
}

/* ============================================================
   Landing — Problème
   ============================================================ */
.uw-problem-list li {
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--uw-text);
}
.uw-problem-vs { }
.uw-problem-bad {
    background: #fff5f5;
    border: 1px solid #fecaca;
}
.uw-problem-good {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* ============================================================
   Landing — Steps (Comment ça marche)
   ============================================================ */
.uw-step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--uw-brand);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(79,70,229,0.25);
}

/* ============================================================
   Landing — Feature cards
   ============================================================ */
.uw-feature-card {
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 12px;
    transition: all 0.2s;
}
.uw-feature-card:hover {
    border-color: var(--uw-brand);
    box-shadow: 0 4px 16px rgba(79,70,229,0.1);
    transform: translateY(-2px);
}
.uw-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--uw-brand-light);
    color: var(--uw-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* ============================================================
   Landing — Dashboard mock
   ============================================================ */
.uw-dashboard-mock {
    max-width: 860px;
    background: #fff;
    border: 1px solid var(--uw-border);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.08);
}
.uw-dashboard-header {
    background: #f8fafc;
}
.uw-showcase-table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--uw-text-secondary);
}

/* ============================================================
   Landing — FAQ
   ============================================================ */
.uw-faq .accordion-button {
    background: #fff;
    color: var(--uw-text);
    font-size: 0.95rem;
}
.uw-faq .accordion-button:not(.collapsed) {
    background: var(--uw-brand-light);
    color: var(--uw-brand);
    box-shadow: none;
}
.uw-faq .accordion-button::after {
    filter: none;
}

/* ============================================================
   Static pages
   ============================================================ */
.uw-static-page {
    min-height: 70vh;
}
.uw-static-content h2 {
    font-size: 1.2rem;
    color: var(--uw-text);
}
.uw-static-content p,
.uw-static-content li {
    font-size: 0.95rem;
    color: var(--uw-text-secondary);
}
.uw-static-content a {
    color: var(--uw-brand);
}
.uw-static-content dt {
    font-size: 0.95rem;
}
.uw-toc {
    border-radius: 8px !important;
}
.uw-code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    overflow-x: auto;
    line-height: 1.7;
}
.uw-code-block code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
