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

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal-item {
    opacity: 0;
    transform: var(--reveal-transform, translateY(20px));
    transition: opacity 0.6s ease var(--reveal-delay, 0s),
                transform 0.6s ease var(--reveal-delay, 0s);
}
.reveal-item.visible {
    opacity: 1;
    transform: none;
}

:root {
    --green-900: #0a2e1a;
    --green-800: #14532d;
    --green-700: #166534;
    --green-600: #16a34a;
    --green-500: #22c55e;
    --green-400: #4ade80;
    --green-100: #dcfce7;
    --green-50: #f0fdf4;

    --neutral-950: #0a0a0a;
    --neutral-900: #171717;
    --neutral-800: #262626;
    --neutral-700: #404040;
    --neutral-600: #525252;
    --neutral-500: #737373;
    --neutral-400: #a3a3a3;
    --neutral-300: #d4d4d4;
    --neutral-200: #e5e5e5;
    --neutral-100: #f5f5f5;
    --neutral-50: #fafafa;
    --white: #ffffff;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1120px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--neutral-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--neutral-200);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--green-600);
    font-size: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-600);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--neutral-900);
}

.nav-cta {
    background: var(--green-800);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--green-700) !important;
}

/* Language toggle */
.lang-toggle {
    background: transparent;
    border: 1.5px solid var(--green-800);
    color: var(--green-800);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    flex-shrink: 0;
}
.lang-toggle:hover {
    background: var(--green-800);
    color: var(--white);
}

/* Mobile toggle */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--neutral-700);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green-600);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--neutral-900);
    margin-bottom: 1.5rem;
    min-height: 120px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.typing-wrapper {
    display: inline;
}

#typing-text {
    color: var(--green-800);
}

.cursor {
    color: var(--green-600);
    font-weight: 300;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--neutral-600);
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--green-800);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--green-700);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--neutral-700);
    border: 1.5px solid var(--neutral-300);
}

.btn-secondary:hover {
    border-color: var(--neutral-400);
    background: var(--neutral-50);
}

.btn-full {
    width: 100%;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.data-card {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s ease forwards;
}

.data-card[data-delay="0"] { animation-delay: 0.3s; }
.data-card[data-delay="1"] { animation-delay: 0.5s; }
.data-card[data-delay="2"] { animation-delay: 0.7s; }
.data-card[data-delay="3"] { animation-delay: 0.9s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-800);
}

.data-label {
    font-size: 0.8rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* ===== SECTIONS COMMON ===== */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green-600);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.section-title br {
    display: block;
    content: "";
}

/* ===== FEATURES ===== */
.features {
    padding: 6rem 0;
    background: var(--neutral-50);
}

.features .section-tag,
.features .section-title {
    text-align: center;
}

.features-subtitle {
    text-align: center;
    color: var(--neutral-500);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-2px);
}

/* ── Active cards (MVP) ── */
.feature-card.active {
    border-color: var(--green-400);
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.1);
}

.feature-card.active:hover {
    border-color: var(--green-500);
    box-shadow: 0 4px 24px rgba(22, 163, 74, 0.15);
}

.feature-status {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
    background: var(--green-600);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

/* ── Locked cards (coming soon) ── */
.feature-card.locked {
    border-color: var(--neutral-100);
    background: var(--neutral-50);
}

.feature-card.locked:hover {
    border-color: var(--neutral-200);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.feature-card.locked .feature-icon {
    background: var(--neutral-100);
    color: var(--neutral-400);
    filter: blur(1px);
    opacity: 0.7;
}

.feature-card.locked h3 {
    color: var(--neutral-400);
    filter: blur(3px);
    user-select: none;
}

.feature-card.locked p {
    color: var(--neutral-300);
    filter: blur(3px);
    user-select: none;
}

.feature-soon {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-500);
    background: var(--neutral-200);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-50);
    color: var(--green-700);
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--neutral-500);
    line-height: 1.5;
}

/* ===== PRICING ===== */
.pricing {
    padding: 6rem 0;
}

.pricing .section-tag,
.pricing .section-title {
    text-align: center;
}

.pricing-subtitle {
    text-align: center;
    color: var(--neutral-500);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: all 0.25s;
}

.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.pricing-card.featured {
    border: 2px solid var(--green-600);
    box-shadow: 0 8px 32px rgba(22, 163, 74, 0.12);
    margin-top: 0.5rem;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-600);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
    margin-bottom: 1.5rem;
}

.pricing-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.75rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
}

.price-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--green-800);
}

