/* =====================================================================
   EC GROUP — habillage du blog CMS-Core
   Chargé APRÈS blog.css (voir themes/ec-group/header.php), uniquement sur les
   pages du CMS. N'affecte pas les autres pages du site.
   Toutes les couleurs et typographies sont celles de style.css :
   --gold #D4B866, --gold-dark #b89a50, --dark #1a1a1a, --gray-light #f8f9fa,
   --gray-border #e0e0e0, --text-main #333, --text-muted #666 ; Montserrat
   (texte et titres) et Poppins (hero), comme .hero du site.
   ===================================================================== */

/* blog.css redéfinit ces variables au niveau :root : on les ramène à la
   charte EC GROUP (sinon header et footer changeraient aussi de couleur). */
:root {
    --text-main: #333;
    --text-muted: #666;
    --primary: var(--gold-dark);
    --secondary: var(--dark);
    --border: var(--gray-border);
    --border-accent: var(--gold);
    --bg-accent-soft: rgba(212, 184, 102, .15);   /* --gold à 15 % */
    --shadow-card: 0 5px 15px rgba(0, 0, 0, .05);  /* .news-card */
    --shadow-lifted: 0 15px 30px rgba(0, 0, 0, .1);
}

.blog-main,
.article-main {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}
.blog-main *,
.article-main * { font-family: inherit; }
.article-content code,
.article-content pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.blog-main { background: var(--gray-light); }
.article-main { background: #fff; }

/* Largeur de contenu alignée sur les sections du site */
.blog-main .container,
.article-main .container { max-width: 1200px; }

/* style.css masque toute balise <nav> sous 992 px (menu du site) :
   on préserve le fil d'Ariane et la pagination du blog. */
.article-main nav.article-breadcrumb { display: block; }
.blog-main nav.blog-pagination { display: flex; }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- Hero : même rendu que .hero du site (Poppins, titre doré en capitales) --- */
.blog-hero {
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 70px 0 56px;
    background: #000;
    color: #fff;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}
.blog-hero .container { max-width: 900px; }
.blog-hero * { font-family: 'Poppins', sans-serif; }
/* Le sous-titre répète déjà « actualités, événements et partenaires » : pas de sur-titre dans le hero. */
.blog-hero .hero-badge { display: none; }
.blog-hero h1 {
    margin: 0 0 20px;
    color: var(--gold);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, .9);
}
.blog-hero p {
    max-width: 800px;
    margin: 0 auto;
    color: #f0f0f0;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.8;
}
@media (max-width: 992px) {
    .blog-hero { padding: 48px 0 40px; }
    .blog-hero h1 { font-size: 1.6rem; letter-spacing: 1px; }
}

/* --- Liste : cartes alignées sur .news-card --- */
.blog-listing { padding-top: 60px; padding-bottom: 80px; }
.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.blog-card {
    border: 0;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lifted); }
/* Les attributs width/height de l'<img> imposaient 360 px de haut : hauteur fixe de 200 px
   (comme .news-image), format horizontal, object-fit: cover. */
