/* L'Aparté - Dashboard */
/* La largeur du main est gérée par base.css (80% de l'écran) */
.info {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--bord);
    font-size: 0.95rem;
}
.info:last-child { border-bottom: none; }
.info .label { color: var(--muted); }
.info .value { color: var(--texte); font-weight: 500; }
.badge {
    display: inline-block;
    background: rgba(56,189,248,0.15);
    color: var(--accent2);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}
.err-box {
    background: rgba(248,113,113,0.1);
    color: var(--err);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}
.actions { display: flex; gap: 1rem; margin-top: 1.5rem; }
.actions .btn { flex: 1; text-align: center; }
/* Onglets dashboard */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tab-btn { padding: 0.5rem 1.1rem; border: 1px solid var(--bord); background: none; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 0.9rem; font-weight: 600; }
.tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.tab-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* Bouton plein "Mes Groupes" : texte sombre/noir FORCÉ sur fond jaune, dans les 2 thèmes (repos + survol). */
.actions .btn:not(.ghost) { color: #1e293b; }
.actions .btn:not(.ghost):hover { color: #1e293b; }
.form-actions { display: flex; gap: 1rem; margin-top: 1.2rem; }

/* --- Fil général --- */
#postCard textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--bord);
    border-radius: 8px;
    background: var(--fond2, #fff);
    color: var(--texte);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}
#postMsg { margin-top: 0.6rem; }
.post {
    padding: 1rem 0;
    border-bottom: 1px solid var(--bord);
}
.post:last-child { border-bottom: none; }
.post-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}
.post-author { font-weight: 600; color: var(--accent); }
.post-date { font-size: 0.75rem; color: var(--muted); }
.post-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}
.post-media {
    margin-top: 0.8rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
    text-align: center;
}
.post-media img, .post-media video {
    max-width: min(100%, 720px);
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}
.post-del {
    margin-top: 0.5rem;
    background: none;
    border: none;
    color: var(--err, #ef4444);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}
.post-del:hover { text-decoration: underline; }
.empty {
    color: var(--muted);
    text-align: center;
    padding: 1.5rem 0;
}

/* --- Commentaires --- */
.post-comments { margin-top: 0.8rem; }
.comment-toggle {
    background: none;
    border: none;
    color: var(--accent2);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}
.comment-toggle:hover { text-decoration: underline; }
.comments { margin-top: 0.8rem; }
.comment {
    padding: 0.6rem 0 0.6rem 1.75rem;
    border-top: 1px solid var(--bord);
    position: relative;
}
/* Filet vertical : matérialise l'appartenance du commentaire au post. */
.comment::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 1rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--bord);
    border-radius: 2px;
}
/* Réponses imbriquées : filet répété, déjà décalées par margin-left inline. */
.comment .comment::before { left: 0.25rem; }
.comment-author { font-weight: 600; font-size: 0.85rem; color: var(--accent); }
.comment-date { font-size: 0.7rem; color: var(--muted); margin-left: 0.5rem; }
.comment-content { margin-top: 0.2rem; font-size: 0.9rem; white-space: pre-wrap; word-wrap: break-word; }
.comment-del {
    background: none; border: none; color: var(--err, #ef4444);
    font-size: 0.75rem; cursor: pointer; padding: 0; margin-top: 0.3rem;
}
.comment-del:hover { text-decoration: underline; }
.comment-form { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.comment-input {
    flex: 1; padding: 0.5rem; border: 1px solid var(--bord);
    border-radius: 6px; background: var(--fond2, #fff); color: var(--texte);
    font-size: 0.85rem;
}
.comment-send {
    padding: 0.5rem 0.8rem; border: none; border-radius: 6px;
    background: var(--accent, #0ea5e9); color: var(--on-accent); cursor: pointer; font-size: 0.85rem;
}
.empty-comments { color: var(--muted); font-size: 0.85rem; }

/* --- Likes + réponses --- */
.post-actions { display: flex; gap: 0.8rem; margin-top: 0.5rem; align-items: center; }
.like-btn {
    background: none; border: 1px solid var(--bord); border-radius: 6px;
    color: var(--muted); font-size: 0.85rem; cursor: pointer; padding: 0.25rem 0.6rem;
    transition: all 0.15s;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn.liked { border-color: var(--accent); color: var(--accent); background: rgba(14,165,233,0.1); }
.comment-head { display: flex; align-items: baseline; gap: 0.5rem; }
.comment-actions { display: flex; gap: 0.8rem; margin-top: 0.3rem; align-items: center; }
.comment-reply { background: none; border: none; color: var(--accent2); font-size: 0.8rem; cursor: pointer; padding: 0; }
.comment-reply:hover { text-decoration: underline; }
.comment-replies { margin-top: 0.3rem; }
.reply-form { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.reply-input { flex: 1; }

/* ===== RESPONSIVE DASHBOARD ===== */
@media (max-width: 480px) {
    .comment-form { flex-direction: column; }
    .comment-input { width: 100%; }
    .comment-send { width: 100%; }
    .post-head { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
    .post-actions { flex-wrap: wrap; }
    .reply-form { flex-direction: column; }
    .reply-input { width: 100%; }
    main { padding: 1.5rem 1rem; }
}

/* Barre retour au fil (quand on vient d'une notification) */
.back-to-feed { margin-bottom: 1rem; }

/* Invitations (parrainage) */
.invite-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bord, rgba(100,116,139,0.2));
    flex-wrap: wrap;
}
.invite-row:last-child { border-bottom: none; }
.invite-row.used { opacity: 0.6; }
.invite-code {
    font-family: monospace;
    font-size: 0.9rem;
    background: var(--bg2, #f1f5f9);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.muted { color: var(--muted, #94a3b8); font-size: 0.85rem; }
