:root {
    --ink: #24272d;
    --muted: #6b7078;
    --paper: #f7f5f0;
    --white: #fff;
    --night: #17191d;
    --gold: #c89432;
    --line: #dfddd7;
    --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.65;
}
img { max-width: 100%; }
a { color: #986718; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #b27a20; }
button, input { font: inherit; }

.site-header {
    position: relative;
    z-index: 20;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.header-inner, .content-width {
    width: min(var(--content), calc(100% - 40px));
    margin-inline: auto;
}
.header-inner {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { flex: 0 0 auto; line-height: 0; }
.brand img { width: clamp(210px, 24vw, 300px); height: auto; }
.nav-toggle { display: none; }
.main-nav, .nav-list { height: 100%; }
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 10px 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.nav-item > a:hover, .nav-item > button:hover { color: #9a6a1e; }
.submenu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 250px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(20, 22, 26, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .18s ease;
}
.nav-item.has-menu:hover > .submenu,
.nav-item.has-menu.is-open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.submenu a, .submenu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 7px;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}
.submenu a:hover, .submenu summary:hover { background: #f5f1e8; color: #9a6a1e; }
.submenu ul { margin: 4px 0 4px 14px; padding: 0; list-style: none; }
.submenu details { margin: 0; }
.submenu summary { list-style: none; }
.submenu summary::-webkit-details-marker { display: none; }
.submenu summary::after { content: "›"; margin-left: auto; font-size: 20px; }
.submenu details[open] > summary::after { transform: rotate(90deg); }
.material-symbols-outlined { font-size: 20px; vertical-align: middle; }
.member-button {
    margin-left: 8px;
    padding-inline: 16px !important;
    border: 1px solid var(--gold) !important;
    border-radius: 999px;
    color: #705018 !important;
}
.member-button:hover { background: var(--gold); color: var(--night) !important; }

main { flex: 1; min-width: 0; }
.page-heading {
    background: var(--night);
    color: var(--white);
    border-bottom: 4px solid var(--gold);
}
.page-heading .content-width { padding: 44px 0 38px; }
.page-heading h1 {
    max-width: 900px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -.03em;
}
.page-meta { margin: 12px 0 0; color: #ddd8cd; }
main > section.container, main > section:not(.page-heading) {
    width: min(var(--content), calc(100% - 40px));
    margin-inline: auto;
    padding: 28px 0;
}
main h2, main h3, main h4 { line-height: 1.25; }
main h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
main h3 { font-size: 1.25rem; }

/* Compatibilité avec le contenu généré par PHP */
.columns { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.column { grid-column: 1 / -1; min-width: 0; }
.column.col-12 { grid-column: span 12; }
.column.col-8 { grid-column: span 8; }
.column.col-6 { grid-column: span 6; }
.column.col-4 { grid-column: span 4; }
.column.col-3 { grid-column: span 3; }
.card {
    height: 100%;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(35, 37, 42, .06);
}
.card-image img { display: block; }
.card-header, .card-body, .card-footer { padding: 16px 18px; }
.card-header { border-bottom: 1px solid var(--line); }
.card-title { font-size: 1.15rem; font-weight: 800; }
.card-subtitle { color: var(--muted); }
.card-footer { margin-top: auto; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--ink);
    border-radius: 7px;
    background: var(--ink);
    color: var(--white) !important;
    font-weight: 750;
    text-decoration: none;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--night) !important; }
.text-gray { color: var(--muted) !important; }

.table { width: 100%; border-collapse: collapse; background: var(--white); }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.table-hover tbody tr:hover { background: #f2efe7; }
.timeline { position: relative; margin: 16px 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 80px 1fr; min-height: 70px; }
.timeline-item::before { content: ""; position: absolute; left: 39px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline-left { position: relative; }
.timeline-icon { position: absolute; z-index: 1; left: 28px; top: 4px; width: 24px; height: 24px; border: 5px solid var(--paper); border-radius: 50%; background: var(--gold); }
.timeline-content { padding: 0 0 24px 8px; }

.tab { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.tab-item { cursor: pointer; }
.tab-item div { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.tab-item.active div, .tab-item div:hover { border-color: var(--gold); background: var(--gold); color: var(--night); }
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }
.badge[data-badge]::after { content: attr(data-badge); display: inline-block; min-width: 22px; margin-left: 8px; padding: 0 5px; border-radius: 999px; background: var(--night); color: var(--white); font-size: .75rem; line-height: 22px; text-align: center; }
.grid { width: 100%; }
.grid img { display: block; }

.site-footer {
    background: #ece9e1;
    border-top: 1px solid var(--line);
    color: #5e6064;
}
.site-footer .content-width { padding: 20px 0; }
.site-footer p { margin: 0; font-size: .9rem; }

@media (max-width: 900px) {
    .header-inner { min-height: 78px; }
    .brand img { width: min(210px, 55vw); }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 8px 10px;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: var(--white);
        color: var(--ink);
        cursor: pointer;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        max-height: calc(100vh - 78px);
        overflow-y: auto;
        background: var(--white);
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 30px rgba(20, 22, 26, .12);
    }
    .main-nav.is-open { display: block; }
    .nav-list { display: block; width: min(var(--content), calc(100% - 40px)); height: auto; margin-inline: auto; padding: 12px 0 18px; }
    .nav-item { border-bottom: 1px solid #efeee9; }
    .nav-item > a, .nav-item > button { width: 100%; justify-content: space-between; }
    .nav-item.has-menu > button::after { content: "›"; font-size: 22px; }
    .nav-item.has-menu.is-open > button::after { transform: rotate(90deg); }
    .submenu { position: static; display: none; width: 100%; opacity: 1; visibility: visible; transform: none; border: 0; border-radius: 0; box-shadow: none; background: #faf9f6; }
    .nav-item.has-menu:hover > .submenu { display: none; }
    .nav-item.has-menu.is-open > .submenu { display: block; }
    .member-button { margin: 10px 0; width: 100%; }
    .column.col-6, .column.col-4, .column.col-3 { grid-column: span 12; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .column.col-4 { grid-column: span 6; }
}

@media (max-width: 600px) {
    .header-inner, .content-width, main > section.container, main > section:not(.page-heading), .nav-list {
        width: min(100% - 28px, var(--content));
    }
    .page-heading .content-width { padding: 32px 0 28px; }
    main > section.container, main > section:not(.page-heading) { padding: 20px 0; }
    .columns { gap: 14px; }
    .column.col-8, .column.col-6, .column.col-4, .column.col-3 { grid-column: span 12; }
    .timeline-item { grid-template-columns: 56px 1fr; }
    .timeline-item::before { left: 27px; }
    .timeline-icon { left: 16px; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
    .tab-item div { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
