/*
 * ACTUALITÉS YMAJE - CSS
 * À ajouter dans votre thème child via functions.php
 * Palette : Or #A7864D / Crème #FAF9F7
 */

/* === VARIABLES === */

.cir-hero,
.actualites-section,
.cir-hero *,
.actualites-section * {
    font-family: 'Caviar Dreams', sans-serif !important;
}

/* Supprimer le gap au-dessus du hero */
.cir-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Supprimer les marges de la section principale */
main#primary.site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Supprimer l'espace après le header */
.site-header + main,
#masthead + main {
    margin-top: 0 !important;
}


/* Supprimer l'espace au-dessus du hero - Version propre */
.cir-hero:first-child {
    margin-top: 0 !important;
}

/* Si le hero est dans un conteneur */
.entry-content > .cir-hero:first-child {
    margin-top: -2rem !important;
}

/* Supprimer le padding du conteneur parent */
.entry-content {
    padding-top: 0 !important;
}

/* === PAGE LISTE ACTUALITÉS === */
.actualites-page {
    background: var(--color-bg-cream);
}

.page-header-actualites {
    background: var(--color-bg-nd);
    padding: 4rem 2rem 3rem;
    border-bottom: 1px solid rgba(167, 134, 77, 0.1);
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-header-actualites h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text-black);
    margin-bottom: 1rem;
}

.page-header-actualites .subtitle {
    font-size: 1.2rem;
    color: var(--color-text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.page-header-actualites .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-gray);
    margin-bottom: 2rem;
}

.page-header-actualites .breadcrumb a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.2s;
}

.page-header-actualites .breadcrumb a:hover {
    color: var(--color-gold-dark);
}

.page-header-actualites .breadcrumb span {
    color: var(--color-text-gray);
}

/* Grille d'articles */
.articles-grid-section {
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.article-card {
    background: var(--color-bg-nd);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(167, 134, 77, 0.1);
    position: relative;
    z-index: 1;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

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

/* Réduction de la taille de l'image */
.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: var(--color-bg-nd); /* ← Empêche le logo de transparaître */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block; /* ← Supprime l'espace sous l'image */
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    background: var(--color-bg-nd); /* ← Fond pour correspondre à la carte */
    position: relative;
    z-index: 1;
}

.card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #8A8A8A;
    margin-bottom: 1rem;
}

.card-meta .meta-date {
    color: var(--color-gold);
    font-weight: 600;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-excerpt {
    color: #5A5A5A;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-link-text {
    color: var(--color-gold);
    font-weight: 600;
    font-size: 0.95rem;
}

.article-card:hover .card-link-text {
    color: var(--color-gold-dark);
}

.no-articles {
    text-align: center;
    color: #5A5A5A;
    font-size: 1.2rem;
    padding: 4rem 0;
}

/* === PAGE ARTICLE INDIVIDUEL === */
.article-page {
    background: var(--color-bg-cream);
}

.article-header-single {
    background: var(--color-bg-nd);
    padding: 3rem 2rem 2rem;
    border-bottom: 1px solid rgba(167, 134, 77, 0.1);
    position: relative;
    z-index: 1;
}

.article-header-single .container {
    max-width: 1200px;
    margin: 0 auto;
}

.article-header-single .breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #5A5A5A;
    margin-bottom: 2rem;
}

.article-header-single .breadcrumb a {
    color: var(--color-gold);
    text-decoration: none;
}

.article-header-single .breadcrumb a:hover {
    color: var(--color-gold-dark);
}

.article-header-single h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    max-width: 1200px;
}

.article-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-date,
.meta-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #5A5A5A;
    font-size: 0.95rem;
}

.meta-date svg,
.meta-author svg {
    color: var(--color-gold);
}

