/* Centre Japonais - Stylesheet */
:root {
    --primary: #bc002d;
    --primary-dark: #9a0024;
    --accent: #1a1a1a;
    --text: #333;
    --text-light: #666;
    --bg: #fafafa;
    --bg-white: #fff;
    --border: #e8e8e8;
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --max-width: 1100px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 4px;
}

* { 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.6;
    font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
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.25rem; }
p { margin: 0 0 1em; }

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

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

/* HEADER */
.site-header {
    background: var(--bg-white);
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    gap: 20px;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--accent);
}
.site-branding:hover { color: var(--accent); }
.site-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}
.site-titles { display: flex; flex-direction: column; }
.site-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 0;
    color: var(--accent);
    line-height: 1.1;
    font-weight: 700;
}
.site-description {
    margin: 2px 0 0;
    font-size: .85rem;
    color: var(--text-light);
}

.header-nav {
    background: var(--accent);
}
.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.main-nav li a {
    display: block;
    color: #fff;
    padding: 14px 18px;
    font-weight: 500;
    font-size: .95rem;
    transition: background .2s;
}
.main-nav li a:hover {
    background: var(--primary);
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    transition: .25s;
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MAIN */
.site-main { min-height: calc(100vh - 320px); }
.site-content { padding: 30px 0 60px; }
.site-content .container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.content-area { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* HERO */
.hero-section {
    background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}
.hero-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    color: inherit;
    transition: transform .25s, box-shadow .25s;
    min-height: 380px;
}
.hero-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}
.hero-image {
    flex: 0 0 55%;
    overflow: hidden;
    background: #eee;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 5px 12px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 16px;
    align-self: flex-start;
}
.hero-title {
    font-size: 2rem;
    margin: 0 0 16px;
    line-height: 1.25;
}
.hero-excerpt {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0 0 20px;
}
.hero-readmore {
    color: var(--primary);
    font-weight: 600;
    align-self: flex-start;
}

/* HOME SECTIONS */
.home-section { margin-bottom: 50px; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.section-title {
    font-size: 1.6rem;
    margin: 0 0 4px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.section-more {
    font-size: .9rem;
    font-weight: 600;
}
.section-desc {
    color: var(--text-light);
    margin: 0 0 20px;
    font-size: .95rem;
}

/* POST GRID */
.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 20px;
}
.post-grid-3 { grid-template-columns: repeat(3, 1fr); }

.grid-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s, box-shadow .25s;
}
.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.grid-card a {
    display: block;
    color: inherit;
}
.grid-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #eee;
}
.grid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.grid-card:hover .grid-card-image img { transform: scale(1.05); }
.grid-card-body { padding: 16px; }
.grid-card-cat {
    display: inline-block;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.grid-card-title {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.35;
    color: var(--accent);
}

/* POST CARD (category list) */
.post-list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 30px; }
.post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .25s, transform .25s;
}
.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.post-card-link {
    display: flex;
    color: inherit;
}
.post-card-image {
    flex: 0 0 280px;
    overflow: hidden;
    background: #eee;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
}
.post-card-body {
    flex: 1;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.post-card-title {
    font-size: 1.4rem;
    margin: 0 0 10px;
    line-height: 1.3;
}
.post-card-excerpt {
    color: var(--text-light);
    margin: 0 0 12px;
}
.post-card-readmore {
    color: var(--primary);
    font-weight: 600;
    font-size: .9rem;
}

/* CATEGORY HEADER */
.category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
}
.category-title {
    font-size: 2.2rem;
    margin: 8px 0 6px;
}
.category-desc {
    color: var(--text-light);
    margin: 0;
    font-size: 1.05rem;
}

/* BREADCRUMB */
.breadcrumb {
    font-size: .85rem;
    color: var(--text-light);
    margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; opacity: .5; }

