/*
Theme Name: Reflets & Matières Blog
Theme URI: https://tableauxenverre.fr/blog/
Description: Thème editorial pour le blog de Reflets & Matières
Version: 1.0
*/

/* ── Variables ───────────────────────────────────────────── */
:root {
    --primary:    #1A1A2E;
    --primary-80: rgba(26,26,46,.8);
    --gold:       #C9A84C;
    --gold-light: #d4b870;
    --gold-pale:  #f5edd6;
    --cream:      #FAF8F4;
    --text:       #2C2C3A;
    --text-light: #6B6B7A;
    --border:     #E8E4DC;
    --white:      #fff;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Inter', system-ui, sans-serif;
    --radius:     8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --shadow-sm:  0 2px 12px rgba(26,26,46,.08);
    --shadow-md:  0 8px 32px rgba(26,26,46,.12);
    --shadow-lg:  0 16px 48px rgba(26,26,46,.16);
    --container:  1200px;
    --header-h:   72px;
}

/* ── Reset ───────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Container ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    border-bottom: 1px solid rgba(201,168,76,.2);
    transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(26,26,46,.35); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: .03em;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo-r {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-serif);
}
.logo-text { color: var(--gold); font-size: .85rem; letter-spacing: .05em; }
.logo-full { color: rgba(255,255,255,.9); }
.logo-amp { color: var(--gold); }

/* Desktop Nav */
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    color: rgba(255,255,255,.8);
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,.1);
}
.nav-link.active { color: var(--gold); }
.nav-icon { width: 14px; height: 14px; flex-shrink: 0; transition: transform .2s; }

/* Dropdown */
.nav-item { position: relative; }
.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    z-index: 200;
}
.dropdown li a {
    display: block;
    padding: 9px 18px;
    font-size: .875rem;
    color: var(--text);
    transition: background .15s, color .15s;
}
.dropdown li a:hover { background: var(--cream); color: var(--primary); }
.nav-item.is-open .dropdown { display: block; }
.nav-item.is-open .nav-icon { transform: rotate(180deg); }

/* CTA */
.header-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius); font-weight: 600; font-size: .875rem; transition: all .2s; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--gold); color: var(--primary); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,168,76,.3); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.mobile-menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,.1); color: var(--white); }
.mobile-menu-btn svg { width: 20px; height: 20px; }

/* Mobile Nav */
.mobile-nav { display: none; background: var(--primary); border-top: 1px solid rgba(201,168,76,.15); overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.mobile-nav.open { max-height: 600px; }
.mobile-nav-list { padding: 16px 0; }
.mobile-nav-list li a {
    display: block;
    padding: 10px 24px;
    font-size: .9rem;
    color: rgba(255,255,255,.82);
    transition: color .15s, background .15s;
}
.mobile-nav-list li a:hover { color: var(--gold); background: rgba(255,255,255,.05); }

/* ── Main ────────────────────────────────────────────────── */
#main-content { min-height: 60vh; }

/* ── Archive Hero ────────────────────────────────────────── */
.archive-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #252548 60%, #1e1e3a 100%);
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
}
.archive-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(201,168,76,.06);
    pointer-events: none;
}
.archive-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201,168,76,.15);
    border: 1px solid rgba(201,168,76,.35);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}
.archive-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 12px;
}
.archive-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,.75);
    max-width: 520px;
}

/* ── Category Pills ──────────────────────────────────────── */
.category-pills-wrap {
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    position: sticky;
    top: var(--header-h);
    z-index: 50;
}
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 500;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    transition: all .2s;
    white-space: nowrap;
}
.pill:hover { border-color: var(--primary); color: var(--primary); background: var(--white); }
.pill.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: rgba(0,0,0,.12);
    font-size: .7rem;
    font-weight: 600;
    padding: 0 4px;
}
.pill.active .pill-count { background: rgba(255,255,255,.2); }

