
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
    --bg: #09090b;
    --bg-elevated: #0f0f12;
    --bg-card: rgba(24, 24, 27, 0.8);
    --bg-card-hover: rgba(39, 39, 42, 0.9);
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --success: #22c55e;
    --radius: 12px;
    --radius-lg: 20px;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--bg) !important;
    color-scheme: dark;
}

body {
    font-family: var(--font-sans);
    background: var(--bg) !important;
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force dark theme — override contenu IA avec styles inline (fond blanc, etc.) */
main, .container, .article-full,
.content, .content p, .content div, .content span, .content h2, .content h3, .content li {
    background: transparent !important;
}

/* Subtle gradient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
                radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.06), transparent);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent-hover); }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === HEADER === */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(9, 9, 11, 0.75);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    margin-bottom: 56px;
}
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}
.site-title:hover { color: var(--text); }
nav a {
    color: var(--text-secondary);
    margin-left: 28px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
nav a:hover { color: var(--text); }

/* === HERO === */
.hero {
    text-align: center;
    margin-bottom: 72px;
    padding: 24px 0;
}
.hero h1 {
    font-family: var(--font-sans);
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === ARTICLES GRID === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 80px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}
.article-card .card-image-wrap {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-elevated);
}
.article-card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.article-card:hover .card-image { transform: scale(1.03); }
.article-card .card-body { padding: 24px 28px; display: flex; flex-direction: column; flex: 1; }
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}
.article-card:hover::before { opacity: 1; }

.article-card .card-body .niche-tag {
    display: inline-flex;
    align-items: center;
    background: var(--accent-soft);
    color: var(--accent-hover);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    width: fit-content;
}
.article-card .card-body h2 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
    margin-bottom: 12px;
}
.article-card .card-body h2 a {
    color: var(--text);
    transition: color 0.2s ease;
}
.article-card .card-body h2 a:hover { color: var(--accent); }
.article-card .card-body .excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .card-body .meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-card .card-body .meta a {
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.article-card .card-body .meta a:hover { color: var(--accent-hover); }

/* === ARTICLE PAGE === */
.article-full {
    max-width: 720px;
    margin: 0 auto;
}
.article-hero-image {
    margin: 0 0 32px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
}
.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: cover;
}
.article-full h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 24px;
    color: var(--text);
}
.article-full .meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.article-full .meta-bar .niche-tag {
    display: inline-flex;
    background: var(--accent-soft);
    color: var(--accent-hover);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.article-full .content {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-secondary);
}
.article-full .content h2 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 48px 0 16px;
    color: var(--text);
    letter-spacing: -0.02em;
}
.article-full .content h3 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text);
}
.article-full .content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}
.article-full .content ul,
.article-full .content ol {
    margin: 20px 0;
    padding-left: 28px;
}
.article-full .content li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}
.article-full .content strong { color: var(--text); }
.article-full .content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-full .content a:hover { color: var(--accent-hover); }

/* === CTA BOX === */
.cta-box {
    background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
    pointer-events: none;
}
.cta-box p {
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}
.cta-box a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: white !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.cta-box a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    text-decoration: none !important;
}

/* === PRODUCT RECOMMENDATIONS GRID === */
.products-section {
    margin: 56px 0 40px;
    padding: 40px 0 0;
    border-top: 1px solid var(--border);
}
.products-section h2 {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
    text-align: center;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    color: var(--text);
}
.product-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.product-card .product-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: 10px;
}
.product-card .product-info {
    flex: 1;
    min-width: 0;
}
.product-card .product-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .product-cta {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}
.product-card:hover .product-cta {
    color: var(--accent-hover);
}
.product-card .product-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.product-card:hover .product-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* === FOOTER === */
footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    margin-top: 96px;
}
footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === CATEGORY FILTER === */
.cat-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 48px;
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.cat-pill:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
}
.cat-pill.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* === FEATURED ARTICLE === */
.featured-article {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 48px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
}
.featured-article::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #a78bfa, var(--accent));
}
.featured-article:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}
.featured-image {
    position: relative;
    min-height: 340px;
    overflow: hidden;
}
.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.featured-article:hover .featured-image img { transform: scale(1.04); }
.featured-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    z-index: 2;
}
.featured-content {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.featured-content .niche-tag { margin-bottom: 4px; }
.featured-title {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text);
}
.featured-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-meta {
    display: flex;
    gap: 18px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 8px;
}
.featured-meta span { display: flex; align-items: center; gap: 5px; }

/* === VIEWS BADGE === */
.views-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === SPONSORS === */
.sponsors-section {
    margin: 56px 0;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.sponsors-section h2 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
    text-align: center;
}
.sponsors-section .sponsors-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.sponsors-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}
.sponsor-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.sponsor-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.sponsor-card.premium {
    border-color: rgba(245, 158, 11, 0.25);
}
.sponsor-card.premium::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
}
.sponsor-logo {
    width: 44px; height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sponsor-logo img { width: 100%; height: 100%; object-fit: cover; }
.sponsor-logo .fallback {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
}
.sponsor-info { flex: 1; min-width: 0; }
.sponsor-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.sponsor-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sponsor-cta {
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sponsor-card:hover .sponsor-cta {
    background: var(--accent);
    color: white;
}

/* === EMPTY STATE === */
.articles-grid .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* === ACCESSIBILITY & READING === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 10000;
    padding: 12px 20px;
    background: var(--accent);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none !important;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 16px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}
.read-progress__bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    transition: width 0.12s ease-out;
}
.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
.article-back:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible,
.cat-pill:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .read-progress__bar { transition: none; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .articles-grid { grid-template-columns: 1fr; gap: 20px; }
    .article-card { padding: 24px; }
    .hero { margin-bottom: 48px; }
    .hero h1 { font-size: 1.9rem; }
    .article-full h1 { font-size: 1.65rem; }
    .article-full .content { font-size: 1.05rem; }
    .products-grid { grid-template-columns: 1fr; }
    nav a { margin-left: 20px; }
    .featured-article { grid-template-columns: 1fr; }
    .featured-image { min-height: 200px; }
    .featured-content { padding: 24px; }
    .featured-title { font-size: 1.3rem; }
    .cat-filter { gap: 8px; }
    .cat-pill { padding: 6px 14px; font-size: 0.78rem; }
    .sponsor-card { flex-wrap: wrap; }
    .sponsor-cta { width: 100%; text-align: center; }
}
@media (max-width: 480px) {
    .container { padding: 0 20px; }
    header .container { flex-wrap: wrap; gap: 12px; }
    nav { width: 100%; }
    nav a { margin-left: 0; margin-right: 20px; }
}