.blog-card > a { display: block; overflow: hidden; }
.blog-card img {
    display: block;
    width: 100%;
    height: 200px;
    aspect-ratio: auto;
    object-fit: cover;
    transition: transform .5s ease;
}
.blog-card:hover img { transform: scale(1.05); }
.blog-card-content { padding: 25px; }
.blog-card h2 { margin: 0 0 .8rem; color: var(--dark); font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.blog-card h2 a { color: var(--dark); transition: color .3s; }
.blog-card h2 a:hover { color: var(--gold-dark); }
.blog-card p { margin-bottom: 1rem; color: var(--text-muted); font-size: .95rem; }
.blog-card-meta,
.blog-card time { color: #999; font-size: .85rem; }

/* Badges : même principe que .news-category */
.blog-category {
    margin-bottom: 0;
    padding: 5px 12px;
    border-radius: 4px;
    background: var(--gold);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
}
/* Tout est une actualité : on n'affiche pas le type de contenu, seulement la catégorie. */
.content-type-badge { display: none; }
.article-collection {
    margin-left: .35rem;
    padding: 5px 12px;
    border-radius: 4px;
    background: var(--bg-accent-soft);
    color: var(--dark);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.blog-pagination a { color: var(--gold-dark); font-weight: 600; }
.blog-pagination a:hover { color: var(--dark); }
.blog-empty h2 { color: var(--dark); }

@media (max-width: 620px) {
    .blog-card img { height: 180px; }
    .blog-card-content { padding: 20px; }
}

/* --- Article --- */
/* style.css définit déjà .article-cover et .article-meta pour une autre page, et stylise la
   balise <header> nue (barre sticky du site) : on neutralise ces règles dans le périmètre du blog. */
.article-main header.article-header {
    display: block;
    position: static;
    padding: 0;
    background: none;
    box-shadow: none;
    justify-content: normal;
    align-items: normal;
    z-index: auto;
}
.article-main .article-cover {
    height: auto;
    max-height: 420px;
    box-shadow: none;
    border-radius: 12px;
    margin-bottom: 3.5rem;
}
.article-main .article-meta {
    display: flex;
    gap: .45rem 1rem;
    margin: 1.5rem 0 0;
    font-size: .85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: #999;
}
.article-header h1 {
    margin: .5rem 0 1.2rem;
    color: var(--dark);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.article-excerpt { color: var(--text-muted); font-size: 1.2rem; font-weight: 300; line-height: 1.7; }
.article-header time { color: #999; }

.article-content { color: var(--text-main); font-size: 1.1rem; line-height: 1.8; }
.article-content h2,
.article-content h3,
.article-content h4 { color: var(--dark); font-weight: 700; }
.article-content strong { color: var(--dark); }
.article-content a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--dark); }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; }
.article-content blockquote {
    border-left: 4px solid var(--gold);
    background: var(--bg-accent-soft);
    font-style: italic;
}
.article-content th { background: var(--bg-accent-soft); }
.article-content pre { background: var(--dark); color: #f0f0f0; }

.article-main .article-breadcrumb a { color: var(--gold-dark); }
.article-breadcrumb li:not(:last-child)::after { color: #ccc; }
.article-breadcrumb a:hover,
.article-breadcrumb a:focus-visible,
.article-breadcrumb .breadcrumb-category { color: var(--gold-dark); }

/* Barre de lecture : se place sous le header sticky d'EC GROUP */
.article-reading-bar { top: var(--ec-header-height, 115px); z-index: 900; }
.article-reading-bar strong { color: var(--dark); }
@media (max-width: 768px) {
    :root { --ec-header-height: 110px; }
    .article-main .article-cover { height: auto; }
    .article-header h1 { font-size: 1.8rem; }
}

/* CTA de fin d'article : fond noir, bouton doré à texte blanc (comme .btn-main du site) */
.article-cta {
    background: var(--dark);
    border: 0;
    border-radius: 12px;
    color: #fff;
}
.article-cta h2,
.article-cta p,
.article-cta .article-cta-reassurance { color: #fff; }
.article-cta .article-cta-label { color: var(--gold); }
.article-cta h2 { font-weight: 700; }
.article-cta .btn,
.article-cta a.btn {
    display: inline-block;
    padding: 14px 30px;
    border: 0;
    border-radius: 50px;
    background: var(--gold);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 184, 102, .4);
    transition: all .3s ease;
}
.article-cta .btn:hover,
.article-cta a.btn:hover { background: #fff; color: var(--gold); transform: translateY(-3px); }

.preview-banner { font-family: 'Montserrat', sans-serif; }

/* Éléments « guides PDF » : désactivés sur EC GROUP, couleurs alignées par précaution */
.guide-download { border-color: var(--gold); background: var(--gray-light); box-shadow: var(--shadow-card); }
.guide-download-icon { background: var(--gold); box-shadow: none; }
.blog-guide-badge { background: var(--gold); box-shadow: none; }

/* --- Informations éditoriales (date, source) : ligne discrète, plus de bandeau pleine largeur --- */
.article-main .content-profile-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem 1.5rem;
    max-width: 760px;
    margin: -1.5rem auto 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    overflow: visible;
}
.article-main .content-profile-meta div {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    padding: 0;
    background: none;
    font-size: .85rem;
}
.article-main .content-profile-meta dt {
    margin: 0;
    color: #999;
    font-size: .85rem;
    font-weight: 400;
    text-transform: none;
}
.article-main .content-profile-meta dt::after { content: " :"; }
.article-main .content-profile-meta dd { margin: 0; color: var(--text-muted); font-size: .85rem; font-weight: 500; }
.article-main .content-profile-meta a { color: var(--gold-dark); }

/* --- Médias dans le contenu : toujours dans la largeur éditoriale, responsives --- */
.article-content img { display: block; max-width: 100%; height: auto; margin: 2rem auto; }
.article-content figure { margin: 2rem 0; }
.article-content figure img { margin: 0 auto; }
.article-content figcaption { color: var(--text-muted); font-size: .85rem; text-align: center; }
.article-content iframe,
.article-content video { display: block; max-width: 100%; border: 0; border-radius: 8px; }

/* Galerie (style.css fournit déjà la grille .article-gallery-grid) : on neutralise les marges d'image */
.article-content .article-gallery-grid { margin: 2rem 0; }
.article-content .article-gallery-grid img { width: 100%; height: 200px; margin: 0; object-fit: cover; }
@media (max-width: 620px) { .article-content .article-gallery-grid img { height: 160px; } }

/* Vidéo responsive 16:9 (.article-video-container est défini dans style.css) */
.article-content .article-video-container { margin: 2rem 0; }

/* --- Partage de l'article : pastilles sobres aux couleurs EC GROUP --- */
.article-share { border-top-color: var(--gray-border); }
.article-share-label { color: var(--gold-dark); font-weight: 700; letter-spacing: 2px; }
.share-link {
    padding: 8px 18px;
    border: 1px solid var(--gold);
    border-radius: 50px;
    background: transparent;
    color: var(--dark);
    font-weight: 600;
}
.share-link:hover,
.share-link:focus-visible { background: var(--gold); border-color: var(--gold); color: #fff; }

/* --- Médias de l'article : image, galerie, visionneuse, vidéos (charte EC GROUP) --- */
.article-content .cms-figure img,
.article-content .cms-gallery img { border-radius: 8px; }
.article-content .cms-gallery .is-zoomable img:hover { opacity: 1; outline: 3px solid var(--gold); outline-offset: -3px; }
.article-content .cms-gallery img:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.article-content figcaption { color: var(--text-muted); font-size: .85rem; }
.cms-video-frame,
.cms-embed-frame { border-radius: 12px; box-shadow: var(--shadow-card); }
.cms-lightbox { z-index: 100000; font-family: 'Montserrat', sans-serif; }
.cms-lb-close:hover,
.cms-lb-nav:hover { background: var(--gold); border-color: var(--gold); }
.cms-lb-figure figcaption { color: #fff; font-weight: 400; }
