/* ============================================================
   OJOIO BLOG — Styles
   Réutilise les variables et patterns du thème existant
   ============================================================ */

/* ── Background bleu sur body pour combler le margin du main ── */
body.post-type-archive-blog {
    background-color: #085fa7 !important;
}

/* ── Header : forcer le fond blanc ── */
.post-type-archive-blog #header {
    background-color: var(--background-color);
}

/* ── Supprimer le margin-top du footer ── */
.post-type-archive-blog #footer,
.single-blog #footer {
    margin-top: 0;
}

/* ── Dégradé sur tout le main archive ── */
#blog-archive {
    background-image: linear-gradient(to bottom, #085fa7, #0074af, #0086ab, #0096a0, #2ea492);
}

/* ============================================================
   LISTING — Hero
   ============================================================ */
.blog-hero {
    padding: 80px 0 60px;
    text-align: center;
    color: var(--background-color);
}

.blog-hero .container {
    max-width: 650px;
    margin: 0 auto;
}

.blog-hero__title {
    font-weight: 900;
    font-size: 40px;
    font-size: 2.5rem;
    line-height: 1.35em;
    color: var(--background-color);
    margin-bottom: 15px;
}

.blog-hero__title::after {
    content: '';
    display: block;
    width: 76px;
    height: 29px;
    margin: 15px auto 0;
    background: url('../img/title-white.svg') no-repeat 0 0;
}

.blog-hero__description {
    font-size: 15px;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.45em;
    max-width: 550px;
    margin: 25px auto 0;
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 40px;
    }

    .blog-hero__title {
        font-size: 30px;
        font-size: 1.875rem;
    }
}

/* ============================================================
   LISTING — Grid
   ============================================================ */
.blog-listing {
    padding: 50px 0 80px;
}

.blog-listing__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.blog-listing__grid .blog-card {
    width: calc((100% - 60px) / 3);
}

