/* =============================================================
   Blog — Muriel Lenégaret
   Ajustements CSS au-dessus des templates Elementor Pro.
   Chargé conditionnellement depuis hello-elementor-child/functions.php
   sur les vues blog (page Blog, single post, archives).
   ============================================================= */

:root {
    --ml-primary: #B72854;
    --ml-primary-light: #FBE9EE;
    --ml-navy: #012D43;
    --ml-cyan: #0EC7DE;
    --ml-bg-soft: #FAF7F4;
    --ml-text-muted: #7d7676;
    --ml-card-shadow: 0 4px 24px rgba(1, 45, 67, 0.08);
    --ml-card-shadow-hover: 0 8px 32px rgba(1, 45, 67, 0.14);
}

/* ---------- Cards (Loop Item) ---------- */

.ml-blog .e-loop-item,
.ml-blog .elementor-loop-item {
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.ml-blog .e-loop-item:hover,
.ml-blog .elementor-loop-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--ml-card-shadow-hover);
}

/* Featured image uniforme 16/10 cropée pour toutes les cards (évite cards inégales). */
.ml-blog .e-loop-item .elementor-widget-theme-post-featured-image,
.ml-blog .elementor-loop-item .elementor-widget-theme-post-featured-image {
    width: 100%;
}
.ml-blog .e-loop-item .elementor-widget-theme-post-featured-image img,
.ml-blog .elementor-loop-item .elementor-widget-theme-post-featured-image img,
.ml-blog .e-loop-item .elementor-widget-image img,
.ml-blog .elementor-loop-item .elementor-widget-image img {
    width: 100% !important;
    aspect-ratio: 16 / 10;
    height: auto !important;
    object-fit: cover !important;
    display: block;
}

/* Hello Elementor pose souvent une contrainte de largeur sur main / .site-main.
   On la lève sur les pages de blog pour que la section prenne toute la largeur. */
.ml-blog main,
.ml-blog .site-main,
.ml-blog #content,
.ml-blog .page-content {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Section blog : full-width avec contenu max 1440px centré + 2 cols */
.ml-blog .ml-blog-section {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    gap: 48px;
}
.ml-blog .ml-blog-section > .e-con:first-child,
.ml-blog .ml-blog-section > .e-con-inner > .e-con:first-child {
    flex: 0 0 calc(100% - 388px) !important;
    width: calc(100% - 388px) !important;
    --width: calc(100% - 388px);
    min-width: 0;
}
.ml-blog .ml-blog-section > .e-con:last-child,
.ml-blog .ml-blog-section > .e-con-inner > .e-con:last-child {
    flex: 0 0 340px !important;
    width: 340px !important;
    --width: 340px;
}

/* Responsive : sous 1024px, sidebar passe sous le grid */
@media (max-width: 1024px) {
    .ml-blog .ml-blog-section {
        flex-wrap: wrap;
    }
    .ml-blog .ml-blog-section > .e-con:first-child,
    .ml-blog .ml-blog-section > .e-con-inner > .e-con:first-child,
    .ml-blog .ml-blog-section > .e-con:last-child,
    .ml-blog .ml-blog-section > .e-con-inner > .e-con:last-child {
        flex: 1 1 100% !important;
        width: 100% !important;
        --width: 100%;
    }
}

/* Cards Loop Grid : forcer 2 cols à pleine largeur de la colonne */
.ml-blog .elementor-loop-container,
.ml-blog .elementor-grid {
    width: 100%;
}

/* Description archive (theme-archive-description) sous le titre */
.ml-blog .ml-archive-description {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.ml-blog .ml-archive-description p {
    margin-bottom: 0.8em;
    line-height: 1.65;
}

/* Pill catégorie */
.ml-blog .ml-card-pill {
    display: inline-block !important;
    width: auto !important;
    align-self: flex-start;
    background: var(--ml-primary-light);
    color: var(--ml-primary) !important;
    font-family: "Jost", sans-serif !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
    line-height: 1.4 !important;
    margin: 0 !important;
}
.ml-blog .ml-card-pill a {
    color: inherit;
    text-decoration: none;
}

/* Titre carte */
.ml-blog .ml-card-title,
.ml-blog .e-loop-item h3.elementor-heading-title {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--ml-navy);
    margin: 0;
}
.ml-blog .ml-card-title a,
.ml-blog .e-loop-item h3.elementor-heading-title a {
    color: inherit;
    text-decoration: none;
    transition: color 150ms ease;
}
.ml-blog .ml-card-title a:hover,
.ml-blog .e-loop-item h3.elementor-heading-title a:hover {
    color: var(--ml-primary);
}

/* Footer carte (date + lire) */
.ml-blog .ml-card-footer {
    border-top: 1px dashed #e8e0e0;
    padding-top: 16px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.ml-blog .ml-card-footer .elementor-post-info__item--type-date,
.ml-blog .ml-card-date {
    color: var(--ml-text-muted);
    font-family: "Jost", sans-serif;
    font-size: 0.85rem;
}
.ml-blog .ml-card-link a,
.ml-blog .ml-card-footer .elementor-button {
    color: var(--ml-primary) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.ml-blog .ml-card-link a:hover {
    text-decoration: underline;
}

/* ---------- Eyebrow titles ---------- */

.ml-blog .ml-eyebrow,
.ml-blog .ml-eyebrow .elementor-heading-title {
    font-family: "Jost", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ml-primary);
    margin: 0 0 24px;
}

/* ---------- Hero ---------- */

.ml-blog .ml-blog-hero {
    min-height: 420px;
}
.ml-blog .ml-blog-hero h1 {
    font-family: "Jost", sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 600;
    color: var(--ml-navy);
    text-align: center;
    margin: 0;
}
.ml-blog .ml-blog-hero .ml-tagline {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.15rem;
    text-align: center;
    color: var(--ml-navy);
    opacity: 0.85;
}

/* ---------- Sidebar boxes ---------- */

.ml-blog .ml-sidebar-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: var(--ml-card-shadow);
    margin-bottom: 32px;
}

.ml-blog .ml-sidebar-box .ml-author-photo img {
    border-radius: 50%;
    width: 110px;
    height: 110px;
    object-fit: cover;
}
.ml-blog .ml-sidebar-box .ml-author-name {
    font-family: "Jost", sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ml-navy);
    text-align: center;
    margin: 12px 0 4px;
}
.ml-blog .ml-sidebar-box .ml-author-role {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    color: var(--ml-primary);
    text-align: center;
    font-size: 0.95rem;
    margin: 0 0 16px;
}
.ml-blog .ml-sidebar-box .ml-author-bio {
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    line-height: 1.55;
    text-align: center;
    color: var(--ml-navy);
}

