/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #6b4423;
    --color-secondary: #d4a574;
    --color-bg: #fefefe;
    --color-text: #2c2c2c;
    --color-text-light: #e0e0e0;; /*#f7f0f0;*/
    --color-border: #e0e0e0;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    --max-width: 1200px;
    --spacing: 2rem;
}

body {
    font-family: var(--font-main);
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-size: 0.95rem;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header et Navigation */
header {
    background-color: var(--color-primary);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.post-content h2,
.post-content h3 {
    scroll-margin-top: 7rem;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: normal;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

header a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

header a:hover {
    opacity: 0.8;
}

/* Main content */
main {
    padding: 1rem 0 1.5rem;
    min-height: calc(100vh - 300px);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 0.95rem;
    color: var(--color-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Posts grid */
.posts-grid h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* Post card */
.post-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.post-card-content {
    padding: 0.85rem;
}

.post-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.post-card h4 a {
    color: var(--color-primary);
    text-decoration: none;
}

.post-card h4 a:hover {
    text-decoration: underline;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.post-card p {
    color: var(--color-secondary);
    line-height: 1.35;
    font-size: 0.9rem;
}

/* Article complet */
.post {
    max-width: 1240px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
    background-color: transparent;
    padding: 0;
}

.post-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.difficulty {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.cover-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 1.5rem;
}

/* Contenu de l'article */
.post-content {
    font-size: 1rem;
    line-height: 1.45;
}

.post-two-col .post-columns {
    display: grid;
    grid-template-columns: 1.2fr 2.8fr;
    gap: 2rem;
    align-items: start;
}

.post-two-col .post-aside {
    position: sticky;
    top: 5.5rem;
    align-self: start;
}

.post-two-col .post-header {
    text-align: left;
    margin-bottom: 1rem;
}

.post-two-col .post-meta {
    justify-content: flex-start;
}

.post-two-col .tags {
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.post-toc {
    margin-top: 1rem;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #fff;
    max-height: 55vh;
    overflow: auto;
}

.post-toc-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.post-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.post-toc-list a {
    text-decoration: none;
    color: var(--color-secondary);
}

.post-toc-list a:hover {
    text-decoration: underline;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-primary);
    margin: 2.5rem 0 1rem;
}

.post-content h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-primary);
    margin: 2rem 0 1rem;
}

.about-compact h2 {
    font-size: 1.5rem;
    margin: 1rem 0 0.35rem;
}

.about-compact p {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.about-compact ul,
.about-compact li {
    font-size: 0.9rem;
}

.about-compact ul {
    margin: 0.35rem 0 0.5rem 1.2rem;
}

.about-compact li {
    margin-bottom: 0.1rem;
    line-height: 1.25;
}

.post-content p {
    margin-bottom: 0.8rem;
}

.post-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content strong {
    color: var(--color-primary);
    font-weight: 600;
}

.post-content em {
    font-style: italic;
    color: var(--color-text-light);
}

.post-content blockquote {
    border-left: 4px solid var(--color-secondary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

/* Encadrés spéciaux */
.tips-box,
.warning-box,
.equipment-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.tips-box {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.warning-box {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
}

.equipment-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.tag {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
}

.tag:hover {
    opacity: 0.9;
}

.tag-active {
    background-color: var(--color-primary);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --spacing: 1rem;
    }

    header nav {
        flex-direction: column;
        text-align: center;
    }

    header ul {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .posts-list {
        grid-template-columns: 1fr;
    }

    .post-header h1 {
        font-size: 1.8rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-two-col .post-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
