/* — Custom properties — */
:root {
    /* Couleurs — Fond */
    --bg: #ffffff;
    --bg-subtle: #f0efec;

    /* Couleurs — Texte */
    --text: #1a1a1a;
    --text-light: #5a5a5a;
    --nav-title: #000000;

    /* Couleurs — Accent */
    --accent: #1A7A6D;
    --accent-hover: #0F5B51;
    --accent-underline: rgba(26, 122, 109, 0.3);

    /* Couleurs — Bordure */
    --border: #1A7A6D;
    --border-light: #e4e2df;

    /* Mise en page */
    --max-width: 61rem;
}

/* — Reset — */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* — Body — */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* — Layout — */
.site-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* — Banner — */
.banner {
    padding: 1.5rem 1.5rem 0;

    a {
        display: block;
    }

    img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0;
    }
}

/* — Nav — */
nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--border);

    .nav-toggle-input {
        display: none;
    }

    .nav-toggle-label {
        display: none;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
        padding: 0.5rem;
        margin-left: auto;

        span {
            display: block;
            width: 24px;
            height: 2px;
            background: var(--text);
            border-radius: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
    }

    .nav-links {
        display: flex;
        flex: 1;
    }

    .nav-item {
        position: relative;
        flex: 1;
        text-align: center;

        > a {
            display: block;
            text-decoration: none;
            color: var(--text);
            font-size: 1.1rem;
            padding: 1rem 1.5rem;
            transition: color 0.2s ease, background-color 0.2s ease;

            &:hover {
                color: #fff;
                background-color: var(--border);
            }
        }

        &:hover .nav-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
    }

    .nav-dropdown {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        min-width: 14rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        padding: 0.5rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        z-index: 100;

        a {
            display: block;
            padding: 0.5rem 1rem;
            text-decoration: none;
            color: var(--text);
            font-size: 1rem;
            transition: background-color 0.15s ease, color 0.15s ease;

            &:hover {
                background-color: var(--accent);
                color: #fff;
            }
        }
    }
}

/* — Main content — */
main {
    margin: 2.5rem 0;
    padding: 0 1.5rem;

    h1 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
        font-weight: 700;
        color: var(--nav-title);
        letter-spacing: -0.02em;
        text-align: center;
    }

    h2 {
        font-size: 1.3rem;
        margin-top: 2rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: var(--nav-title);
    }

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

    p {
        margin-bottom: 1rem;
        color: var(--text);
    }

    a {
        color: var(--accent);
        text-decoration: underline;
        text-decoration-color: var(--accent-underline);
        text-underline-offset: 0.15em;
        transition: color 0.2s ease, text-decoration-color 0.2s ease;

        &:hover {
            color: var(--accent-hover);
            text-decoration-color: var(--accent-hover);
        }
    }
}

/* — Section layout (sidebar + content) — */
.section-layout {
    display: flex;
    gap: 2.5rem;
}

.section-sidebar {
    flex: 0 0 16rem;
}

.section-content {
    flex: 1;
    min-width: 0;
}

/* — Section pages list — */
.section-pages {

    h2 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-light);
        margin-top: 0;
        margin-bottom: 1rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}

/* — Page list — */
.page-list {
    list-style: none;

    li {
        padding: 0;
        border-radius: 0;
        border-left: 2px solid var(--border);
        margin-bottom: 0.5rem;
        transition: background-color 0.2s ease, border-color 0.2s ease;

        &:hover {
            background-color: var(--accent);
            border-left-color: var(--accent);
        }

        a {
            text-decoration: none;
            color: var(--text);
            display: block;
            padding: 0.75rem 1rem;

            &:hover {
                color: #fff;
            }
        }
    }
}

/* — Event card (agenda single page) — */
.event-card {
    h1 {
        margin-bottom: 0.75rem;
    }

    .event-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 1.25rem;
        padding: 1rem 1.25rem;
        background: var(--bg-subtle);
        border-left: 4px solid var(--accent);
        border-radius: 0;
        margin-bottom: 2rem;
    }

    .event-meta-item {
        font-size: 0.95rem;
        color: var(--text);
        white-space: nowrap;
    }

    .event-body {
        p {
            margin-bottom: 1rem;
        }
    }
}

/* — Callout — */
.callout {
    margin-bottom: 1.5rem;
}

/* — Event list (agenda section) — */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.event-card-inline {
    padding: 1.25rem 1.5rem;
    background: var(--bg-subtle);
    border-left: 4px solid var(--accent);
    border-radius: 0;

    h2 {
        font-size: 1.2rem;
        margin-top: 0;
        margin-bottom: 0.5rem;

        a {
            text-decoration: none;
            color: var(--nav-title);

            &:hover {
                color: var(--accent);
            }
        }
    }

    .event-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 0.75rem;
    }

    .event-meta-item {
        font-size: 0.9rem;
        color: var(--text-light);
        white-space: nowrap;
    }

    .event-body {
        p {
            margin-bottom: 0.5rem;
            font-size: 0.95rem;
        }
    }
}

/* — Pagination — */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);

    a, .pagination-current {
        display: inline-block;
        padding: 0.4rem 0.75rem;
        border-radius: 0;
        font-size: 0.9rem;
        text-decoration: none;
    }

    a {
        color: var(--text-light);
        transition: background-color 0.2s ease, color 0.2s ease;

        &:hover {
            background: var(--bg-subtle);
            color: var(--accent);
        }
    }

    .pagination-current {
        background: var(--accent);
        color: white;
        font-weight: 600;
    }
}

/* — Responsive mobile — */
@media (max-width: 768px) {
    .banner {
        padding: 1rem 1rem 0;

        img {
            border-radius: 0;
        }
    }

    nav {
        padding: 1rem;

        .nav-toggle-label {
            display: flex;
        }

        .nav-links {
            display: none;
            flex-direction: column;
            width: 100%;
            gap: 0;
            margin-left: 0;
            padding-top: 1rem;
        }

        .nav-toggle-input:checked ~ .nav-links {
            display: flex;
        }

        .nav-item {
            > a {
                display: block;
                padding: 0.75rem 0;
                border-bottom: 1px solid var(--border);
            }
        }

        .nav-dropdown {
            position: static;
            opacity: 1;
            visibility: visible;
            transform: none;
            box-shadow: none;
            border: none;
            border-radius: 0;
            min-width: 0;
            padding: 0;
            background: transparent;

            a {
                padding: 0.5rem 0 0.5rem 1.25rem;
                font-size: 0.95rem;
                color: var(--text-light);
                border-bottom: 1px solid var(--border-light);
            }
        }
    }

    main {
        margin: 1.5rem 0;
        padding: 0 1rem;

        h1 {
            font-size: 1.4rem;
        }

        h2 {
            font-size: 1.15rem;
        }
    }

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

    .section-layout {
        flex-direction: column;
    }

    .section-sidebar {
        order: 2;
    }

    .section-content {
        order: 1;
    }

    .section-pages {
        margin-top: 2.5rem;
        padding-top: 2rem;
        border-top: 2px solid var(--border);
    }

    .event-card-inline {
        padding: 1rem;

        .event-meta {
            flex-direction: column;
            gap: 0.25rem;
        }
    }
}
