/* ============================================================
   Styles spécifiques à la page d'article de blog
   Encapsulés pour ne pas affecter la navbar et le footer
   ============================================================ */

:root {
    --blog-bg:        #f8fafc;
    --blog-card:      #ffffff;
    --blog-text:      #1e293b;
    --blog-muted:     #64748b;
    --blog-border:    #e2e8f0;
}

/* Limite les styles au conteneur principal */
.article-wrap {
    background: var(--blog-bg);
    color: var(--blog-text);
    padding: 100px 0 60px;
}

.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blog-muted);
    text-decoration: none;
    font-size: .9rem;
    margin-bottom: 24px;
    transition: color .15s ease;
}

.article-back:hover {
    color: var(--blog-text);
}

.article-cat {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    margin-bottom: 20px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 20px;
    color: var(--blog-text);
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.8rem;
    }
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--blog-muted);
    font-size: .9rem;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blog-border);
}

.article-meta span i {
    margin-right: 6px;
}

/* ---- Contenu de l'article (HTML généré par l'IA) ---- */
.article-content {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #334155;
}

.article-content h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 48px 0 16px;
    color: var(--blog-text);
    line-height: 1.25;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--blog-text);
}

.article-content p {
    margin: 0 0 18px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content strong {
    color: var(--blog-text);
}

.article-content a {
    color: #2563eb;
    text-decoration: underline;
}

.article-content a:hover {
    color: #1d4ed8;
}

.article-content blockquote {
    border-left: 4px solid var(--blog-border);
    padding-left: 20px;
    margin: 24px 0;
    color: var(--blog-muted);
    font-style: italic;
}

.article-content code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
}

.article-content pre {
    background: #1e293b;
    color: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ---- <figure> injectées par le générateur ---- */
.article-content figure {
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.article-content figure img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content figcaption {
    padding: 12px 16px;
    background: var(--blog-card);
    font-size: .85rem;
    color: var(--blog-muted);
    text-align: center;
    border-top: 1px solid var(--blog-border);
}

.article-content figcaption small a {
    color: var(--blog-muted);
}

/* ---- Articles liés ---- */
.related-section {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 60px 20px 0;
    border-top: 1px solid var(--blog-border);
}

.related-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--blog-card);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
}

.related-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.related-card p {
    font-size: .85rem;
    color: var(--blog-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
