/* TastyCloud Blog - Styles spécifiques aux articles */

/* Forcer le header blanc sur les articles de blog */
/* body.single .et_menu_container {
    background: #FFF !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
} */

/* body.single #top-menu > li > a {
    color: grey !important;
} */

/* Centrer le burger menu verticalement */
body.single .mobile_menu_bar {
    top: 50% !important;
    transform: translateY(-50%);
}

/* Forcer le fond de page blanc */
body.single {
    background: #FFF !important;
}

body.single #page-container {
    background: #FFF !important;
}

/* Supprimer la ligne parasite (::before) sur le container */
body.single #main-content .container::before {
    display: none !important;
}

/* Layout général */
.tc-blog-single {
    padding: 60px 0;
}

#left-area {
    width: 100% !important;
}

/* Cacher la sidebar si jamais elle s'affiche */
#sidebar {
    display: none;
}

/* Article */
.tc-post-article {
    max-width: 800px;
    margin: 0 auto;
}

/* Breadcrumb */
.tc-breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
}

.tc-breadcrumb a {
    color: #626E82;
    text-decoration: none;
}

.tc-breadcrumb a:hover {
    color: #A7FFF7;
}

.tc-breadcrumb .separator {
    margin: 0 8px;
    color: #626E82;
}

/* Titre article */
.tc-post-header {
    margin-bottom: 30px;
}

.tc-post-article .entry-title {
    font-size: 42px;
    font-weight: 700;
    color: #1E2836;
    margin-bottom: 15px;
    line-height: 1.2;
}

/* Métadonnées */
.tc-post-meta {
    display: flex;
    gap: 20px;
    color: #626E82;
    font-size: 16px;
}

.tc-date::before {
    content: none !important;
}

.tc-category::before {
    content: none !important;
}

/* Image featured */
.tc-featured-image {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.tc-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contenu */
.tc-post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #1D2936;
}

.tc-post-content h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #1E2836;
}

.tc-post-content h3 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1E2836;
}

.tc-post-content p {
    margin-bottom: 20px;
}

.tc-post-content ul,
.tc-post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.tc-post-content li {
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 980px) {
    .tc-post-article .entry-title {
        font-size: 32px;
    }

    .tc-post-content {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .tc-blog-single {
        padding: 30px 0;
    }

    .tc-post-article .entry-title {
        font-size: 28px;
    }
}

/* Container personnalisé pour éviter le padding Divi */
.tc-blog-container {
    width: 80%;
    max-width: 1080px;
    margin: auto;
    position: relative;
}

/* ============================================
   BLOG HOME TEMPLATE (PHP Template - home.php)
   ============================================ */

/* Main Layout */
.tc-blog-home .tc-archive-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.tc-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex: 1;
}

/* Post Card */
.tc-post-card {
    background: #FFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tc-post-card:hover {
    box-shadow: 0px 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

/* Post Thumbnail */
.tc-post-thumb {
    margin: 0 0 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

.tc-post-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tc-post-card:hover .tc-post-thumb img {
    transform: scale(1.05);
}

/* Post Card Content */
.tc-post-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Post Category */
.tc-post-category {
    display: inline-block;
    padding: 4px 12px;
    background: #F1F4FF;
    color: #A7FFF7;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    align-self: flex-start;
}

/* Post Title */
.tc-post-title {
    font-size: 18px;
    font-weight: 600;
    color: #1E2836;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.tc-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tc-post-title a:hover {
    color: #A7FFF7;
}

/* Post Meta */
.tc-post-meta {
    font-size: 14px;
    color: #626E82;
    margin-bottom: 12px;
}

.tc-post-date::before {
    content: none !important;
}

/* Post Excerpt */
.tc-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #626E82;
    margin-bottom: 15px;
    flex: 1;
}

/* Read More Link */
.tc-read-more {
    display: inline-block;
    color: #A7FFF7;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tc-read-more:hover {
    color: #1E2836;
}

/* Sidebar */
.tc-sidebar {
    /* width: 250px; */
    flex-shrink: 0;
    background: #F1F4FF;
    border-radius: 12px;
    padding: 25px;
}

.tc-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #1E2836;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #A7FFF7;
}

