/**
 * AEC Collection — Blog homepage
 * Design system : EB Garamond + Work Sans, palette #1a1a1a / #5a5a5a / #101996 / #318e96
 *
 * Inspiration : Le Collectionist, Emerald Stay — éditorial, aéré, image-led.
 */

:root {
    --aec-c-text: #1a1a1a;
    --aec-c-text-soft: #5a5a5a;
    --aec-c-text-mute: #a7a7a7;
    --aec-c-accent: #318e96;
    --aec-c-cta: #101996;
    --aec-c-bg: #ffffff;
    --aec-c-bg-soft: #fafafa;
    --aec-c-bg-warm: #f6f3ee;
    --aec-c-border: #ececec;
    --aec-c-border-soft: #f4f4f4;
    --aec-font-serif: 'EB Garamond', Georgia, serif;
    --aec-font-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --aec-bh-wrap: 1280px;
}

.aec-blog-home {
    color: var(--aec-c-text);
    font-family: var(--aec-font-sans);
    font-size: 16px;
    line-height: 1.65;
    background: var(--aec-c-bg);
    overflow-x: hidden;
}

.aec-blog-home *,
.aec-blog-home *::before,
.aec-blog-home *::after {
    box-sizing: border-box;
}

.aec-blog-home a {
    color: inherit;
    text-decoration: none;
}