/* Liste catégories */
.ml-blog .ml-sidebar-box ul.elementor-icon-list-items,
.ml-blog .ml-sidebar-box .wp-block-categories,
.ml-blog .ml-sidebar-box .widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ml-blog .ml-sidebar-box .widget_categories li,
.ml-blog .ml-sidebar-box ul.elementor-icon-list-items li {
    border-bottom: 1px solid #f0e8e8;
    padding: 12px 0;
}
.ml-blog .ml-sidebar-box .widget_categories li:last-child,
.ml-blog .ml-sidebar-box ul.elementor-icon-list-items li:last-child {
    border-bottom: none;
}
.ml-blog .ml-sidebar-box .widget_categories a {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.05rem;
    color: var(--ml-navy);
    text-decoration: none;
    transition: color 150ms ease;
}
.ml-blog .ml-sidebar-box .widget_categories a:hover {
    color: var(--ml-primary);
}

/* ---------- Pagination Loop Grid ---------- */

.ml-blog .elementor-pagination .page-numbers,
.ml-blog .e-load-more-anchor + nav .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0 3px;
    border-radius: 4px;
    font-family: "Jost", sans-serif;
    font-size: 0.95rem;
    color: var(--ml-navy);
    background: transparent;
    text-decoration: none;
}
.ml-blog .elementor-pagination .page-numbers.current {
    background: var(--ml-primary);
    color: #fff;
}
.ml-blog .elementor-pagination .page-numbers:hover {
    color: var(--ml-primary);
}

/* ---------- Single post ---------- */

.ml-single .entry-content,
.ml-single .elementor-widget-theme-post-content {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--ml-navy);
}
.ml-single .entry-content p,
.ml-single .elementor-widget-theme-post-content p {
    margin-bottom: 1.4em;
}
.ml-single h2, .ml-single h3 {
    font-family: "Jost", sans-serif;
    color: var(--ml-navy);
}

.ml-single p.ml-lead {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.55;
    color: var(--ml-navy);
    border-left: 3px solid var(--ml-primary);
    padding-left: 18px;
    margin: 0 0 32px;
}

.ml-single .ml-event-card {
    background: var(--ml-bg-soft);
    border-left: 3px solid var(--ml-primary);
    padding: 22px 26px;
    border-radius: 12px;
    margin: 36px 0;
    font-family: "Jost", sans-serif;
}
.ml-single .ml-event-card h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ml-navy);
}
.ml-single .ml-event-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ml-navy);
    font-size: 0.95rem;
    line-height: 1.7;
}
.ml-single .ml-event-card a {
    color: var(--ml-primary);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .ml-blog .ml-blog-hero {
        min-height: 280px;
    }
    .ml-blog .ml-sidebar-box {
        padding: 24px;
    }
}
