/* L'Aparté - Landing (index) */
body {
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}
header { padding: 1.5rem 2rem; }
.logo { font-size: 1.5rem; }
nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}
nav a:hover { color: var(--accent); }
main {
    flex: 1;
    width: 65%;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}
h1 { font-size: 2.8rem; line-height: 1.2; margin-bottom: 1.5rem; font-weight: 700; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 650px; margin-bottom: 3rem; }
.valeurs {
    margin-bottom: 3rem;
}
.valeurs h3 {
    color: var(--accent2);
    font-size: 1.15rem;
    margin-top: 1.8rem;
    margin-bottom: 0.4rem;
}
.valeurs h3:first-child { margin-top: 0; }
.valeurs p {
    font-size: 1rem;
    color: var(--muted);
    max-width: 650px;
    line-height: 1.6;
}
.cta {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
}
.cta:hover { transform: translateY(-2px); opacity: 0.9; color: var(--on-accent); }
.note { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }
footer {
    border-top: 1px solid var(--carte);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}
footer a { color: var(--accent2); text-decoration: none; }
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    nav a { margin-left: 1rem; }
    main { padding: 2rem 1.25rem; }
}

/* --- Fil général (index, visible si connecté) --- */
#feedSection {
    max-width: 100%;
}
#feedSection .card {
    background: var(--carte);
    border: 1px solid var(--bord, rgba(100,116,139,0.2));
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
#feedSection .card h2 { font-size: 1.2rem; margin-bottom: 1rem; }

/* Présentation (texte descriptif) placée en bas */
.presentation {
    margin: 3.5rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid var(--bord, rgba(100,116,139,0.2));
    text-align: center;
    max-width: 900px;
}
.presentation h1 { font-size: 2rem; }
.presentation .lead { margin: 0 auto 2.5rem; text-align: center; }
.presentation .valeurs { text-align: left; max-width: 650px; margin: 0 auto; }
#ctaZone { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.cta-login {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.cta-login:hover {
    background: var(--accent);
    color: var(--on-accent);
}
#postContent {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--bord, rgba(100,116,139,0.2));
    border-radius: 8px;
    background: var(--fond);
    color: var(--texte);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}
.form-actions { display: flex; gap: 1rem; margin-top: 1rem; }
.post { padding: 1rem 0; border-bottom: 1px solid var(--bord, rgba(100,116,139,0.2)); min-width: 0; max-width: 100%; overflow: hidden; }
.post:last-child { border-bottom: none; }
.post.highlight-target {
    border: 2px solid var(--accent2, #6366f1);
    border-radius: 8px;
    padding: 0.9rem;
    margin: 0.4rem 0;
}
.post-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.post-author {
    font-weight: 600;
    color: var(--accent2);
}
.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.4rem;
    display: inline-block;
    flex-shrink: 0;
}
.author-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    line-height: 1;
}
.author-link {
    color: var(--accent2);
    text-decoration: none;
}
.author-link:hover {
    text-decoration: underline;
    color: var(--accent);
}
.post-date { font-size: 0.75rem; color: var(--muted); }
.ai-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(139,92,246,0.15);
    border: 1px solid rgba(139,92,246,0.4);
    color: #8b5cf6;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
}
.post-content { white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; }
.see-more-btn {
    display: inline-block;
    margin: 2px 0 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--muted, #64748b);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}
.see-more-btn:hover { color: var(--accent, #2563eb); text-decoration: underline; }

/* Toggle type de post (Post / Réel) */
.post-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.post-visibility {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.8rem;
}
.vis-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    border: 1px solid var(--bord);
    border-radius: 6px;
    background: var(--fond);
    color: var(--texte);
    cursor: pointer;
}
.vis-btn.active {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}
#visScope {
    padding: 0.35rem;
    border: 1px solid var(--bord);
    border-radius: 6px;
    background: var(--fond);
    color: var(--texte);
}
.pt-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--bord);
    border-radius: 999px;
    background: var(--fond);
    color: var(--texte);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.pt-btn.active {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
    font-weight: 600;
}

/* Média dans les posts */
.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;
}
/* Embed YouTube : réduit à 80% de la largeur, centré, ratio 16:9 conservé SANS rogner */
.yt-embed {
    margin-top: 0.8rem;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}
.yt-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* Bouton partager */
.share-btn {
    background: none;
    border: none;
    color: var(--accent2);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}
.share-btn:hover { text-decoration: underline; }

.report-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}
.report-btn:hover { color: var(--err); text-decoration: underline; }

.translate-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}
.translate-btn:hover { text-decoration: underline; }

