
/* ============================================================
   Blog — listing et détail d'article
   ============================================================ */

/* ---------- Listing ---------------------------------------- */

.blog-listing {
    max-width: 860px;
    margin: 0 auto;
    padding: 160px 1.5rem 3rem;
}

.blog-listing-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.blog-listing-header h1 {
    font-size: 2rem;
    color: #333;
    font-weight: 400;
    margin: 0 0 0.5rem;
}

.blog-listing-header p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.blog-admin-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Carte horizontale */
.blog-card {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.blog-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
}

.blog-card-image {
    width: 220px;
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-placeholder {
    color: #ccc;
    font-size: 3rem;
}

.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.blog-client-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #eef3f4;
    color: #62757c;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.blog-card-date {
    font-size: 0.8rem;
    color: #aaa;
}

.blog-card-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 0.7rem;
    line-height: 1.35;
}

.blog-situation-preview {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}

.blog-situation-preview strong {
    color: #b34b32;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.blog-read-more {
    display: inline-block;
    padding: 8px 20px;
    background: #62757c;
    color: #ffffff !important;
    border-radius: 5px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.blog-read-more:hover {
    background: #b34b32;
}

.blog-card-admin {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.blog-card-admin a {
    color: #bbb;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-admin a:hover {
    color: #b34b32;
}

.blog-empty {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.1rem;
}

/* ---------- Catégorie badge (listing + détail) ------------- */

.blog-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #fef3ef;
    color: #b34b32;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-category-badge:hover {
    background: #fde4dc;
}

/* ---------- Breadcrumb (page catégorie) -------------------- */

.blog-breadcrumb {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.blog-breadcrumb a {
    color: #62757c;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- Page de recherche ------------------------------ */

.search-form-page {
    display: flex;
    align-items: center;
    max-width: 520px;
    margin: 1.2rem auto 0;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 40px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-form-page:focus-within {
    border-color: #b34b32;
    box-shadow: 0 2px 12px rgba(179,75,50,0.15);
}

.search-form-page input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Titillium Web', sans-serif;
    font-size: 1rem;
    color: #333;
    padding: 4px 0;
}

.search-form-page input[type="search"]::placeholder {
    color: #bbb;
}

.search-form-page input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.search-form-page button {
    background: #b34b32;
    border: none;
    cursor: pointer;
    color: #fff;
    border-radius: 30px;
    padding: 8px 18px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.search-form-page button:hover {
    background: #9a3f2a;
}

.blog-card-body h3 a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-body h3 a:hover {
    color: #b34b32;
}

/* ---------- Layout détail ---------------------------------- */

body.blog-detail-page {
    background-color: var(--color-dark);
    font-family: 'Titillium Web', sans-serif;
    color: #444;
    margin: 0;
    padding: 0;
}

.blog-detail {
    max-width: 760px;
    margin: 0 auto;
    padding: 160px 1.5rem 4rem;
}

.blog-detail-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.blog-detail-card img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    object-fit: cover;
    max-height: 360px;
}

.blog-detail-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.75rem;
    text-align: center;
    line-height: 1.3;
}

.blog-detail-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.blog-detail-actions .button {
    background-color: #62757c;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.blog-detail-actions .button:hover {
    background-color: #b34b32;
}

.blog-detail-admin {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.blog-detail-admin a {
    color: #bbb;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-detail-admin a:hover {
    color: #b34b32;
}

#lienRetour {
    text-align: center;
    margin-top: 1.5rem;
}

/* ---------- Détail ----------------------------------------- */

.blog-section-situation {
    background: #fff3f0;
    border-left: 4px solid #b34b32;
    border-radius: 0 6px 6px 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.blog-section-situation h2 {
    color: #b34b32;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.blog-section-solution {
    background: #f0f5f4;
    border-left: 4px solid #62757c;
    border-radius: 0 6px 6px 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.blog-section-solution h2 {
    color: #62757c;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.blog-md-content {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.7;
}

.blog-md-content p {
    margin: 0 0 0.75rem;
}

.blog-md-content p:last-child {
    margin-bottom: 0;
}

.blog-md-content ul,
.blog-md-content ol {
    margin: 0 0 0.75rem 1.5rem;
    padding: 0;
}

.blog-md-content li {
    margin-bottom: 0.3rem;
}

.blog-md-content h2,
.blog-md-content h3,
.blog-md-content h4,
.blog-md-content h5 {
    font-weight: 600;
    margin: 1rem 0 0.4rem;
    color: inherit;
}

.blog-md-content strong {
    font-weight: 700;
}

.blog-md-content em {
    font-style: italic;
}

.blog-md-content a {
    color: #b34b32;
    text-decoration: underline;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #eef3f4;
    color: #62757c;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---------- Responsive ------------------------------------- */

@media screen and (max-width: 768px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-card-image {
        width: 100%;
        height: 180px;
    }
}

@media screen and (max-width: 768px) {
    .blog-detail {
        padding-top: 120px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .blog-detail-card {
        padding: 1.5rem;
    }

    .blog-detail-card h3 {
        font-size: 1.4rem;
    }
}

@media screen and (max-width: 576px) {
    .blog-listing {
        padding-top: 120px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .blog-card-body h3 {
        font-size: 1.05rem;
    }
}
