/* Réseau Amis — thème « Tapis » : cartes en relief, carte du joueur posée sur le tapis,
   avatar en jeton de poker, pastilles arrondies. Les couleurs viennent des jetons de theme.css. */
#socialRoot { min-width:0; --s-line:#2c1419; --s-edge:#3a1a21; --s-edge-top:#4b232c; --s-well:#0f0709; --s-chip:#140a0d; }

/* Icônes */
#socialRoot .social-icon { width:18px; height:18px; flex:none; display:block; }

/* Message d'état (succès / erreur) */
#socialMessage:not(:empty) { margin:0 0 14px; padding:12px 16px; border:1px solid #2f5a45; border-radius:14px; background:#0f1d17; color:#bdebd2; font-size:13px; }
#socialMessage.error { border-color:#7a2e3a; background:#2a0f17; color:#ffc9cf; }

/* Surfaces : dégradé vers le bas, bord supérieur plus clair, ombre portée douce */
#socialRoot .social-card,#socialRoot .social-post,#socialRoot .social-chat-sidebar,#socialRoot .social-chat-pane,#socialRoot .social-empty,#socialRoot .social-setup,#socialRoot .social-profile-detail {
  background:linear-gradient(180deg,#1d0f13 0%,#160b0e 55%,#130a0c 100%);
  border:1px solid var(--s-edge); border-top-color:var(--s-edge-top); border-radius:18px;
  box-shadow:0 1px 2px #0009,0 16px 34px -20px #000;
}
#socialRoot h3 { font-size:16px; margin:0 0 12px; }
#socialRoot .social-card { padding:20px; margin:0 0 16px; }
#socialRoot .fine-print { font-size:12px; color:var(--muted); line-height:1.6; margin:0; }
.social-empty-text { margin:10px 0; color:var(--muted); font-size:13px; line-height:1.6; }