/* Contenu de post traduit (léger marqueur visuel) */
.post-content[data-translated="1"] {
    font-style: italic;
}

/* Menu de partage multiple */
.share-menu {
    position: fixed;
    z-index: 1000;
    min-width: 240px;
    background: var(--carte);
    border: 1px solid var(--bord);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.share-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    background: none;
    border: none;
    border-radius: 7px;
    color: var(--texte);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.share-menu-item:hover { background: var(--fond); }
.share-menu-ico { font-size: 1.05rem; line-height: 1; }

/* Modal de partage en DM */
.dm-share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.dm-share-modal {
    background: var(--carte);
    border: 1px solid var(--bord);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 380px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dm-share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--bord);
}
.dm-share-head h3 { margin: 0; font-size: 1rem; color: var(--texte); }
.dm-share-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}
.dm-share-close:hover { color: var(--texte); }
.dm-share-search {
    margin: 0.7rem 1rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--bord);
    border-radius: 8px;
    background: var(--fond);
    color: var(--texte);
    font-size: 0.9rem;
}
.dm-share-search:focus { outline: none; border-color: var(--accent2); }
.dm-share-list {
    overflow-y: auto;
    padding: 0 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dm-share-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--texte);
    text-align: left;
    cursor: pointer;
}
.dm-share-user:hover { background: var(--fond); }
.dm-share-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.dm-share-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-share-name { font-size: 0.9rem; }
.dm-share-name small { color: var(--muted); }

.empty { color: var(--muted); text-align: center; padding: 1.5rem 0; }

/* Messages admin (contact reçus) */
.msg-head { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.msg-head b { color: var(--texte); }
.m-email { color: var(--accent2); font-size: 0.85rem; }
.m-date { color: var(--muted); font-size: 0.75rem; margin-left: auto; }
.m-text { white-space: pre-wrap; color: var(--texte); line-height: 1.5; }

/* Admin : messages de contact */
.contact-card { cursor: pointer; }
.contact-card.unread { border-left: 4px solid var(--accent); }
.m-unread {
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}
.m-reply {
    margin-top: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: var(--fond);
    border-radius: 8px;
    color: var(--texte);
    font-size: 0.9rem;
}
.reply-form { border-top: 1px solid var(--bord); padding-top: 0.8rem; }
.reply-input {
    width: 100%;
    padding: 0.6rem;
    background: var(--fond);
    border: 1px solid var(--bord);
    border-radius: 6px;
    color: var(--texte);
    font-size: 0.9rem;
    resize: vertical;
}

/* Modération : contenus signalés */
.mod-card.pending { border-left: 4px solid var(--accent); }
.m-type {
    background: var(--fond);
    color: var(--muted);
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}
.m-score { margin-top: 0.4rem; font-size: 0.9rem; color: var(--texte); }
.m-cat {
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.4rem;
}
.m-resolved {
    background: #16a34a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}
.mod-content {
    margin-top: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--fond);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}
.btn.danger {
    background: #dc2626;
    color: #fff;
}
.btn.danger:hover {
    background: #b91c1c;
}
.btn.keep-btn {
    background: #16a34a;
    color: #fff;
}
.btn.keep-btn:hover {
    background: #15803d;
}
.info-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.user-info-panel {
    padding: 0.8rem;
    background: var(--fond);
    border-radius: 8px;
    border: 1px solid var(--bord);
}
.user-info-inner .profile-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.user-info-inner .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
    background: #000;
}
.user-info-inner .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    font-size: 1.2rem;
}
.user-info-inner .stats-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.mini-post {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--bord);
}
.mini-post:last-child { border-bottom: none; }
.group-link {
    color: var(--accent2);
    text-decoration: none;
    font-weight: 600;
}
.group-link:hover { text-decoration: underline; }
.msg-err { color: var(--err, #ef4444); font-size: 0.9rem; margin-top: 0.5rem; }

/* --- Commentaires (index) --- */
.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, rgba(100,116,139,0.2));
    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, rgba(100,116,139,0.2));
    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(--accent2); }
.comment-date { font-size: 0.7rem; color: var(--muted); margin-left: 0.5rem; }
.comment-content { margin-top: 0.35rem; 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; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; position: relative; }
/* La barre d'outils Markdown (insérée par editor.js après le textarea) doit passer
   sur sa propre ligne pleine largeur, sinon elle comprime le champ de saisie. */
.comment-form .md-toolbar { flex-basis: 100%; order: 3; }
.comment-input {
    flex: 1; min-width: 0; width: 100%; min-height: 2.4rem; padding: 0.5rem; border: 1px solid var(--bord, rgba(100,116,139,0.2));
    border-radius: 6px; background: var(--fond); color: var(--texte);
    font-size: 0.85rem;
}
.comment-edit-form textarea {
    flex: 0 0 auto;
}
.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;
}
/* Bouton 📎 : joindre une image/vidéo à un commentaire.
   order 1 = sur la même ligne que le textarea, AVANT la barre Markdown (order 3). */
