@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap");

/* =========================
   GLOBAL
========================= */

.fz-page {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #f7f7f7;
    color: #1a1a1a;
}

.fz-body {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
}

.fz-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
}

.fz-card-hdr {
    padding: 12px 14px;
    font-size: 12px;
    color: #888;
    border-bottom: 1px solid #eee;
}

.fz-cat-item {
    padding: 14px;
    display: flex;
    gap: 8px;
    text-decoration: none;
    color: #333;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}

.fz-cat-item:last-child { border-bottom: 0; }
.fz-cat-item:hover { background: #fafafa; }
.fz-cat-item.active { font-weight: 700; }

.fz-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 8px;
}

/* =========================
   MOBILE BACKDROP / SIDEBAR
========================= */

#fz-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 110;
}

/* =========================
   HEADER
========================= */

.fz-header {
    background: #c8102e;
    color: #fff;
    width: 100%;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.fz-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

.fz-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    white-space: nowrap;
    flex: 1 1 auto;
}

.fz-menu-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    padding: 0;
    flex: 0 0 28px;
}

.fz-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    font-style: italic;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
}

.fz-logo-main {
    font-weight: 900;
    font-size: 16px;
    color: #fff;
}

.fz-logo-sub {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
    font-style: normal;
    text-transform: lowercase;
    color: #fff;
}

.fz-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
}

.fz-user {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.fz-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    display: inline-block;
}

.fz-user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    flex: 0 0 36px;
    line-height: 1;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.92);
}

.fz-user-avatar--image { background: rgba(255,255,255,0.08); }
.fz-user-avatar--initials, .fz-user-avatar--guest { background: rgba(255,255,255,0.14); }

.fz-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* =========================
   SEARCH + FEED HEADER
========================= */

.fz-feed-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.fz-searchbar {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.fz-search-icon {
    flex: 0 0 auto;
    font-size: 15px;
    opacity: 0.65;
}

.fz-search-input {
    flex: 1 1 auto;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: #111827;
    min-width: 0;
}

.fz-search-input::placeholder { color: #98a2b3; }

.fz-feed-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.fz-feed-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.1;
}

.fz-new-topic-btn {
    background: #c8102e;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(200,16,46,0.18);
}

.fz-new-topic-btn--mobile { display: none; }

/* =========================
   TOPIC ROW
========================= */

.fz-topic-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    background: #fff;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
}
.fz-topic-row:hover { background: #fafafa; }
.fz-topic-row.fz-open { border-radius: 14px 14px 0 0; margin-bottom: 0; }
.fz-topic-main { min-width: 0; }
.fz-topic-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.fz-topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: center;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}
.fz-topic-cat {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
}
.fz-topic-stats { text-align: right; white-space: nowrap; }
.fz-topic-count { display: block; font-size: 15px; font-weight: 700; }
.fz-topic-count-label { font-size: 11px; color: #999; }

/* =========================
   THREAD
========================= */

.fz-thread-inline {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 0;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 0 0 14px 14px;
}

.fz-bbl-sep {
    font-size: 12px;
    color: #666;
    margin: 18px 0 12px;
    font-weight: 700;
}

/* =========================
   POSTS
========================= */

.fz-post {
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
}

.fz-post--root,
.fz-post--author {
    background: #fff6f7;
    border-color: #f0d2d8;
}

.fz-post--comment {
    background: #ffffff;
    border-color: #e5e7eb;
}

.fz-post--reply {
    margin-left: 28px;
    background: #f7f9fc;
    border-color: #e3e8ef;
    position: relative;
}

.fz-post--reply::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #e5e7eb;
    border-radius: 999px;
}