.price-currency {
    font-size: 0.9rem;
    color: var(--neutral-500);
    font-weight: 500;
}

.price-period {
    font-size: 0.8rem;
    color: var(--neutral-400);
    margin-top: 0.25rem;
}

/* ── Toggle mensuel/annuel ── */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.75rem 0 1rem;
}
.toggle-label {
    font-size: 0.82rem;
    color: var(--neutral-400);
    cursor: pointer;
    transition: color 0.2s;
}
.toggle-label.toggle-active {
    color: var(--green-700);
    font-weight: 600;
}
.toggle-discount {
    background: var(--green-100, #dcfce7);
    color: var(--green-700);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--neutral-300, #d1d5db);
    border-radius: 999px;
    transition: background 0.3s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--green-600);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.pricing-features li {
    font-size: 0.88rem;
    color: var(--neutral-700);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.4;
}

.pricing-features li span:not(.check):not(.cross) {
    flex: 1;
}

.pricing-features li.disabled {
    color: var(--neutral-400);
}

.check {
    color: var(--green-600);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.cross {
    color: var(--neutral-300);
    font-size: 0.85rem;
    flex-shrink: 0;
    line-height: 1.4;
}

/* ===== ABOUT ===== */
.about {
    padding: 6rem 0;
    background: var(--neutral-50);
}

/* About Story */
.about-story {
    margin-bottom: 5rem;
}

.about-story-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

.about-story-text p {
    font-size: 1rem;
    color: var(--neutral-600);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-story-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green-800);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* About How */
.about-how {
    padding-top: 3rem;
    border-top: 1px solid var(--neutral-200);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-desc {
    font-size: 1.05rem;
    color: var(--neutral-600);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.step-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--green-600);
    background: var(--green-50);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.step h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.step p {
    font-size: 0.85rem;
    color: var(--neutral-500);
}

/* Chat Mockup */
.chat-mockup {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-bubble {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 90%;
}

.chat-bubble.user {
    background: var(--green-800);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ai-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green-600);
    margin-bottom: 0.5rem;
}

/* ===== BLOG ===== */
.blog {
    padding: 6rem 0;
}

.blog .section-tag,
.blog .section-title {
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.blog-img {
    height: 180px;
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-img-placeholder {
    font-size: 2.5rem;
    color: var(--green-400);
    opacity: 0.6;
}

.blog-body {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.blog-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green-600);
    background: var(--green-50);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--neutral-400);
}

.blog-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.blog-body > p {
    font-size: 0.85rem;
    color: var(--neutral-500);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--neutral-100);
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-800);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.author-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neutral-800);
}

.author-role {
    font-size: 0.75rem;
    color: var(--neutral-400);
}

.blog-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* ===== BLOG PAGE (blog.html) ===== */

.blog-page .nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.blog-list-section {
    padding: 0 0 4rem;
    min-height: 70vh;
}

/* ── Blog Hero Banner ── */
.blog-page-header {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 50%, var(--green-600) 100%);
    padding: 8rem 2rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.blog-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.blog-page-header .section-tag {
    color: var(--green-400);
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.blog-page-header .section-title {
    color: var(--white);
    text-align: center;
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.blog-page-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ── Category Filters ── */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding: 0 2rem;
}

.blog-filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1.5px solid var(--neutral-200);
    border-radius: 24px;
    background: var(--white);
    color: var(--neutral-600);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.blog-filter-btn:hover {
    border-color: var(--green-400);
    color: var(--green-700);
    background: var(--green-50);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
    transform: translateY(-1px);
}

.blog-filter-btn.active {
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    color: var(--white);
    border-color: var(--green-700);
    box-shadow: 0 3px 12px rgba(22, 101, 52, 0.25);
    transform: translateY(-1px);
}

.blog-card-link { cursor: pointer; }
.blog-card-anchor { text-decoration: none; color: inherit; display: block; }
.blog-card-anchor:hover { color: inherit; }

.blog-loading {
    display: flex;
    justify-content: center;
    padding: 4rem 0;
    grid-column: 1 / -1;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--green-600);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.blog-empty {
    text-align: center;
    padding: 3rem;
    color: var(--neutral-400);
    font-size: 0.95rem;
}

/* ── Article View ── */
.article-section {
    padding: 7rem 0 4rem;
    min-height: 70vh;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--green-700);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.article-back:hover { color: var(--green-900); }

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

.article-header { margin-bottom: 2rem; }

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.article-date { font-size: 0.85rem; color: var(--neutral-400); }
.article-views { font-size: 0.8rem; color: var(--neutral-400); }

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-900);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-excerpt {
    font-size: 1.1rem;
    color: var(--neutral-500);
    line-height: 1.6;
    font-style: italic;
}

