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

html, body {
    overflow-x: hidden;
}

img, video, iframe, svg, canvas {
    max-width: 100%;
    height: auto;
}

:root {
    --color-primary: #7c2d12;
    --color-accent: #0f766e;
    --color-bg-warm: #fff7ed;
    --color-text: #222;
    --color-muted: #666;
    --color-border: #ddd;
    --color-surface: #fafafa;
    --font-main: Tahoma, Geneva, sans-serif;
    --lh: 1.6;
}

body {
    font-family: var(--font-main);
    font-size: 17px;
    line-height: var(--lh);
    color: var(--color-text);
    font-weight: 400;
}

.cat-hero {
    position: relative;
    background-color: #1a1a1a;
    overflow: hidden;
}

.cat-hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cat-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.45;
}

.cat-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 32px 72px;
    color: #fff;
}

.cat-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.cat-hero-content h1 {
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    line-height: var(--lh);
    color: #fff;
    margin: 0 0 20px;
    max-width: 720px;
}

.cat-hero-sub {
    font-size: 17px;
    line-height: var(--lh);
    color: rgba(255,255,255,0.88);
    max-width: 620px;
    margin: 0 0 36px;
}

.cat-hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 0 28px 0 0;
}

.stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: var(--lh);
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: var(--lh);
}

.cat-hero-stats .stat-sep {
    width: 1px;
    height: 36px;
    background-color: rgba(255,255,255,0.3);
    margin: 0 28px 0 0;
    flex-shrink: 0;
}

.articles-section {
    background-color: var(--color-bg-warm);
    padding: 64px 0;
}

.articles-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.articles-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.articles-header h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: var(--lh);
    color: var(--color-primary);
    margin: 0;
}

.articles-count {
    font-size: 14px;
    color: var(--color-muted);
    line-height: var(--lh);
    margin: 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.art-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.art-card-img {
    overflow: hidden;
    height: 200px;
    flex-shrink: 0;
    background-color: #e0e0e0;
}

.art-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.art-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.art-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-muted);
    line-height: var(--lh);
    margin-bottom: 10px;
}

.art-card-meta svg {
    flex-shrink: 0;
    color: var(--color-accent);
}

.art-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: var(--lh);
    margin: 0 0 10px;
    color: var(--color-text);
}

.art-card-body h3 a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.art-card-body h3 a:hover,
.art-card-body h3 a:focus {
    color: var(--color-primary);
    text-decoration: underline;
}

.art-card-desc {
    font-size: 14px;
    color: var(--color-muted);
    line-height: var(--lh);
    margin: 0;
}

.articles-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-muted);
}

.articles-empty svg {
    display: block;
    margin: 0 auto 20px;
}

.articles-empty p {
    font-size: 16px;
    line-height: var(--lh);
    margin: 0;
}

.tabs-section {
    background-color: #fff;
    padding: 64px 0;
}

.tabs-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.tabs-wrapper h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: var(--lh);
    color: var(--color-primary);
    margin: 0 0 12px;
}

.tabs-intro {
    font-size: 16px;
    color: var(--color-muted);
    line-height: var(--lh);
    margin: 0 0 36px;
    max-width: 700px;
}

.tab-radio {
    display: none;
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 0;
}

.tab-label {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 400;
    color: var(--color-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    line-height: var(--lh);
    transition: color 0.2s;
}

.tab-label:hover {
    color: var(--color-primary);
}

#tab-musees:checked ~ .tabs-nav label[for="tab-musees"],
#tab-evenements:checked ~ .tabs-nav label[for="tab-evenements"],
#tab-patrimoine:checked ~ .tabs-nav label[for="tab-patrimoine"] {
    color: var(--color-primary);
    font-weight: 700;
    border-bottom-color: var(--color-primary);
}

.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
}

#tab-musees:checked ~ .tabs-content #panel-musees,
#tab-evenements:checked ~ .tabs-content #panel-evenements,
#tab-patrimoine:checked ~ .tabs-content #panel-patrimoine {
    display: block;
}

