/* ==========================================================================
   Module : Sujet Unique - CSS critique du premier rendu
   ========================================================================== */

.ttb-single-thread-page .ttb-thread-item-full {
    position: relative;
    isolation: isolate;
    background-color: transparent;
    padding: var(--tt-space-5);
    border: none;
    margin-bottom: var(--tt-space-5);
    clip-path: var(--tt-chamfer-md);
    filter: drop-shadow(var(--tt-shadow-sm, 0 0.25rem 1rem rgba(0, 0, 0, 0.22)));
}

.ttb-single-thread-page .ttb-thread-item-full::before,
.ttb-single-thread-page .ttb-thread-item-full::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-md);
}

.ttb-single-thread-page .ttb-thread-item-full::before {
    inset: 0;
    background: var(--ttb-color-border-accent);
}

.ttb-single-thread-page .ttb-thread-item-full::after {
    inset: 1px;
    background: var(--ttb-color-bg-element);
}

.ttb-single-thread-page .ttb-thread-header {
    display: flex;
    align-items: flex-start;
    gap: var(--tt-space-4);
    margin-bottom: var(--tt-space-4);
    padding-bottom: var(--tt-space-4);
    border-bottom: 1px solid var(--ttb-color-divider);
}

.ttb-single-thread-page .ttb-thread-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.ttb-single-thread-page .ttb-thread-main-content-header .entry-title.ttb-thread-title {
    font-size: var(--tt-font-size-lg);
    color: var(--ttb-color-text-heading);
    margin-bottom: var(--tt-space-1);
    line-height: 1.3;
}

.ttb-single-thread-page .ttb-thread-meta {
    font-size: var(--tt-font-size-xs);
    color: var(--ttb-color-text-secondary);
}

.ttb-single-thread-page .ttb-thread-meta a {
    color: var(--ttb-color-text-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.ttb-single-thread-page .ttb-thread-meta a:hover,
.ttb-single-thread-page .ttb-thread-meta a:focus-visible {
    color: var(--ttb-color-text-link-hover);
    text-decoration-thickness: 2px;
}

.ttb-single-thread-page .entry-content.ttb-thread-content {
    color: var(--ttb-color-text-primary);
    line-height: var(--ttb-line-height-content);
}

.ttb-single-thread-page .entry-content p,
.ttb-single-thread-page .entry-content ul,
.ttb-single-thread-page .entry-content ol,
.ttb-single-thread-page .entry-content blockquote,
.ttb-single-thread-page .entry-content .wp-block-image,
.ttb-single-thread-page .entry-content .wp-block-embed {
    margin-bottom: var(--tt-space-4);
}

.ttb-single-thread-page .entry-content a {
    color: var(--ttb-color-text-link-hover);
    text-decoration: underline;
}

.ttb-single-thread-page .entry-content a:hover {
    text-decoration: none;
}

.ttb-comments-wrapper {
    position: relative;
    isolation: isolate;
    background-color: transparent;
    padding: var(--tt-space-4);
    border: none;
    clip-path: var(--tt-chamfer-md);
    margin-top: var(--tt-space-5);
    filter: drop-shadow(var(--tt-shadow-sm, 0 0.25rem 1rem rgba(0, 0, 0, 0.22)));
}

.ttb-comments-wrapper::before,
.ttb-comments-wrapper::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-md);
}

.ttb-comments-wrapper::before {
    inset: 0;
    background: var(--ttb-color-border-accent);
}

.ttb-comments-wrapper::after {
    inset: 1px;
    background: var(--ttb-color-bg-container);
}

.ttb-comments-wrapper .comments-title,
.ttb-comments-wrapper #reply-title.comment-reply-title {
    font-size: var(--tt-font-size-md);
    color: var(--ttb-color-text-heading);
    margin-bottom: var(--tt-space-4);
    padding-bottom: var(--tt-space-2);
    border-bottom: 1px solid var(--ttb-color-divider);
}

.ttb-comments-wrapper #cancel-comment-reply-link {
    display: none !important;
}

.ttb-comments-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--tt-space-2);
    margin-bottom: var(--tt-space-4);
}

.ttb-comments-header .comments-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ttb-comment-sort-controls {
    display: flex;
    align-items: center;
    gap: var(--tt-space-1);
    font-size: var(--tt-font-size-xs);
    color: var(--ttb-color-text-secondary);
}

