/* Variables */
:root {
    --primary-color: #4a6741;
    --primary-dark: #3a5233;
    --secondary-color: #d4a373;
    --secondary-dark: #b58556;
    --accent-color: #faedcd;
    --text-color: #333;
    --bg-color: #fefae0;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

/* Reset et base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Main */
main {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

h1, h2, h3 {
    color: var(--primary-color);
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

a {
    color: var(--primary-color);
}

/* Breadcrumb / retour */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--secondary-dark);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Sommaire */
.intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

/* Recherche */
.search-box {
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15);
}

/* Filtres par catégorie */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.category-filter {
    padding: 0.4rem 0.9rem;
    border: 2px solid var(--secondary-color);
    background: var(--white);
    color: var(--secondary-dark);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.category-filter:hover {
    background: var(--accent-color);
}

.category-filter.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* Liste d'articles */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-item {
    background: var(--white);
    margin-bottom: 20px;
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 5px solid var(--secondary-color);
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.article-item.hidden {
    display: none;
}

.article-item a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.article-item a:hover {
    color: var(--primary-dark);
}

.article-excerpt {
    color: #555;
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: #666;
    margin-top: 0.8rem;
}

.tag, .category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
}

.tag {
    background: var(--secondary-color);
    color: white;
}

.category {
    background: var(--primary-color);
    color: white;
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    color: #777;
    padding: 2rem;
    font-style: italic;
}

.no-results.hidden {
    display: none;
}

/* Article */
article {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

article h1 {
    margin-top: 0;
}

article ul, article ol {
    padding-left: 1.5rem;
}

article li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 3rem;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    nav ul {
        width: 100%;
    }

    nav ul li {
        margin-left: 0;
        margin-right: 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .article-item {
        padding: 18px;
    }

    article {
        padding: 1.5rem;
    }
}
