/* SINGLE — Article (layout, méta, contenu), breadcrumbs, commentaires. Chargé is_singular(). Extrait de main.css. */
/* --- 7.2 Single Post Layout & Content — Premium 2026 --- */
.single-post-layout {
    background-color: var(--soft-surface);
    padding: 32px 40px;
    border-radius: var(--soft-radius);
    box-shadow: var(--soft-shadow);
}

/* Category badge */
.article-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--senego-color-primary), var(--senego-color-accent));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 14px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 16px;
    transition: opacity 0.2s;
}
.article-category-badge:hover {
    opacity: 0.85;
    color: #fff;
}

/* Title */
.single-post-layout .entry-title {
    font-size: 2.4rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--senego-color-text);
    text-transform: none; /* casse normale = douceur (cohérent design test) */
}

/* Entry meta — single-line premium layout */
.single-post-layout .entry-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.single-post-layout .entry-meta .author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    margin-right: 10px;
}
.single-post-layout .entry-meta .author-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--senego-color-text);
}
.single-post-layout .entry-meta .entry-date {
    font-size: 0.85rem;
    color: #777;
}
.single-post-layout .entry-meta .meta-sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 10px;
    vertical-align: middle;
}
.single-post-layout .entry-meta .reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #777;
}
.single-post-layout .entry-meta .reading-time svg {
    color: #999;
    flex-shrink: 0;
}
.single-post-layout .entry-meta .comment-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--senego-color-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
.single-post-layout .entry-meta .comment-count-badge:hover {
    opacity: 0.7;
    color: var(--senego-color-accent);
}
.single-post-layout .entry-meta .comment-count-badge svg {
    flex-shrink: 0;
}

/* Post thumbnail */
.single-post-layout .post-thumbnail {
    margin-bottom: 28px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--soft-radius);
    overflow: hidden;
}
.single-post-layout .post-thumbnail img {
    border-radius: var(--soft-radius);
}

/* Entry content — premium typography */
.entry-content p, .entry-content li {
    line-height: 1.85;
    font-size: 1.1rem;
    color: #2a2a2a;
}
.entry-content p {
    margin-bottom: 1.4em;
}
.entry-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 2.5rem 0 1rem 0;
    color: var(--senego-color-text);
    letter-spacing: -0.01em;
}
.entry-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 0.8rem 0;
    color: var(--senego-color-text);
}
.entry-content h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.8rem 0 0.6rem 0;
    color: #333;
}
.entry-content strong {
    font-weight: 700;
    color: var(--senego-color-text);
}
.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.entry-content a:hover {
    color: var(--senego-color-accent);
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-unit);
    border-radius: 8px;
    overflow: hidden;
}
.entry-content th, .entry-content td {
    border: 1px solid #e8e8e8;
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.95rem;
}
.entry-content th {
    background-color: #f8f8f8;
    font-weight: 700;
    color: #333;
}
.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 20px 24px;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.7;
    background: linear-gradient(135deg, #fff9f5 0%, #fff5ee 100%);
    border-radius: 0 12px 12px 0;
    color: #333;
    position: relative;
}
.entry-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: -8px;
    left: 16px;
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.2;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    line-height: 1;
}
.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Article tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    margin-bottom: 8px;
    border-top: 1px solid #eee;
}
/* Étiquettes migrées vers le Design System : <a class="senego-tag"> (cf. components.css). */