.comment-media-btn {
    flex: 0 0 auto; order: 1; padding: 0.5rem 0.7rem; border: 1px solid var(--bord, rgba(100,116,139,0.2));
    border-radius: 6px; background: var(--fond); color: var(--texte); cursor: pointer; font-size: 0.95rem; line-height: 1;
}
.comment-media-btn:hover { border-color: var(--accent, #0ea5e9); }
.comment-send { order: 2; }
.comment-media-input { order: 1; }
/* Aperçu du média joint (pleine largeur, sous le champ). */
.comment-media-preview {
    flex-basis: 100%; order: 4; display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem;
}
.comment-media-clear {
    border: none; background: transparent; color: var(--msg-err, #ef4444); cursor: pointer; font-weight: bold;
}
/* Média affiché DANS un commentaire (image/vidéo). */
.comment-media { margin-top: 0.4rem; }
.comment-media img, .comment-media video {
    max-width: 100%; max-height: 320px; border-radius: 8px; display: block;
}
.empty-comments { color: var(--muted); font-size: 0.85rem; }

/* --- Likes + réponses (index) --- */
.post-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; align-items: center; }
.like-btn {
    background: none; border: 1px solid var(--bord, rgba(100,116,139,0.2)); 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); }
/* Réactions : cœur rouge + pouce rose */
.react-btn {
    background: none; border: 1px solid var(--bord, rgba(100,116,139,0.2)); border-radius: 999px;
    color: var(--muted); font-size: 0.9rem; cursor: pointer; padding: 0.3rem 0.7rem;
    display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; line-height: 1;
}
.react-btn .cnt { font-size: 0.8rem; }
.react-btn:hover { transform: scale(1.08); }
.heart-btn:hover, .heart-btn.active { border-color: #e0245e; background: rgba(231,36,94,0.1); }
.heart-btn.active span.cnt, .heart-btn.active { color: #e0245e; }
.thumb-btn:hover, .thumb-btn.active { border-color: #f472b6; background: rgba(244,114,182,0.12); }
.thumb-btn.active span.cnt, .thumb-btn.active { color: #f472b6; }
/* Boîte à smileys / émoticônes */
.emoji-bar { position: relative; margin-top: 0.4rem; }
.emoji-picker {
    display: flex; flex-wrap: wrap; gap: 0.15rem; padding: 0.5rem; margin-top: 0.4rem;
    background: var(--carte, #fff); border: 1px solid var(--bord, rgba(100,116,139,0.2));
    border-radius: 8px; max-width: 260px; max-height: 180px; overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); position: absolute; z-index: 10;
}
.emoji-item { font-size: 1.3rem; cursor: pointer; padding: 0.2rem; border-radius: 4px; line-height: 1; }
.emoji-item:hover { background: rgba(14,165,233,0.15); transform: scale(1.2); }
.comment-emoji { margin-top: 0.3rem; }
.comment-emoji .emoji-bar { margin-top: 0.2rem; }
/* Édition de post */
.post-edit-form { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.4rem; }
.post-edit-form textarea { width: 100%; }
.edit-btn { background: none; border: none; color: var(--accent2); font-size: 0.8rem; cursor: pointer; padding: 0; }
.edit-btn:hover { text-decoration: underline; }
.comment-btn { background: none; border: none; color: var(--accent2); font-size: 0.85rem; cursor: pointer; padding: 0; }
.comment-btn:hover { text-decoration: underline; }
.del-btn { background: none; border: none; color: var(--err, #ef4444); font-size: 0.8rem; cursor: pointer; padding: 0; }
.del-btn:hover { text-decoration: underline; }

.post-edited { font-size: 0.75rem; color: var(--muted); margin-left: 0.4rem; font-style: italic; }
.comment-head { display: flex; align-items: baseline; gap: 0.5rem; }
.comment-actions { display: flex; flex-wrap: wrap; 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; position: relative; }
.reply-input { flex: 1; }

/* ===== RESPONSIVE INDEX ===== */
@media (max-width: 768px) {
    header nav { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    header nav a { margin-left: 0; font-size: 0.85rem; }
    .presentation h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    .lead { font-size: 1rem; }
    .presentation { margin-top: 2.5rem; padding-top: 2rem; }
    .presentation h1 { font-size: 1.4rem; }
    .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; }
}

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

/* Layout & sidebar : voir sidebar.css (commun à toutes les pages) */

/* ===== Page profil ===== */
.profile-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}
.badge {
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.profile-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--bord);
    color: var(--muted);
    font-size: 0.85rem;
}
/* Profil enrichi */
.profile-top {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: #000;
    flex-shrink: 0;
}
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent2);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}
.profile-ident { flex: 1; min-width: 0; }
.profile-ident h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.profile-bio {
    color: var(--texte);
    margin-top: 0.6rem;
    font-size: 0.95rem;
    white-space: pre-wrap;
}
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}
.tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.4);
    color: var(--accent);
    font-size: 0.8rem;
}
.profile-quote {
    margin-top: 0.8rem;
    padding-left: 0.8rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
    font-size: 0.9rem;
}
.stats-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--bord);
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat b { font-size: 1.3rem; color: var(--accent2); }
.stat span { font-size: 0.75rem; color: var(--muted); }
.profile-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.6rem;
}
.common-groups {
    margin-top: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--bord);
}
.common-groups h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.common-groups-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.group-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--bord);
    border-radius: 999px;
    background: var(--fond);
    color: var(--texte);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}
