body {
    background: var(--main-background);
}

.cat-hero{
    position: relative;
    overflow: hidden;
    margin: 0 0 22px;
    color: #fff;
    background:
            linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25) 35%, rgba(0,0,0,.50)),
            var(--cat-bg) center/cover no-repeat;
}
.cat-hero--compact{ min-height: 280px; }

.cat-hero__content{
    min-height: inherit;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.cat-hero__title{
    color: var(--primary-yellow, #ffd64d);
    margin: 6px 0 8px;
    font-size: 130px;
    line-height: 1.1;
    font-weight: 600;
    font-style: italic;
}

/* ===== Fil d’Ariane en overlay (en haut à gauche) ===== */
.cat-breadcrumb{
    position: absolute;
    top: 12px; left: 12px;
    display: flex; gap: 8px; align-items: center;
    padding: 8px 10px;
    font-size: 13px;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(2px);
}
.cat-breadcrumb .crumb{ color:#e9edf6; text-decoration:none; }
.cat-breadcrumb .crumb:hover{ text-decoration:underline; }
.cat-breadcrumb .current{ color:#fff; font-weight:600; pointer-events:none; }

.cat-page{
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.cat-grid{
    list-style:none; margin:0; padding:0;
    display:flex;
    flex-wrap: wrap;
    gap: var(--cat-gap);
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
}

.cat-card{
    display:flex;
    border:1px solid #eceef3;
    background:#fff;
    box-shadow:0 1px 2px rgba(0,0,0,.04);
    overflow:hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    border-radius:16px;
    flex: 0 1 calc((100% - 2 * var(--cat-gap)) / 3);
    max-width: calc((100% - 2 * var(--cat-gap)) / 3);
}

.cat-link{
    display:flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding:16px;
    text-decoration:none;
    color:#111;
    width:100%;
}

.cat-thumb{
    width:180px; height:180px;
    flex:0 0 180px;
    border-radius:14px;
    overflow:hidden;
    background:#f5f6f9;
}
.cat-thumb img{
    width:100%; height:100%;
    object-fit:cover; display:block;
}

.cat-card-body{
    display:flex;
    flex-direction:column;
    min-width:0;
}
.cat-card-title{
    font-family: "Grold Thin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight:700;
    font-size:18px;
    line-height:1.25;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cat-card-sub{
    font-size:14px;
    color:#6b7280; margin-top:4px;
}

.cat-card:hover{
    border-color:#dfe3eb;
    box-shadow:0 8px 18px rgba(0,0,0,.10);
    transform: translateY(-2px);
}

/* Sécurité box-sizing */
.cat-grid, .cat-card, .cat-link, .cat-thumb, .cat-card-body, .cat-card-title{ box-sizing:border-box; }

.display-all-article-container{
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 50px;
}
.display-all-articles{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px auto 60px;
    padding: 18px;
    border: 0;
    border-radius: 9999px;
    background: var(--primary-yellow, #ffd64d);
    color: #1f2328;
    font-family: "Grold", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
    transform: translateY(0);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background-color .2s ease;
}

.display-all-articles:hover{
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
    filter: brightness(1.02);
}

.display-all-articles:active{
    transform: translateY(0) scale(.99);
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

.display-all-articles:focus-visible{
    outline: none;
    box-shadow: 0 6px 14px rgba(0,0,0,.12), 0 0 0 3px rgba(0,0,0,.08), 0 0 0 6px rgba(255,214,77,.45);
}

.display-all-articles:disabled{
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

@media (max-width: 900px){
    .cat-card{
        flex-basis: calc((100% - 1 * var(--cat-gap)) / 2);
        max-width: calc((100% - 1 * var(--cat-gap)) / 2);
    }
    .cat-thumb{ width:130px; height:130px; flex-basis:130px; }
}

@media (max-width: 720px){
    .cat-hero--compact{ min-height: 220px; }
    .cat-breadcrumb{ font-size:12px; top:10px; left:10px; padding:6px 8px; }
    .cat-grid{ gap:16px; }
    .cat-thumb{ width:120px; height:120px; flex-basis:120px; }
    .cat-link{ padding:14px; gap:14px; }
    .cat-card-title{ font-size:17px; }
}

@media (max-width: 480px){
    .cat-card{
        flex-basis: 100%;
        max-width: 100%;
    }
    .display-all-articles{
        width: calc(100% - 32px);
        max-width: 420px;
    }
    .cat-thumb{ width:110px; height:110px; flex-basis:110px; }
    .cat-link{ padding:12px; gap:12px; }
    .cat-card-title{ font-size:16px; }
}