/* ============================================================
   ABSTRICT · Social CSS — Auth / Profile / Gallery / Comments
   ============================================================= */

/* ── Auth Bar ─────────────────────────────────────────────────── */
.auth-bar {
  display: flex; align-items: center; gap: 6px;
  position: relative;
}
.auth-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: var(--text-muted); cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms;
}
.auth-btn:hover { background: rgba(99,102,241,.15); color: var(--accent); border-color: rgba(99,102,241,.3); }
.auth-avatar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; padding: 0;
  background: transparent; border: 2px solid rgba(99,102,241,.3);
  cursor: pointer; overflow: hidden;
  transition: border-color 200ms, transform 200ms;
}
.auth-avatar-btn:hover { border-color: var(--accent); transform: scale(1.08); }
.auth-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-avatar span { color: #fff; font-size: 14px; font-weight: 700; }

/* ── User Dropdown ────────────────────────────────────────────── */
.auth-user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 220px; background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 8px; z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: ddIn .15s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.auth-dd-head { display: flex; align-items: center; gap: 10px; padding: 8px; }
.auth-dd-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.auth-dd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-dd-avatar span { color: #fff; font-size: 14px; font-weight: 700; }
.auth-dd-info { min-width: 0; }
.auth-dd-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-dd-email { display: block; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-dd-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.auth-dd-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; text-align: left;
  transition: background 150ms, color 150ms;
}
.auth-dd-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.auth-dd-danger:hover { background: rgba(239,68,68,.1); color: var(--danger); }

/* ── Modal Base ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.75); backdrop-filter: blur(10px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Override old .modal rules from styles.css */
.modal-overlay .modal {
  position: static !important;
  inset: auto !important;
  background: var(--bg-card, var(--surface));
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px;
  width: 100%; max-width: 480px; max-height: 85vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
  animation: sheetUp .3s cubic-bezier(.22,1,.36,1);
  box-sizing: border-box;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.06); border: none;
  color: var(--text-muted); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms, color 150ms;
}
.modal-close:hover { background: rgba(255,255,255,.12); color: var(--text); }
.modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.15);
  margin: 0 auto 16px;
}

/* ── Auth Modal ───────────────────────────────────────────────── */
.auth-modal { padding-bottom: 32px; }
.auth-modal-head { margin-bottom: 20px; text-align: center; flex-shrink: 0; }
.auth-modal-logo { margin-bottom: 12px; display: block; margin-left: auto; margin-right: auto; }
.auth-modal-title { font-size: 22px; font-weight: 700; color: var(--text); margin: 0; }
.auth-modal-sub { font-size: 13px; color: var(--text-muted); margin: 6px 0 0; }
.auth-modal-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: rgba(255,255,255,.04); border-radius: 10px; padding: 4px;
}
.auth-tab {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 200ms, color 200ms;
}
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-tab:not(.active):hover { color: var(--text); }
.auth-form { text-align: left; }
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
}
.auth-field input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-subtle);
  color: var(--text); font-size: 15px;
  transition: border-color 200ms;
}
.auth-field input:focus { border-color: var(--accent); outline: none; }
.auth-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.auth-submit {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity 200ms, transform 100ms;
}
.auth-submit:active { transform: scale(.98); }
.auth-submit:hover { opacity: .9; }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-subtle);
}
.auth-google-btn {
  width: 100%; padding: 12px; border: 1px solid var(--border-subtle);
  border-radius: 10px; background: rgba(255,255,255,.04);
  color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 200ms;
}
.auth-google-btn:hover { background: rgba(255,255,255,.08); }
.auth-reset-link {
  margin-top: 16px; font-size: 13px; text-align: center;
}
.auth-reset-link a { color: var(--text-muted); text-decoration: none; }
.auth-reset-link a:hover { color: var(--accent); }

