/* Natalia Blog System — Premium Theme 2026 */

:root {
    --accent-color: #7C3AED;
    --accent-light: rgba(124, 58, 237, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --bg: #F3F0E6;
    /* Warm Beige — Light Mode */
    --card-bg: #ffffff;
    --border: rgba(124, 58, 237, 0.1);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.04);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --border: rgba(124, 58, 237, 0.2);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.blog-body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

/* Apple-style Theme Switch — Blog */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 32px;
    position: relative;
    width: 64px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #e2e8f0;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.slider:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 26px;
    left: 3px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

input:checked + .slider {
    background-color: #1a1a1a;
}

input:checked + .slider:before {
    transform: translateX(32px);
}

.icon-moon-switch,
.icon-sun-switch {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    transition: opacity 0.3s;
}

.icon-moon-switch {
    left: 8px;
    color: #f1f5f9;
}

.icon-sun-switch {
    right: 8px;
    color: #475569;
}

/* Header — Consistent with Guide Officiel */
.blog-nav-header {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0 2rem;
}

.blog-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-btn-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
}

.back-btn-circle:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

.blog-logo-text {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

/* The Premium Card Structure */
.article-container {
    max-width: 850px;
    margin: 1rem auto 3rem;
    padding: 3.5rem;
    background: var(--card-bg);
    border-radius: 40px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    box-sizing: border-box;
}

/* Typography — Mirroring Guide Officiel */
.article-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 1.5rem 0;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    line-height: 1.2;
}

.article-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(124, 58, 237, 0.06);
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 3.5rem 0 1.25rem;
    color: var(--accent-color);
    border-bottom: 2px solid rgba(124, 58, 237, 0.08);
    padding-bottom: 0.5rem;
}

/* Components — Natalia Style */
.article-toc {
    background: rgba(124, 58, 237, 0.04);
    padding: 2.5rem;
    border-radius: 24px;
    margin: 3rem 0;
}

.article-toc strong {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.article-toc ul {
    list-style: none;
    padding: 0;
}

.article-toc li {
    margin-bottom: 0.8rem;
}

.article-toc a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.article-toc a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.toc-title svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent-color);
}

/* Premium Lead Magnet — Integrated Inside Card */
.lm-inline {
    background: rgba(124, 58, 237, 0.04);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 32px;
    padding: 2.5rem;
    margin-bottom: 4rem;
    width: 100%;
    box-sizing: border-box;
}

.lm-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 15px;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.lm-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.natalia-icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.natalia-icon-circle svg {
    stroke: currentColor;
    width: 24px;
    height: 24px;
}
.natalia-icon-circle.danger {
    background: #fff2f4;
    color: #cf1832;
}
.natalia-icon-circle.warning {
    background: #fffbeb;
    color: #b45309;
}
[data-theme="dark"] .natalia-icon-circle {
    background: #1e293b;
}
[data-theme="dark"] .natalia-icon-circle.danger {
    background: #7f1d1d;
    color: #fca5a5;
}
[data-theme="dark"] .natalia-icon-circle.warning {
    background: #78350f;
    color: #fcd34d;
}

.lm-text-content h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.lm-text-content p {
    margin: 5px 0 0;
    color: var(--text-secondary);
}

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

.lm-input-row {
    display: flex;
    gap: 12px;
}

.lm-input {
    flex: 1;
    height: 56px;
    padding: 0 1.5rem;
    border-radius: 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    font-size: 1rem;
    outline: none;
    background: white;
}

.lm-submit {
    height: 56px;
    padding: 0 2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.lm-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.lm-rgpd {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Related Articles — Internal Linking */
.related-articles {
    max-width: 900px;
    margin: 2rem auto 0;
    padding: 2rem 2.5rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
}

.related-articles h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 1.2rem;
    font-weight: 700;
}

.related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.related-articles li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    transition: background 0.2s;
}

.related-articles li a::before {
    content: "→";
    flex-shrink: 0;
}

.related-articles li a:hover {
    background: var(--accent-light);
}

/* Scroll effect on header */
.blog-nav-header.scrolled {
    background: rgba(243, 240, 230, 0.92);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .blog-nav-header.scrolled {
    background: rgba(15, 23, 42, 0.92);
}

/* Blog Grid — cards listing on blog.html */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 0 2rem;
}

@media (min-width: 480px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card-premium {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
}

.article-card-premium:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.08);
}

.article-card-premium h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-premium p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA Banner on blog.html */
.blog-cta-banner {
    background: linear-gradient(135deg, var(--accent-color), #A78BFA);
    border-radius: 24px;
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    margin: 4rem 0 2rem;
}

.blog-cta-btn {
    display: inline-flex;
    height: 44px;
    padding: 0 24px;
    background: white;
    color: var(--accent-color);
    border-radius: 99px;
    align-items: center;
    font-weight: 700;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: transform 0.2s;
}

.blog-cta-btn:hover {
    transform: translateY(-2px);
}

/* Note cards inside articles */
.note-card {
    background: var(--accent-light);
    border-left: 4px solid var(--accent-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.note-card.warning {
    background: rgba(251, 191, 36, 0.08);
    border-left-color: #f59e0b;
}

.note-card.danger {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: #ef4444;
}

.note-icon { font-size: 1.25rem; }

/* In-article CTA */
.article-cta-banner {
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cta-btn {
    margin-left: auto;
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.2s;
}

.cta-btn:hover { transform: translateY(-2px); }

/* Tables inside articles */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.article-table th {
    text-align: left;
    padding: 1rem;
    background: var(--accent-light);
    color: var(--accent-color);
    font-weight: 700;
}

.article-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

/* Lead magnet success message */
.lm-success-msg {
    display: none;
    align-items: center;
    gap: 10px;
    color: #059669;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 12px;
    margin-top: 1rem;
}

/* Blog Footer Mini */
.blog-footer-mini {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    margin-top: 0;
    text-align: center;
}

.blog-footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

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

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

@media (max-width: 650px) {
    .article-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .article-title {
        font-size: 2rem;
    }

    .lm-input-row {
        flex-direction: column;
    }

    .lm-submit {
        width: 100%;
    }

    .related-articles {
        padding: 1.5rem;
        margin: 1.5rem 1rem 0;
    }

    .blog-footer-links {
        gap: 1.2rem;
    }
}