/* ==========================================================================
   Délices et coeur brûlé - Stylesheet
   ========================================================================== */

:root {
    --primary: #e84e3b;
    --primary-dark: #c63d2c;
    --accent: #374757;
    --text: #333;
    --text-light: #666;
    --bg: #fff8f5;
    --bg-white: #fff;
    --border: #f0e6e0;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --max-width: 1100px;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
    --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1.3;
    margin: 0 0 .6em;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--primary); color: #fff; padding: 10px 16px; z-index: 9999;
}
.skip-link:focus { left: 0; }

/* Header
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--bg-white);
    border-bottom: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.header-top { padding: 18px 0; }
.header-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex: 1;
}
.site-logo {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}
.site-title-block {
    display: flex;
    flex-direction: column;
}
.site-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.site-tagline {
    font-size: .85rem;
    color: var(--text-light);
    margin-top: 2px;
}
.menu-toggle {
    display: none;
    background: none; border: 0; cursor: pointer;
    padding: 8px;
    flex-direction: column; gap: 5px;
}
.menu-toggle span {
    display: block; width: 28px; height: 3px; background: var(--accent);
    transition: transform .2s, opacity .2s;
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.header-nav { background: var(--accent); }
.main-nav {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.main-nav li a {
    display: block;
    color: #fff;
    padding: 14px 18px;
    font-weight: 500;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 3px solid transparent;
    transition: background .15s, border-color .15s;
}
.main-nav li a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-bottom-color: var(--primary);
}

/* Layout
   -------------------------------------------------------------------------- */
.site-main { min-height: 60vh; }
.site-content { padding: 36px 0 60px; }
.content-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}
.content-area { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* Hero
   -------------------------------------------------------------------------- */
.hero {
    background: var(--bg-white);
    padding: 0;
    border-bottom: 1px solid var(--border);
}
.hero-card {
    display: flex;
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 380px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}
.hero-image {
    flex: 1.2;
    background-size: cover;
    background-position: center;
    min-height: 340px;
}
.hero-text {
    flex: 1;
    padding: 40px 36px;
    display: flex; flex-direction: column; justify-content: center;
}
.hero-cat {
    display: inline-block;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.hero-title {
    font-size: 2.4rem;
    margin: 0 0 .5em;
}
.hero-card:hover .hero-title { color: var(--primary); }
.hero-intro { color: var(--text-light); margin-bottom: 1em; }
.hero-cta {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    align-self: flex-start;
    transition: background .15s;
}
.hero-card:hover .hero-cta { background: var(--primary-dark); }

/* Sections
   -------------------------------------------------------------------------- */
.home-section { margin-bottom: 50px; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}
.section-title {
    font-family: var(--font-heading);
    color: var(--accent);
    margin: 0 0 16px;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 6px;
}
.section-head .section-title { border-bottom: 0; padding-bottom: 0; margin: 0; }
.section-more {
    font-size: .9rem;
    color: var(--primary);
    font-weight: 600;
}

/* Post grid (4 col)
   -------------------------------------------------------------------------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.post-grid-3 { grid-template-columns: repeat(3, 1fr); }
.post-grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.grid-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.grid-card-image {
    width: 100%;
    padding-top: 62%;
    background-size: cover;
    background-position: center;
    background-color: var(--border);
}
.grid-card-image-empty {
    background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
}
.grid-card-body { padding: 16px; }
.grid-card-cat {
    display: block;
    color: var(--primary);
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    margin-bottom: 6px;
}
.grid-card-title {
    font-size: 1.05rem;
    margin: 0;
    color: var(--accent);
    line-height: 1.35;
}
.grid-card:hover .grid-card-title { color: var(--primary); }
.grid-card-excerpt {
    color: var(--text-light);
    font-size: .9rem;
    margin: 8px 0 0;
}

/* Post list (category)
   -------------------------------------------------------------------------- */
.post-list { display: flex; flex-direction: column; gap: 24px; }
.post-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow-md); }
.post-card-image-link { flex: 0 0 280px; display: block; }
.post-card-image {
    width: 100%; height: 100%;
    min-height: 200px;
    background-size: cover; background-position: center;
    background-color: var(--border);
}
.post-card-image-empty {
    background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
}
.post-card-body { flex: 1; padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; }
.post-card-title {
    margin: 0 0 .5em;
    font-size: 1.4rem;
}
.post-card-title a { color: var(--accent); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { color: var(--text-light); margin-bottom: 1em; }
.post-card-more { font-weight: 600; font-size: .9rem; }

/* Category header
   -------------------------------------------------------------------------- */
.category-header {
    background: var(--bg-white);
    padding: 28px 30px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
}
.category-title { margin: 0 0 .3em; font-size: 2rem; }
.category-description { color: var(--text-light); margin: 0 0 .5em; }
.category-count { color: var(--primary); font-size: .85rem; font-weight: 600; margin: 0; }

/* Single article
   -------------------------------------------------------------------------- */
.breadcrumb {
    margin-bottom: 18px;
    font-size: .88rem;
    color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { margin: 0 8px; color: var(--border); }

.single-article {
    background: var(--bg-white);
    padding: 36px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.article-header { margin-bottom: 22px; }
.article-cat {
    display: inline-block;
    color: var(--primary);
    text-transform: uppercase;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    margin-bottom: 10px;
}
.article-title {
    font-size: 2.2rem;
    margin: 0;
}
.article-featured {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-featured img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}
.entry-content {
    font-size: 1.05rem;
    line-height: 1.75;
}
.entry-content h2 {
    font-size: 1.6rem;
    margin-top: 1.5em;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}
.entry-content h3 { font-size: 1.25rem; margin-top: 1.4em; color: var(--primary-dark); }
.entry-content p { margin: 0 0 1.1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content img {
    border-radius: var(--radius);
    margin: 1em 0;
}
.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg);
    padding: 16px 20px;
    margin: 1.4em 0;
    color: var(--text-light);
    font-style: italic;
}
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2em 0;
}
.entry-content th, .entry-content td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: var(--bg); }