/* Share buttons — modern pill style */
.share-button-bar {
    padding: 16px 0;
    margin-bottom: 2rem;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.share-button-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #fff;
}
.share-button.facebook {
    background: linear-gradient(135deg, #1877F2, #0d5bbf);
}
.share-button.twitter {
    background: linear-gradient(135deg, var(--senego-color-text), #333);
}
.share-button.whatsapp {
    background: linear-gradient(135deg, #25D366, #1da851);
}
.share-button.comments-link {
    background: #f5f5f5;
    color: #555;
    border: 1px solid var(--senego-color-border);
    font-weight: 700;
}
.share-button.comments-link:hover {
    background: #eee;
    color: #333;
    box-shadow: none;
}
.share-icon {
    flex-shrink: 0;
}
.page-links { margin-top: var(--spacing-unit); }
.post-navigation { margin-top: calc(var(--spacing-unit) * 2); }

/* Entry footer — minimal */
.single-post-layout .entry-footer {
    margin-top: 0;
}

/* --- 7.3 Breadcrumbs --- */
.breadcrumbs {
    font-size: .85rem;
    margin-bottom: 16px;
    color: #999;
    overflow: hidden;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.breadcrumbs .item-current {
    flex-shrink: 1;
    min-width: 0;
}
.breadcrumbs .item-current strong {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    max-width: 100%;
    color: var(--senego-color-meta);
    font-weight: 500;
}
.breadcrumbs .separator {
    margin: 0 .4rem;
    color: #ccc;
}
.breadcrumbs a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}

@media(max-width: 767px) {
    .single-post-layout {
        padding: 16px;
    }
    .single-post-layout .entry-title {
        font-size: 1.55rem;
        line-height: 1.25;
        letter-spacing: -0.01em;
    }
    .single-post-layout .entry-meta {
        gap: 0;
    }
    .single-post-layout .entry-meta .author-avatar {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    .single-post-layout .entry-meta .author-name {
        font-size: 0.82rem;
    }
    .single-post-layout .entry-meta .entry-date {
        font-size: 0.78rem;
    }
    .single-post-layout .entry-meta .meta-sep {
        width: 3px;
        height: 3px;
        margin: 0 7px;
    }
    .single-post-layout .entry-meta .reading-time {
        font-size: 0.78rem;
    }
    .single-post-layout .entry-meta .comment-count-badge {
        font-size: 0.78rem;
    }
    .article-category-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-bottom: 12px;
    }
    .share-button-list {
        justify-content: center;
        gap: 8px;
    }
    .share-button .share-label {
        display: none;
    }
    .share-button {
        padding: 10px 14px;
        border-radius: 50px;
        flex: 1;
        justify-content: center;
    }
    .article-tags {
        gap: 6px;
        padding: 16px 0;
    }
    .senego-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .inline-comment-form-section {
        padding: 16px;
        border-radius: var(--soft-radius);
    }
}
/*--------------------------------------------------------------
# 8.0 - Comments Section
--------------------------------------------------------------*/
.inline-comment-form-section {
    margin-top: 8px;
    margin-bottom: 2rem;
    padding: 20px 24px 0;
}
.info-opinion {
    color: #888;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1.5;
}

.comments-area {
    margin-top: 2rem;
    background: #fff;
    padding: 32px 0;
    border-top: 2px solid #f0f0f0;
}
.comments-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--senego-color-text);
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment {
    background-color: var(--senego-color-surface-muted);
    margin: 8px 0;
    border-radius: var(--soft-radius);
}
.comment-list .depth-1 {
    border: 1px solid #eee;
}
.comment-list .parent {
    padding-right: 10px;
}
ol.children .even {
    border: 0;
    margin-right: 10px;
}

.comment-body {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 0;
}
.comment-avatar .avatar {
    border-radius: 50%;
    width: 64px;
    height: 64px;
}
.comment-main {
    width: 100%;
}
.comment-bubble {
    border-radius: var(--soft-radius);
    padding: 1rem 1.2rem;
    background: #fff;
}
.comment-author-name {
    font-weight: 700;
}
.comment-author-name a {
    color: var(--color-text);
    text-decoration: none;
}
.comment-content {
    font-size: 1rem;
    margin-top: 0.5rem;
}
.comment-meta {
    font-size: 0.8rem;
    color: var(--color-meta);
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}
.comment-meta a {
    color: var(--color-meta);
    text-decoration: none;
}
.comment-meta a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
.reply-link-wrapper, .edit-link-wrapper {
    margin-left: 1rem;
}
.comment-reply-link {
    font-weight: 700;
}
/* Nested Comments */
.comment-list .children {
    list-style: none;
    padding-left: calc(32px + 1rem); /* Half avatar + gap */
    margin-top: 1.5rem;
    position: relative;
    margin-bottom: 0;
}
.comment-list .children .comment-bubble {
    background-color: #fff; /* Contrast for child comments */
}
/* Comment Form */
.comment-form-wrapper {
    padding: 24px 0;
}
.comment-form-wrapper label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 700;
}
.comment-form .comment-form-comment textarea {
    width: 100%;
    height: 80px;
}

#inline-commentform textarea {
    height: 55px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
}
#inline-commentform textarea:focus {
    border-color: #007acc;
    box-shadow: 0 0 8px rgba(0, 122, 204, 0.6);
    outline: none;
}
.comment-form-author {
    margin-right: 30px;
}
.comment-form-author, .comment-form-email {
    background-color: #fff0;
    display: inline-block;
}

/* Masquage par défaut - spécificité plus élevée */
.comment-form .comment-form-author,
.comment-form .comment-form-email {
    display: block; /* Override du inline-block ci-dessus */
}


.comment-form .comment-form-comment textarea, .comment-form-author input, .comment-form-email input {
    padding: 1rem;
    border-radius: var(--soft-radius);
    border: 1px solid var(--color-border);
    font-family: var(--font-primary), serif;
    font-size: 1rem;
    transition: height 0.3s ease;
}
.comment-form-author input, .comment-form-email input {
    font-size: 1rem;
}
.comment-form-wrapper.is-focused .comment-form-comment textarea {
    height: 120px;
}
/* État par défaut : champs cachés */
.comment-form-fields-grid,
.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-cookies-consent,
.comment-form .form-submit {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-top 0.4s ease-in-out !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.comment-form .logged-in-as + .form-submit {
    max-height: 150px;
    opacity: 1;
    margin-top: 1rem !important;
}
/* État révélé : champs visibles quand le formulaire est focalisé */
.comment-form-wrapper.is-focused .comment-form-fields-grid,
.comment-form-wrapper.is-focused .comment-form-author,
.comment-form-wrapper.is-focused .comment-form-email,
.comment-form-wrapper.is-focused .form-submit,
.comment-form-wrapper.is-focused .comment-form-cookies-consent {
    max-height: 150px !important; /* Large enough to not clip content */
    opacity: 1 !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}
.comment-form-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-form .p {
    margin: 0;
}
.comment-form-fields-grid input {
    width: 100%;
    padding: .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--soft-radius);
}
/* Bouton « Publier le commentaire » migré vers le Design System :
   class="submit senego-btn senego-btn--gradient" (cf. components.css).
   `submit` est conservé comme accroche technique (JS d'envoi). */