/* ── Article Grid ────────────────────────────────────────── */
.archive-section { padding: 48px 0 64px; background: var(--white); }
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}
.no-posts {
    grid-column: 1/-1;
    text-align: center;
    padding: 64px 0;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Article Card */
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-image-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, #252548 100%);
    flex-shrink: 0;
}
.card-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.article-card:hover .card-image-wrap img { transform: scale(1.04); }
.card-image-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--gold);
    opacity: .5;
}
.card-cat-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(26,26,46,.85);
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--gold); }
.card-excerpt {
    font-size: .875rem;
    color: var(--text-light);
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.card-date { font-size: .78rem; color: var(--text-light); }
.card-read {
    font-size: .8rem;
    font-weight: 600;
    color: var(--gold);
    display: flex; align-items: center; gap: 4px;
    transition: gap .2s;
}
.card-read:hover { gap: 8px; }
.card-read svg { width: 13px; height: 13px; }

/* ── Pagination ──────────────────────────────────────────── */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
}
.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    padding: 0 12px;
    transition: all .2s;
}
.archive-pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.archive-pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: var(--white); }
.archive-pagination .page-numbers.dots { border: none; background: none; }

/* ── Single Article ──────────────────────────────────────── */
.article-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #252548 60%, #1e1e3a 100%);
    padding: 52px 0 44px;
    position: relative;
    overflow: hidden;
}
.article-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(201,168,76,.06);
    pointer-events: none;
}
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.article-breadcrumb a { color: rgba(255,255,255,.6); transition: color .2s; }
.article-breadcrumb a:hover { color: var(--gold); }
.article-breadcrumb span { color: rgba(255,255,255,.35); }
.article-cat-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(201,168,76,.15);
    border: 1px solid rgba(201,168,76,.35);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.article-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
    max-width: 760px;
    margin-bottom: 20px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.article-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    color: rgba(255,255,255,.65);
}
.article-meta-item svg { width: 13px; height: 13px; }

/* Featured image */
.article-featured-image {
    margin: 0;
    max-height: 480px;
    overflow: hidden;
}
.article-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Article body */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    padding: 52px 0 64px;
    align-items: start;
}
.article-body {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text);
}
.article-body h2 { font-size: 1.6rem; font-weight: 600; color: var(--primary); margin: 2em 0 .8em; line-height: 1.3; }
.article-body h3 { font-size: 1.3rem; font-weight: 600; color: var(--primary); margin: 1.6em 0 .6em; }
.article-body p { margin-bottom: 1.4em; }
.article-body a { color: var(--primary); border-bottom: 1px solid var(--gold); }
.article-body ul, .article-body ol { padding-left: 1.5em; margin-bottom: 1.4em; }
.article-body li { margin-bottom: .4em; }
.article-body blockquote {
    border-left: 3px solid var(--gold);
    padding: 16px 24px;
    background: var(--cream);
    margin: 2em 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--primary);
}
.article-body img { border-radius: var(--radius-lg); margin: 2em 0; }
.article-body figure figcaption { font-size: .85rem; color: var(--text-light); text-align: center; margin-top: 8px; font-family: var(--font-sans); font-style: normal; }

/* Article sidebar */
.article-sidebar {}
.sidebar-widget {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-widget h3 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.sidebar-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .875rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color .2s;
}
.sidebar-cats a:last-child { border-bottom: none; }
.sidebar-cats a:hover { color: var(--gold); }
.sidebar-cats .count { font-size: .78rem; color: var(--text-light); }
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--primary);
    padding: 10px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all .2s;
    margin-bottom: 24px;
}
.back-to-blog:hover { border-color: var(--primary); background: var(--primary); color: var(--white); }
.back-to-blog svg { width: 14px; height: 14px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,.75);
    padding-top: 56px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--white);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 14px;
}
.footer-logo span { color: var(--gold); }
.footer-tagline { font-style: italic; font-size: .95rem; color: rgba(255,255,255,.65); margin-bottom: 12px; }
.footer-desc { font-size: .875rem; line-height: 1.7; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-tags span {
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(201,168,76,.12);
    border: 1px solid rgba(201,168,76,.2);
    color: rgba(201,168,76,.85);
}
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 { font-family: var(--font-serif); font-size: .95rem; color: var(--white); font-weight: 600; margin-bottom: 14px; letter-spacing: .03em; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .875rem; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.35); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: .8rem; color: rgba(255,255,255,.35); transition: color .2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
    .footer-top { grid-template-columns: 1fr; gap: 32px; }
    .footer-nav { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .logo-full { display: none; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .footer-nav { grid-template-columns: 1fr 1fr; }
    .archive-hero { padding: 40px 0 32px; }
    .article-hero { padding: 36px 0 28px; }
}
@media (max-width: 560px) {
    .articles-grid { grid-template-columns: 1fr; }
    .footer-nav { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .category-pills { gap: 6px; }
    .pill { font-size: .75rem; padding: 5px 12px; }
}