.ttb-comment-sort-select {
    background-color: var(--ttb-color-bg-element);
    color: var(--ttb-color-text-primary);
    border: 1px solid var(--ttb-color-border-accent);
    border-radius: var(--tt-radius-xs);
    padding: 0.25rem 0.5rem;
    font-size: var(--tt-font-size-xs);
    cursor: pointer;
}

.ttb-comments-wrapper .comment-list,
.ttb-comments-wrapper .comment-list .children {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.ttb-comments-wrapper .ttb-comment-item {
    background-color: transparent;
    margin-bottom: var(--tt-space-4);
    position: relative;
}

.ttb-comments-wrapper .comment-list > .ttb-comment-item:last-child {
    margin-bottom: 0;
}

.ttb-comments-wrapper .comment-body.ttb-comment-body {
    display: flex;
    gap: var(--tt-space-4);
    position: relative;
    isolation: isolate;
    border: none;
    padding: var(--tt-space-4);
    clip-path: var(--tt-chamfer-sm);
    background-color: transparent;
}

.ttb-comments-wrapper .comment-body.ttb-comment-body::before,
.ttb-comments-wrapper .comment-body.ttb-comment-body::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-sm);
}

.ttb-comments-wrapper .comment-body.ttb-comment-body::before {
    inset: 0;
    background: var(--ttb-color-border-accent);
}

.ttb-comments-wrapper .comment-body.ttb-comment-body::after {
    inset: 1px;
    background: var(--ttb-color-bg-element);
}

.ttb-comments-wrapper .ttb-comment-avatar img {
    display: block;
    width: 40px;
    height: 40px;
    max-width: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.ttb-comments-wrapper .ttb-comment-content-wrapper {
    flex: 1;
    min-width: 0;
}

.ttb-comments-wrapper .comment-meta.ttb-comment-meta {
    margin-bottom: var(--tt-space-2);
}

.ttb-comments-wrapper .comment-author.ttb-comment-author b.fn {
    color: var(--ttb-color-text-link);
    font-size: 1.1em;
}

.ttb-comments-wrapper .comment-author.ttb-comment-author .says {
    color: var(--ttb-color-text-secondary);
    font-size: 0.9em;
}

.ttb-comments-wrapper .comment-metadata.ttb-comment-metadata {
    font-size: var(--tt-font-size-xs);
    color: var(--ttb-color-text-secondary);
}

.ttb-comments-wrapper .comment-metadata a {
    color: var(--ttb-color-text-secondary);
}

.ttb-comments-wrapper .comment-content.ttb-comment-text {
    margin: var(--tt-space-2) 0;
    line-height: var(--ttb-line-height-content);
    color: var(--ttb-color-text-primary);
    word-wrap: break-word;
}

.ttb-comments-wrapper .comment-content p:last-child {
    margin-bottom: 0;
}

.ttb-comments-wrapper .comment-awaiting-moderation {
    font-style: italic;
    color: var(--ttb-color-text-secondary);
    font-size: var(--tt-font-size-xs);
}

.ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link,
.ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger {
    position: relative;
    isolation: isolate;
    background-color: transparent;
    color: #FFFFFF !important;
    padding: var(--tt-space-1) var(--tt-space-2);
    min-height: 2.25rem;
    clip-path: var(--tt-chamfer-sm);
    text-decoration: none;
    font-size: var(--tt-font-size-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: var(--tt-space-2);
    line-height: 1;
    transition: color 0.2s ease;
}

.ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link .tt-icon,
.ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger .tt-icon {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
    stroke-width: 2.15;
}

.ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link::before,
.ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link::after,
.ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger::before,
.ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-sm);
    transition: background 0.2s ease;
}

.ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link::before,
.ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger::before {
    inset: 0;
    background: var(--ttb-color-accent-strong);
}

.ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link::after,
.ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger::after {
    inset: 1px;
    background: var(--ttb-color-accent-strong);
}

.ttb-comments-wrapper .comment-list .ttb-comment-item {
    list-style: none;
}

.ttb-comments-wrapper .comment-body.ttb-comment-body.ttb-article-bg-primary::after {
    background: var(--ttb-color-bg-comment-primary);
}

.ttb-comments-wrapper .comment-body.ttb-comment-body.ttb-article-bg-secondary::after {
    background: var(--ttb-color-bg-comment-secondary);
}