@media (min-width: 768px) {
    .comment-form-fields-grid {
        flex-direction: row;
    }
    .comment-form-fields-grid .comment-form-author,
    .comment-form-fields-grid .comment-form-email {
        flex: 1;
    }
}
@media (max-width: 767px) {
    .comments-area {
        padding: 15px;
    }
    .comment-body {
        gap: 10px;
        padding: 10px;
    }
    .comment-avatar .avatar {
        width: 40px;
        height: 40px;
    }
    .comment-bubble {
        padding: 10px 15px;
    }
    .comment-list{
        margin: 0;
    }
    .comment-list .children {
        padding-left: 0;
    }
    .comment-meta {
        padding-left: calc(40px + 10px);
    }
    .comment-form-wrapper {
        padding: 10px;
    }

    .comment-form-author {
        margin-right: 0;
    }
    .comment-form-author, .comment-form-email {
        display: block;
    }
}


/* === Responsive mobile single + commentaires (déplacé de core.css — modularité) === */
@media (max-width: 767px) {
    /* ================================================================
       SINGLE POST - Article Page — Premium Mobile 2026
       ================================================================ */
    .single-post-layout {
        padding: var(--mobile-padding);
        background: #fff;
    }

    .single-post-layout .entry-title {
        font-size: 1.5rem;
        line-height: 1.25;
        text-transform: none;
        font-weight: 800;
        margin-bottom: 14px;
        letter-spacing: -0.01em;
    }

    .single-post-layout .entry-meta {
        gap: 0;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .single-post-layout .post-thumbnail {
        margin: 0 calc(-1 * var(--mobile-padding)) 20px;
        border-radius: 0;
    }

    .single-post-layout .post-thumbnail img {
        border-radius: 0;
        width: 100%;
    }

    .single-post-layout .entry-content {
        max-width: 100%;
    }

    .entry-content p,
    .entry-content li {
        font-size: 1rem;
        line-height: 1.75;
    }

    .entry-content h2 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
    }
    .entry-content h3 {
        font-size: 1.1rem;
        margin: 1.3rem 0 0.6rem;
    }
    .entry-content h4 {
        font-size: 1.05rem;
        margin: 1.2rem 0 0.5rem;
    }

    .entry-content blockquote {
        margin: 1.5rem 0;
        padding: 14px 16px;
        font-size: 1rem;
        border-left-width: 3px;
        border-radius: 0 8px 8px 0;
    }
    .entry-content blockquote::before {
        font-size: 2.5rem;
        top: -4px;
        left: 10px;
    }

    .entry-content iframe {
        margin: 1rem auto;
    }

    /* Breadcrumbs mobile */
    .breadcrumbs {
        font-size: 0.75rem;
        margin-bottom: 12px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Share buttons mobile */
    .share-button-bar {
        padding: 12px 0;
        margin-bottom: 1.5rem;
    }

    .share-button-list {
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    .share-button {
        padding: 10px 14px;
        border-radius: 50px;
        font-size: 0.85rem;
        flex: 1;
        justify-content: center;
    }

    .share-button .share-label {
        display: none;
    }

    /* Tags mobile */
    .article-tags {
        gap: 6px;
        padding: 14px 0;
    }
    .senego-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* Inline comment form mobile */
    .inline-comment-form-section {
        padding: 14px 16px;
        border-radius: var(--soft-radius);
        margin-bottom: 1.5rem;
    }

    /* ================================================================
       COMMENTS - Cleaner Mobile
       ================================================================ */
    .comments-area {
        padding: var(--mobile-padding);
        margin-top: 0;
        background: #fff;
        border-top: 3px solid #f5f5f5;
    }

    .comments-title {
        font-size: 1.2rem;
        font-weight: 800;
        margin-bottom: 1rem;
    }

    .comment-body {
        gap: 8px;
        padding: 10px;
    }

    .comment-avatar .avatar {
        width: 36px;
        height: 36px;
    }

    .comment-bubble {
        padding: 10px 12px;
        border-radius: var(--soft-radius);
        background: #f8f8f8;
    }

    .comment-content {
        font-size: 0.9rem;
    }

    #inline-commentform textarea {
        height: 48px;
        border-radius: var(--soft-radius);
        padding: 12px 16px;
        font-size: 0.9rem;
        border: 1px solid var(--senego-color-border);
        background: #fff;
    }

    #inline-commentform textarea:focus {
        background: #fff;
    }
}
