/* =============================================
FORUM DETAIL PAGE - VERSION COMPLÈTE Figma
============================================= */

.forum-detail-content {
max-width: 1280px;
margin: 0 auto;
padding: 40px 24px 120px;
background: #000;
}

/* ====================== THREAD HEADER ====================== */
.thread-header {
background: #0A0A0A;
border: 1px solid #222;
border-radius: 16px;
padding: 48px 44px;
border-left: 8px solid #EAB308;
margin-bottom: 48px;
box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.thread-badges {
display: flex;
gap: 12px;
margin-bottom: 24px;
}

.badge {
font-size: 13px;
font-weight: 700;
padding: 7px 20px;
border-radius: 9999px;
letter-spacing: 0.8px;
text-transform: uppercase;
}

.badge.art-therapy { 
background: #2563EB; 
color: white; 
}

.badge.pinned { 
background: #EAB308; 
color: #111; 
}

.thread-title {
font-family: 'Playfair Display', serif;
font-size: 48px;
line-height: 1.1;
font-weight: 900;
color: #F8FAFC;
margin-bottom: 32px;
}

.thread-author-info {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 36px;
}

.thread-author-info img {
width: 72px;
height: 72px;
border-radius: 50%;
object-fit: cover;
border: 4px solid #EAB308;
box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.author-name {
font-size: 20px;
font-weight: 600;
color: white;
}

.author-role {
color: #EAB308;
font-size: 14.5px;
font-weight: 600;
}

/* ====================== THREAD CONTENT ====================== */
.thread-content {
font-size: 17.5px;
line-height: 1.85;
color: #E2E8F0;
padding-bottom: 20px;
}

/* ====================== REPLIES ====================== */
.replies-section {
background: #111111;
border-radius: 16px;
padding: 44px;
margin-bottom: 48px;
}

.replies-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 36px;
padding-bottom: 20px;
border-bottom: 1px solid #222;
}

.reply-card {
background: #1A1A1A;
border-radius: 14px;
padding: 34px;
margin-bottom: 28px;
border: 1px solid #222;
}

.reply-author {
display: flex;
align-items: center;
gap: 18px;
margin-bottom: 22px;
}

.reply-author img {
width: 52px;
height: 52px;
border-radius: 50%;
object-fit: cover;
}

.reply-content {
font-size: 16.5px;
line-height: 1.78;
color: #CBD5E1;
}

.reply-actions {
margin-top: 26px;
display: flex;
gap: 32px;
color: #94A3B8;
font-size: 15px;
}

/* ====================== ADD REPLY ====================== */
.add-reply-box {
background: #111111;
border-radius: 16px;
padding: 44px;
border: 1px solid #222;
}

.reply-toolbar {
background: #1F2937;
padding: 14px;
border-radius: 12px;
display: flex;
gap: 14px;
margin-bottom: 24px;
}

.toolbar-btn {
width: 42px;
height: 42px;
background: #334155;
color: #CBD5E1;
border: none;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 18px;
}

.reply-textarea {
width: calc(100% - 48px);
min-height: 180px;
background: #1F2937;
border: 1px solid #334155;
border-radius: 12px;
color: white;
padding: 24px;
font-size: 16.5px;
resize: vertical;
}

.btn-publish {
background: linear-gradient(90deg, #EAB308, #FACC15);
color: #111;
font-weight: 700;
padding: 18px 48px;
border: none;
border-radius: 9999px;
font-size: 17px;
cursor: pointer;
margin-top: 28px;
box-shadow: 0 8px 25px rgba(234, 179, 8, 0.4);
}

/* ====================== SIDEBAR ====================== */
.sidebar {
display: flex;
flex-direction: column;
gap: 32px;
}

.sidebar-card {
background: #111111;
border-radius: 16px;
padding: 40px 32px;
text-align: center;
border: 1px solid #222;
}

.sidebar-card img {
width: 148px;
height: 148px;
border-radius: 50%;
border: 6px solid #EAB308;
margin-bottom: 28px;
}

/* Responsive */
@media (max-width: 1024px) {
.forum-detail-content > div {
grid-template-columns: 1fr !important;
}
}
:root {
    --jaune: #EAB308;
}
body { background:#000; color:#E2E8F0; font-family:'Montserrat', sans-serif; }
.forum-detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 120px;
}

/* HEADER THREAD */
.thread-header {
    background: #111111;
    border-radius: 16px;
    padding: 40px;
    border-left: 8px solid var(--jaune);
    margin-bottom: 48px;
    position: relative;
}
.thread-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.badge {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 9999px;
    letter-spacing: 0.6px;
}
.badge.art { background: #2563EB; color:white; }
.badge.pinned { background: var(--jaune); color:#111; }

.thread-title {
    font-family: 'Playfair Display', serif;
    font-size: 46px;
    line-height: 1.1;
    margin-bottom: 28px;
}

.thread-author-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}
.thread-author-info img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid var(--jaune);
    box-shadow: 0 0 0 6px rgba(234,179,8,0.15);
}

.author-role {
    color: var(--jaune);
    font-size: 14px;
    font-weight: 600;
}

/* REPLIES */
.replies-section {
    background: #111;
    border-radius: 16px;
    padding: 40px;
}
.reply-card {
    background: #1A1A1A;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}
.reply-author img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
}

/* ADD REPLY */
.add-reply-box {
    background: #111;
    border-radius: 16px;
    padding: 40px;
    margin-top: 48px;
}
.reply-toolbar {
    background: #1F2937;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.toolbar-btn {
    width: 40px; height: 40px;
    background: #334155;
    color: #CBD5E1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-publish {
    background: linear-gradient(90deg, #EAB308, #FACC15);
    color: #111;
    font-weight: 700;
    padding: 18px 40px;
    border-radius: 9999px;
    box-shadow: 0 0 25px rgba(234,179,8,0.5);
}

/* SIDEBAR */
.sidebar-card {
    background: #111;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}
.sidebar-card img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid var(--jaune);
}
/* =============================================
   RESPONSIVE MOBILE - Forum Detail
   ============================================= */

@media (max-width: 1024px) {
    .forum-detail-content > div {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }
    
    .thread-header {
        padding: 36px 24px;
    }
    
    .thread-title {
        font-size: 36px;
        line-height: 1.15;
    }
    
    .thread-author-info img {
        width: 60px;
        height: 60px;
    }
    
    .replies-section,
    .add-reply-box {
        padding: 32px 24px;
    }
    
    .reply-card {
        padding: 28px 24px;
    }
    
    .sidebar {
        margin-top: 20px;
    }
    
    .sidebar-card {
        padding: 32px 24px;
    }
    
    .sidebar-card img {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 640px) {
    .forum-detail-content {
        padding: 20px 16px 80px;
    }
    
    .thread-header {
        padding: 32px 20px;
        border-left-width: 5px;
    }
    
    .thread-title {
        font-size: 32px;
    }
    
    .thread-badges {
        flex-wrap: wrap;
    }
    
    .thread-author-info {
        gap: 14px;
    }
    
    .thread-author-info img {
        width: 52px;
        height: 52px;
    }
    
    .replies-section,
    .add-reply-box {
        padding: 28px 20px;
    }
    
    .reply-card {
        padding: 24px 20px;
    }
    
    .reply-toolbar {
        padding: 10px;
        gap: 8px;
    }
    
    .toolbar-btn {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .btn-publish {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
    
    .sidebar-card {
        padding: 28px 20px;
    }
    
    .sidebar-card img {
        width: 100px;
        height: 100px;
    }
}

/* Très petit écran */
@media (max-width: 480px) {
    .thread-title {
        font-size: 28px;
    }
    
    .forum-detail-content {
        padding: 16px 12px 60px;
    }
}
/* =============================================
   FIX MOBILE FORT - Débordement + Header non-sticky
   ============================================= */

@media (max-width: 768px) {
    
    /* Force non-sticky header */
    .header {
        position: relative !important;
        top: auto !important;
    }
    
    /* Correction débordement horizontal */
    .forum-detail-content,
    .thread-header,
    .replies-section,
    .add-reply-box,
    .sidebar-card,
    .content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .thread-header {
        padding: 32px 18px !important;
        border-left-width: 5px !important;
    }

    .thread-title {
        font-size: 30px !important;
        line-height: 1.15 !important;
    }

    .replies-section,
    .add-reply-box {
        padding: 28px 18px !important;
    }

    .reply-card {
        padding: 24px 18px !important;
    }

    .sidebar {
        margin-top: 24px;
    }

    .sidebar-card {
        padding: 28px 18px !important;
    }

    .btn-publish {
        width: 100% !important;
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    .forum-detail-content {
        padding: 16px 12px 60px !important;
    }
    
    .thread-title {
        font-size: 27px !important;
    }
    
    .thread-author-info img {
        width: 52px !important;
        height: 52px !important;
    }
}
/* =============================================
   FIX MOBILE URGENT - Header non-sticky + No overflow
   ============================================= */

@media (max-width: 768px) {

    /* Force le header à ne PLUS être sticky sur cette page */
    .header {
        position: static !important;
        top: auto !important;
    }

    /* Empêche tout débordement horizontal */
    body, 
    .content, 
    .forum-detail-content,
    .thread-header,
    .replies-section,
    .add-reply-box,
    .sidebar-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Ajustements plus serrés pour mobile */
    .thread-header {
        padding: 32px 18px !important;
        margin-bottom: 32px !important;
    }

    .thread-title {
        font-size: 29px !important;
        line-height: 1.15 !important;
    }

    .replies-section,
    .add-reply-box {
        padding: 28px 18px !important;
    }

    .reply-card {
        padding: 24px 18px !important;
    }

    .forum-detail-content {
        padding: 20px 12px 80px !important;
    }
}

/* Correction supplémentaire pour très petits écrans */
@media (max-width: 480px) {
    .thread-title {
        font-size: 26px !important;
    }
    
    .thread-header {
        padding: 28px 16px !important;
    }
}

/* ====================== DISCUSSIONS SIMILAIRES ====================== */
.similar-threads-title {
    color: #EAB308;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 600;
}

.similar-thread-item {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #222;
}

.similar-thread-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.similar-thread-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: color 0.25s ease;
}

.similar-thread-link:hover {
    color: #FACC15;
}

.similar-thread-title {
    font-size: 15.5px;
    line-height: 1.45;
    margin-bottom: 6px;
    font-weight: 500;
}

.similar-thread-meta {
    color: #94A3B8;
    font-size: 13.5px;
}

.no-similar {
    color: #94A3B8;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.emoji-picker {
    position: absolute;
    background: #1F2937;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 12px;
    width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 100;
    margin-top: 8px;
    display: none;
}

.emoji-grid {
    display: flex;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    flex-wrap: wrap;
}

.emoji-item {
    font-size: 26px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
}

.emoji-item:hover {
    background: #334155;
    transform: scale(1.25);
}

/* ====================== LIENS DANS LES RÉPONSES ====================== */
.reply-content a,
.reply-item a {
    color: #60A5FA;                    /* Bleu clair moderne */
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

.reply-content a:hover,
.reply-item a:hover {
    color: #93C5FD;
    border-bottom: 1px solid #93C5FD;
    text-decoration: none;
}

/* Effet au clic / focus */
.reply-content a:active,
.reply-content a:focus,
.reply-item a:active,
.reply-item a:focus {
    color: #3B82F6;
    outline: none;
}

/* Style pour les liens dans le markdown rendu */
.reply-content strong a,
.reply-content em a {
    color: #60A5FA;
}

/* Adaptation pour le mode sombre (déjà sombre par défaut) */
@media (max-width: 768px) {
    .reply-content a {
        font-size: 15px;
    }
}

/* Bouton Like */
.stat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-btn .icon {
    font-size: 18px;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.stat-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-btn.liked {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--red-like);
}

.stat-btn.liked .icon {
    filter: grayscale(0);
}

/* Stat Views */
.stat-views {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.stat-views .icon {
    font-size: 18px;
    opacity: 0.7;
}

/* ====================== LIENS AUTEUR ====================== */
.author-avatar-link,
.author-name-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.author-avatar-link:hover img {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    border-radius: 50%;
}

.author-name-link:hover strong {
    color: #FACC15; /* Jaune doré */
    text-decoration: underline;
}

.author-avatar-link img {
    transition: all 0.2s ease;
    border-radius: 50%;
}

/* ====================== NOMS D'AUTEURS ====================== */
.author-name-link strong {
    color: #E0C070;
    font-weight: 600;
}

.author-name-link:hover strong {
    color: #FACC15;
    text-shadow: 0 0 12px rgba(250, 204, 21, 0.5);
}

.author-name-link strong {
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.02em;
    transition: all 0.25s ease;
}

/* Effet au clic / focus */
.author-name-link:active strong,
.author-name-link:focus strong {
    color: #DDD6FE;
    transform: translateX(2px);
}

/* Style spécial pour les admins ou modérateurs (optionnel) */
.author-role {
    color: #94A3B8;
    font-size: 13px;
    font-weight: 400;
}

/* Version premium avec glow subtil */
.author-name-link:hover strong {
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
}

/* Badges supplémentaires */
.badge.locked {
    background: #B91C1C;           /* Rouge sombre */
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge.pinned {
    background: #15803D;           /* Vert */
    color: white;
}

.badge.art-therapy {
    background: #7C3AED;
    color: white;
}

.locked-notice {
    background: rgba(185, 28, 28, 0.15);
    border: 1px solid #B91C1C;
    color: #FCA5A5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

.locked-notice strong {
    color: #EF4444;
    font-size: 16px;
}

.author-stats-compact {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #CBD5E1;
    font-size: 14px;
}

.stat-item strong {
    color: #FACC15;
    font-weight: 700;
}

.stat-item svg {
    width: 18px;
    height: 18px;
    color: #FACC15;
}

/* ====================== PAGINATION ====================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 40px 0 20px 0;
    padding: 16px 0;
    border-top: 1px solid #334155;
}

.page-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #CBD5E1;
    border: 1px solid #475569;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-btn:hover:not(.disabled) {
    background: #FACC15;
    color: #0F172A;
    border-color: #FACC15;
    transform: translateY(-1px);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-info {
    color: #94A3B8;
    font-size: 14px;
    font-weight: 500;
    padding: 0 12px;
}

/* Version mobile - texte court */
@media (max-width: 640px) {
    .pagination {
        gap: 12px;
    }
    
    .page-btn {
        padding: 9px 14px;
        font-size: 14px;
    }
    
    .page-info {
        font-size: 13px;
    }
}

/* Style pour les flèches */
.pagination .page-btn svg,
.pagination .page-btn span {
    transition: all 0.2s ease;
}