.ttb-comments-wrapper > .comment-respond {
    margin-bottom: var(--tt-space-5);
    position: relative;
    isolation: isolate;
    background-color: transparent;
    padding: var(--tt-space-4);
    border: none;
    clip-path: var(--tt-chamfer-sm);
}

.ttb-comments-wrapper > .comment-respond::before,
.ttb-comments-wrapper > .comment-respond::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-sm);
}

.ttb-comments-wrapper > .comment-respond::before {
    inset: 0;
    background: var(--ttb-color-border-secondary);
}

.ttb-comments-wrapper > .comment-respond::after {
    inset: 1px;
    background: var(--ttb-color-bg-element);
}

.ttb-comments-wrapper .no-comments.ttb-comments-closed {
    text-align: center;
    padding: var(--tt-space-4);
    color: var(--ttb-color-text-secondary);
}

.ttb-comment-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(var(--ttb-color-bg-element-rgb), 0.85);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--tt-space-4);
    clip-path: var(--tt-chamfer-sm);
    text-align: center;
}

.ttb-comment-login-prompt .ttb-comment-login-overlay {
    position: relative;
    inset: auto;
    min-height: clamp(7rem, 18vw, 10rem);
}

.ttb-comment-login-overlay .ttb-comment-login-message a {
    position: relative;
    isolation: isolate;
    color: var(--ttb-color-accent);
    font-size: var(--tt-font-size-md);
    font-weight: bold;
    text-decoration: none;
    padding: var(--tt-space-2) var(--tt-space-4);
    border: none;
    clip-path: var(--tt-chamfer-sm);
    background: transparent;
    transition: color 0.3s ease;
    display: inline-block;
    z-index: 21;
}

.ttb-comment-login-overlay .ttb-comment-login-message a::before,
.ttb-comment-login-overlay .ttb-comment-login-message a::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-sm);
    transition: all 0.3s ease;
}

.ttb-comment-login-overlay .ttb-comment-login-message a::before {
    inset: 0;
    background: var(--ttb-color-accent);
}

.ttb-comment-login-overlay .ttb-comment-login-message a::after {
    inset: 2px;
    background: rgba(var(--ttb-color-bg-page-rgb), 0.9);
}

.ttb-comment-login-overlay .ttb-comment-login-message a:hover {
    color: var(--ttb-color-bg-page);
}

.ttb-comment-login-overlay .ttb-comment-login-message a:hover::after {
    background: var(--ttb-color-accent);
}

.ttb-thread-status-info {
    position: relative;
    isolation: isolate;
    background-color: transparent;
    border: none;
    color: #CD4A4A;
    padding: var(--tt-space-4);
    clip-path: var(--tt-chamfer-sm);
    margin-top: var(--tt-space-5);
    text-align: center;
}

.ttb-thread-status-info::before,
.ttb-thread-status-info::after {
    content: '';
    position: absolute;
    z-index: -1;
    clip-path: var(--tt-chamfer-sm);
}

.ttb-thread-status-info::before {
    inset: 0;
    background: #CD4A4A;
}

.ttb-thread-status-info::after {
    inset: 1px;
    background: var(--ttb-color-bg-element);
}