/* ── Save Build Modal ─────────────────────────────────────────── */
.save-modal { padding-bottom: 32px; }
.save-modal-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 16px; }
.save-field { margin-bottom: 14px; }
.save-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
}
.save-field input, .save-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-subtle);
  color: var(--text); font-size: 14px; resize: vertical;
  transition: border-color 200ms;
}
.save-field input:focus, .save-field textarea:focus { border-color: var(--accent); outline: none; }
.save-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-secondary); cursor: pointer;
}
.save-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.save-screenshot-preview { margin: 12px 0; }
.save-screenshot-preview img {
  width: 100%; border-radius: 10px; border: 1px solid var(--border-subtle);
}
.save-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.save-submit {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  background: var(--teal); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity 200ms, transform 100ms;
}
.save-submit:active { transform: scale(.98); }
.save-submit:hover { opacity: .9; }
.save-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Save Build Button ────────────────────────────────────────── */
.save-build-btn {
  width: 100%; margin-top: 12px; padding: 12px 16px;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(20,184,166,.15));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 10px; color: var(--accent);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 200ms, border-color 200ms;
  text-transform: uppercase; letter-spacing: .5px;
}
.save-build-btn:hover {
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(20,184,166,.25));
  border-color: var(--accent);
}

/* ── Social Gallery ───────────────────────────────────────────── */
/* Même conteneur centré que Bibliothèque/Performances : sans ça, la section
   Communauté s'étirait depuis le bord gauche de l'écran (mal alignée). */
.section-social-page {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}
.section-social { margin-top: 24px; }
.social-filters {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.sf-btn {
  padding: 8px 16px; border: 1px solid var(--border-subtle);
  border-radius: 20px; background: transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 200ms;
}
.sf-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sf-btn:not(.active):hover { border-color: var(--text-muted); color: var(--text); }
.social-grid {
  /* auto-fit : les colonnes vides disparaissent quand il y a peu de builds,
     la carte remplit toute la largeur au lieu de rester à gauche. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

/* ── Members Grid ─────────────────────────────────────────────── */
.sf-members {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  border-color: rgba(99,102,241,.35);
}
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
  justify-content: center;
  gap: 12px;
}
.member-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0; border-radius: 14px; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  cursor: pointer; font-family: inherit; color: inherit;
  transition: border-color 200ms, transform 200ms;
}
.member-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.member-banner {
  width: 100%; height: 80px; overflow: hidden;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.1));
}
.member-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-banner-empty {
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.05));
}
.member-card-body {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 14px 16px; width: 100%;
}
.member-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-top: -28px; margin-bottom: 10px; flex-shrink: 0;
  border: 3px solid var(--bg-card); position: relative; z-index: 1;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar span { color: #fff; font-size: 22px; font-weight: 700; }
.member-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 4px;
}
.member-bio {
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
  min-height: 2.9em; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.member-stats { font-size: 12px; color: var(--text-muted); }
.member-stats strong { color: var(--text); }
.social-loading, .social-empty {
  grid-column: 1 / -1; text-align: center; padding: 40px 16px;
  color: var(--text-muted); font-size: 14px;
}

/* ── Build Card ───────────────────────────────────────────────── */
.build-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 16px;
  cursor: pointer; transition: border-color 200ms, transform 200ms;
}
.build-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.bc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bc-avatar span { color: #fff; font-size: 14px; font-weight: 700; }
.bc-meta { display: flex; flex-direction: column; min-width: 0; }
.bc-author { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-time { font-size: 11px; color: var(--text-muted); }
.bc-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.bc-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.bc-screenshot { margin-bottom: 10px; border-radius: 10px; overflow: hidden; }
.bc-screenshot img { width: 100%; display: block; }
.bc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.bc-tag {
  padding: 3px 8px; border-radius: 6px;
  background: rgba(255,255,255,.05); color: var(--text-muted);
  font-size: 11px; font-weight: 500;
}
.bc-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border-subtle); padding-top: 10px;
}
.bc-price { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--teal); }
.bc-actions { display: flex; gap: 6px; }
.bc-like, .bc-comment-btn, .bc-load {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: none; border-radius: 8px;
  background: rgba(255,255,255,.05); color: var(--text-muted);
  font-size: 12px; cursor: pointer; transition: background 150ms, color 150ms;
}
.bc-like:hover, .bc-comment-btn:hover, .bc-load:hover { background: rgba(255,255,255,.1); color: var(--text); }
.bc-like.liked { color: var(--danger); background: rgba(239,68,68,.1); }
/* Suppression : discrète, en haut à droite de la carte (séparée des actions) */
.bc-delete {
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; padding: 6px;
  border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: background 150ms, color 150ms;
}
.bc-delete:hover { background: rgba(239,68,68,.12); color: var(--danger); }