.article-cover {
    height: 240px;
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.article-cover-icon {
    font-size: 4rem;
    color: var(--green-400);
    opacity: 0.5;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--neutral-800);
    margin-bottom: 2.5rem;
}

.article-content p { margin-bottom: 1.25rem; }

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 2rem 0 0.75rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--neutral-100);
}

.article-tag {
    font-size: 0.8rem;
    color: var(--green-700);
    background: var(--green-50);
    padding: 0.3rem 0.75rem;
    border-radius: 14px;
    font-weight: 500;
}

.article-author-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--neutral-50);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.author-avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1rem;
    flex-shrink: 0;
}

.article-author-info { flex: 1; }
.article-author-info .author-name { font-size: 1rem; font-weight: 600; }
.article-author-info .author-role { font-size: 0.85rem; display: block; margin-bottom: 0.5rem; }

.author-bio {
    font-size: 0.88rem;
    color: var(--neutral-500);
    line-height: 1.5;
    margin: 0;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--neutral-500);
    margin-bottom: 2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--neutral-100);
    color: var(--neutral-700);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s;
}

.share-btn:hover {
    background: var(--green-100);
    color: var(--green-800);
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 6rem 0;
    background: var(--green-900);
    color: var(--white);
}

.cta-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-section .section-tag {
    color: var(--green-400);
}

.cta-section .section-title {
    color: var(--white);
}

.cta-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cta-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.cta-input {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 0.95rem;
    font-family: var(--font);
    width: 300px;
    outline: none;
    transition: border-color 0.2s;
}

.cta-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.cta-input:focus {
    border-color: var(--green-400);
}

.cta-section .btn-primary {
    background: var(--green-500);
    color: var(--green-900);
}

.cta-section .btn-primary:hover {
    background: var(--green-400);
}

.cta-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== FOOTER ===== */
.footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--neutral-200);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--neutral-100);
    margin-bottom: 1.5rem;
}

.footer-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--green-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand-desc {
    font-size: 0.85rem;
    color: var(--neutral-500);
    line-height: 1.6;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--neutral-500);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--green-700);
}

.footer-bottom {
    text-align: center;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--neutral-400);
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--neutral-900);
    padding: 1.75rem 2rem 0;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--neutral-400);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--neutral-900);
}

.modal-body {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--neutral-600);
    line-height: 1.7;
}

.modal-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.modal-body h3:first-of-type {
    margin-top: 1rem;
}

.modal-body ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.modal-body li {
    margin-bottom: 0.4rem;
}

.modal-body p {
    margin-bottom: 0.75rem;
}

/* position relative for modal cards */
.modal {
    position: relative;
}

/* ===== AUTH MODAL ===== */
.modal-auth {
    max-width: 480px;
}

.modal-auth h2 {
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--neutral-500);
    font-size: 0.9rem;
    padding: 0.5rem 2rem 0;
}

.auth-form {
    padding: 1.5rem 2rem 2rem;
}

.auth-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-error.show {
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--neutral-900);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--green-600);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--neutral-500);
    margin-top: 1.25rem;
}

.auth-switch a {
    color: var(--green-700);
    font-weight: 600;
}

.auth-switch a:hover {
    color: var(--green-600);
}

/* Checkboxes CGU & Newsletter */
.form-checkboxes {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--neutral-600);
    cursor: pointer;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: var(--green-600);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--green-700);
    font-weight: 600;
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--green-600);
}

.required-star {
    color: #dc2626;
    font-weight: 700;
}

/* Forgot password link */
.forgot-password-link {
    text-align: right;
    margin-top: -0.25rem;
    margin-bottom: 1rem;
}

.forgot-password-link a {
    font-size: 0.82rem;
    color: var(--green-700);
    font-weight: 500;
    text-decoration: none;
}

.forgot-password-link a:hover {
    color: var(--green-600);
    text-decoration: underline;
}

/* Success message (green variant of auth-error) */
.auth-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.auth-success a {
    color: #16a34a;
    font-weight: 600;
}

/* Reset password page */
.reset-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 80px;
    background: var(--neutral-50, #f8fafc);
}

.reset-card {
    background: var(--white, #fff);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.reset-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.reset-card .form-group {
    margin-bottom: 1rem;
}

.reset-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neutral-700, #404040);
    margin-bottom: 0.35rem;
}

