/* ==========================================================================
   Templates de base (Single, Page, Singular, Index)
   Optimisés pour Elementor
   ========================================================================== */

/* ==========================================================================
   Template Singular (fallback pour tous les contenus)
   ========================================================================== */

.singular-template {
    width: 100%;
}

.singular-article {
    width: 100%;
}

.elementor-content-wrapper {
    width: 100%;
}

/* ==========================================================================
   Template Single (Articles de blog)
   ========================================================================== */

.single-post-template {
    width: 100%;
    padding: 60px 0 80px 0;
    background: #FFFFFF;
}

.single-post-article {
    width: 100%;
}

/* En-tête de l'article */
.single-post-header {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0 0 40px 0;
    border-bottom: 1px solid #E8E8E8;
    margin-bottom: 40px;
}

.single-post-header-sized {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: calc(100% - 40px);
    max-width: 900px;
}

.single-post-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    font: normal normal 600 13px/16px OS_SemiBold;
    color: #1D7FC7;
    background: rgba(29, 127, 199, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.category-badge:hover {
    background: rgba(29, 127, 199, 0.2);
}

.single-post-title {
    font: normal normal bold 42px/50px OS_Bold;
    color: #100D08;
    margin: 0 0 20px 0;
}

.single-post-meta {
    display: flex;
    gap: 20px;
    font: normal normal normal 16px/20px OS_Regular;
    color: #666;
}

.post-date {
    color: #888;
}

.post-author {
    color: #666;
}

/* Contenu de l'article */
.single-post-content {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0 0 60px 0;
}

.single-post-content-sized {
    width: calc(100% - 40px);
    max-width: 800px;
    font: normal normal normal 18px/30px OS_Regular;
    color: #333;
}

.single-post-content-sized p {
    margin: 0 0 24px 0;
}

.single-post-content-sized h2 {
    font: normal normal bold 28px/36px OS_Bold;
    color: #100D08;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1D7FC7;
}

.single-post-content-sized h3 {
    font: normal normal bold 22px/30px OS_Bold;
    color: #100D08;
    margin: 30px 0 15px 0;
}

.single-post-content-sized img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
}

/* Navigation entre articles */
.single-post-navigation {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 40px 0;
    border-top: 1px solid #E8E8E8;
}

.single-post-navigation-sized {
    width: calc(100% - 40px);
    max-width: 900px;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px;
    background: #F8F8F8;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.nav-previous:hover,
.nav-next:hover {
    background: #EFEFEF;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    font: normal normal 600 13px/16px OS_SemiBold;
    color: #1D7FC7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font: normal normal 600 16px/22px OS_SemiBold;
    color: #100D08;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    background: #1D7FC7;
    color: #FFFFFF;
    font: normal normal 600 15px/20px OS_SemiBold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 30px;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-back:hover {
    background: #16649E;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(29, 127, 199, 0.35);
}

/* Commentaires */
.single-post-comments {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 60px 0;
    background: #F8F8F8;
}

.single-post-comments-sized {
    width: calc(100% - 40px);
    max-width: 800px;
}

/* ==========================================================================
   Template Page
   ========================================================================== */

.page-template {
    width: 100%;
    min-height: 50vh;
}

.page-article {
    width: 100%;
}

.page-content-wrapper {
    width: 100%;
}

/* Lien de retour */
.page-footer-nav {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: #1D7FC7;
    color: #FFFFFF;
    font: normal normal 600 15px/20px OS_SemiBold;
    text-decoration: none;
    border-radius: 30px;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.back-to-home:hover {
    background: #16649E;
    transform: translateY(-2px);
}

/* ==========================================================================
   Template Index (fallback liste d'articles)
   ========================================================================== */

.index-template {
    width: 100%;
    padding: 60px 0;
    background: #FFFFFF;
}

.page-header {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.page-title {
    font: normal normal bold 42px/48px OS_Bold;
    color: #100D08;
    text-align: center;
    margin: 0;
}

/* Grille de posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: 0 auto 50px auto;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font: normal normal normal 14px/18px OS_Regular;
    color: #888;
}

.post-category {
    color: #1D7FC7;
    font-weight: 600;
}

.post-title {
    font: normal normal bold 22px/28px OS_Bold;
    color: #100D08;
    margin: 0 0 15px 0;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #1D7FC7;
}

.post-excerpt {
    font: normal normal normal 16px/24px OS_Regular;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.read-more {
    font: normal normal 600 15px/20px OS_SemiBold;
    color: #1D7FC7;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #16649E;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    font: normal normal 600 16px/20px OS_SemiBold;
    color: #666;
    background: #F5F5F5;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination .page-numbers:hover {
    background: #1D7FC7;
    color: #FFFFFF;
}

.pagination .page-numbers.current {
    background: #1D7FC7;
    color: #FFFFFF;
}

.pagination .prev,
.pagination .next {
    padding: 0 20px;
}

/* Aucun résultat */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 40px;
}

.no-results h2 {
    font: normal normal bold 28px/34px OS_Bold;
    color: #100D08;
    margin: 0 0 20px 0;
}

.no-results p {
    font: normal normal normal 18px/26px OS_Regular;
    color: #666;
    margin: 0 0 30px 0;
}

/* ==========================================================================
   Responsive — Tablette (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .single-post-template {
        padding: 50px 0 60px 0;
    }

    .single-post-title {
        font: normal normal bold 36px/44px OS_Bold;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .page-title {
        font: normal normal bold 36px/42px OS_Bold;
    }
}

/* ==========================================================================
   Responsive — Mobile large (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .single-post-template {
        padding: 40px 0 50px 0;
    }

    .single-post-title {
        font: normal normal bold 28px/36px OS_Bold;
    }

    .single-post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .single-post-content-sized {
        font: normal normal normal 17px/28px OS_Regular;
    }

    .nav-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nav-previous,
    .nav-next {
        text-align: center;
    }

    .nav-back {
        order: -1;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-title {
        font: normal normal bold 28px/34px OS_Bold;
    }
}

/* ==========================================================================
   Responsive — Mobile petit (≤ 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .single-post-title {
        font: normal normal bold 24px/30px OS_Bold;
    }

    .single-post-content-sized {
        font: normal normal normal 16px/26px OS_Regular;
    }

    .single-post-content-sized h2 {
        font: normal normal bold 22px/28px OS_Bold;
    }

    .nav-back {
        padding: 13px 24px;
        font-size: 14px;
    }

    .post-thumbnail {
        height: 200px;
    }

    .post-title {
        font: normal normal bold 20px/26px OS_Bold;
    }

    .page-title {
        font: normal normal bold 24px/30px OS_Bold;
    }
}