.group-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; position: static; }
}

/* Message "Prochainement en ligne" */
.prochainement {
    margin: 1.5rem 0 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--carte);
    border: 1px dashed var(--accent);
    border-radius: 10px;
    text-align: center;
    font-size: 1rem;
    color: var(--muted);
}
.prochainement strong {
    color: var(--accent);
}

/* --- Bannière de profil --- */
.profile-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    margin: -1rem -1rem 0;
    background: var(--fond);
    border-bottom: 2px solid var(--bord);
}
.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
    display: block;
}
.profile-banner.adjusting img {
    cursor: grab;
}
.profile-banner.adjusting.dragging img {
    cursor: grabbing;
}
.banner-adjust-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2;
}
.banner-adjust-btn:hover {
    background: rgba(0,0,0,0.75);
}
.banner-adjust-bar {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 10px;
    font-size: 0.85rem;
    z-index: 2;
}

/* --- Albums photos --- */
.albums-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.albums-head h2 { margin: 0; }
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.album-card {
    position: relative;
    background: var(--carte);
    border: 1px solid var(--bord);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}
.album-card:hover { border-color: var(--accent); }
.album-cover {
    height: 100px;
    background: var(--fond);
    overflow: hidden;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--muted);
}
.album-name {
    padding: 0.4rem 0.5rem 0;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.album-count {
    padding: 0 0.5rem 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}
.album-del {
    position: absolute;
    top: 0.35rem; right: 0.35rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.album-view {
    width: 100%;
    grid-column: 1 / -1;
}
.album-view-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.album-view-head h3 { margin: 0; flex: 1; }
.album-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}
.album-photo {
    width: 150px;
    border-radius: 8px;
    background: var(--fond);
    border: 1px solid var(--bord);
    overflow: hidden;
}
.album-photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

/* --- Modal (création d'album) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.modal-overlay[style*="flex"] { display: flex; }
.modal-box {
    background: var(--carte);
    border: 1px solid var(--bord);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.modal-box h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--texte);
}
.modal-box input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--bord);
    border-radius: 8px;
    background: var(--fond);
    color: var(--texte);
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}
.modal-box input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* --- Visibilité des albums --- */
.album-vis-icon {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}
.album-view-vis {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0;
    padding: 0.75rem;
    background: var(--fond);
    border: 1px solid var(--bord);
    border-radius: 10px;
}
.album-vis-label {
    font-size: 0.85rem;
    color: var(--muted);
}
.album-vis-select {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    max-width: 420px;
}
.album-vis-select .vis-btn {
    flex: 1;
    padding: 0.4rem 0.4rem;
    font-size: 0.8rem;
    text-align: center;
    background: var(--carte);
    border: 1px solid var(--bord);
    border-radius: 6px;
    cursor: pointer;
    color: var(--muted);
    white-space: nowrap;
}
.album-vis-select .vis-btn.active {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: var(--carte);
    font-weight: 600;
}
.album-add-photo {
    white-space: nowrap;
}

/* --- Liste d'amis (modal) --- */
.modal-box-wide {
    max-width: 480px;
}

/* --- Panneau liste d'amis (déploiement inline) --- */
.friends-panel {
    margin: 0.75rem -1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.friends-panel .friends-list {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.75rem 0;
    background: var(--fond);
    border: 1px solid var(--bord);
    border-radius: 10px;
}

/* --- Cartes d'amis (grille alignée à gauche) --- */
.friends-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.6rem;
}
.friend-card {
    width: calc(25% - 0.6rem);
    min-width: 120px;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--texte);
    background: var(--carte);
    border: 1px solid var(--bord);
    text-align: center;
    transition: border-color 0.15s;
}
.friend-card:hover {
    border-color: var(--accent);
}
.friend-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #000;
}
.friend-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.friend-avatar-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 1.4rem;
}
.friend-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}
.friend-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.75rem;
    color: var(--muted);
}
.friend-card-bio {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 600px) {
    .friends-grid .friend-card { width: calc(50% - 0.6rem); }
}


