/* ==========================================================================
   Blog – Contrôle Services
   Cohérent avec le thème existant (Poppins, #D62D20, #27235D, container 1200px)
   ========================================================================== */

/* ---- Header blog ---- */
.acf-page-header--blog {
    background: #27235D;
    padding: 60px 0 40px;
    min-height: auto;
}
.acf-page-header--blog .block__content {
    text-align: left;
}
.acf-page-header--blog .block-title {
    color: #fff;
    font-size: 32px;
    font-weight: 400;
    margin: 10px 0 0;
}
.acf-page-header--blog .block-title__subtitle {
    color: rgba(255,255,255,.7);
    font-size: 16px;
    font-weight: 300;
    margin: 8px 0 0;
}
.acf-page-header--blog .breadcrumb__link,
.acf-page-header--blog .breadcrumb__item span {
    color: rgba(255,255,255,.8);
}
.acf-page-header--blog .breadcrumb__item::before {
    color: rgba(255,255,255,.5);
}

/* ---- Filtres catégories ---- */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 40px;
    padding: 0;
}
.blog-filters__item {
    display: inline-block;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 400;
    color: #27235D;
    border: 1px solid #E6E6E6;
    border-radius: 2px;
    text-decoration: none;
    transition: all .25s ease;
}
.blog-filters__item:hover {
    border-color: #D62D20;
    color: #D62D20;
}
.blog-filters__item--active {
    background: #D62D20;
    color: #fff;
    border-color: #D62D20;
}
.blog-filters__item--active:hover {
    color: #fff;
}

/* ---- Grille blog ---- */
.section-blog {
    margin: 50px 0 80px;
}
.section-blog .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.blog-grid--related {
    margin-top: 20px;
}

/* ---- Carte article ---- */
.blog-card {
    background: #fff;
    border: 1px solid #E6E6E6;
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow .3s ease, transform .3s ease;
}
.blog-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    transform: translateY(-3px);
}
.blog-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.blog-card__figure {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin: 0;
}
.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.blog-card:hover .blog-card__image {
    transform: scale(1.05);
}
.blog-card__content {
    padding: 20px;
}
.blog-card__category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #D62D20;
    margin: 0 0 8px;
}
.blog-card__title {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    color: #27235D;
    margin: 0 0 10px;
}
.blog-card__excerpt {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    color: #424D58;
    margin: 0 0 12px;
}
.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #999;
}
.blog-card__date {
    font-weight: 300;
}
.blog-card__reading {
    font-weight: 300;
}
.blog-card__reading::before {
    content: "•";
    margin-right: 15px;
}

/* ---- Pagination ---- */
.blog-pagination {
    margin: 50px 0 0;
    text-align: center;
}
.blog-pagination .page-numbers {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.blog-pagination .page-numbers li {
    display: inline-block;
}
.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 400;
    color: #27235D;
    border: 1px solid #E6E6E6;
    text-decoration: none;
    transition: all .25s ease;
}
.blog-pagination .page-numbers a:hover {
    border-color: #D62D20;
    color: #D62D20;
}
.blog-pagination .page-numbers .current {
    background: #D62D20;
    color: #fff;
    border-color: #D62D20;
}

/* ---- Article vide ---- */
.blog-empty {
    text-align: center;
    padding: 80px 0;
    font-size: 16px;
    font-weight: 300;
    color: #424D58;
}

/* ===================================================================
   SINGLE POST
   =================================================================== */

.section-single-post {
    margin: 40px 0 60px;
}
.section-single-post .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Layout 2 colonnes */
.single-post__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    align-items: start;
}

/* Meta */
.single-post__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 25px;
    font-size: 13px;
}
.single-post__category {
    display: inline-block;
    padding: 4px 12px;
    background: #D62D20;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-decoration: none;
    border-radius: 2px;
}
.single-post__category:hover {
    background: #27235D;
    color: #fff;
}
.single-post__date {
    color: #999;
    font-weight: 300;
}
.single-post__reading {
    color: #999;
    font-weight: 300;
}