.fz-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    min-width: 0;
}
.fz-post-name { font-weight: 700; font-size: 14px; line-height: 1; }
.fz-post-badge-author {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: #c8102e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
}
.fz-post-time { font-size: 12px; color: #999; line-height: 1; }
.fz-post-body { font-size: 16px; line-height: 1.6;font-weight: 300; }
.fz-post-body p { margin: 0 0 8px; }
.fz-post-body p:last-child { margin-bottom: 0; }

.fz-post-quote {
    font-size: 13px;
    color: #667085;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-left: 2px solid #d8dee6;
    background: rgba(255,255,255,0.55);
    border-radius: 8px;
}

.fz-post-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.fz-vote {
    border: 1px solid #e5e7eb;
    background: #fafafa;
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background .15s ease;
}
.fz-vote:hover { background: #f1f5f9; }

.fz-reply-inline-btn {
    margin-left: auto;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

/* =========================
   INLINE REPLY / MAIN COMMENT
========================= */

.fz-inline-reply { display: none; margin-top: 10px; }
.fz-inline-reply.open { display: block; }
.fz-inline-reply-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #555; }
.fz-inline-reply textarea,
.fz-reply-ta {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    min-height: 110px;
    resize: vertical;
    box-sizing: border-box;
    font: inherit;
}
.fz-inline-reply-foot,
.fz-reply-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.fz-inline-reply-cancel,
.fz-inline-reply-submit,
.fz-reply-btn,
.fz-main-comment-open-btn {
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.fz-inline-reply-cancel { background: #fff; border: 1px solid #ddd; }
.fz-inline-reply-submit,
.fz-reply-btn,
.fz-main-comment-open-btn { background: #111; color: #fff; border: none; }

.fz-main-comment-box { margin-top: 16px; }
.fz-main-comment-open { display: none; }

.fz-reply-wrap {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: flex-start;
}

.fz-reply-av {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8102e, #e11d48);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 34px;
}
.fz-reply-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fz-reply-inner { flex: 1 1 auto; }

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .fz-page {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        background: #fff;
    }

    .fz-body {
        grid-template-columns: 1fr;
        max-width: none;
        padding: 0;
        gap: 0;
    }

    .fz-header {
        position: sticky;
        top: 0;
        z-index: 120;
    }

    .fz-header-inner {
        max-width: none;
        padding: 14px 14px;
    }

    .fz-logo-main { font-size: 15px; }
    .fz-logo-sub { font-size: 11px; }
    .fz-user-name { display: none; }

    .fz-feed-search-row {
        padding: 12px 14px 8px;
        margin-bottom: 0;
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }

    .fz-searchbar {
        border-radius: 12px;
        padding: 11px 12px;
        width: 100%;
    }

    .fz-new-topic-btn--mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 700;
        width: 100%;
        box-sizing: border-box;
    }

    .fz-new-topic-btn--desktop { display: none; }

    .fz-feed-hdr {
        padding: 4px 14px 10px;
        margin-bottom: 0;
    }

    .fz-feed-title {
        font-size: 22px;
    }

    .fz-topic-row,
    .fz-thread-inline {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 0;
    }

    .fz-topic-row {
        padding: 16px 14px;
    }

    .fz-thread-inline {
        padding: 14px;
    }

    .fz-post {
        border-radius: 12px;
    }

    .fz-post--reply {
        margin-left: 14px;
    }

    .fz-post--reply::before {
        left: -10px;
    }

    .fz-side {
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        width: min(84vw, 320px);
        background: #f7f7f7;
        padding: 12px;
        overflow: auto;
        z-index: 130;
        transform: translateX(-100%);
        transition: transform .2s ease;
        display: block;
        box-shadow: 0 20px 40px rgba(0,0,0,0.16);
    }

    .fz-card {
        border-radius: 14px;
    }
}


/* =========================
   INTERACTIONS + AUTH POPUP
========================= */

.fz-reply-inline-btn,
.fz-main-comment-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fz-main-comment-box {
    margin-top: 18px;
}

.fz-auth-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fz-auth-popup-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.20);
    text-align: center;
}

.fz-auth-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: #f3f4f6;
    color: #475467;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.fz-auth-popup-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff1f2;
    font-size: 24px;
}

.fz-auth-popup-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
}

.fz-auth-popup-card p {
    margin: 0 0 18px;
    color: #667085;
    line-height: 1.5;
}

.fz-auth-popup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 10px;
    background: #c8102e;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

@media (min-width: 769px) {
    .fz-feed-search-row {
        display: flex !important;
        margin-bottom: 12px;
    }

    .fz-searchbar {
        max-width: 420px;
    }

    /* Hamburger invisible sur desktop — sidebar toujours visible */
    .fz-menu-btn {
        display: none !important;
    }
}


/* BADGE AUTEUR AU NIVEAU DU SUJET */
.fz-topic-author-badge {
    display: inline-flex;
    align-items: center;
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.fz-post-badge-author {
    display: none;
}

/* =========================
   COULEURS DES BULLES
   Auteur sujet  : bleu clair  #e3f0ff / #0073aa
   Commentaire   : vert clair  #e8fbe8 / #28a745
   Réponse       : gris clair  #f5f5f5 / #999
========================= */

.fz-post--root,
.fz-post--author {
    background: #e3f0ff !important;
    border-color: #0073aa !important;
}

.fz-post--comment {
    background: #e8fbe8 !important;
    border-color: #28a745 !important;
}

.fz-post--reply {
    background: #f5f5f5 !important;
    border-color: #999 !important;
}

.fz-post--reply::before {
    background: #999;
}

/* Blockquote dans les réponses */
.fz-post-quote {
    background: #f0f0f0;
    border-left: 3px solid #555;
    color: #333;
    border-radius: 0 6px 6px 0;
}

/* Bouton Commenter */
.fz-main-comment-open-btn {
    background: #c8102e;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

/* Bouton Publier réponse */
.fz-inline-reply-submit,
.fz-reply-btn {
    background: #c8102e !important;
    color: #fff !important;
}

/* Enter pour soumettre — hint visuel */
.fz-reply-ta:focus,
.fz-inline-reply textarea:focus {
    border-color: #c8102e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200,16,46,.1);
}

/* =========================
   BOUTON SIGNALEMENT
========================= */

.fz-report-btn {
    margin-left: 4px;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
    cursor: pointer;
    color: #bbb;
    font-size: 15px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    line-height: 1;
    font-style: normal;
    text-decoration: none;
}

.fz-report-btn:hover {
    color: #e53935;
    background: #fff1f2;
}