/* Related */
.related-articles { margin-top: 50px; }

/* Sidebar
   -------------------------------------------------------------------------- */
.widget {
    background: var(--bg-white);
    padding: 22px 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.widget-title {
    font-size: 1.15rem;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    color: var(--accent);
}
.widget-list { list-style: none; padding: 0; margin: 0; }
.widget-item { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.widget-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.widget-link {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-size: .92rem;
    line-height: 1.4;
}
.widget-link:hover { color: var(--primary); }
.widget-thumb {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.widget-cat-link {
    display: flex;
    justify-content: space-between;
    color: var(--text);
    font-weight: 500;
}
.widget-cat-link:hover { color: var(--primary); }
.widget-count { color: var(--text-light); font-size: .85rem; }

/* Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 36px;
}
.page-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--accent);
    font-weight: 500;
    transition: all .15s;
}
.page-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Buttons
   -------------------------------------------------------------------------- */
.button {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background .15s;
}
.button:hover { background: var(--primary-dark); color: #fff; }

/* 404
   -------------------------------------------------------------------------- */
.error-404 {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.error-title {
    font-size: 6rem;
    margin: 0;
    color: var(--primary);
    line-height: 1;
}
.error-lead { font-size: 1.4rem; color: var(--accent); }
.error-text { color: var(--text-light); margin-bottom: 1.5em; }
.error-404 .post-grid { margin-top: 30px; text-align: left; }

.no-articles {
    background: var(--bg-white);
    padding: 30px;
    text-align: center;
    border-radius: var(--radius);
    color: var(--text-light);
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--accent);
    color: #cbd5e0;
    padding: 50px 0 0;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
}
.footer-title {
    color: #fff;
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #cbd5e0; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: .88rem;
}
.footer-bottom p { margin: 0; }

/* Back to top
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: 0;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, visibility .25s, transform .25s, background .15s;
    box-shadow: var(--shadow-md);
    z-index: 100;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .content-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-grid, .post-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .post-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero-card { flex-direction: column; min-height: 0; }
    .hero-image { min-height: 240px; flex: 0 0 auto; }
    .hero-text { padding: 28px 24px; }
    .hero-title { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .menu-toggle { display: flex; }
    .header-nav { display: none; }
    .header-nav.is-open { display: block; }
    .main-nav { flex-direction: column; }
    .main-nav li a {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .post-card { flex-direction: column; }
    .post-card-image-link { flex: 0 0 auto; width: 100%; }
    .post-card-image { min-height: 200px; padding-top: 56%; height: 0; }
    .single-article { padding: 24px 20px; }
    .article-title { font-size: 1.7rem; }
    .site-content { padding: 24px 0 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .site-title { font-size: 1.3rem; }
    .site-tagline { font-size: .78rem; }
    .site-logo { height: 50px; width: 50px; }
    .category-header { padding: 22px; }
    .error-title { font-size: 4rem; }
}

@media (max-width: 480px) {
    .post-grid, .post-grid-4, .post-grid-3 { grid-template-columns: 1fr; }
    .container { padding: 0 14px; }
    .hero-text { padding: 22px 18px; }
    .hero-title { font-size: 1.5rem; }
    .single-article { padding: 18px 14px; }
    .widget { padding: 18px 16px; }
    .site-branding { gap: 12px; }
    .site-logo { height: 44px; width: 44px; }
    .site-title { font-size: 1.15rem; }
    .site-tagline { display: none; }
    .back-to-top { width: 40px; height: 40px; bottom: 16px; right: 16px; }
}