.tab-panel-inner {
    padding: 32px 0 8px;
}

.overview-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.overview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: var(--lh);
}

.overview-table caption {
    font-size: 13px;
    color: var(--color-muted);
    text-align: left;
    padding: 10px 16px;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    line-height: var(--lh);
}

.overview-table thead th {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    padding: 12px 16px;
    line-height: var(--lh);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overview-table tbody tr {
    border-bottom: 1px solid var(--color-border);
}

.overview-table tbody tr:last-child {
    border-bottom: none;
}

.overview-table tbody tr:nth-child(even) {
    background-color: var(--color-bg-warm);
}

.overview-table tbody td {
    padding: 12px 16px;
    color: var(--color-text);
    vertical-align: top;
    line-height: var(--lh);
    font-size: 15px;
}

.overview-table tbody td strong {
    font-weight: 700;
    color: var(--color-primary);
}

.table-note {
    font-size: 13px;
    color: var(--color-muted);
    line-height: var(--lh);
    margin: 16px 0 0;
    font-style: italic;
}

.kpi-section {
    background-color: var(--color-bg-warm);
    padding: 64px 0;
    border-top: 1px solid #e0e0e0;
}

.kpi-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.kpi-header {
    margin-bottom: 40px;
}

.kpi-header h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: var(--lh);
    color: var(--color-primary);
    margin: 0 0 10px;
}

.kpi-header p {
    font-size: 15px;
    color: var(--color-muted);
    line-height: var(--lh);
    margin: 0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.kpi-card {
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.kpi-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.kpi-val {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: var(--lh);
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 14px;
    color: var(--color-muted);
    line-height: var(--lh);
}

.cta-section {
    background-color: var(--color-accent);
    padding: 64px 0;
}

.cta-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-text {
    flex: 1;
    min-width: 260px;
}

.cta-text h2 {
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    color: #fff;
    line-height: var(--lh);
    margin: 0 0 12px;
}

.cta-text p {
    font-size: 16px;
    color: rgba(255,255,255,0.88);
    line-height: var(--lh);
    margin: 0;
}

.cta-btn {
    display: inline-block;
    background-color: #fff;
    color: var(--color-accent);
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 6px;
    white-space: nowrap;
    border: 2px solid #fff;
    transition: background-color 0.2s, color 0.2s;
}

.cta-btn:hover,
.cta-btn:focus {
    background-color: var(--color-accent);
    color: #fff;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .cat-hero-content {
        padding: 52px 20px 48px;
    }

    .cat-hero-content h1 {
        font-size: 26px;
    }

    .cat-hero-sub {
        font-size: 16px;
    }

    .cat-hero-stats {
        gap: 16px;
    }

    .stat-item {
        padding: 0;
    }

    .cat-hero-stats .stat-sep {
        display: none;
    }

    .articles-section,
    .tabs-section,
    .kpi-section,
    .cta-section {
        padding: 44px 0;
    }

    .articles-wrapper,
    .tabs-wrapper,
    .kpi-wrapper,
    .cta-wrapper {
        padding: 0 16px;
    }

    .articles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 28px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tabs-nav {
        gap: 0;
    }

    .tab-label {
        padding: 10px 14px;
        font-size: 14px;
    }

    .overview-table {
        font-size: 13px;
    }

    .overview-table thead th,
    .overview-table tbody td {
        padding: 10px 12px;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .kpi-card {
        padding: 20px 16px;
    }

    .kpi-val {
        font-size: 22px;
    }

    .cta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .cta-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cat-hero-content h1 {
        font-size: 22px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .art-card-img {
        height: 170px;
    }

    .tab-label {
        padding: 9px 10px;
        font-size: 13px;
    }

    .articles-header h2,
    .tabs-wrapper h2,
    .kpi-header h2,
    .cta-text h2 {
        font-size: 20px;
    }
}