/* Shared eyebrow */
.aec-blog-home .aec-eyebrow {
    display: inline-block;
    font-family: var(--aec-font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--aec-c-accent);
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  HERO ÉDITORIAL                                                      */
/* ═══════════════════════════════════════════════════════════════════ */

.aec-bh-hero {
    background: var(--aec-c-bg-warm);
    padding: clamp(72px, 12vw, 140px) 0 clamp(56px, 8vw, 96px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.aec-bh-hero::before {
    /* léger motif de bord, presque invisible — donne du caractère sans charger */
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top left, rgba(49, 142, 150, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at bottom right, rgba(16, 25, 150, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* === Variante : hero avec photo de fond === */
.aec-bh-hero--has-image {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
    min-height: clamp(420px, 60vh, 640px);
    padding: clamp(96px, 14vw, 180px) 0 clamp(72px, 10vw, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aec-bh-hero--has-image::before {
    /* en mode photo, on supprime les radial gradients */
    display: none;
}

.aec-bh-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 26, 26, 0.10) 0%, rgba(26, 26, 26, 0.55) 100%),
        linear-gradient(180deg, rgba(26, 26, 26, 0.18) 0%, rgba(26, 26, 26, 0) 35%);
    pointer-events: none;
}

.aec-bh-hero--has-image .aec-bh-hero__wrap {
    color: #ffffff;
}

.aec-bh-hero--has-image .aec-bh-hero__eyebrow {
    color: #ffffff;
    opacity: 0.92;
}

.aec-bh-hero--has-image .aec-bh-hero__title {
    color: #ffffff;
    text-shadow: 0 1px 24px rgba(0, 0, 0, 0.28);
}

.aec-bh-hero--has-image .aec-bh-hero__lede {
    color: rgba(255, 255, 255, 0.93);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

.aec-bh-hero__wrap {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

.aec-bh-hero__eyebrow {
    margin-bottom: 24px;
}

.aec-bh-hero__title {
    font-family: var(--aec-font-serif);
    font-weight: 400;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 24px;
    color: var(--aec-c-text);
}

.aec-bh-hero__lede {
    font-family: var(--aec-font-serif);
    font-style: italic;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.5;
    color: var(--aec-c-text-soft);
    margin: 0;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  FILTRES RÉGIONS (sticky)                                            */
/* ═══════════════════════════════════════════════════════════════════ */

.aec-bh-filters {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--aec-c-border);
}

.aec-bh-filters__wrap {
    max-width: var(--aec-bh-wrap);
    margin: 0 auto;
    padding: 18px clamp(20px, 4vw, 40px);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.aec-bh-filters__wrap::-webkit-scrollbar {
    display: none;
}

.aec-bh-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 18px;
    font-family: var(--aec-font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--aec-c-text-soft);
    background: transparent;
    border: 1px solid var(--aec-c-border);
    border-radius: 999px;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.aec-bh-chip:hover {
    color: var(--aec-c-text);
    border-color: var(--aec-c-text-soft);
}

.aec-bh-chip.is-active {
    color: #ffffff;
    background: var(--aec-c-accent);
    border-color: var(--aec-c-accent);
}

.aec-bh-chip__count {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.6;
}

.aec-bh-chip.is-active .aec-bh-chip__count {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  FEATURED ARTICLE (hero card)                                        */
/* ═══════════════════════════════════════════════════════════════════ */

.aec-bh-featured {
    max-width: var(--aec-bh-wrap);
    margin: clamp(48px, 7vw, 80px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

.aec-bh-featured__link {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(32px, 5vw, 56px);
    align-items: center;
}

.aec-bh-featured__media {
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--aec-c-bg-soft);
    transition: transform 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    font-family: var(--aec-font-serif);
    font-size: 80px;
    font-weight: 400;
    letter-spacing: 0.04em;
    overflow: hidden;
}

.aec-bh-featured__link:hover .aec-bh-featured__media {
    transform: scale(1.02);
}

.aec-bh-featured__placeholder-glyph {
    user-select: none;
}

.aec-bh-featured__body {
    padding: 12px 0;
}

.aec-bh-featured__eyebrow {
    margin-bottom: 16px;
}

.aec-bh-featured__title {
    font-family: var(--aec-font-serif);
    font-weight: 400;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.15;
    margin: 0 0 20px;
    color: var(--aec-c-text);
    letter-spacing: -0.005em;
    transition: color 0.2s ease;
}

.aec-bh-featured__link:hover .aec-bh-featured__title {
    color: var(--aec-c-accent);
}

.aec-bh-featured__lede {
    font-family: var(--aec-font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--aec-c-text-soft);
    margin: 0 0 28px;
    max-width: 480px;
}

.aec-bh-featured__cta {
    font-family: var(--aec-font-sans);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--aec-c-accent);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: gap 0.2s ease;
}

.aec-bh-featured__link:hover .aec-bh-featured__cta {
    gap: 16px;
}

@media (max-width: 768px) {
    .aec-bh-featured__link {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .aec-bh-featured__media {
        aspect-ratio: 16 / 10;
    }
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  GRILLE PRINCIPALE                                                   */
/* ═══════════════════════════════════════════════════════════════════ */

.aec-bh-grid-section {
    max-width: var(--aec-bh-wrap);
    margin: clamp(32px, 5vw, 64px) auto clamp(80px, 10vw, 120px);
    padding: 0 clamp(20px, 4vw, 40px);
}

.aec-bh-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 36px);
}

@media (max-width: 980px) {
    .aec-bh-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .aec-bh-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* Card */
.aec-bh-card {
    display: flex;
    flex-direction: column;
}

.aec-bh-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.aec-bh-card__media {
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--aec-c-bg-soft);
    overflow: hidden;
    transition: transform 0.5s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.22);
    font-family: var(--aec-font-serif);
    font-size: 56px;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
}

.aec-bh-card__placeholder-glyph {
    user-select: none;
}

.aec-bh-card__link:hover .aec-bh-card__media {
    transform: scale(1.025);
}

.aec-bh-card__body {
    padding: 0 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aec-bh-card__eyebrow {
    margin-bottom: 10px;
}

.aec-bh-card__title {
    font-family: var(--aec-font-serif);
    font-weight: 400;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.25;
    color: var(--aec-c-text);
    margin: 0 0 12px;
    letter-spacing: -0.003em;
    transition: color 0.2s ease;
}

.aec-bh-card__link:hover .aec-bh-card__title {
    color: var(--aec-c-accent);
}

.aec-bh-card__lede {
    font-family: var(--aec-font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--aec-c-text-soft);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  PAGINATION                                                          */
/* ═══════════════════════════════════════════════════════════════════ */

.aec-bh-pagination {
    margin-top: clamp(48px, 6vw, 72px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.aec-bh-pagination__item .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-family: var(--aec-font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--aec-c-text-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.aec-bh-pagination__item .page-numbers:hover {
    color: var(--aec-c-text);
    border-color: var(--aec-c-border);
}

.aec-bh-pagination__item .page-numbers.current {
    color: #ffffff;
    background: var(--aec-c-text);
    border-color: var(--aec-c-text);
}

.aec-bh-pagination__item .page-numbers.dots {
    border: none;
    cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  EMPTY STATE                                                         */
/* ═══════════════════════════════════════════════════════════════════ */

.aec-bh-empty {
    text-align: center;
    padding: clamp(80px, 12vw, 140px) clamp(20px, 4vw, 40px);
    color: var(--aec-c-text-soft);
    font-family: var(--aec-font-serif);
    font-style: italic;
    font-size: 20px;
}

.aec-bh-empty a {
    color: var(--aec-c-cta);
    border-bottom: 1px solid currentColor;
    font-style: normal;
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  Mobile fine-tuning                                                  */
/* ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .aec-bh-hero {
        padding: 60px 0 48px;
    }
    .aec-bh-filters__wrap {
        padding: 14px 16px;
    }
    .aec-bh-chip {
        padding: 8px 14px;
        font-size: 12px;
    }
    .aec-bh-card__media {
        font-size: 44px;
    }
}

/* === Override des wrappers Pura/Elementor === */
.blog .site-content,
.blog .container,
.blog .row {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.blog .content-area,
.blog .primary {
    width: 100% !important;
    padding: 0 !important;
}

.blog .page-title-wrap,
.blog .pura-page-title,
.blog .pura-breadcrumb-wrap {
    display: none !important;
}