/* ── Comments Modal ───────────────────────────────────────────── */
.comments-modal { display: flex; flex-direction: column; max-height: 80vh; }
.comments-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.comments-list {
  flex: 1; overflow-y: auto; max-height: 400px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 12px; padding-right: 4px;
}
.comments-loading, .comments-empty {
  text-align: center; padding: 32px; color: var(--text-muted); font-size: 13px;
}
.comment-item { display: flex; gap: 10px; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-avatar span { color: #fff; font-size: 12px; font-weight: 700; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.comment-author { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.4; word-break: break-word; }
.comments-form {
  display: flex; gap: 8px; border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}
.comments-form input {
  flex: 1; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-subtle);
  color: var(--text); font-size: 14px;
}
.comments-form input:focus { border-color: var(--accent); outline: none; }
.comment-submit {
  width: 44px; height: 44px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 18px; font-weight: 700;
  cursor: pointer; transition: opacity 200ms, transform 100ms;
}
.comment-submit:active { transform: scale(.95); }
.comment-submit:hover { opacity: .85; }

/* ── Build Detail Modal ───────────────────────────────────────── */
.build-detail-modal { }
.bd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bd-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.bd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bd-avatar span { color: #fff; font-size: 18px; font-weight: 700; }
.bd-info { display: flex; flex-direction: column; }
.bd-author { font-size: 15px; font-weight: 600; color: var(--text); }
.bd-time { font-size: 12px; color: var(--text-muted); }
.bd-name { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.bd-desc { font-size: 14px; color: var(--text-secondary); margin: 0 0 12px; line-height: 1.5; }
.bd-screenshot { margin-bottom: 12px; border-radius: 10px; overflow: hidden; }
.bd-screenshot img { width: 100%; display: block; }
.bd-price {
  font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--teal);
  margin-bottom: 16px;
}
.bd-components { margin-bottom: 16px; }
.bd-comp-row {
  display: grid; grid-template-columns: 70px 1fr auto;
  gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.bd-comp-row:last-child { border-bottom: none; }
.bd-comp-cat { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.bd-comp-name { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-comp-price { font-family: var(--mono); color: var(--text); font-weight: 600; }
.bd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-action {
  flex: 1; min-width: 120px; padding: 12px; border: 1px solid var(--border-subtle);
  border-radius: 10px; background: rgba(255,255,255,.04); color: var(--text-secondary);
  font-size: 13px; font-weight: 600; cursor: pointer; text-align: center;
  transition: background 200ms, border-color 200ms;
}
.bd-action:hover { background: rgba(255,255,255,.08); border-color: var(--accent); }

/* ── Profile Modal ────────────────────────────────────────────── */
.profile-modal { }
.profile-banner {
  width: calc(100% + 48px); margin: -24px -24px 0;
  height: 140px; overflow: hidden; position: relative;
  border-radius: 20px 20px 0 0; background: var(--bg-alt);
}
.profile-banner img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.profile-banner-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; transition: background 200ms;
  color: var(--text-muted);
}
.profile-banner-empty:hover { background: var(--border-subtle); color: var(--text); }
.profile-banner-empty svg { opacity: .5; }
.profile-banner-empty span { font-size: 12px; font-weight: 500; }
.profile-header { text-align: center; margin-bottom: 20px; margin-top: -30px; position: relative; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 3px solid rgba(99,102,241,.3);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar span { color: #fff; font-size: 32px; font-weight: 700; }
.profile-name { font-size: 22px; font-weight: 700; color: var(--text); margin: 0; }
.profile-bio { font-size: 14px; color: var(--text-muted); margin: 6px 0 12px; line-height: 1.4; }
.profile-stats { display: flex; justify-content: center; gap: 20px; }
.ps-item { font-size: 13px; color: var(--text-muted); }
.ps-item strong { color: var(--text); font-weight: 700; }
.ps-clickable {
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: background 150ms, color 150ms;
}
.ps-clickable:hover { background: rgba(99,102,241,.1); color: var(--accent); }
.ps-clickable:hover strong { color: var(--accent); }

/* ── Profile Lanyard ──────────────────────────────────────── */
.profile-lanyard {
  margin: 10px auto 12px; padding: 10px 12px;
  background: rgba(88,101,242,.08); border: 1px solid rgba(88,101,242,.2);
  border-radius: 12px; max-width: 280px;
}
.profile-lanyard-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.profile-lanyard-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #5865F2; display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.profile-lanyard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-lanyard-avatar span { color: #fff; font-size: 13px; font-weight: 700; }
.profile-lanyard-info { display: flex; flex-direction: column; }
.profile-lanyard-name { font-size: 13px; font-weight: 700; color: var(--text); }
.profile-lanyard-status { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.lanyard-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.profile-lanyard-activity {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 6px; border-top: 1px solid rgba(88,101,242,.15);
}
.lanyard-act-type { font-size: 10px; font-weight: 600; color: #5865F2; text-transform: uppercase; letter-spacing: .3px; }
.lanyard-act-name { font-size: 12px; font-weight: 600; color: var(--text); }
.lanyard-act-detail, .lanyard-act-state { font-size: 11px; color: var(--text-muted); }

.profile-follow-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 20px; margin: 10px auto 0;
  background: var(--accent); color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 200ms, transform 150ms;
}
.profile-follow-btn:hover { background: var(--accent-hover); transform: scale(1.02); }
.profile-follow-btn.following { background: rgba(99,102,241,.12); color: var(--accent); border: 1px solid rgba(99,102,241,.3); }
.profile-follow-list {
  margin-bottom: 16px; padding: 12px;
  background: var(--bg-alt); border-radius: 12px;
  border: 1px solid var(--border-subtle);
}
.follow-list { display: flex; flex-direction: column; gap: 6px; }
.follow-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  cursor: pointer; transition: background 150ms;
}
.follow-list-item:hover { background: rgba(255,255,255,.05); }
.follow-list-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.follow-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.follow-list-avatar span { color: #fff; font-size: 12px; font-weight: 700; }
.follow-list-name { font-size: 13px; font-weight: 600; color: var(--text); }
.profile-social-links {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 10px 0;
}
.ps-social {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 6px;
  background: rgba(255,255,255,.06); color: var(--text-secondary);
  font-size: 12px; text-decoration: none;
  transition: background 150ms, color 150ms;
}
.ps-social:hover { background: rgba(99,102,241,.15); color: var(--accent); }
.ps-social span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-edit-btn {
  width: 100%; padding: 12px; margin: 16px 0;
  border: 1px solid var(--border-subtle); border-radius: 10px;
  background: rgba(255,255,255,.04); color: var(--text-secondary);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 200ms;
}
.profile-edit-btn:hover { background: rgba(255,255,255,.08); }
.profile-builds { display: flex; flex-direction: column; gap: 10px; }
.profile-loading, .profile-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }
.profile-build-card {
  padding: 12px 14px; border: 1px solid var(--border-subtle);
  border-radius: 10px; cursor: pointer;
  transition: border-color 200ms;
}
.profile-build-card:hover { border-color: var(--accent); }
.pbc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pbc-name { font-size: 14px; font-weight: 600; color: var(--text); }
.pbc-price { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--teal); }
.pbc-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.pbc-actions { display: flex; gap: 8px; align-items: center; }
.pbc-load {
  padding: 5px 12px; border: none; border-radius: 6px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.pbc-delete {
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; padding: 6px;
  border: 1px solid transparent; border-radius: 6px;
  background: rgba(239,68,68,.08); color: var(--danger);
  cursor: pointer; transition: background 150ms, border-color 150ms;
}
.pbc-delete:hover { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.35); }
.pbc-public, .pbc-private {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
}
.pbc-public { background: rgba(20,184,166,.15); color: var(--teal); }
.pbc-private { background: rgba(255,255,255,.06); color: var(--text-muted); }

/* Alignement vertical des icônes SVG dans les meta/cartes */
.pbc-meta-item svg, .bc-load svg, .bc-delete svg, .bc-like svg, .bc-comment-btn svg, .bd-action svg, .pbc-delete svg, .bc-edit svg, .bc-fork svg {
  vertical-align: -2px;
}
.bd-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ── Follow Button ───────────────────────────────────────────── */
.member-follow {
  margin-top: 10px; padding: 6px 16px;
  border: 1px solid var(--accent); border-radius: 8px;
  background: transparent; color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background 200ms, color 200ms;
}
.member-follow:hover { background: var(--accent); color: #fff; }
.member-follow.following { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.3); }
.member-stats { display: flex; justify-content: center; gap: 16px; }

/* ── Build Card Owner Actions ────────────────────────────────── */
.bc-owner-actions { display: flex; gap: 4px; margin-left: auto; }
.bc-edit {
  display: flex; align-items: center; justify-content: center;
  padding: 6px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: background 150ms, color 150ms;
}
.bc-edit:hover { background: rgba(99,102,241,.12); color: var(--accent); }
.bc-fork {
  display: flex; align-items: center; justify-content: center;
  padding: 6px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: background 150ms, color 150ms;
}
.bc-fork:hover { background: rgba(16,185,129,.12); color: #10b981; }

/* ── Leaderboard ─────────────────────────────────────────────── */
.sf-leaderboard {
  display: inline-flex; align-items: center; gap: 4px;
  border-color: rgba(251,191,36,.35);
}
.sf-leaderboard.active { background: linear-gradient(135deg, #f59e0b, #f97316); border-color: #f59e0b; }
.leaderboard-section {
  margin-bottom: 16px; padding: 16px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.leaderboard-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.lb-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; background: rgba(255,255,255,.03);
  cursor: pointer; transition: background 150ms;
}
.lb-item:hover { background: rgba(255,255,255,.06); }
.lb-rank { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text-muted); min-width: 32px; }
.lb-item:nth-child(1) .lb-rank { color: #f59e0b; }
.lb-item:nth-child(2) .lb-rank { color: #94a3b8; }
.lb-item:nth-child(3) .lb-rank { color: #b45309; }
.lb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-avatar span { color: #fff; font-size: 12px; font-weight: 700; }
.lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-author { font-size: 11px; color: var(--text-muted); }
.lb-likes { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--danger); font-weight: 600; }
.lb-likes svg { fill: var(--danger); }

/* ── Edit Profile Modal ───────────────────────────────────────── */
.edit-profile-modal { }
.ep-banner-section { margin-bottom: 16px; }
.ep-banner-section label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.ep-banner-preview {
  width: 100%; height: 100px; border-radius: 10px; overflow: hidden;
  background: var(--bg-alt); border: 1px dashed var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px; position: relative;
}
.ep-banner-preview img { width: 100%; height: 100%; object-fit: cover; }
.ep-banner-placeholder { font-size: 12px; color: var(--text-muted); }
.ep-banner-preview-error { font-size: 12px; color: var(--danger); }
.ep-banner-section input[type="url"] {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  background: var(--bg-alt); border: 1px solid var(--border-subtle);
  color: var(--text); font-size: 12px; font-family: var(--mono);
}
.ep-banner-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.ep-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 16px; }
.ep-field { margin-bottom: 14px; }
.ep-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
}
.ep-field input, .ep-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-subtle);
  color: var(--text); font-size: 14px; resize: vertical;
  transition: border-color 200ms;
}
.ep-field input:focus, .ep-field textarea:focus { border-color: var(--accent); outline: none; }
.ep-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.ep-social-section { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.ep-social-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.ep-submit {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity 200ms, transform 100ms;
}
.ep-submit:active { transform: scale(.98); }
.ep-submit:hover { opacity: .9; }
.ep-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Social Search ───────────────────────────────────────────── */
.social-toolbar { margin-bottom: 16px; }
.social-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  transition: border-color 200ms;
}
.social-search:focus-within { border-color: var(--accent); }
.social-search-icon { color: var(--text-muted); flex-shrink: 0; display: flex; }
.social-search input {
  flex: 1; border: none; background: transparent;
  color: var(--text); font-size: 14px; outline: none; min-width: 0;
}
.social-search input::placeholder { color: var(--text-muted); }
.social-search-clear {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.08); border: none; color: var(--text-muted);
  cursor: pointer; transition: background 150ms, color 150ms;
}
.social-search-clear:hover { background: rgba(255,255,255,.15); color: var(--text); }

/* ── Comment delete ──────────────────────────────────────────── */
.comment-delete {
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; padding: 4px;
  border: none; border-radius: 6px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; opacity: 0;
  transition: opacity 150ms, background 150ms, color 150ms;
}
.comment-item:hover .comment-delete { opacity: 1; }
.comment-delete:hover { background: rgba(239,68,68,.12); color: var(--danger); }

/* ── Liked state for detail modal ────────────────────────────── */
.bd-action.liked { color: var(--danger); border-color: rgba(239,68,68,.3); }

/* ── Mobile (phone) ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal-overlay .modal { max-width: 100% !important; width: 100% !important; border-radius: 20px 20px 0 0; }
  .modal-handle { display: block; }
  .social-grid { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .sf-members { margin-left: 0; }
  .bd-comp-row { grid-template-columns: 60px 1fr auto; }
  .bd-actions { flex-direction: column; }
  .bd-action { min-width: auto; }
  .auth-user-dropdown { right: -8px; }

  /* Profile mobile - full width bottom sheet */
  .profile-modal { max-width: 100% !important; width: 100% !important; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
  .profile-banner { height: 100px; width: calc(100% + 32px); margin: -20px -16px 0; border-radius: 20px 20px 0 0; }
  .profile-header { text-align: center; margin-top: -30px; }
  .profile-avatar { width: 64px; height: 64px; margin: 0 auto 10px; }
  .profile-name { font-size: 18px; }
  .profile-bio { font-size: 13px; }
  .profile-stats { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .ps-item { font-size: 12px; }
  .profile-social-links { gap: 6px; justify-content: center; }
  .ps-social { padding: 6px 8px; font-size: 11px; }
  .profile-follow-btn { margin: 8px auto 0; }
  .profile-edit-btn { width: 100%; margin: 0 0 12px; }

  /* Lanyard mobile - centered */
  .profile-lanyard { max-width: 100%; margin: 10px 0 12px; }
  .profile-lanyard-header { justify-content: center; }
  .profile-lanyard-activity { align-items: center; text-align: center; }

  /* Build cards mobile */
  .profile-builds { margin-top: 8px; }
  .profile-build-card { padding: 10px; }
  .pbc-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pbc-actions { flex-wrap: wrap; gap: 6px; }
  .pbc-load { width: 100%; }
  .pbc-public, .pbc-private { font-size: 10px; }

  /* Build cards in gallery */
  .bc-head { gap: 8px; }
  .bc-meta { gap: 4px; }
  .bc-actions { gap: 4px; }
  .bc-action { padding: 6px 8px; font-size: 11px; }

  /* Gallery filters mobile */
  .social-toolbar { flex-direction: column; gap: 8px; }
  .social-filters { flex-wrap: wrap; }
  .sf-btn { font-size: 11px; padding: 5px 8px; }

  /* Search mobile */
  .social-search { width: 100%; }

  /* Leaderboard mobile */
  .lb-item { padding: 8px 10px; }
  .lb-rank { font-size: 12px; min-width: 24px; }
  .lb-avatar { width: 28px; height: 28px; }
  .lb-name { font-size: 12px; }

  /* Edit profile mobile */
  .edit-profile-modal { max-width: 100%; }
  .ep-field input, .ep-field textarea { font-size: 16px; padding: 12px; }
  .ep-social-section { gap: 8px; }

  /* Comments mobile */
  .comment-item { padding: 8px; }
  .comment-text { font-size: 12px; }

  /* Member card mobile */
  .member-banner { height: 50px; }
  .member-avatar { width: 44px; height: 44px; margin-top: -22px; }
  .member-name { font-size: 13px; }
  .member-bio { font-size: 11px; min-height: 2.5em; }
  .member-follow { padding: 5px 12px; font-size: 11px; }

  /* Build detail modal mobile */
  .bd-title { font-size: 16px; }
  .bd-author { font-size: 12px; }
  .bd-price { font-size: 14px; }
}

/* ── Desktop ──────────────────────────────────────────────────── */
@media (min-width: 641px) {
  .modal-overlay { align-items: center; padding: 16px; }
  .modal-overlay .modal { border-radius: 20px; max-width: 480px; }
  .modal-handle { display: none; }
  .profile-banner { width: calc(100% + 48px); margin: -24px -24px 0; }
}