.article-content-single {
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

.article-content-single .container {
    max-width: 1200px;
    margin: 0 auto;
}

/*  Réduction de la taille de l'image principale */
.article-image-single {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    max-height: 500px; /* ← Limite la hauteur de l'image */
    position: relative;
    background: var(--color-bg-nd); /* ← Empêche le logo de transparaître */
}

.article-image-single img {
    width: 100%;
    height: 100%;
    max-height: 500px; /* ← Hauteur maximale */
    object-fit: cover; /* ← Recadrage intelligent */
    display: block;
}

.article-body {
    max-width: 1200px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: #2C2C2C;
    line-height: 1.7;
    background: var(--color-cream); /* ← Fond opaque */
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.article-body h2 {
    color: var(--color-gold-dark);
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    font-weight: 600;
}

.article-body h3 {
    color: #2C2C2C;
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

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

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

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

.article-body li strong {
    color: var(--color-gold-dark);
}

.article-body a {
    color: var(--color-gold);
    text-decoration: underline;
}

.article-body a:hover {
    color: var(--color-gold-dark);
}

.article-body blockquote {
    border-left: 4px solid var(--color-gold);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--color-bg-nd);
    font-style: italic;
    color: #5A5A5A;
}

/* ✅ CORRECTION : Images dans le contenu de l'article */
.article-body img {
    max-width: 100%;
    height: auto;
    max-height: 400px; /* ← Limite la hauteur */
    object-fit: cover;
    border-radius: 8px;
    margin: 2rem 0;
    display: block;
    background: var(--color-bg-nd); /* ← Empêche le logo de transparaître */
}

/* Partage */
.article-share {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: var(--color-white);
    border-radius: 12px;
    border: 1px solid rgba(167, 134, 77, 0.1);
    position: relative;
    z-index: 1;
}

.article-share h3 {
    font-size: 1.2rem;
    color: #2C2C2C;
    margin: 0 0 1rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn.linkedin { background: #0077B5; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #1877F2; }
.share-btn.email { background: var(--color-gold); }

/* Retour */
.article-back {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
}

.back-link {
    color: var(--color-gold);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.back-link:hover {
    color: var(--color-gold-dark);
}

/* === CTA SECTION - Commun aux deux pages === */
.cta-section-actualites,
.article-cta {
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    width: 100vw;
    margin-left: calc(-50vw + 50%); 
}

.cta-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-white);
    padding: 4rem 0rem; 
    border-radius: 0;
    text-align: center;
    box-shadow: none;
    margin: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Titres du CTA */
.cta-box h2,
.cta-box h3 {
    font-size: 2rem;
    margin: 0 0 1rem;
    font-weight: 700;
    color: var(--color-white);
}

/* Texte du CTA */
.cta-box p {
    font-size: 1.15rem;
    margin: 0 0 2rem;
    opacity: 0.95;
    line-height: 1.6;
    color: var(--color-white);
}

/* Bouton du CTA */
.cta-button {
    display: inline-block;
    background: var(--color-white);
    color: var(--color-gold-dark);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    background: var(--color-bg-cream);
    color: var(--color-gold-dark);
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
    .page-header-actualites h1 {
        font-size: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* ✅ Images encore plus petites sur mobile */
    .card-image {
        max-height: 180px;
    }
    
    .article-image-single {
        max-height: 300px;
    }
    
    .article-image-single img {
        max-height: 300px;
    }
    
    .article-body img {
        max-height: 250px;
    }
    
    .article-header-single h1 {
        font-size: 1.8rem;
    }
    
    .article-body {
        font-size: 1rem;
        padding: 1.5rem;
    }
    
    .cta-box {
        padding: 2rem 1.5rem;
    }
    
    .cta-box h2,
    .cta-box h3 {
        font-size: 1.5rem;
    }
    
    /* ✅ MASQUER l'extrait et les métadonnées sur mobile - Juste image + titre */
    .article-card .card-meta,
    .article-card .card-excerpt,
    .article-card .card-link-text {
        display: none;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 0;
    }
    
    /* Carte plus compacte sur mobile */
    .article-card {
        border-radius: 8px;
    }
}

/* === CORRECTIONS SUPPLÉMENTAIRES POUR LE LOGO EN ARRIÈRE-PLAN === */

/* S'assurer que tous les conteneurs ont un fond opaque */
.actualites-page .article-card,
.article-page .article-header-single,
.article-page .article-content-single,
.article-page .article-share,
.article-page .cta-box {
    background: var(--color-bg-cream);
    position: relative;
    z-index: 1;
}

/* Si le logo en arrière-plan est défini dans body::before */
body.actualites-page::before,
body.article-page::before {
    opacity: 0.05 !important; /* ← Réduit encore plus l'opacité du logo */
}

/* SUPPRESSION DE L'ESPACE ENTRE CTA ET FOOTER */
.cta-section-actualites + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Forcer le footer à coller */
.cta-section-actualites + footer,
.article-cta + footer,
footer.site-footer,
#colophon {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Supprimer tout élément entre CTA et footer */
.cta-section-actualites ~ *:not(footer) {
    display: none;
}

/* Forcer le footer à coller au CTA */
footer.site-footer {
    margin-top: 0 !important;
}

/* Supprimer tout espacement après le CTA */
.cta-section-actualites {
    margin-bottom: 0 !important;
}

/* Masquer le fil d'Ariane sur la page liste des actualités */
.page .breadcrumb,
.page .entry-header .breadcrumb,
body.page .breadcrumb {
    display: none !important;
}

/* Garder le fil d'Ariane UNIQUEMENT sur les articles individuels */
.single-actualite .breadcrumb {
    display: flex !important;
}

/* Masquer le fil d'Ariane sur la page Actualités uniquement */
body.page nav.breadcrumbs {
    display: none !important;
}

/* Garder le fil d'Ariane sur les articles individuels */
body.single-actualite .article-header-single .breadcrumb {
    display: flex !important;
}

/* Forcer le fond de toute la carte à être uniforme */
.article-card,
.article-card .card-link,
.article-card a {
    background: var(--color-bg-nd) !important;
}

/* S'assurer que tous les éléments de la carte ont le bon fond */
.card-image,
.card-content {
    background: var(--color-bg-nd) !important;
}

/* Supprimer tout fond blanc potentiel */
.article-card * {
    background-color: transparent !important;
}

.article-card,
.card-content {
    background-color: var(--color-bg-nd) !important;
}