@media (max-width: 935px) {
    .blog-listing__grid .blog-card {
        width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 590px) {
    .blog-listing__grid .blog-card {
        width: 100%;
    }
}

/* ── Card ── */
.blog-card {
    background: var(--background-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    text-align: center;
}

.blog-card__date-wrapper {
    margin-bottom: 24px;
    text-align: center;
}

.blog-card__date {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 50em;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f0f0f0;
}

.blog-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.blog-card__title {
    font-size: 20px;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0 0 16px;
    line-height: 1.35em;
    text-align: left;
    width: 100%;
}

.blog-card__title a {
    text-decoration: none;
    color: var(--primary-color);
    transition: .3s ease color;
}

.blog-card__title a:hover {
    color: var(--footer-color);
}

.blog-card__excerpt {
    font-size: 15px;
    font-size: 0.9375rem;
    color: var(--default-color);
    line-height: 1.45em;
    margin: 0 0 24px;
    flex: 1;
    text-align: left;
    width: 100%;
}

.blog-card__cta {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 16px;
    font-size: 1rem;
    border-radius: 50em;
    transition: .3s ease color, .3s ease background-color;
    align-self: center;
    line-height: 1.35em;
    text-decoration: none;
}

.blog-card__cta:hover {
    color: var(--background-color);
    background-color: var(--primary-color);
}

/* ── Load More ── */
.blog-listing__loadmore {
    text-align: center;
    margin-top: 48px;
}

.blog-listing__btn {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--background-color);
    color: var(--background-color);
    font-size: 16px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50em;
    cursor: pointer;
    transition: .3s ease background-color, .3s ease color;
    line-height: 1.35em;
    font-family: 'Montserrat', sans-serif;
}

.blog-listing__btn:hover,
.blog-listing__btn:focus {
    background: var(--background-color);
    color: var(--primary-color);
}

.blog-listing__btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.blog-listing__btn--loading {
    pointer-events: none;
    opacity: .7;
}

/* ── Fade-in animation (AJAX) ── */
.blog-card--fadein {
    opacity: 0;
    transform: translateY(20px);
    animation: blogCardFadeIn .5s ease forwards;
}

@keyframes blogCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   SINGLE — Hero
   ============================================================ */
.blog-single__hero {
    padding: 40px 0 50px;
}

.blog-single__hero-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.blog-single__hero-spacer {
    flex-shrink: 0;
    width: 150px;
}

.blog-single__title {
    font-size: 40px;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.35em;
    max-width: 800px;
    text-align: center;
    flex: 1;
}

.blog-single__title::after {
    content: '';
    display: block;
    width: 76px;
    height: 29px;
    margin: 15px auto 0;
    background: url('../img/title.svg') no-repeat 0 0;
}

.blog-single__date {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 50em;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f0f0f0;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 8px;
    width: 150px;
    text-align: center;
}

@media (max-width: 768px) {
    .blog-single__hero-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .blog-single__hero-spacer {
        display: none;
    }

    .blog-single__title {
        font-size: 30px;
        font-size: 1.875rem;
    }

    .blog-single__title::after {
        margin: 15px auto 0;
    }

    .blog-single__date {
        width: auto;
    }
}

@media (max-width: 380px) {
    .blog-single__title {
        font-size: 25px;
        font-size: 1.5625rem;
    }
}

/* ============================================================
   SINGLE — Introduction (image gauche + bulle turquoise droite)
   ============================================================ */
.blog-single__intro {
    background-color: var(--primary-color);
    padding: 40px 0;
}

.blog-single__intro-container {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 20px;
}

.blog-single__intro-image-wrapper {
    width: calc(45% - 10px);
    overflow: hidden;
    border-top-right-radius: 50% 100%;
    border-bottom-right-radius: 50% 100%;
    position: relative;
}

.blog-single__intro-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.blog-single__intro-content {
    width: calc(55% - 10px);
    padding: 60px 60px 60px 80px;
    background-color: var(--footer-color);
    border-top-left-radius: 50% 100%;
    border-bottom-left-radius: 50% 100%;
    color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-single__chapo {
    font-size: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.45em;
    margin: 0 0 24px;
    max-width: 420px;
}

.blog-single__intro-text {
    font-size: 14px;
    font-size: 0.875rem;
    line-height: 1.55em;
    max-width: 420px;
}

.blog-single__intro-text p {
    margin-bottom: 12px;
}

.blog-single__intro-text p:last-child {
    margin-bottom: 0;
}

/* ── Sans image : pleine largeur ── */
.blog-single__intro-container--no-image .blog-single__intro-content {
    width: 100%;
    border-top-right-radius: 50em;
    padding: 60px 15vw;
    text-align: center;
}

.blog-single__intro-container--no-image .blog-single__chapo,
.blog-single__intro-container--no-image .blog-single__intro-text {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 880px) {
    .blog-single__intro-image-wrapper {
        width: 100%;
        min-height: 300px;
        max-height: 400px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .blog-single__intro-content {
        width: 100%;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        padding: 40px 2%;
    }

    .blog-single__intro-container--no-image .blog-single__intro-content {
        padding: 40px 2%;
    }
}

/* ============================================================
   SINGLE — Content Blocks
   ============================================================ */
.blog-single__content {
    background-color: var(--primary-color);
    padding: 40px 0 60px;
}

.blog-single__content-container {
    max-width: 860px;
    margin: 0 auto;
    padding-left: 2%;
    padding-right: 2%;
}

/* ── Bloc commun ── */
.blog-block {
    background: var(--background-color);
    border-radius: 12px;
    padding: 60px 70px;
    margin-bottom: 30px;
    text-align: center;
}

.blog-block:last-child {
    margin-bottom: 0;
}

.blog-block__title {
    font-size: 30px;
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--default-color);
    margin: 0 0 24px;
    line-height: 1.35em;
}

.blog-block__subtitle {
    font-size: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--default-color);
    margin: 0 0 24px;
    line-height: 1.45em;
}

.blog-block__text {
    font-size: 15px;
    font-size: 0.9375rem;
    line-height: 1.55em;
    color: var(--default-color);
    text-align: center;
}

.blog-block__text p {
    margin-bottom: 20px;
}

.blog-block__text p:last-child {
    margin-bottom: 0;
}

.blog-block__text strong {
    font-weight: 700;
}

/* ── Listes custom (bullet vert comme .content-rich) ── */
.blog-block__text ul {
    list-style: none;
    padding: 0 0 0 24px;
    margin: 24px auto;
    max-width: 520px;
    text-align: left;
}

.blog-block__text ul li {
    position: relative;
    margin-bottom: 20px;
    line-height: 1.45em;
    list-style: none;
}

.blog-block__text ul li::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

.blog-block__text ul li:last-child {
    margin-bottom: 0;
}

/* ── Highlight (texte bleu gras) ── */
.blog-block__highlight {
    margin: 32px 0 0;
    padding: 0;
    border: none;
    font-size: 15px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.45em;
    text-align: center;
    font-style: italic;
}

/* ── Bloc Texte + Image ── */
.blog-block--text-image {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.blog-block--text-image .blog-block__image-col {
    width: 100%;
    overflow: hidden;
}

.blog-block--text-image .blog-block__image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.blog-block--text-image .blog-block__text-col {
    padding: 60px 70px;
}

/* ── Bloc Conclusion (bulle bleu/turquoise) ── */
.blog-block--conclusion {
    background-color: var(--footer-color);
    color: var(--background-color);
    padding: 0;
    overflow: hidden;
    text-align: center;
    position: relative;
    border-radius: 12px;
}

.blog-block--conclusion::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background-color: var(--primary-color);
    border-bottom-left-radius: 50em;
}

.blog-block--conclusion .blog-block__title,
.blog-block--conclusion .blog-block__text {
    position: relative;
    z-index: 1;
    color: var(--background-color);
}

.blog-block--conclusion .blog-block__title {
    padding: 50px 60px 0;
    font-size: 15px;
    font-size: 0.9375rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.blog-block--conclusion .blog-block__text {
    padding: 20px 60px 50px;
    color: var(--background-color);
}

.blog-block--conclusion .blog-block__text strong {
    color: var(--background-color);
}

/* ============================================================
   RESPONSIVE — Blocs
   ============================================================ */
@media (max-width: 768px) {
    .blog-block {
        padding: 36px 24px;
        border-radius: 8px;
    }

    .blog-block__title {
        font-size: 20px;
        font-size: 1.25rem;
    }

    .blog-block--text-image .blog-block__text-col {
        padding: 36px 24px;
    }

    .blog-block--text-image .blog-block__image {
        height: 220px;
    }

    .blog-block--conclusion .blog-block__title,
    .blog-block--conclusion .blog-block__text {
        padding-left: 24px;
        padding-right: 24px;
    }
}