.tc-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tc-category-list li {
    margin: 0;
}

.tc-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #FFF;
    border-radius: 6px;
    text-decoration: none;
    color: #1E2836;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tc-category-list a:hover {
    background: #A7FFF7;
    color: #1E2836;
    transform: translateX(5px);
}

.tc-category-list .count {
    background: #E8EDF5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #626E82;
}

/* Pagination */
.tc-pagination {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #E8EDF5;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.tc-pagination a,
.tc-pagination span {
    padding: 10px 20px;
    border: 1px solid #E8EDF5;
    border-radius: 6px;
    text-decoration: none;
    color: #1E2836;
    background: #FFF;
    transition: all 0.2s ease;
}

.tc-pagination a:hover,
.tc-pagination span:not(.current):hover {
    background: #A7FFF7;
    border-color: #A7FFF7;
}

.tc-pagination .current {
    background: #1E2836;
    color: #FFF;
    border-color: #1E2836;
}

/* No Posts */
.tc-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #626E82;
    font-size: 18px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet (sous 1024px) */
@media (max-width: 1024px) {
    .tc-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (sous 768px) */
@media (max-width: 768px) {
    .tc-blog-home .tc-archive-content {
        flex-direction: column;
    }

    .tc-sidebar {
        width: 100%;
        order: 2; /* Move below posts */
    }

    .tc-posts-grid {
        grid-template-columns: 1fr;
        order: 1;
    }

    .tc-archive-title {
        font-size: 32px;
    }
}

/* Small Mobile (sous 480px) */
@media (max-width: 480px) {
    .tc-archive-title {
        font-size: 28px;
    }

    .tc-sidebar {
        padding: 20px;
    }

    .tc-post-card-content {
        padding: 15px;
    }
}

/* ============================================
   PAGE BLOG (Gutenberg) - page-id-73
   Structure corrigée avec layout:grid sur post-template
   ============================================ */

/* Forcer le header blanc sur la page Blog */
/* body.page-id-73 .et_menu_container,
body.archive .et_menu_container,
body.blog .et_menu_container,
body.home .et_menu_container {
    background: #FFF !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
} */

/* body.page-id-73 #top-menu > li > a,
body.archive #top-menu > li > a,
body.blog #top-menu > li > a,
body.home #top-menu > li > a {
    color: grey !important;
} */

/* Centrer le burger menu verticalement */
body.page-id-73 .mobile_menu_bar,
body.archive .mobile_menu_bar,
body.blog .mobile_menu_bar,
body.home .mobile_menu_bar {
    top: 50% !important;
    transform: translateY(-50%);
}

/* Forcer le fond de page blanc */
body.page-id-73,
body.archive,
body.blog,
body.home {
    background: #FFF !important;
}

body.page-id-73 #page-container,
body.archive #page-container,
body.blog #page-container,
body.home #page-container {
    background: #FFF !important;
}

/* Supprimer la ligne parasite (::before) sur le container */
body.page-id-73 #main-content .container::before,
body.archive #main-content .container::before,
body.blog #main-content .container::before,
body.home #main-content .container::before {
    display: none !important;
}

/* Page Container */
.page-id-73 #main-content .container {
    max-width: 1200px;
}

/* Columns Layout */
.tc-blog-layout {
    gap: 40px !important;
}

.tc-main-content,
.tc-sidebar-column {
    margin: 0 !important;
}

/* Post Template Grid - C'est LE layout:grid qui crée la grille */
.tc-posts-query > ul.wp-block-post-template,
.tc-posts-query .wp-block-post-template,
ul.wp-block-post-template.is-layout-grid,
.wp-block-post-template.columns-3.is-layout-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    padding: 0 !important;
}