/* Hero image */
.single-post__hero {
    margin: 0 0 30px;
    border-radius: 2px;
    overflow: hidden;
}
.single-post__hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Table des matières */
.single-post__toc {
    background: #f8f8f8;
    border-left: 3px solid #D62D20;
    padding: 20px 25px;
    margin: 0 0 35px;
}
.single-post__toc-title {
    font-size: 15px;
    font-weight: 600;
    color: #27235D;
    margin: 0 0 10px;
}
.single-post__toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}
.single-post__toc-item {
    counter-increment: toc;
    margin: 6px 0;
}
.single-post__toc-item a {
    font-size: 13px;
    font-weight: 400;
    color: #424D58;
    text-decoration: none;
    transition: color .2s ease;
}
.single-post__toc-item a::before {
    content: counter(toc) ". ";
    color: #D62D20;
    font-weight: 600;
}
.single-post__toc-item a:hover {
    color: #D62D20;
}
.single-post__toc-item--h3 {
    padding-left: 20px;
}

/* Contenu article */
.single-post__content {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
    color: #333;
}
.single-post__content h2 {
    font-size: 22px;
    font-weight: 400;
    color: #27235D;
    margin: 40px 0 15px;
    padding-top: 10px;
}
.single-post__content h3 {
    font-size: 18px;
    font-weight: 400;
    color: #27235D;
    margin: 30px 0 12px;
}
.single-post__content p {
    margin: 0 0 18px;
}
.single-post__content a {
    color: #D62D20;
    text-decoration: underline;
}
.single-post__content a:hover {
    color: #27235D;
}
.single-post__content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 20px 0;
}
.single-post__content ul,
.single-post__content ol {
    padding-left: 25px;
    margin: 0 0 18px;
}
.single-post__content li {
    margin: 6px 0;
}
.single-post__content blockquote {
    border-left: 3px solid #D62D20;
    margin: 25px 0;
    padding: 15px 20px;
    background: #f8f8f8;
    font-style: italic;
    color: #424D58;
}
.single-post__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.single-post__content th,
.single-post__content td {
    padding: 10px 14px;
    border: 1px solid #E6E6E6;
    font-size: 13px;
    text-align: left;
}
.single-post__content th {
    background: #27235D;
    color: #fff;
    font-weight: 600;
}

/* Tags */
.single-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0 0;
    padding: 25px 0 0;
    border-top: 1px solid #E6E6E6;
}
.single-post__tag {
    display: inline-block;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 400;
    color: #424D58;
    border: 1px solid #E6E6E6;
    text-decoration: none;
    border-radius: 2px;
    transition: all .25s ease;
}
.single-post__tag:hover {
    border-color: #D62D20;
    color: #D62D20;
}

/* Sidebar */
.single-post__sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 120px;
}
.sidebar-widget {
    padding: 25px;
    border: 1px solid #E6E6E6;
    border-radius: 2px;
}
.sidebar-widget__title {
    font-size: 16px;
    font-weight: 400;
    color: #27235D;
    margin: 0 0 8px;
}
.sidebar-widget__text {
    font-size: 13px;
    font-weight: 300;
    color: #424D58;
    margin: 0 0 15px;
    line-height: 1.5;
}
.sidebar-widget .btn--full {
    display: block;
    text-align: center;
    padding: 10px 20px;
    background: #D62D20;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    text-transform: uppercase;
    border: none;
    transition: background .25s ease;
}
.sidebar-widget .btn--full:hover {
    background: #27235D;
}
.sidebar-widget__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 400;
    color: #D62D20;
    text-decoration: none;
    margin: 0 0 12px;
}
.sidebar-widget__phone svg {
    width: 18px;
    height: 18px;
}
.sidebar-widget__phone svg * {
    fill: #D62D20;
}
.sidebar-widget .btn--redirect {
    display: inline-block;
    padding: 0 15px;
    line-height: 30px;
    color: #D62D20;
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    border: 1px solid #D62D20;
    text-decoration: none;
    transition: all .25s ease;
}
.sidebar-widget .btn--redirect:hover {
    background: #D62D20;
    color: #fff;
}

/* Articles liés */
.section-related {
    margin: 60px 0 80px;
}
.section-related .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media all and (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .single-post__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .single-post__sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar-widget {
        flex: 1;
        min-width: 250px;
    }
}

@media all and (max-width: 576px) {
    .acf-page-header--blog {
        padding: 40px 0 30px;
    }
    .acf-page-header--blog .block-title {
        font-size: 24px;
    }
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .blog-grid--related {
        grid-template-columns: 1fr;
    }
    .blog-filters {
        gap: 6px;
    }
    .blog-filters__item {
        font-size: 12px;
        padding: 5px 12px;
    }
    .single-post__content {
        font-size: 14px;
    }
    .single-post__content h2 {
        font-size: 19px;
    }
    .single-post__sidebar {
        flex-direction: column;
    }
    .sidebar-widget {
        min-width: auto;
    }
}