.reset-card input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--neutral-300, #d4d4d4);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.reset-card input[type="password"]:focus {
    outline: none;
    border-color: var(--green-500, #22c55e);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Google Sign-In Button */
.google-btn-wrapper {
    margin-bottom: 0.5rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--neutral-300);
    border-radius: 8px;
    background: var(--white);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neutral-800);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.btn-google:active {
    transform: scale(0.98);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-google svg {
    flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.75rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--neutral-200);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== NAV USER (logged in) ===== */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neutral-800);
    text-decoration: none;
}

.nav-user-name:hover {
    color: var(--green-700);
}

.nav-user-plan {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--green-50);
    color: var(--green-700);
}

.nav-logout {
    background: none;
    border: 1px solid var(--neutral-300);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-family: var(--font);
    color: var(--neutral-600);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-logout:hover {
    border-color: var(--neutral-400);
    color: var(--neutral-900);
}

/* ===== CHAT PAGE ===== */
.chat-page {
    background: var(--neutral-50);
}

.chat-layout {
    display: flex;
    height: calc(100vh - 64px);
    margin-top: 64px;
}

/* Sidebar */
.chat-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--neutral-200);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
}

.sidebar-conversations {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.conv-item {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--neutral-600);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-item:hover {
    background: var(--neutral-50);
}

.conv-item.active {
    background: var(--green-50);
    color: var(--green-800);
    font-weight: 500;
}

.sidebar-quota {
    padding-top: 1rem;
    border-top: 1px solid var(--neutral-100);
}

.quota-bar {
    height: 4px;
    background: var(--neutral-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.quota-fill {
    height: 100%;
    background: var(--green-600);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.quota-text {
    font-size: 0.75rem;
    color: var(--neutral-400);
}

/* Chat main */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Welcome */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.chat-welcome-icon {
    font-size: 3rem;
    color: var(--green-400);
    margin-bottom: 1rem;
}

.chat-welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.chat-welcome p {
    font-size: 0.95rem;
    color: var(--neutral-500);
    max-width: 400px;
    margin-bottom: 2rem;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 500px;
}

.suggestion-chip {
    padding: 0.5rem 1rem;
    border: 1px solid var(--neutral-200);
    border-radius: 20px;
    background: var(--white);
    font-size: 0.82rem;
    font-family: var(--font);
    color: var(--neutral-700);
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    border-color: var(--green-400);
    color: var(--green-700);
    background: var(--green-50);
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

.chat-messages.has-messages {
    display: flex;
}

.msg {
    display: flex;
    gap: 0.75rem;
    max-width: 80%;
}

.msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.msg.user .msg-avatar {
    background: var(--green-800);
    color: var(--white);
}

.msg.assistant .msg-avatar {
    background: var(--green-50);
    color: var(--green-700);
    font-size: 0.9rem;
}

.msg-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

.msg-content {
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.msg.user .msg-content {
    background: var(--green-800);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.msg.assistant .msg-content {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    border-bottom-left-radius: 4px;
}

/* Markdown-rendered content in messages */
.msg-content strong {
    font-weight: 600;
    color: var(--neutral-900);
}

.msg-content em {
    font-style: italic;
    color: var(--neutral-500);
}

.msg-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.msg-content li {
    margin-bottom: 0.3rem;
}

.msg.assistant .msg-content ul {
    list-style-type: disc;
}

.msg.assistant .msg-content li {
    color: var(--neutral-700);
}

/* Paragraphs in messages */
.msg-content p {
    margin: 0.3rem 0;
    line-height: 1.6;
}

/* Headings in messages */
.msg-heading {
    margin: 0.7rem 0 0.3rem;
    font-weight: 600;
    color: var(--neutral-900);
}
h3.msg-heading { font-size: 1.05rem; }
h4.msg-heading { font-size: 0.98rem; }
h5.msg-heading { font-size: 0.92rem; }

/* Horizontal rules in messages */
.msg-hr {
    border: none;
    border-top: 1px solid var(--neutral-200);
    margin: 0.6rem 0;
}

/* Markdown tables in messages */
.msg-table-wrapper {
    overflow-x: auto;
    margin: 0.6rem 0;
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
}

.msg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    white-space: nowrap;
}

.msg-table th {
    background: var(--green-50, #f0fdf4);
    color: var(--green-800);
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    border-bottom: 2px solid var(--green-200, #bbf7d0);
    text-align: left;
}

.msg-table td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--neutral-100);
    color: var(--neutral-700);
}

.msg-table tbody tr:hover {
    background: var(--neutral-50);
}

.msg-table tbody tr:last-child td {
    border-bottom: none;
}

/* Inline code in messages */
.msg-content code {
    background: var(--neutral-100);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* Links in messages */
.msg-content a {
    color: var(--green-700);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.msg-content a:hover {
    color: var(--green-800);
}

/* Streaming cursor — blinking block ▋ */
.streaming-cursor::after {
    content: '▋';
    animation: streamBlink 0.7s step-end infinite;
    color: var(--green-600);
    font-weight: 300;
}
.streaming-cursor-char {
    display: inline;
    animation: streamBlink 0.7s step-end infinite;
    color: var(--green-600);
    font-weight: 300;
}
.streaming-cursor-char::after {
    content: '▋';
}

@keyframes streamBlink {
    50% { opacity: 0; }
}

/* Status text during SQL execution */
.msg-streaming-status {
    color: var(--neutral-400);
    font-size: 0.85rem;
    font-style: italic;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.msg-streaming-status:empty {
    display: none;
}
.msg-streaming-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-500);
    animation: statusPulse 1.2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

.msg-typing {
    display: inline-flex;
    gap: 4px;
    padding: 0.85rem 1.1rem;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.msg-typing span {
    width: 6px;
    height: 6px;
    background: var(--neutral-400);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.msg-typing span:nth-child(1) { animation-delay: 0s; }
.msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input area */
.chat-input-area {
    padding: 1rem 2rem 1.25rem;
    border-top: 1px solid var(--neutral-200);
    background: var(--white);
}

.chat-form {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--neutral-300);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--neutral-900);
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: var(--green-600);
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: var(--green-800);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send:hover {
    background: var(--green-700);
}

.chat-send:disabled {
    background: var(--neutral-300);
    cursor: not-allowed;
}

.chat-stop {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: #e74c3c;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-stop:hover {
    background: #c0392b;
}

.agent-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-badge.agent-prix { background: #27ae60; color: #fff; }
.agent-badge.agent-production { background: #2980b9; color: #fff; }
.agent-badge.agent-juridique { background: #8e44ad; color: #fff; }
.agent-badge.agent-unknown { background: var(--neutral-400); color: #fff; }

/* ── Data source badges (DSA/FAOSTAT/INStaD) ── */
.msg-source-badges {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.source-badge {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}
.source-badge.source-dsa { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
.source-badge.source-faostat { background: #dbeafe; color: #1e40af; border-color: #60a5fa; }
.source-badge.source-instad { background: #dcfce7; color: #166534; border-color: #4ade80; }
.source-badge.source-prophet { background: #ede9fe; color: #5b21b6; border-color: #a78bfa; }

.chat-disclaimer {
    font-size: 0.72rem;
    color: var(--neutral-400);
    text-align: center;
    margin-top: 0.5rem;
}

/* Textarea auto-expand */
#chat-input {
    resize: none;
    overflow-y: hidden;
    min-height: 44px;
    max-height: 160px;
    line-height: 1.5;
}

/* ===== MESSAGE ACTIONS (copy, edit, feedback) ===== */
/* ===== CHART IN MESSAGES ===== */
/* ── Legal sources (FAOLEX) ── */
.msg-sources {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--neutral-50, #f8fafc);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-left: 3px solid var(--green-600, #16a34a);
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
}
.msg-sources .src-header {
    font-weight: 600;
    color: var(--green-700, #15803d);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}
.msg-sources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.msg-sources li {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--neutral-100, #f1f5f9);
}
.msg-sources li:last-child {
    border-bottom: none;
}
.msg-sources .src-type {
    display: inline-block;
    background: var(--green-100, #dcfce7);
    color: var(--green-700, #15803d);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-right: 0.4rem;
    text-transform: uppercase;
}
.msg-sources .src-link {
    color: var(--green-600, #16a34a);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.78rem;
}
.msg-sources .src-link:hover {
    text-decoration: underline;
    color: var(--green-700, #15803d);
}

.msg-chart {
    width: 100%;
    max-width: 100%;
    height: 380px;
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    background: var(--white);
}

.msg-chart .js-plotly-plot {
    border-radius: 8px;
}

/* ── Suggestion chips ─────────────────────── */
.msg-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.suggestion-chip {
    background: var(--green-50, #f0fdf4);
    border: 1px solid var(--green-300, #86efac);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    color: var(--green-700, #15803d);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.suggestion-chip:hover {
    background: var(--green-100, #dcfce7);
    border-color: var(--green-400, #4ade80);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.15);
}

.suggestion-chip:active {
    transform: translateY(0);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .suggestion-chip {
        background: rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.3);
        color: #86efac;
    }
    .suggestion-chip:hover {
        background: rgba(34, 197, 94, 0.2);
        border-color: rgba(34, 197, 94, 0.5);
    }
}

.msg-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.4rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.msg:hover .msg-actions {
    opacity: 1;
}

.msg-action-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    color: var(--neutral-400);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.msg-action-btn:hover {
    color: var(--neutral-600);
    border-color: var(--neutral-200);
    background: var(--neutral-50);
}

.msg-action-btn.active-like {
    color: var(--green-600);
    border-color: var(--green-200);
    background: var(--green-50);
}

.msg-action-btn.active-dislike {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Edit user message */
.msg-edit-btn {
    background: none;
    border: none;
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
    color: var(--neutral-400);
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.15s;
}

.msg.user:hover .msg-edit-btn {
    opacity: 1;
}

.msg-edit-btn:hover {
    color: var(--white);
    background: rgba(255,255,255,0.15);
}

/* ===== CONVERSATION DELETE ===== */
.conv-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conv-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conv-delete {
    display: none;
    background: none;
    border: none;
    color: var(--neutral-400);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-left: 0.25rem;
}

.conv-item:hover .conv-delete {
    display: block;
}

.conv-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* Rename button */
.conv-rename {
    display: none;
    background: none;
    border: none;
    color: var(--neutral-400);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.conv-item:hover .conv-rename {
    display: block;
}

.conv-rename:hover {
    color: var(--green-700);
    background: var(--green-50);
}

/* Inline rename input */
.conv-rename-input {
    flex: 1;
    padding: 0.2rem 0.4rem;
    border: 1.5px solid var(--green-500);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font);
    color: var(--neutral-900);
    background: var(--white);
    outline: none;
    min-width: 0;
}

/* Sidebar toggle button (chat page) */
.sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-right: 0.5rem;
}

.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--neutral-600);
    border-radius: 2px;
    transition: all 0.3s;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}
.sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 49;
}

/* ===== SELECTION BAR ===== */
.selection-bar {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-800);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 50;
}

.selection-bar button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 0.82rem;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
}

.selection-bar button:hover {
    text-decoration: underline;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--neutral-900);
    color: var(--white);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font);
    opacity: 0;
    transition: all 0.3s;
    z-index: 300;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Nav mobile */
    .nav-mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1.5rem 2rem;
        border-bottom: 1px solid var(--neutral-200);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        gap: 1rem;
        z-index: 99;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem 0;
    }

    .nav-cta {
        text-align: center;
    }

    .nav-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .hero {
        flex-direction: column;
        padding: 7rem 1.5rem 3rem;
        min-height: auto;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2rem;
        min-height: 100px;
    }

    .hero-content {
        max-width: 100%;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .about-story-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 3rem auto 0;
    }

    .blog-page-header {
        padding: 6.5rem 1.5rem 2rem;
    }
    .blog-page-header .section-title {
        font-size: 1.75rem;
    }
    .blog-page-subtitle {
        font-size: 0.9rem;
    }

    .article-title { font-size: 1.5rem; }
    .article-cover { height: 160px; }
    .article-content { font-size: 0.95rem; }
    .article-author-card { flex-direction: column; align-items: center; text-align: center; }
    .blog-filters { gap: 0.35rem; }
    .blog-filter-btn { font-size: 0.78rem; padding: 0.4rem 0.85rem; }

    .cta-form {
        flex-direction: column;
        align-items: center;
    }

    .cta-input {
        width: 100%;
        max-width: 300px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand-col {
        grid-column: 1 / -1;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .chat-sidebar {
        display: flex;
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .chat-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .msg {
        max-width: 95%;
    }

    .chat-messages {
        padding: 1rem;
    }

    .chat-input-area {
        padding: 0.75rem 1rem;
    }

    .msg-chart {
        height: 280px;
    }

    .msg-chart-wrapper {
        margin: 0.5rem -0.5rem;
    }

    .msg-table-wrapper {
        margin: 0.4rem -0.5rem;
        font-size: 0.8rem;
    }

    .msg-table th, .msg-table td {
        padding: 6px 8px;
        font-size: 0.78rem;
    }

    .chat-suggestions {
        flex-direction: column;
        align-items: stretch;
    }

    .suggestion-chip {
        text-align: center;
    }

    .chat-welcome h2 {
        font-size: 1.3rem;
    }

    .chat-welcome p {
        font-size: 0.85rem;
    }

    .msg-content {
        font-size: 0.9rem;
    }

    .chart-dl-btn {
        font-size: 0.72rem;
        padding: 4px 8px;
    }
}

/* ===== PROFILE PAGE ===== */
.profile-page {
    background: var(--neutral-50);
}

.profile-layout {
    padding-top: 64px;
    min-height: 100vh;
}

.profile-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-800);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-header-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.profile-email-text {
    font-size: 0.9rem;
    color: var(--neutral-500);
    margin-bottom: 0.5rem;
}

.profile-plan-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: var(--green-50);
    color: var(--green-700);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
    padding-bottom: 0;
}

.profile-tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font);
    color: var(--neutral-500);
    cursor: pointer;
    transition: all 0.2s;
}

.profile-tab:hover {
    color: var(--neutral-700);
}

.profile-tab.active {
    color: var(--green-800);
    border-bottom-color: var(--green-600);
    font-weight: 600;
}

/* Tab Content */
.profile-tab-content {
    display: none;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 2rem;
}

.profile-tab-content.active {
    display: block;
}

.profile-tab-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 1.25rem;
}

/* Profile Form */
.profile-form .form-group {
    margin-bottom: 1.25rem;
}

.profile-form .form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 0.35rem;
}

.profile-form .form-group input,
.profile-form .form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--neutral-900);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.profile-form .form-group input:focus,
.profile-form .form-group select:focus {
    border-color: var(--green-600);
}

.input-disabled {
    background: var(--neutral-50) !important;
    color: var(--neutral-500) !important;
    cursor: not-allowed;
}

/* Profile form save button spacing */
.profile-form > .btn {
    margin-top: 0.5rem;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--neutral-400);
    margin-top: 0.3rem;
}

/* Profile Alerts */
.profile-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.profile-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.profile-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Security Section */
.security-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-200);
}

.auth-method-info {
    font-size: 0.9rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

/* Subscription Tab */
.current-plan-card {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.plan-card-header h3 {
    margin-bottom: 0;
}

.plan-name-badge {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background: var(--green-800);
    color: var(--white);
}

.plan-feature-tag {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: var(--white);
    color: var(--green-700);
    margin-right: 0.5rem;
    margin-bottom: 0.3rem;
}

.plan-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.plan-option {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.plan-option:hover {
    border-color: var(--green-400);
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.08);
}

.plan-option.current {
    border-color: var(--green-600);
    background: var(--green-50);
}

.plan-option h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--green-800);
    margin-bottom: 0.75rem;
}

.plan-features-list {
    list-style: none;
    font-size: 0.82rem;
    color: var(--neutral-600);
    margin-bottom: 1rem;
}

.plan-features-list li {
    padding: 0.2rem 0;
}

.plan-current-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green-700);
    background: var(--green-100);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
}

/* Usage Stats */
.usage-stats {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 1.5rem;
}

.usage-stats h3 {
    margin-bottom: 1rem;
}

.usage-bar-container {
    max-width: 400px;
}

.usage-bar {
    height: 8px;
    background: var(--neutral-200);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-fill {
    height: 100%;
    background: var(--green-600);
    border-radius: 8px;
    transition: width 0.3s;
    width: 0%;
}

.usage-text {
    font-size: 0.82rem;
    color: var(--neutral-500);
}

@media (max-width: 768px) {
    .profile-container {
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-tabs {
        overflow-x: auto;
    }

    .profile-tab-content {
        padding: 1.25rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .profile-form .form-group input,
    .profile-form .form-group select {
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .profile-tab {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.65rem;
        min-height: 90px;
    }

    .data-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .about-story-stats {
        grid-template-columns: 1fr 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* ===== DATA EXPORT BUTTONS ===== */
.export-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.export-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--neutral-200);
    background: var(--white);
    font-size: 0.8rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--neutral-600);
}

.export-btn:hover {
    background: var(--green-50);
    border-color: var(--green-600);
    color: var(--green-700);
}

.export-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--neutral-50);
}

.export-btn.locked:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-200);
    color: var(--neutral-600);
}

/* ===== CHART DOWNLOAD =====  */
.msg-chart-wrapper {
    position: relative;
    margin: 1rem 0;
}

.chart-download-bar {
    display: flex;
    justify-content: flex-end;
    padding: 6px 4px 0;
}

.chart-dl-btn {
    background: none;
    border: 1px solid var(--neutral-200);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.78rem;
    color: var(--neutral-600);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.chart-dl-btn:hover {
    background: var(--green-50, #f0fdf4);
    border-color: var(--green-600);
    color: var(--green-700);
}

/* ===== LEGAL PAGES (privacy, terms, cookies, mentions, contact) ===== */
.legal-page {
    padding-top: 100px;
    padding-bottom: 4rem;
    background: var(--neutral-50, #fafafa);
    min-height: 100vh;
}

.legal-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.legal-header {
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--green-600, #16a34a);
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neutral-900, #171717);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.legal-updated {
    font-size: 0.9rem;
    color: var(--neutral-500, #737373);
    font-weight: 400;
}

/* Body */
.legal-body {
    font-size: 1rem;
    color: var(--neutral-700, #404040);
    line-height: 1.8;
    text-align: justify;
}

.legal-intro {
    background: var(--white, #fff);
    border: 1px solid var(--neutral-200, #e5e5e5);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 2.5rem;
    font-size: 1.02rem;
    line-height: 1.85;
}

.legal-intro p {
    margin-bottom: 0.75rem;
}

.legal-intro p:last-child {
    margin-bottom: 0;
}

/* Headings */
.legal-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900, #171717);
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--neutral-200, #e5e5e5);
    letter-spacing: -0.01em;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--neutral-800, #262626);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-body h4 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--neutral-800, #262626);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.legal-body p {
    margin-bottom: 1rem;
}

.legal-body a {
    color: var(--green-700, #15803d);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.legal-body a:hover {
    color: var(--green-900, #14532d);
}

/* Lists */
.legal-body ul,
.legal-body ol {
    margin: 0.75rem 0 1.25rem 0;
    padding-left: 1.5rem;
}

.legal-body li {
    margin-bottom: 0.6rem;
    line-height: 1.75;
}

.legal-body li strong {
    color: var(--neutral-900, #171717);
}

/* Info Box */
.legal-info-box {
    background: var(--white, #fff);
    border-left: 4px solid var(--green-600, #16a34a);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.legal-info-box p {
    margin-bottom: 0;
    line-height: 1.8;
}

/* Warning Box */
.legal-warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.5rem;
    margin: 1rem 0 1.25rem;
}

.legal-warning-box p {
    margin-bottom: 0;
    color: #92400e;
    font-size: 0.95rem;
}

/* Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0 1.75rem;
    font-size: 0.92rem;
    background: var(--white, #fff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.legal-table thead {
    background: var(--neutral-900, #171717);
    color: var(--white, #fff);
}

.legal-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.legal-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--neutral-100, #f5f5f5);
    vertical-align: top;
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-table tbody tr:hover {
    background: var(--neutral-50, #fafafa);
}

.legal-table code {
    background: var(--neutral-100, #f5f5f5);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    color: var(--green-800, #166534);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.contact-card {
    background: var(--white, #fff);
    border: 1px solid var(--neutral-200, #e5e5e5);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.contact-card:hover {
    border-color: var(--green-400, #4ade80);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
    transform: translateY(-2px);
}

.contact-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.contact-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--neutral-900, #171717);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.contact-card p {
    font-size: 0.88rem;
    color: var(--neutral-600, #525252);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.contact-card-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-700, #15803d) !important;
    text-decoration: none !important;
    background: var(--green-50, #f0fdf4);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.contact-card-link:hover {
    background: var(--green-100, #dcfce7) !important;
    color: var(--green-800, #166534) !important;
}

.contact-card-delay {
    font-size: 0.78rem !important;
    color: var(--neutral-400, #a3a3a3) !important;
    margin-top: 0.75rem;
    margin-bottom: 0 !important;
}

/* FAQ Items */
.faq-item {
    background: var(--white, #fff);
    border: 1px solid var(--neutral-200, #e5e5e5);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.faq-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900, #171717);
    margin: 0 0 0.5rem 0;
}

.faq-item p {
    font-size: 0.92rem;
    color: var(--neutral-600, #525252);
    margin-bottom: 0;
    line-height: 1.65;
}

/* Legal Page Responsive */
@media (max-width: 768px) {
    .legal-page {
        padding-top: 80px;
        padding-bottom: 2rem;
    }

    .legal-header h1 {
        font-size: 1.75rem;
    }

    .legal-body h2 {
        font-size: 1.25rem;
        margin-top: 2.25rem;
    }

    .legal-body h3 {
        font-size: 1.05rem;
    }

    .legal-body {
        font-size: 0.93rem;
    }

    .legal-intro {
        padding: 1.25rem 1.25rem;
    }

    .legal-info-box {
        padding: 1rem 1.25rem;
    }

    .legal-table {
        font-size: 0.82rem;
    }

    .legal-table th,
    .legal-table td {
        padding: 0.6rem 0.7rem;
    }

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

    .contact-card {
        padding: 1.25rem 1rem;
    }
}