/* Avatars : initiales sur une teinte propre à chaque joueur */
.social-avatar { --a:#a8323f; --b:#4f1420; width:40px; height:40px; flex:none; display:grid; place-items:center; border-radius:50%; overflow:hidden; background:linear-gradient(150deg,var(--a),var(--b)); color:#fbeee9; box-shadow:0 0 0 2px #0e0709,0 4px 10px -4px #000; }
.social-avatar img { width:100%; height:100%; object-fit:cover; }
.social-initials { font-family:var(--font-display); font-weight:600; font-size:15px; letter-spacing:.02em; line-height:1; }
.social-avatar.tone-1 { --a:#a85d2e; --b:#4d2210; }
.social-avatar.tone-2 { --a:#94742f; --b:#45330f; }
.social-avatar.tone-3 { --a:#2f7458; --b:#123326; }
.social-avatar.tone-4 { --a:#4b5d86; --b:#1f2740; }
.social-avatar.tone-5 { --a:#a04760; --b:#451726; }
.social-avatar-group { --a:#4a2630; --b:#24121a; color:#e8c9ce; }
.social-avatar-group .social-icon { width:20px; height:20px; }

/* Personne : nom + pseudo */
.social-person { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 0; border-bottom:1px solid var(--s-line); }
.social-person:last-child { border-bottom:0; }
.social-person-copy { flex:1; min-width:0; display:grid; gap:1px; }
.social-person-name { justify-self:start; max-width:100%; padding:0; color:var(--ink); font-size:14px; font-weight:650; text-align:left; overflow-wrap:anywhere; }
.social-person-copy small { color:var(--muted); font-size:12.5px; overflow-wrap:anywhere; }
@media(hover:hover){ .social-person-name:hover { color:var(--accent-text); } }
.social-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.social-row-actions .primary,.social-row-actions .secondary { min-height:38px; padding:0 14px; border-radius:999px; font-size:12.5px; }
.social-row-actions small { color:var(--muted); font-size:12px; }

/* Carte du joueur : le tapis avec son rail, l'avatar en jeton */
.social-hero { position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:16px 28px; margin:0 0 16px; padding:26px 30px;
  border:1px solid #5a2230; border-radius:24px;
  background:radial-gradient(70% 120% at 18% -20%,#ffffff12 0%,transparent 60%),radial-gradient(130% 170% at 0% 0%,#5a1626 0%,#2a0d15 48%,#140a0d 100%);
  box-shadow:inset 0 0 0 7px #12070a,inset 0 0 0 8px #4d1d28,0 24px 50px -30px #000; }
.social-hero::after { content:""; position:absolute; z-index:-1; right:-34px; top:50%; width:230px; height:230px; transform:translateY(-50%) rotate(-12deg); opacity:.07; pointer-events:none;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23fbeee9' d='M50 6C38 24 14 36 14 56a17 17 0 0 0 29 12c-1 9-5 17-12 24h38c-7-7-11-15-12-24a17 17 0 0 0 29-12C86 36 62 24 50 6z'/%3E%3C/svg%3E"); }
.social-chip { position:relative; width:92px; height:92px; padding:7px; border-radius:50%; flex:none; background:repeating-conic-gradient(from 11.25deg,#d63a48 0 22.5deg,#f3e3df 22.5deg 45deg); box-shadow:0 0 0 2px #12070a,0 14px 26px -10px #000; }
.social-chip::after { content:""; position:absolute; inset:12px; border-radius:50%; border:1.5px dashed #fbeee966; pointer-events:none; }
.social-chip .social-avatar { width:100%; height:100%; box-shadow:0 0 0 3px #12070a; }
.social-chip .social-initials { font-size:28px; }
.social-hero-id { min-width:0; }
.social-hero-id h2 { margin:0 0 6px; font-size:28px; line-height:1.1; color:var(--cream); overflow-wrap:anywhere; }
.social-hero-id p { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0; color:#d8bfc2; font-size:13.5px; }
.social-hero-id .social-hero-bio { display:block; margin-top:10px; max-width:52ch; color:#ead7d9; line-height:1.55; }
.social-privacy-label { display:inline-flex; align-items:center; gap:6px; padding:4px 10px 4px 8px; border-radius:999px; background:#12070a99; border:1px solid #5a2a34; color:#ead2d5; font-size:12px; }
.social-privacy-label .social-icon { width:14px; height:14px; }
.social-profile-counts { display:flex; gap:6px; }
.social-profile-counts .text-btn { display:grid; justify-items:center; gap:4px; min-width:76px; padding:10px 8px; border-radius:14px; color:#d8bfc2; font-size:12px; }
@media(hover:hover){ .social-profile-counts .text-btn:hover { background:#12070a80; color:var(--ink); } }
.social-profile-counts strong { font:600 26px/1 var(--font-display); color:var(--cream); }
.social-hero-actions { display:flex; align-items:center; gap:8px; }
#socialRoot .social-round { width:40px; height:40px; display:grid; place-items:center; padding:0; border-radius:50%; color:#e6cfd2; font-size:0; }
#socialRoot .social-hero .social-round { background:#12070a99; border:1px solid #5a2a34; }
@media(hover:hover){ #socialRoot .social-round:hover { background:#2a1218; color:var(--ink); } }
.social-edit { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 16px 0 13px; border-radius:999px; }
.social-edit .social-icon { width:16px; height:16px; }

/* Onglets : rail creusé, onglet actif en relief */
#socialRoot .social-tabs { display:flex; flex-direction:row; gap:4px; margin:0 0 18px; padding:5px; border:1px solid #2e151a; border-radius:18px; background:#0e0608; box-shadow:inset 0 2px 8px #000a; overflow-x:auto; scrollbar-width:none; overscroll-behavior-x:contain; }
#socialRoot .social-tabs::-webkit-scrollbar { display:none; }
#socialRoot .social-tabs button { flex:1 0 auto; width:auto; text-align:center; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 14px; border:1px solid transparent; border-radius:13px; background:none; color:var(--muted); font-size:13.5px; font-weight:550; white-space:nowrap; transition:background-color .18s ease-out,color .18s ease-out; }
@media(hover:hover){ #socialRoot .social-tabs button:hover { color:var(--ink); background:#1b0c10; } }
#socialRoot .social-tabs button.selected { color:#fff3f1; background:linear-gradient(180deg,#43172a 0%,#2c0f18 100%); border-color:#62273a; box-shadow:0 8px 16px -10px #000; }
#socialRoot .social-tabs button.selected .social-icon { color:var(--accent-text); }
.social-badge { display:inline-grid; place-items:center; min-width:19px; height:19px; padding:0 6px; border-radius:10px; background:var(--accent-solid); color:#fff; font-size:12px; font-weight:700; line-height:1; }

/* Fil : colonne principale + cercle d'amis */
.social-columns { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:20px; align-items:start; }
.social-feed { min-width:0; }
#socialRoot .social-more { display:block; margin:4px auto 0; min-height:42px; padding:0 20px; border-radius:999px; }

/* Rédaction */
#socialRoot .social-composer { display:grid; gap:14px; margin:0 0 18px; padding:18px 20px; }
.social-composer-main { display:grid; grid-template-columns:44px minmax(0,1fr); gap:12px; align-items:start; }
.social-composer-main .social-avatar { width:44px; height:44px; }
.social-composer-main label { margin:0; }
#socialRoot .social-composer textarea { min-height:70px; padding:12px 14px; border:1px solid var(--s-edge); border-radius:14px; background:var(--s-well); font-size:15px; line-height:1.5; resize:vertical; }
.social-kinds { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; border:0; min-width:0; }
.social-composer .social-kinds,.social-composer [data-share-details],.social-composer [data-audience],.social-composer [data-group-select] { margin-left:56px; }
.social-kind { position:relative; flex-direction:row; align-items:center; gap:7px; min-height:36px; padding:0 14px 0 11px; border:1px solid var(--s-edge); border-radius:999px; background:var(--s-chip); color:#dcc6c9; font-size:12.5px; cursor:pointer; user-select:none; transition:background-color .15s ease-out,border-color .15s ease-out; }
.social-kind input { position:absolute; width:1px; height:1px; margin:0; opacity:0; pointer-events:none; }
.social-kind .social-icon { width:16px; height:16px; color:var(--muted); }
@media(hover:hover){ .social-kind:hover { border-color:#5c2531; color:var(--ink); } }
.social-kind:has(input:checked) { background:linear-gradient(180deg,#43172a,#2c0f18); border-color:#7a2e3a; color:#fff3f1; }
.social-kind:has(input:checked) .social-icon { color:var(--accent-text); }
.social-kind:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.social-composer [data-share-details]:empty { display:none; }
.social-composer [data-share-details] { display:grid; gap:12px; }
.social-composer [data-share-details]>label,.social-composer [data-share-details] .social-checkbox { margin:0; }
.social-composer-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; border-top:1px solid var(--s-line); }
.social-visibility { position:relative; display:flex; flex-direction:row; align-items:center; margin:0; min-width:0; }
.social-vis-icon { position:absolute; left:6px; top:50%; display:grid; place-items:center; width:32px; height:32px; margin-top:-16px; border-radius:50%; background:linear-gradient(180deg,#3a1720,#26101a); box-shadow:0 1px 0 #ffffff14 inset; color:var(--accent-text); pointer-events:none; }
.social-vis-icon .social-icon { width:16px; height:16px; }
.social-vis-icon.swap { animation:social-vis-swap .3s cubic-bezier(.2,.8,.2,1); }
@keyframes social-vis-swap { from { transform:scale(.6) rotate(-20deg); opacity:.3; } to { transform:none; opacity:1; } }
#socialRoot .social-visibility select { width:auto; min-width:200px; max-width:100%; height:44px; min-height:44px; margin:0; padding:0 42px 0 46px; border:1px solid var(--s-edge); border-radius:999px; background-color:var(--s-chip); color:#f3e1e3; font-size:14px; font-weight:600; box-shadow:0 1px 0 #ffffff0d inset; }
#socialRoot .social-composer-foot .primary { min-height:44px; padding:0 26px; border-radius:999px; }
@media(prefers-reduced-motion:reduce){ .social-vis-icon.swap { animation:none; } }
.social-sharing-preview { margin:0; color:var(--muted); font-size:12.5px; line-height:1.6; overflow-wrap:anywhere; }
.social-checkbox,#socialAudience label { display:flex; flex-direction:row; align-items:center; gap:10px; margin:0 0 10px; font-size:13px; color:#e2cdd0; }
.social-checkbox:last-child { margin-bottom:0; }
.social-checkbox input { flex:0 0 18px; width:18px; height:18px; accent-color:var(--accent-solid); }
#socialRoot fieldset { margin:0; padding:12px 14px; border:1px solid var(--s-edge); border-radius:14px; min-width:0; }
#socialRoot fieldset.social-kinds { padding:0; border:0; border-radius:0; }
#socialRoot legend { padding:0 6px; font-size:12px; color:var(--muted); }

/* Publication */
#socialRoot .social-post { margin:0 0 16px; padding:20px 22px 10px; }
.social-post>header { display:grid; grid-template-columns:44px minmax(0,1fr) auto; grid-template-areas:"av who del" "av meta del"; column-gap:12px; row-gap:2px; align-items:center; margin:0 0 14px; padding:0; }
.social-post>header>.social-avatar { grid-area:av; width:44px; height:44px; }
.social-post>header>.social-person-copy { grid-area:who; display:flex; flex-wrap:wrap; align-items:baseline; column-gap:8px; }
.social-post>header>.social-post-meta { grid-area:meta; color:#a58d90; font-size:12px; }
.social-post>header>[data-delete-post] { grid-area:del; align-self:start; }
#socialRoot .social-post>header>[data-delete-post] { color:#a58d90; }
.social-post-text { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; line-height:1.6; color:#f3e7e4; }
.social-post>footer { display:flex; gap:4px; margin:14px -10px 0; padding-top:6px; border-top:1px solid var(--s-line); }
.social-react { display:inline-flex; align-items:center; gap:7px; min-height:40px; padding:0 12px; border:0; border-radius:999px; background:none; color:#c9b1b4; font-size:13.5px; font-weight:600; font-variant-numeric:tabular-nums; transition:background-color .15s ease-out,color .15s ease-out; }
.social-react .social-icon { width:19px; height:19px; transition:transform .12s ease-out; }
.social-react:active .social-icon { transform:scale(.86); }
@media(hover:hover){ .social-react:hover { background:#24101a; color:var(--ink); } }
.social-react.liked { color:var(--accent-text); }
.social-react.liked .social-icon path { fill:currentColor; }
.social-react.pop .social-icon { animation:social-pop .42s cubic-bezier(.2,.9,.3,1.35); }
@keyframes social-pop { 0% { transform:scale(.7); } 55% { transform:scale(1.22); } 100% { transform:scale(1); } }
@media(prefers-reduced-motion:reduce){ .social-react.pop .social-icon { animation:none; } }

/* Commentaires */
.social-comments { margin:2px -2px 10px; padding-top:6px; }
.social-comment,.social-notification { display:flex; align-items:flex-start; gap:12px; }
.social-comment { padding:10px 0; }
.social-comment .social-avatar { width:32px; height:32px; }
.social-comment .social-initials { font-size:12px; }
.social-comment>div { flex:1; min-width:0; padding:9px 13px; border-radius:4px 16px 16px 16px; background:#21101a; }
.social-comment strong { font-size:13px; }
.social-comment p { margin:3px 0 4px; white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.5; }
.social-comment small { color:var(--muted); font-size:12px; }
.social-comments form { display:grid; grid-template-columns:32px minmax(0,1fr) 40px; align-items:center; gap:10px; margin-top:8px; }
.social-comments form .social-avatar { width:32px; height:32px; }
.social-comments form .social-initials { font-size:12px; }
.social-comments form label { margin:0; }
#socialRoot .social-comments input { min-height:40px; border-radius:999px; padding:0 16px; background:var(--s-well); }
#socialRoot .social-send { background:var(--accent-solid); border:0; color:#fff; }
@media(hover:hover){ #socialRoot .social-send:hover { background:var(--accent-solid-hover); } }
#socialRoot .social-send .social-icon { width:18px; height:18px; }

/* Contenus partagés */
.social-stat-snapshot { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0 2px; }
.social-stat-snapshot>div { min-width:0; padding:14px 16px; border:1px solid var(--s-edge); border-radius:14px; background:linear-gradient(180deg,#26111a,#180b10); }
.social-stat-snapshot small { display:block; margin-bottom:6px; color:var(--muted); font-size:12px; }
.social-stat-snapshot strong { display:block; font:600 24px/1.1 var(--font-display); color:var(--ink); overflow-wrap:anywhere; }
.social-stat-snapshot .positive { color:var(--positive); }
.social-stat-snapshot .negative { color:var(--red); }
.social-shared-hand { display:grid; justify-items:start; gap:12px; margin-top:14px; padding:18px 20px; border:1px solid #5a2230; border-radius:18px;
  background:radial-gradient(110% 140% at 50% -10%,#561726 0%,#2a0d16 58%,#170a0e 100%); box-shadow:inset 0 0 0 5px #12070a,inset 0 0 0 6px #4d1d28; }
.social-shared-hand>p { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin:0; color:#d8bfc2; font-size:12.5px; }
.social-shared-hand>p strong { font:600 17px/1.2 var(--font-display); color:var(--cream); overflow-wrap:anywhere; }
.social-shared-hand .playing-cards { min-height:52px; }
.social-replay { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 18px 0 13px; border:1px solid #7a2e3a; border-radius:999px; background:#12070acc; color:#ffe6e8; font-size:13px; font-weight:600; transition:background-color .15s ease-out; }
.social-replay .social-icon { width:15px; height:15px; }
.social-replay .social-icon path { fill:currentColor; }
@media(hover:hover){ .social-replay:hover { background:#2c1018; } }
.social-photos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:14px; }
.social-photos img { width:100%; max-height:380px; object-fit:cover; border-radius:14px; background:#110a0b; }
.social-event-card,.social-event-batch { margin-top:14px; padding:16px 18px; border:1px solid var(--s-edge); border-radius:16px; background:linear-gradient(180deg,#22101a,#170b10); }
.social-event-card h4,.social-event-batch h4 { margin:0 0 8px; font:600 16px/1.3 var(--font-display); overflow-wrap:anywhere; }
.social-event-card p,.social-event-batch>p { margin:0 0 4px; color:var(--muted); font-size:13px; line-height:1.6; }
.social-event-batch>details { margin-top:10px; padding-top:10px; border-top:1px solid var(--s-line); }
.social-event-batch summary { padding:8px 0; font-size:13px; cursor:pointer; }

/* Fil vide */
#socialRoot .social-empty { padding:26px; color:var(--muted); }
#socialRoot .social-empty-feed { display:grid; justify-items:center; gap:8px; padding:34px 24px 30px; text-align:center; }
.social-empty-art { width:150px; height:auto; margin-bottom:8px; overflow:visible; }
.social-empty-art .card-back { fill:#3b1520; stroke:#6a2a36; stroke-width:1.5; }
.social-empty-art .card-face { fill:#f6ece8; stroke:#12070a; stroke-width:1.5; }
.social-empty-art .card-suit { fill:#d23a48; }
.social-empty-feed h3 { margin:0; font-size:20px; color:var(--ink); }
.social-empty-feed p { margin:0 0 12px; font-size:14px; }
#socialRoot .social-empty-feed .primary { min-height:42px; padding:0 22px; border-radius:999px; }

/* Cercle d'amis (colonne de droite) */
#socialRoot .social-circle { position:sticky; top:18px; padding:18px; }
.social-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
#socialRoot .social-card-head h3 { margin:0; }
.social-circle-list .social-person { padding:10px 0; }
#socialRoot .social-circle-add { width:100%; display:flex; align-items:center; justify-content:center; gap:8px; min-height:42px; margin-top:12px; border-radius:14px; }
#socialRoot .social-circle-add .social-icon { width:16px; height:16px; }

/* Amis, abonnements */
#socialRoot .social-stacked { display:grid; gap:16px; }
#socialRoot .social-stacked>.social-card { margin:0; padding:20px; }
#socialRoot .social-stacked>.social-card h3:not(:first-child) { margin-top:22px; }
#socialRoot .social-stacked .social-empty-text { margin:0; }
#socialRoot .social-friends-layout,#socialRoot .social-follows-layout { grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); align-items:start; }
#socialRoot .social-friends-layout>section:first-child { grid-row:span 2; }
.social-card form,.social-new-conversation form,.social-group-management form { display:grid; gap:14px; min-width:0; }
.social-card form>label,.social-card form>fieldset { min-width:0; margin:0; }
.social-card form>button { justify-self:start; }
.social-invite { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; margin:14px 0 18px; }
.social-invite input,.social-invite button { min-width:0; min-height:44px; }
#socialRoot .social-invite input { border-radius:12px; background:var(--s-well); font-size:13px; color:#d8bfc2; }
#socialFriendForm,#socialFollowForm { display:grid; grid-template-columns:minmax(0,1fr); align-items:end; gap:10px; margin:0; }
#socialFriendForm>label,#socialFollowForm>label { min-width:0; margin:0; }
#socialFriendForm input,#socialFriendForm>button,#socialFollowForm input,#socialFollowForm>button { min-height:44px; }
#socialFriendForm>button,#socialFollowForm>button { justify-self:start; white-space:nowrap; border-radius:999px; padding:0 20px; }
#socialRoot .social-stacked .social-person { align-items:center; }
#socialRoot .social-stacked .social-row-actions { justify-content:flex-end; }

/* Profil d'un autre joueur */
#socialRoot .social-profile-detail { position:relative; margin:0 0 16px; padding:22px; }
.social-profile-detail>.icon-btn { position:absolute; top:12px; right:12px; width:40px; height:40px; border-radius:50%; }
.social-profile-detail>.social-person { padding-top:0; padding-right:40px; border:0; }
.social-profile-detail>.social-person .social-avatar { width:56px; height:56px; }
.social-profile-detail>.social-person .social-initials { font-size:20px; }
.social-profile-detail p { margin:0 0 12px; color:var(--muted); font-size:13.5px; line-height:1.6; overflow-wrap:anywhere; }

/* Création / modification du profil */
#socialRoot .social-setup { max-width:760px; padding:26px; }
.social-setup>p { color:var(--muted); font-size:13px; line-height:1.6; }
.social-setup .span-two { grid-column:1/-1; }
.social-setup .social-checkbox { margin-top:18px; }
.social-setup .fine-print { margin-top:12px; }
.social-setup .social-row-actions { margin-top:20px; }
#socialRoot .social-setup .social-row-actions .primary,#socialRoot .social-setup .social-row-actions .secondary { min-height:44px; padding:0 20px; }

/* Messagerie */
.social-messaging { display:grid; grid-template-columns:minmax(240px,300px) minmax(0,1fr); gap:18px; align-items:start; }
#socialRoot .social-chat-sidebar { padding:16px 12px; min-width:0; }
.social-chat-sidebar>h3 { padding:0 8px; }
.social-conversation-list { display:grid; gap:4px; margin-bottom:12px; max-height:420px; overflow:auto; }
.social-conversation { display:flex; align-items:center; gap:12px; width:100%; min-width:0; padding:10px; border:1px solid transparent; border-radius:14px; background:none; color:var(--ink); text-align:left; transition:background-color .15s ease-out; }
@media(hover:hover){ .social-conversation:hover { background:#1f0e13; } }
.social-conversation.selected { background:linear-gradient(180deg,#3a1520,#280e16); border-color:#5c2531; }
.social-conversation-copy { display:grid; gap:2px; min-width:0; }
.social-conversation-copy strong { font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.social-conversation-copy small { font-size:12px; color:var(--muted); }
.social-conversation.unread strong { color:#fff; }
.social-conversation.unread .social-conversation-copy small { color:var(--accent-text); }
.social-new-conversation,.social-group-management { padding:12px 8px 0; border-top:1px solid var(--s-line); }
.social-new-conversation summary,.social-group-management summary { display:flex; align-items:center; gap:8px; padding:6px 0 12px; color:#e8c9ce; font-size:13px; font-weight:600; cursor:pointer; list-style:none; }
.social-new-conversation summary::-webkit-details-marker,.social-group-management summary::-webkit-details-marker { display:none; }
.social-new-conversation summary .social-icon { width:16px; height:16px; color:var(--accent-text); }
.social-new-conversation input[type=checkbox],.social-group-management input[type=checkbox] { width:18px; height:18px; }
#socialRoot .social-chat-pane { display:flex; flex-direction:column; min-width:0; min-height:520px; padding:0; }
.social-chat-placeholder { flex:1; display:grid; place-content:center; justify-items:center; gap:6px; padding:40px 20px; color:var(--muted); text-align:center; }
.social-chat-placeholder .social-icon { width:34px; height:34px; color:#6a3a44; }
.social-chat-head { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:12px; padding:14px 18px; border-bottom:1px solid var(--s-line); }
.social-chat-head>div { flex:1; min-width:0; }
#socialRoot .social-chat-head h3 { margin:0 0 2px; font-size:16px; overflow-wrap:anywhere; }
.social-chat-head p { margin:0; color:var(--muted); font-size:12px; }
#socialMessageHistory:empty { display:none; }
#socialMessageHistory { padding:8px 18px 0; text-align:center; }
.social-chat-messages { flex:1; min-height:240px; max-height:min(58vh,640px); overflow:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:10px; padding:18px; background:radial-gradient(90% 70% at 50% 0%,#24091266,transparent 70%); }
.social-chat-message { align-self:flex-start; width:fit-content; max-width:min(78%,560px); min-width:0; padding:10px 14px; border:1px solid var(--s-edge); border-radius:18px 18px 18px 6px; background:#211017; }
.social-chat-message.mine { align-self:flex-end; border-color:#c4424f; border-radius:18px 18px 6px 18px; background:linear-gradient(180deg,#b8333f,#9a2632); color:#fff; }
.social-chat-message header { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:8px; margin:0 0 4px; padding:0; }
.social-chat-message.mine header { justify-content:flex-end; margin:0; }
.social-chat-message header .social-avatar { width:26px; height:26px; }
.social-chat-message header .social-initials { font-size:12px; }
.social-chat-message header .social-person-copy { display:flex; align-items:baseline; gap:6px; min-width:0; }
.social-chat-message header .social-person-name { font-size:13px; }
.social-chat-message header .social-person-copy small { display:none; }
.social-chat-message header>small { color:#a58d90; font-size:12px; }
.social-chat-message.mine header>small { color:#ffd6da; }
.social-chat-message .social-post-text { font-size:14.5px; line-height:1.5; }
.social-chat-message.mine .social-post-text { color:#fff; }
.social-chat-message .social-stat-snapshot { gap:6px; }
.social-chat-message .social-stat-snapshot>div { padding:10px; }
.social-chat-message .social-stat-snapshot strong { font-size:18px; }
.social-chat-message .social-shared-hand { margin-top:10px; padding:14px; }
.social-message-composer { display:grid; gap:10px; padding:12px 14px 14px; border-top:1px solid var(--s-line); }
.social-message-composer .social-kind { min-height:32px; padding:0 12px 0 9px; font-size:12px; }
.social-message-composer [data-share-details]:empty { display:none; }
.social-message-composer [data-share-details] { display:grid; gap:10px; }
.social-message-composer [data-share-details]>label { margin:0; }
.social-message-row { display:grid; grid-template-columns:minmax(0,1fr) 46px; align-items:end; gap:10px; }
.social-message-row label { margin:0; }
#socialRoot .social-message-row textarea { min-height:46px; max-height:160px; padding:12px 16px; border:1px solid var(--s-edge); border-radius:18px; background:var(--s-well); font-size:14.5px; line-height:1.4; resize:none; }
#socialRoot .social-message-row .social-send { width:46px; height:46px; display:grid; place-items:center; padding:0; border-radius:50%; }

/* Forum et salons */
#socialRoot .social-forum-modes { display:inline-flex; width:auto; margin:0 0 18px; padding:4px; border-radius:14px; }
#socialRoot .social-forum-modes button { min-height:38px; padding:0 16px; border:0; border-radius:10px; font-size:13px; }
#socialRoot .social-forum-modes button[aria-pressed="true"] { background:var(--seg-on); color:#ffe6e8; font-weight:600; }
.social-forum-columns { grid-template-columns:minmax(260px,340px) minmax(0,1fr); }
.social-forum-columns>section { padding:18px; }
.social-forum-list { display:grid; gap:8px; margin-top:16px; }
.social-forum-topic-link { width:100%; min-width:0; padding:14px 16px; border:1px solid var(--s-edge); border-radius:14px; background:#180b10; color:var(--ink); text-align:left; transition:border-color .15s ease-out,background-color .15s ease-out; }
@media(hover:hover){ .social-forum-topic-link:hover { border-color:#6a2a36; background:#1f0e14; } }
.social-forum-topic-link strong { display:block; margin-bottom:6px; font-size:14.5px; overflow-wrap:anywhere; }
.social-forum-topic-link small { display:block; color:var(--muted); font-size:12px; line-height:1.6; }
#socialRoot .social-forum-topic { padding:22px; }
.social-forum-topic>h3 { margin:16px 0 8px; font-size:24px; overflow-wrap:anywhere; }
.social-forum-topic>.social-person,.social-forum-reply>.social-person { padding:10px 0; border:0; }
.social-forum-topic>.social-person small,.social-forum-reply>.social-person>small { color:var(--muted); font-size:12px; }
.social-forum-topic>h4 { margin:24px 0 4px; font-size:15px; }
.social-forum-reply { margin:10px 0; padding:4px 0 14px; border-bottom:1px solid var(--s-line); }
.social-forum-topic>form { margin-top:20px; padding-top:18px; border-top:1px solid var(--s-line); }
.social-forum-columns + *,.social-sharing-preview + .social-columns { margin-top:0; }
#socialTabContent>.social-sharing-preview { margin:0 0 14px; }

/* Notifications */
.social-notification { align-items:center; padding:12px; border-radius:14px; }
.social-notification + .social-notification { margin-top:4px; }
.social-notification>div { flex:1; min-width:0; }
.social-notification.unread { background:#22101a; }
.social-notification.unread::after { content:""; flex:none; width:9px; height:9px; border-radius:50%; background:var(--accent); }
.social-notification-target { padding:0; color:var(--ink); font-size:14px; line-height:1.5; text-align:left; }
.social-notification small { display:block; margin-top:3px; color:var(--muted); font-size:12px; }

/* Réseau indisponible en local : message clair, non bloquant */
.social-offline { max-width:560px; margin:6px auto; }
#socialRoot .social-offline { padding:26px; }
.social-offline h3 { margin:0 0 8px; font-size:18px; color:var(--ink); }
.social-offline p { margin:0 0 14px; font-size:13px; line-height:1.6; }
.social-offline-list { list-style:none; margin:0 0 18px; padding:0; display:grid; gap:10px; }
.social-offline-list li { display:grid; grid-template-columns:auto 1fr; column-gap:12px; row-gap:2px; align-items:start; padding:12px 14px; border:1px solid var(--s-edge); border-radius:14px; background:#ffffff06; }
.social-offline-list li::before { content:""; grid-row:1/3; width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--neutral); }
.social-offline-list li.ok::before { background:var(--positive); }
.social-offline-list li.wait::before { background:#e2b659; }
.social-offline-list b { color:var(--ink); font-size:13px; }
.social-offline-list span { font-size:12.5px; line-height:1.6; color:var(--muted); }
.social-offline .secondary,.social-offline .primary { min-height:44px; border-radius:999px; padding:0 20px; display:inline-flex; align-items:center; }

/* Écrans moyens */
@media(max-width:1180px){
  .social-hero { grid-template-columns:auto minmax(0,1fr) auto; }
  .social-hero>.social-profile-counts { grid-column:2/-1; grid-row:2; justify-self:start; margin-left:-8px; }
}
@media(max-width:1000px){
  .social-columns { grid-template-columns:minmax(0,1fr); }
  #socialRoot .social-circle { display:none; }
  .social-messaging { grid-template-columns:minmax(0,1fr); }
  .social-conversation-list { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:240px; }
  #socialRoot .social-friends-layout,#socialRoot .social-follows-layout { grid-template-columns:minmax(0,1fr); }
  #socialRoot .social-friends-layout>section:first-child { grid-row:auto; }
  .social-forum-columns { grid-template-columns:minmax(0,1fr); }
}

/* Téléphone */
@media(max-width:650px){
  .social-hero { grid-template-columns:auto minmax(0,1fr); gap:14px 16px; padding:20px 18px 16px; border-radius:22px; }
  .social-hero::after { width:170px; height:170px; right:-40px; }
  .social-chip { width:70px; height:70px; padding:5px; }
  .social-chip::after { inset:9px; }
  .social-chip .social-initials { font-size:22px; }
  .social-hero-id h2 { font-size:22px; padding-right:4px; }
  .social-hero-id p { font-size:13px; }
  .social-hero>.social-profile-counts { grid-column:1/-1; grid-row:2; justify-self:stretch; margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:6px; border-radius:16px; background:#12070a80; }
  .social-profile-counts .text-btn { min-width:0; padding:8px 4px; }
  .social-profile-counts strong { font-size:22px; }
  .social-hero-actions { grid-column:1/-1; grid-row:3; justify-content:space-between; }
  .social-edit { flex:1; justify-content:center; }
  #socialRoot .social-tabs { margin:0 -16px 16px; padding:5px 16px; border-radius:0; border-left:0; border-right:0; scroll-snap-type:x proximity; -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 14px,#000 calc(100% - 22px),transparent 100%); mask-image:linear-gradient(90deg,transparent 0,#000 14px,#000 calc(100% - 22px),transparent 100%); }
  #socialRoot .social-tabs button { flex:0 0 auto; padding:0 13px; font-size:13px; scroll-snap-align:start; }
  #socialRoot .social-composer { padding:16px; }
  .social-composer-main { grid-template-columns:38px minmax(0,1fr); gap:10px; }
  .social-composer-main .social-avatar { width:38px; height:38px; }
  .social-composer .social-kinds,.social-composer [data-share-details],.social-composer [data-audience],.social-composer [data-group-select] { margin-left:0; }
  .social-kinds { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 -16px; padding:0 16px; }
  .social-kinds::-webkit-scrollbar { display:none; }
  .social-kind { flex:none; }
  .social-composer-foot { gap:10px; }
  .social-visibility { flex:1; }
  #socialRoot .social-visibility select { width:100%; min-width:0; padding:0 38px 0 46px; }
  #socialRoot .social-composer-foot .primary { padding:0 18px; }
  #socialRoot .social-composer textarea,#socialRoot .social-visibility select,#socialRoot .social-comments input,#socialRoot .social-message-row textarea,#socialRoot .social-invite input { font-size:16px; }
  #socialRoot .social-post { padding:16px 16px 8px; border-radius:16px; }
  .social-post>header { grid-template-columns:40px minmax(0,1fr) auto; }
  .social-post>header>.social-avatar { width:40px; height:40px; }
  .social-post>footer { margin:12px -8px 0; }
  .social-stat-snapshot { gap:6px; }
  .social-stat-snapshot>div { padding:10px 12px; }
  .social-stat-snapshot strong { font-size:19px; }
  .social-shared-hand { padding:16px; }
  #socialRoot .social-stacked>.social-card { padding:16px; }
  .social-invite,#socialFriendForm,#socialFollowForm { grid-template-columns:minmax(0,1fr); }
  .social-invite button,#socialFriendForm>button,#socialFollowForm>button { width:100%; }
  .social-person>.social-row-actions { flex:1 1 100%; padding-left:52px; }
  #socialRoot .social-stacked .social-row-actions { justify-content:flex-start; }
  .social-conversation-list { grid-template-columns:minmax(0,1fr); }
  #socialRoot .social-chat-pane { min-height:0; }
  .social-chat-messages { max-height:60vh; padding:14px; }
  .social-chat-message { max-width:88%; }
  .social-message-composer { padding:10px 12px 12px; }
  .social-message-composer .social-kinds { margin:0 -12px; padding:0 12px; }
  #socialRoot .social-forum-modes { display:flex; width:100%; }
  #socialRoot .social-forum-modes button { flex:1; padding:0 8px; }
  .social-forum-topic>h3 { font-size:19px; }
  #socialRoot .social-forum-topic { padding:16px; }
  #socialRoot .social-setup { padding:18px; }
  #socialRoot .social-profile-detail { padding:16px; }
}