/* --- Actions sur les photos d'album --- */
.album-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0.3rem;
    background: var(--fond);
    border-top: 1px solid var(--bord);
}
.album-photo-actions .btn {
    padding: 0.25rem 0.35rem;
    font-size: 0.7rem;
    background: var(--carte);
    color: var(--texte);
    border: 1px solid var(--bord);
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    white-space: normal;
    line-height: 1.2;
}
.album-photo-actions .btn:hover {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

/* --- Toast (notification du site) --- */
.laparte-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--carte);
    color: var(--texte);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 2000;
    display: none;
    max-width: 90vw;
    text-align: center;
}
.laparte-toast.error {
    border-color: var(--msg-err, #dc2626);
    color: var(--msg-err, #dc2626);
}

/* --- Tooltip "qui a liké" (survol cœur/pouce) --- */
.react-tooltip {
    position: fixed;
    z-index: 3000;
    min-width: 120px;
    max-width: 260px;
    background: var(--carte, #1e293b);
    color: var(--texte, #e2e8f0);
    border: 1px solid var(--bord, rgba(100,116,139,0.3));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
    line-height: 1.5;
    pointer-events: none;
    display: none;
}
.react-tooltip .rt-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
}
.react-tooltip .rt-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.react-tooltip .rt-empty {
    color: var(--muted, #94a3b8);
    font-style: italic;
}

/* Aperçu de lien (unfurl) */
.link-preview {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    margin-top: 10px;
    border: 1px solid var(--bord, rgba(100,116,139,0.3));
    border-radius: 10px;
    background: var(--carte, #1e293b);
    text-decoration: none;
    color: var(--texte, #e2e8f0);
    overflow: hidden;
    transition: background 0.15s;
}
.link-preview:hover { background: var(--carte-hover, #f1f5f9); }
.link-preview .lp-thumb { width: 100%; max-height: 360px; overflow: hidden; border-radius: 0; background: rgba(0,0,0,0.15); }
.link-preview .lp-thumb img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; display: block; }
.link-preview .lp-body { min-width: 0; padding: 12px 14px; }
.link-preview .lp-title { font-weight: 600; font-size: 1.05rem; line-height: 1.35; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.link-preview .lp-desc { font-size: 0.88rem; color: var(--muted, #94a3b8); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.link-preview .lp-host { font-size: 0.76rem; color: var(--muted, #94a3b8); margin-top: 6px; text-transform: lowercase; }

/* --- Bloc d'accueil visiteur (réseau ouvert) --- */
.cta-open {
    margin: 2rem auto 1.5rem;
    max-width: 620px;
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--texte);
}
.cta-buttons {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
    align-items: center;
}
.cta-buttons .cta { padding: 0.85rem 1.8rem; font-size: 1.05rem; }
.cta-note {
    margin-top: 1.3rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.cta-note a { color: var(--accent); text-decoration: none; }
.cta-note a:hover { text-decoration: underline; }

/* --- Post partagé depuis un groupe public : encadré distinctif --- */
.post.post-shared {
    border: 1px solid var(--accent2, #0369a1);
    border-left: 4px solid var(--accent2, #0369a1);
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent2, #0369a1) 7%, var(--carte, #fff));
    padding: 0.6rem 0.8rem;
    margin: 0.6rem 0;
}
.post.post-shared .share-origin {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--accent2, #0369a1);
    font-weight: 600;
    margin-bottom: 0.7rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid color-mix(in srgb, var(--accent2, #0369a1) 45%, transparent);
}
.post.post-shared .share-origin strong {
    font-weight: 800;
    color: var(--texte, #1e293b);
    background: color-mix(in srgb, var(--accent2, #0369a1) 14%, transparent);
    padding: 0.12rem 0.5rem;
    border-radius: 6px;
}
.post.post-shared .share-origin-link { text-decoration: none; }
.post.post-shared .share-origin-link:hover strong { background: color-mix(in srgb, var(--accent2, #0369a1) 26%, transparent); }
.post.post-shared .share-origin-link:hover { text-decoration: none; }
.post.post-shared .post-head { margin-top: 0; }