/* SINGLE ARTICLE */
.single-article {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 36px;
}
.article-header { margin-bottom: 24px; }
.article-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: 2px;
    margin-bottom: 12px;
}
.article-title {
    font-size: 2.2rem;
    margin: 0;
    line-height: 1.2;
}
.article-featured {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-featured img { width: 100%; }

.entry-content { font-size: 1.05rem; line-height: 1.75; }
.entry-content h2 {
    font-size: 1.55rem;
    margin: 1.6em 0 .6em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.entry-content h3 { font-size: 1.25rem; margin: 1.4em 0 .5em; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content img {
    border-radius: var(--radius);
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: .8em 1.2em;
    margin: 1.4em 0;
    background: var(--bg);
    color: var(--text-light);
    font-style: italic;
}
.entry-content a { text-decoration: underline; }

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

/* SIDEBAR */
.widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.widget-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: var(--accent);
}
.widget-list { list-style: none; padding: 0; margin: 0; }
.widget-list li { margin-bottom: 12px; }
.widget-list li:last-child { margin-bottom: 0; }
.widget-article {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--text);
}
.widget-article:hover { color: var(--primary); }
.widget-article img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.widget-article-title {
    font-size: .88rem;
    line-height: 1.3;
    font-weight: 500;
}
.widget-cats li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.widget-cats li:last-child { border-bottom: none; }
.widget-cats a { color: var(--text); flex: 1; }
.widget-cats a:hover { color: var(--primary); }
.widget-count {
    background: var(--bg);
    color: var(--text-light);
    padding: 2px 9px;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 600;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 30px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text);
    font-size: .9rem;
}
.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination .page-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 404 */
.error-page {
    background: var(--bg-white);
    text-align: center;
    padding: 60px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.error-code {
    font-size: 6rem;
    color: var(--primary);
    margin: 0 0 8px;
    line-height: 1;
}
.error-title { margin: 0 0 16px; }
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    margin-top: 12px;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.error-suggest { margin-top: 40px; text-align: left; max-width: 360px; margin-left: auto; margin-right: auto; }
.error-suggest ul { list-style: none; padding: 0; }
.error-suggest li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

/* FOOTER */
.site-footer {
    background: var(--accent);
    color: #ccc;
    padding: 50px 0 20px;
    margin-top: 40px;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.site-footer h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.site-footer p { color: #aaa; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #ccc; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: .85rem;
    color: #888;
}
.footer-bottom p { margin: 0; }

/* BACK TO TOP */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s, background .25s;
    z-index: 99;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
    .post-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .site-content .container { flex-direction: column; }
    .sidebar { width: 100%; }
    .hero-card { flex-direction: column; min-height: auto; }
    .hero-image { flex: 0 0 auto; aspect-ratio: 16/9; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .header-mid { padding: 14px 20px; }
    .site-title { font-size: 1.3rem; }
    .site-description { font-size: .78rem; }
    .site-logo { width: 50px; height: 50px; }
    .menu-toggle { display: flex; }
    .header-nav {
        display: none;
        background: var(--accent);
    }
    .header-nav.is-open { display: block; }
    .main-nav { flex-direction: column; }
    .main-nav li a {
        padding: 14px 20px;
        border-bottom: 1px solid #2a2a2a;
    }
    .post-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .post-card-link { flex-direction: column; }
    .post-card-image { flex: 0 0 auto; aspect-ratio: 16/9; }
    .post-card-image img { min-height: auto; }
    .post-card-title { font-size: 1.15rem; }
    .single-article { padding: 22px; }
    .article-title { font-size: 1.6rem; }
    .hero-content { padding: 24px; }
    .hero-title { font-size: 1.5rem; }
    .footer-content { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }
    .container { padding: 0 14px; }
    .post-grid, .post-grid-3 { grid-template-columns: 1fr; }
    .site-content { padding: 20px 0 40px; }
    .site-title { font-size: 1.15rem; }
    .single-article { padding: 18px; }
    .error-code { font-size: 4rem; }
    .pagination a, .pagination span { padding: 6px 10px; font-size: .85rem; }
}
