/* ============================================================================ */
/* BLOG — styles dédiés                                                          */
/* Cohérent avec l'identité HUMAN REC (noir, rouge, gris, sans superflu)         */
/* ============================================================================ */

/* Variables CSS — repris du site (au cas où ce CSS est chargé seul) */
:root {
    --blog-max-width: 760px;
    --blog-grid-max: 1200px;
}

/* ============================================================================ */
/* BLOG INDEX & CATÉGORIES                                                       */
/* ============================================================================ */

.blog-index-hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.blog-index-hero h1 {
    font-family: 'Clash Display', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin: 1.5rem 0 1rem;
    letter-spacing: -0.02em;
}

.blog-index-hero h1 span {
    color: var(--red, #e63946);
}

.blog-index-hero .lead {
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.85;
}

/* Filtres catégorie */
.blog-categories {
    max-width: var(--blog-grid-max);
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.cat-pill {
    padding: 0.55rem 1.25rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    text-decoration: none;
    color: var(--gray, #a8a8a8);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: transparent;
}

.cat-pill:hover {
    border-color: var(--red, #e63946);
    color: #fff;
}

.cat-pill.active {
    background: var(--red, #e63946);
    border-color: var(--red, #e63946);
    color: #fff;
}

/* Grid articles */
.blog-grid-section {
    max-width: var(--blog-grid-max);
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: rgba(230, 57, 70, 0.4);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0a0a0a;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: grayscale(0.2);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
    filter: grayscale(0);
}

.blog-card-body {
    padding: 1.5rem 1.5rem 1.75rem;
}

.blog-card-cat {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--red, #e63946);
    margin-bottom: 0.75rem;
}

.blog-card h2 {
    font-family: 'Clash Display', sans-serif;
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
    margin: 0 0 1rem;
}

.blog-card-meta {
    font-size: 0.85rem;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-sep {
    opacity: 0.4;
}

.blog-empty {
    text-align: center;
    padding: 6rem 2rem;
    opacity: 0.7;
}

/* ============================================================================ */
/* ARTICLE                                                                       */
/* ============================================================================ */

.blog-article {
    color: #fff;
}

.article-hero {
    width: 100%;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: #0a0a0a;
    margin-bottom: 2.5rem;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta-wrap,
.article-title-wrap,
.article-body,
.article-author,
.article-cta,
.article-related {
    max-width: var(--blog-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.breadcrumb {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--red, #e63946);
}

.breadcrumb [aria-current="page"] {
    opacity: 0.7;
}

.article-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-category {
    color: var(--red, #e63946);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
}

.article-title-wrap {
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

.article-title-wrap h1 {
    font-family: 'Clash Display', sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
}

.article-lede {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0 0 1.5rem;
}

.article-tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tags li {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 2px;
    color: rgba(255,255,255,0.7);
}

/* Corps article — typographie longue lecture */
.article-body {
    font-size: 1.075rem;
    line-height: 1.75;
    margin-bottom: 4rem;
}

.article-body > * + * {
    margin-top: 1.5rem;
}

.article-body h2 {
    font-family: 'Clash Display', sans-serif;
    font-size: 1.85rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-top: 3.5rem !important;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.article-body h3 {
    font-family: 'Clash Display', sans-serif;
    font-size: 1.35rem;
    line-height: 1.3;
    margin-top: 2.5rem !important;
    margin-bottom: 0.75rem;
}

.article-body h4 {
    font-size: 1.1rem;
    margin-top: 2rem !important;
    margin-bottom: 0.5rem;
    color: var(--red, #e63946);
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body a {
    color: var(--red, #e63946);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.article-body a:hover {
    opacity: 0.75;
}

.article-body ul,
.article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 3px solid var(--red, #e63946);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    opacity: 0.85;
    font-size: 1.15rem;
    line-height: 1.6;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

.article-body strong {
    color: #fff;
    font-weight: 600;
}

.article-body code {
    background: rgba(255,255,255,0.08);
    padding: 0.15em 0.4em;
    border-radius: 2px;
    font-size: 0.92em;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.article-body th,
.article-body td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.article-body th {
    color: var(--red, #e63946);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Bloc auteur */
.article-author {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--red, #e63946);
    border-radius: 4px;
    margin-bottom: 4rem;
}

.author-avatar {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: #0a0a0a;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

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

.author-bio strong {
    display: block;
    margin-bottom: 0.25rem;
    font-family: 'Clash Display', sans-serif;
    font-size: 1.1rem;
}

.author-bio p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin: 0 0 0.5rem;
}

.author-link {
    color: var(--red, #e63946);
    text-decoration: none;
    font-size: 0.9rem;
}

.author-link:hover {
    text-decoration: underline;
}

/* CTA contact */
.article-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(230, 57, 70, 0.06);
    border-radius: 4px;
    margin-bottom: 5rem;
}

.article-cta h2 {
    font-family: 'Clash Display', sans-serif;
    font-size: 2rem;
    margin: 0 0 1rem;
}

.article-cta p {
    max-width: 500px;
    margin: 0 auto 1.5rem;
    opacity: 0.85;
    line-height: 1.6;
}

/* Articles similaires */
.article-related {
    margin-bottom: 5rem;
}

.article-related h2 {
    font-family: 'Clash Display', sans-serif;
    font-size: 1.75rem;
    margin: 0 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.related-card:hover {
    border-color: rgba(230, 57, 70, 0.4);
}

.related-card a {
    text-decoration: none;
    color: inherit;
}

.related-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    filter: grayscale(0.2);
    transition: filter 0.3s;
}

.related-card:hover img {
    filter: grayscale(0);
}

.related-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.related-cat {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red, #e63946);
    margin-bottom: 0.5rem;
}

.related-card h3 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
}

.related-card time {
    font-size: 0.8rem;
    opacity: 0.55;
}

/* ============================================================================ */
/* RESPONSIVE                                                                    */
/* ============================================================================ */

@media (max-width: 768px) {
    .blog-index-hero {
        padding: 6rem 1.5rem 3rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-hero {
        margin-bottom: 1.5rem;
    }

    .article-meta-wrap,
    .article-title-wrap,
    .article-body,
    .article-author,
    .article-cta,
    .article-related {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-author {
        flex-direction: column;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card img,
    .related-card,
    .related-card img {
        transition: none;
    }
}