.ttb-thread-edited-info {
    font-size: var(--tt-font-size-xs, 0.8em);
    color: var(--ttb-color-text-subtle, #6e7681);
    margin-top: 0.25rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.3125rem;
}

.ttb-thread-edited-info .tt-icon {
    font-size: 0.85em;
    opacity: 0.7;
}

html.light-mode .ttb-single-thread-page .ttb-thread-item-full::before {
    background: var(--ttb-color-border-accent);
}

html.light-mode .ttb-single-thread-page .ttb-thread-item-full::after {
    background: var(--tt-color-surface, #fff9f1);
}

html.light-mode .ttb-single-thread-page .ttb-thread-header {
    border-bottom: 1px solid var(--ttb-color-divider, #E0D5C1);
}

html.light-mode .ttb-single-thread-page .ttb-thread-main-content-header .entry-title.ttb-thread-title {
    color: var(--tt-color-page-text, #4A3B31);
}

html.light-mode .ttb-single-thread-page .ttb-thread-meta {
    color: var(--tt-color-page-text-muted);
}

html.light-mode .ttb-single-thread-page .ttb-thread-meta a {
    color: var(--ttb-color-text-link);
}

html.light-mode .ttb-single-thread-page .ttb-thread-meta a:hover,
html.light-mode .ttb-single-thread-page .ttb-thread-meta a:focus-visible {
    color: var(--ttb-color-text-link-hover);
}

html.light-mode .ttb-single-thread-page .entry-content.ttb-thread-content {
    color: var(--tt-color-page-text);
}

html.light-mode .ttb-single-thread-page .entry-content a {
    color: var(--ttb-color-text-link-hover);
}

html.light-mode .ttb-thread-edited-info {
    color: var(--tt-color-page-text-muted, #8B7355);
}

html.light-mode .ttb-comments-wrapper::before {
    background: var(--ttb-color-border-accent);
}

html.light-mode .ttb-comments-wrapper::after {
    background: var(--tt-color-surface, #fff9f1);
}

html.light-mode .ttb-comments-wrapper .comments-title,
html.light-mode .ttb-comments-wrapper #reply-title.comment-reply-title {
    color: var(--tt-color-page-text, #4A3B31);
    border-bottom: 1px solid var(--ttb-color-divider, #E0D5C1);
}

html.light-mode .ttb-comment-sort-controls {
    color: var(--tt-color-page-text-muted, #8B7D6B);
}

html.light-mode .ttb-comment-sort-select {
    background-color: var(--tt-color-component-background, #EADDCA);
    color: var(--tt-color-page-text, #4A3B31);
    border-color: var(--ttb-color-border-accent);
}

html.light-mode .ttb-comments-wrapper .comment-body.ttb-comment-body::before,
html.light-mode .ttb-comments-wrapper .comment-body.ttb-comment-body.ttb-article-bg-primary::before,
html.light-mode .ttb-comments-wrapper .comment-body.ttb-comment-body.ttb-article-bg-secondary::before {
    background: var(--ttb-color-border-accent);
}

html.light-mode .ttb-comments-wrapper .comment-body.ttb-comment-body::after,
html.light-mode .ttb-comments-wrapper .comment-body.ttb-comment-body.ttb-article-bg-primary::after,
html.light-mode .ttb-comments-wrapper .comment-body.ttb-comment-body.ttb-article-bg-secondary::after {
    background: var(--tt-color-surface, #fff9f1);
}

html.light-mode .ttb-comments-wrapper .comment-author.ttb-comment-author b.fn {
    color: var(--ttb-color-text-link);
}

html.light-mode .ttb-comments-wrapper .comment-author.ttb-comment-author .says {
    color: var(--tt-color-page-text-muted);
}

html.light-mode .ttb-comments-wrapper .comment-metadata.ttb-comment-metadata,
html.light-mode .ttb-comments-wrapper .comment-metadata a {
    color: var(--tt-color-page-text-muted);
}

html.light-mode .ttb-comments-wrapper .comment-content.ttb-comment-text {
    color: var(--tt-color-page-text);
}

html.light-mode .ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link::before,
html.light-mode .ttb-comments-wrapper .reply.ttb-reply-link .comment-reply-link::after,
html.light-mode .ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger::before,
html.light-mode .ttb-comments-wrapper .reply.ttb-reply-link .ttb-comment-reply-trigger::after {
    background: var(--ttb-color-accent-strong);
}

html.light-mode .ttb-comments-wrapper > .comment-respond::before {
    background: var(--ttb-color-border-secondary, #D4C0A5);
}

html.light-mode .ttb-comments-wrapper > .comment-respond::after {
    background: var(--tt-color-component-background);
}

html.light-mode .ttb-comment-login-overlay {
    background-color: rgba(250, 240, 230, 0.85);
}

html.light-mode .ttb-comment-login-overlay .ttb-comment-login-message a {
    color: var(--ttb-color-accent);
}

html.light-mode .ttb-comment-login-overlay .ttb-comment-login-message a::after {
    background: rgba(250, 240, 230, 0.95);
}

html.light-mode .ttb-comment-login-overlay .ttb-comment-login-message a:hover {
    color: var(--tt-color-page-bg);
}

html.light-mode .ttb-comment-login-overlay .ttb-comment-login-message a:hover::after {
    background: var(--ttb-color-accent);
}

html.light-mode .ttb-thread-status-info {
    color: #B54040;
}

html.light-mode .ttb-thread-status-info::before {
    background: #CD4A4A;
}

html.light-mode .ttb-thread-status-info::after {
    background: #FFF0F0;
}
