/* ==========================================================================
   Au Coin Des Jardins - Stylesheet
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #429656;
    --primary-dark: #3a864d;
    --primary-light: #5bb070;
    --accent: #255430;
    --text: #333;
    --text-light: #666;
    --bg: #fff;
    --bg-light: #f5f8f5;
    --border: #dde8dd;
    --font-primary: 'Open Sans', Arial, sans-serif;
    --font-heading: 'Merriweather', Georgia, serif;
    --max-width: 1140px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-primary); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; margin-bottom: .6em; color: var(--text); }
h1 { font-size: 1.8em; } h2 { font-size: 1.4em; } h3 { font-size: 1.2em; }
p { margin-bottom: 1em; }
ul, ol { margin: 0 0 1em 1.5em; }
li { margin-bottom: .3em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

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

/* --- Header --- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }
.header-top { padding: 20px 0; background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); }
.header-top .container { display: flex; align-items: center; }
.site-branding { text-align: center; width: 100%; }
.site-title { font-family: var(--font-heading); font-size: 28px; margin: 0; }
.site-title a { color: #fff; }
.site-title a:hover { color: #e8f5e9; }
.site-description { font-size: 14px; color: rgba(255,255,255,.85); margin: 4px 0 0; }

.header-nav { background: var(--accent); }
.header-nav .container { display: flex; align-items: center; justify-content: center; }
.main-nav { display: flex; list-style: none; margin: 0; padding: 0; }
.main-nav li a { display: block; padding: 12px 20px; color: #fff; font-size: 14px; font-weight: 600; transition: background .2s; }
.main-nav li a:hover, .main-nav li.active a { background: rgba(255,255,255,.15); color: #fff; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; width: 24px; height: 3px; background: #fff; margin: 4px 0; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 10px 0; font-size: 13px; color: var(--text-light); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; color: #ccc; }
.breadcrumb .current { color: var(--text); }

/* --- Layout --- */
.site-content { padding: 30px 0; }
.site-content > .container { display: flex; gap: 35px; align-items: flex-start; }
.content-area { flex: 1; min-width: 0; }

/* --- Article --- */
.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 1.8em; margin-bottom: 10px; }
.post-thumbnail { margin-bottom: 25px; border-radius: 6px; overflow: hidden; }
.post-thumbnail img { width: 100%; }
.entry-content h2 { margin-top: 1.5em; padding-bottom: 6px; border-bottom: 2px solid var(--primary); }
.entry-content h3 { margin-top: 1.2em; }
.entry-content ul, .entry-content ol { margin: 1em 0 1em 2em; }
.entry-content li { margin-bottom: .5em; }

/* --- Cards --- */
.post-list { display: grid; gap: 25px; }
.post-card { display: flex; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.post-card:last-child { border-bottom: none; }
.post-card .card-thumbnail { flex-shrink: 0; width: 280px; border-radius: 6px; overflow: hidden; }
.post-card .card-thumbnail img { width: 100%; height: 190px; object-fit: cover; }
.post-card .card-content { flex: 1; }
.post-card .card-title { font-size: 1.15em; margin-bottom: 6px; }
.post-card .card-title a { color: var(--text); }
.post-card .card-title a:hover { color: var(--primary); }
.post-card .card-category { font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; display: block; }
.post-card .card-excerpt { font-size: .9em; color: var(--text-light); line-height: 1.6; }
.read-more { display: inline-block; margin-top: 6px; color: var(--primary); font-weight: 600; font-size: .85em; }
.read-more:hover { color: var(--accent); }

/* --- Home sections --- */
.home-section { margin-bottom: 40px; }
.section-title { font-size: 1.4em; padding-bottom: 10px; border-bottom: 2px solid var(--primary); margin-bottom: 20px; }
.section-title a { color: var(--text); }
.section-title a:hover { color: var(--primary); }
.section-more { text-align: center; margin-top: 12px; }

/* --- Related --- */
.related-posts { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--border); }
.related-posts h3 { margin-bottom: 15px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-item { text-align: center; }
.related-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.related-item a { font-size: .85em; color: var(--text); }
.related-item a:hover { color: var(--primary); }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 25px; }
.pagination a, .pagination .current-page { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; color: var(--text); }
.pagination a:hover, .pagination .current-page { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Category --- */
.category-header { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid var(--primary); }
.category-header h1 { font-size: 1.6em; margin-bottom: 5px; }
.category-header p { color: var(--text-light); font-size: .9em; margin: 0; }

/* --- Sidebar --- */
.sidebar { width: 280px; flex-shrink: 0; }
.widget { margin-bottom: 25px; padding: 18px; background: var(--bg-light); border-radius: 6px; border: 1px solid var(--border); }
.widget-title { font-size: 1em; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); font-size: .9em; }
.widget ul li a:hover { color: var(--primary); }

/* --- Footer --- */
.site-footer { background: var(--accent); color: rgba(255,255,255,.8); padding: 25px 0; margin-top: 40px; font-size: 14px; text-align: center; }
.site-footer a { color: var(--primary-light); }
.site-footer a:hover { color: #fff; }
.sites-amis { margin-top: 8px; font-size: 13px; }

.back-to-top { position: fixed; bottom: 25px; right: 25px; width: 42px; height: 42px; background: var(--primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 100; }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top.visible { display: flex; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .site-content > .container { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-card { flex-direction: column; }
    .post-card .card-thumbnail { width: 100%; }
    .post-card .card-thumbnail img { height: 200px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--accent); z-index: 1000; }
    .main-nav.open { display: flex; }
    .main-nav li a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
    .header-nav .container { position: relative; justify-content: flex-end; }
    .entry-title { font-size: 1.4em; }
    .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    body { font-size: 15px; }
    .container { padding: 0 15px; }
}
