/* Complément visuel des fonctionnalités sociales MarketDG. */
.social-panel { margin-top: 20px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.social-panel h2, .social-panel h3 { margin-top: 0; }
.social-actions { display:flex; flex-wrap:wrap; gap:10px; margin: 12px 0; }
.social-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:10px 14px; border:0; border-radius:9px; color:#fff; background:#2563eb; text-decoration:none; font-weight:700; cursor:pointer; }
.social-button:hover { filter:brightness(.94); }
.social-button.secondary { color:#1f2937; background:#f3f4f6; border:1px solid #d1d5db; }
.social-button.liked { background:#be123c; }
.social-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.social-links a { display:inline-flex; align-items:center; gap:7px; padding:9px 11px; border:1px solid #dbeafe; border-radius:9px; background:#eff6ff; color:#1d4ed8; font-weight:700; text-decoration:none; }
.presence { display:inline-flex; align-items:center; gap:7px; font-size:13px; color:#64748b; }
.presence::before { content:""; width:9px; height:9px; display:inline-block; border-radius:50%; background:#9ca3af; }
.presence.online { color:#15803d; }
.presence.online::before { background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.14); }
.social-comments { display:grid; gap:12px; margin-top:12px; }
.social-comment { padding:12px; border-radius:9px; background:#f8fafc; border:1px solid #e5e7eb; }
.social-comment-header { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; font-size:13px; color:#64748b; margin-bottom:7px; }
.social-comment-body { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.social-form textarea { display:block; width:100%; min-height:95px; margin:8px 0 10px; padding:11px; border:1px solid #cbd5e1; border-radius:9px; font:inherit; resize:vertical; }
.rating-stars { color:#f59e0b; letter-spacing:2px; white-space:nowrap; }
.rating-summary { font-size:14px; color:#475569; }
.chat-layout { display:grid; grid-template-columns:minmax(230px, .75fr) minmax(0, 1.6fr); gap:18px; align-items:start; }
.chat-list, .chat-window { background:#fff; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; }
.chat-list h2, .chat-window h2 { margin:0; padding:15px; background:#f8fafc; border-bottom:1px solid #e5e7eb; font-size:18px; }
.chat-conversation { display:block; padding:13px 15px; color:inherit; text-decoration:none; border-bottom:1px solid #e5e7eb; }
.chat-conversation.active, .chat-conversation:hover { background:#eff6ff; }
.chat-conversation small { display:block; color:#64748b; margin-top:4px; }
.chat-messages { height: min(58vh, 520px); min-height:270px; overflow:auto; padding:15px; display:flex; flex-direction:column; gap:10px; background:#f8fafc; }
.chat-message { max-width:82%; align-self:flex-start; padding:10px 12px; border-radius:12px 12px 12px 3px; background:#fff; border:1px solid #e5e7eb; overflow-wrap:anywhere; white-space:pre-wrap; }
.chat-message.mine { align-self:flex-end; background:#dbeafe; border-color:#bfdbfe; border-radius:12px 12px 3px 12px; }
.chat-message time { display:block; margin-top:5px; color:#64748b; font-size:11px; }
.chat-compose { display:flex; gap:8px; padding:12px; }
.chat-compose textarea { min-width:0; flex:1; resize:vertical; min-height:48px; max-height:130px; padding:10px; border:1px solid #cbd5e1; border-radius:9px; font:inherit; }
.chat-compose button { border:0; border-radius:9px; padding:10px 15px; color:white; background:#2563eb; font-weight:700; cursor:pointer; }
.profile-card { background:#fff; border:1px solid #e5e7eb; border-radius:13px; padding:20px; margin-bottom:18px; }
.review-item { border-bottom:1px solid #e5e7eb; padding:13px 0; }
.review-item:last-child { border-bottom:0; }
.social-muted { color:#64748b; font-size:13px; }
@media(max-width:760px) { .chat-layout { grid-template-columns:1fr; } .chat-list .chat-list-items { max-height:230px; overflow:auto; } .chat-message { max-width:92%; } }
body.dark-theme .social-panel, body.dark-theme .profile-card, body.dark-theme .chat-list, body.dark-theme .chat-window { background:#202723; color:#e8eee9; border-color:#37433b; }
body.dark-theme .social-comment, body.dark-theme .chat-messages, body.dark-theme .chat-list h2, body.dark-theme .chat-window h2 { background:#252d28; color:#e8eee9; border-color:#37433b; }
body.dark-theme .social-links a { background:#263951; color:#bfdbfe; border-color:#365579; }
body.dark-theme .chat-message { background:#303b33; color:#e8eee9; border-color:#46534a; }
body.dark-theme .chat-message.mine { background:#1e3a5f; border-color:#315b8f; }
body.dark-theme .chat-conversation.active, body.dark-theme .chat-conversation:hover { background:#263951; }

/* Private-message controls: readable bubbles, compact metadata, personal delete action. */
.chat-message { position:relative; min-width:0; max-width:min(82%,700px); }
.chat-message-header { display:flex; min-width:0; align-items:flex-start; justify-content:space-between; gap:10px; }
.chat-message-header time { min-width:0; overflow-wrap:anywhere; }
.chat-message-body { white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; line-height:1.6; }
.chat-message-actions { display:flex; justify-content:flex-end; margin-top:4px; }
.chat-message-delete { display:inline-grid; place-items:center; width:30px; height:30px; border:1px solid #d1d5db; border-radius:8px; color:#475569; background:transparent; font:inherit; font-size:18px; line-height:1; cursor:pointer; }
.chat-message-delete:hover { color:#b91c1c; border-color:#fca5a5; background:#fff7f7; }
.chat-message-delete:focus-visible { outline:3px solid #60a5fa; outline-offset:2px; }
.chat-message-delete:disabled { opacity:.55; cursor:wait; }
.chat-history-hidden-notice { margin:12px; padding:10px 12px; border:1px solid #cbd5e1; border-radius:10px; background:#f8fafc; color:#334155; }
body.dark-theme .chat-message-delete { color:#e8eee9; border-color:#59665d; }
body.dark-theme .chat-message-delete:hover { color:#fecaca; border-color:#b45353; background:#3b2828; }
body.dark-theme .chat-history-hidden-notice { background:#252d28; color:#e8eee9; border-color:#46534a; }
@media(max-width:760px) { .chat-message { max-width:92%; } }
