/* GATA */

:root {
    --color-primary: #1b5e20;
    --color-primary-light: #2e7d32;
    --color-primary-dark: #0d3d12;
    --color-accent: #f9a825;
    --color-bg: #f4f7f4;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #5f6368;
    --color-border: #e0e4e0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --radius: 10px;
    --max-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header & Navigation */
.site-header {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-light));
    color: #fff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
}

.brand:hover {
    text-decoration: none;
    opacity: 0.95;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.18);
    text-decoration: none;
    color: #fff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Main content */
.site-main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero (accueil) */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 60%, #43a047 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
}

.hero h1 {
    margin: 0 0 0.75rem;
    font-size: 2rem;
    font-weight: 700;
}

.hero p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.92;
    max-width: 700px;
}

/* Module cards grid */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 0 0 1.25rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.module-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.module-card .icon {
    font-size: 2rem;
    line-height: 1;
}

.module-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-primary-dark);
}

.module-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    flex: 1;
}

.module-card .card-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary-light);
}

/* Content list */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    color: var(--color-primary-dark);
}

.page-header p {
    margin: 0;
    color: var(--color-text-muted);
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-item {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.content-item h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.content-item h2 a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.content-item h2 a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.content-item .meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.content-item .excerpt {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e8f5e9;
    color: var(--color-primary-dark);
}

.badge-urgent {
    background: #ffebee;
    color: #c62828;
}

.badge-pinned {
    background: #fff8e1;
    color: #f57f17;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px dashed var(--color-border);
}

.read-more {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-light);
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

.content-item h2 a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.content-item h2 a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

/* Detail page */
.breadcrumb {
    margin-bottom: 1.25rem;
}

.breadcrumb a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary-light);
    text-decoration: none;
}

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

.detail-page {
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.detail-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    color: var(--color-primary-dark);
}

.detail-badges {
    margin: 0.75rem 0 0;
}

.detail-intro {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--color-primary-light);
    font-size: 1rem;
    color: var(--color-text);
}

.detail-sections {
    margin-top: 1.5rem;
}

.detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h2 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    color: var(--color-primary-dark);
}

.detail-content {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text);
}

.detail-document {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.btn-download {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--color-primary-light);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-download:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
    color: #fff;
}

.detail-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* Stats bar */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary-light);
}

.stat-item .label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Footer */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-inner h4 {
    color: #fff;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.footer-inner p,
.footer-inner li {
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 0;
}

.footer-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-inner a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-inner a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-primary-dark);
        padding: 1rem 1.5rem;
        box-shadow: var(--shadow-md);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .detail-page {
        padding: 1.25rem;
    }
}