/* List items in grid */
.tc-posts-query ul.wp-block-post-template li,
ul.wp-block-post-template.is-layout-grid li,
.wp-block-post-template.columns-3 li {
    margin: 0 !important;
    list-style: none !important;
    display: block !important;
    width: 100% !important;
}

/* Post Card */
.tc-posts-query .tc-post-card {
    background: #FFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    padding: 20px;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Post list item */
.tc-posts-query .wp-block-post-template > li {
    background: #FFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    overflow: hidden;
}

.tc-posts-query .wp-block-post-template > li:hover,
.tc-posts-query .tc-post-card:hover {
    box-shadow: none;
    transform: none;
}

/* Featured Image */
.tc-posts-query .tc-post-card .wp-block-post-featured-image {
    margin: 0 0 15px 0 !important;
}

.tc-posts-query .tc-post-card .wp-block-post-featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Post Title */
.tc-posts-query .tc-post-title {
    font-size: 18px !important;
    font-weight: 600;
    color: #1E2836;
    margin: 0 0 10px 0 !important;
}

.tc-posts-query .tc-post-title a {
    color: inherit;
    text-decoration: none;
}

.tc-posts-query .tc-post-title a:hover {
    color: #A7FFF7;
}

/* Post Meta */
.tc-posts-query .tc-post-date {
    font-size: 14px;
    color: #626E82;
    margin-bottom: 8px !important;
}

/* Remove calendar icon */
.tc-posts-query .tc-post-date::before {
    content: none !important;
}

.tc-posts-query .tc-post-category {
    font-size: 12px;
    margin-bottom: 12px !important;
}

.tc-posts-query .tc-post-category a,
.tc-posts-query .tc-post-category .wp-block-post-terms__prefix {
    color: #1E2836;
    text-decoration: none;
    font-weight: 500;
}

.tc-posts-query .tc-post-category a:hover {
    text-decoration: underline;
}

.tc-posts-query .tc-post-category a:hover {
    text-decoration: underline;
}

/* Post Excerpt */
.tc-posts-query .tc-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #626E82;
}

/* Sidebar */
.tc-sidebar {
    background: #F1F4FF;
    border-radius: 12px;
    padding: 25px !important;
}

.tc-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #1E2836;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #A7FFF7;
}

/* Tag Cloud */
.tc-category-list.wp-block-tag-cloud {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.tc-category-list.wp-block-tag-cloud a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #FFF;
    border-radius: 6px;
    text-decoration: none;
    color: #1E2836;
    font-size: 14px !important;
    transition: all 0.2s ease;
}

.tc-category-list.wp-block-tag-cloud a:hover {
    background: #A7FFF7;
    color: #1E2836;
    transform: translateX(5px);
}

/* Pagination */
.tc-posts-query .wp-block-query-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #E8EDF5;
}

.tc-posts-query .wp-block-query-pagination a,
.tc-posts-query .wp-block-query-pagination span {
    padding: 10px 20px;
    border: 1px solid #E8EDF5;
    border-radius: 6px;
    text-decoration: none;
    color: #1E2836;
    background: #FFF;
    transition: all 0.2s ease;
}

.tc-posts-query .wp-block-query-pagination a:hover {
    background: #A7FFF7;
    border-color: #A7FFF7;
}

.tc-posts-query .wp-block-query-pagination .page-numbers.current {
    background: #1E2836;
    color: #FFF;
    border-color: #1E2836;
}

/* ============================================
   RESPONSIVE - PAGE BLOG GUTENBERG
   ============================================ */

/* Tablet (< 1024px) */
@media (max-width: 1024px) {
    .tc-posts-query .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .tc-blog-layout {
        flex-direction: column !important;
    }

    .tc-main-content,
    .tc-sidebar-column {
        width: 100% !important;
        flex-basis: 100% !important;
    }

    .tc-posts-query .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .tc-blog-title {
        font-size: 32px;
    }

    .tc-sidebar {
        padding: 20px !important;
    }
}
