/* /assets/css/blog_style.css */

/* Conteneur principal de l'article */
.blog-container article.container {
    max-width: 750px; /* Limite la largeur du texte pour une meilleure lisibilité */
    margin: 2rem auto; /* Centre l'article et ajoute de l'espace */
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    color: #333; /* Texte plus sombre sur fond blanc */
}

/* Titre principal de l'article */
.blog-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* Métadonnées (date, auteur, etc.) */
.blog-container .post-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 1rem;
}

/* Image de couverture */
.blog-container .post-featured-image {
    margin-bottom: 2rem;
}
.blog-container .post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

/* Contenu de l'article (généré par TinyMCE) */
.blog-container .post-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #34495e;
}

.blog-container .post-content h2,
.blog-container .post-content h3,
.blog-container .post-content h4 {
    color: #2c3e50;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}
.blog-container .post-content h2 { font-size: 1.8rem; border-bottom: 2px solid #3498db; padding-bottom: 0.5rem; }
.blog-container .post-content h3 { font-size: 1.5rem; }

.blog-container .post-content p {
    margin-bottom: 1.5rem;
}

.blog-container .post-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dotted #3498db;
}
.blog-container .post-content a:hover {
    color: #2980b9;
    border-bottom-style: solid;
}

.blog-container .post-content ul,
.blog-container .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-container .post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #7f8c8d;
}

.blog-container .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-categories-list {
    margin-top: 0.75rem;
}
.post-category-tag {
    display: inline-block;
    background-color: #eef2f7;
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

/* === SECTION ARTICLES SIMILAIRES === */

.similar-posts-section {
    max-width: 750px;
    margin: 3rem auto;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
}

.similar-posts-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
}

.similar-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.similar-post-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.similar-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.similar-post-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
.similar-post-card-content {
    padding: 1rem;
}
.similar-post-card-content h4 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

/* =========================================================================
   BOUTON LECTURE VOCALE (TTS)
========================================================================= */
#tts-btn {
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px;
    font-size: 0.9rem;
    padding: 8px 20px;
    cursor: pointer;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    transition: all 0.2s;
}
#tts-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* =========================================================================
   PARTAGE SOCIAL (Blog & Ressources)
========================================================================= */
.post-sharing {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}
.post-sharing h3 {
    margin-bottom: 1.5rem;
    color: #334155;
    font-size: 1.2rem;
}
.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #14171A; }
.share-btn.linkedin { background-color: #0A66C2; }
.share-btn.copy-link { background-color: #64748b; }
.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.copy-link-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 9999;
}
.copy-link-feedback.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* =========================================================================
   ARTICLES SIMILAIRES
========================================================================= */
/* Section Articles Similaires */
.similar-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f2f5;
}

.similar-posts-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.similar-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.similar-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.similar-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.similar-post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.similar-post-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.similar-post-card-content h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
}

/* Responsive */
@media (max-width: 992px) {
    .similar-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .similar-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .similar-post-card img {
        height: 180px;
    }
}