/* ============================================================
   MyGameList v3 — Profil utilisateur
   ============================================================ */

/* ── Profile page ────────────────────────────── */
.profile-hero {
  background: var(--blue);
  padding: 40px 0 0;
  color: var(--white);
}
.profile-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.profile-identity { display: flex; align-items: center; gap: 20px; }

.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top; /* mieux centré sur le visage */
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.profile-avatar-placeholder {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--blue-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: var(--white);
  border: 3px solid rgba(255,255,255,0.2);
}
.profile-role-badge {
  position: absolute; bottom: 0; right: 0;
  font-size: 18px;
  background: var(--white);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}

.profile-username {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: 12px;
    gap: 12px;
    align-items: center; /* ← aligne verticalement */
}
.profile-meta-item { font-size: 13px; color: rgba(255,255,255,0.65); }

.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* KPIs — bandeau indépendant entre hero et contenu */
.profile-kpis-wrap {
  background: var(--white);
  border-bottom: 2px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.profile-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.profile-kpi {
  text-align: center;
  padding: 16px 8px;
  border-right: 1px solid var(--gray-200);
  border-top: 3px solid transparent;
  transition: background var(--transition);
}
.profile-kpi:last-child { border-right: none; }
.profile-kpi:hover { background: var(--gray-50); }

/* Couleurs par thème */
.profile-kpi:nth-child(1) { border-top-color: #3b82f6; }
.profile-kpi:nth-child(1) .profile-kpi-num { color: #3b82f6; }
.profile-kpi:nth-child(2) { border-top-color: #8b5cf6; }
.profile-kpi:nth-child(2) .profile-kpi-num { color: #8b5cf6; }
.profile-kpi:nth-child(3) { border-top-color: #10b981; }
.profile-kpi:nth-child(3) .profile-kpi-num { color: #10b981; }
.profile-kpi:nth-child(4) { border-top-color: #f59e0b; }
.profile-kpi:nth-child(4) .profile-kpi-num { color: #f59e0b; }
.profile-kpi:nth-child(5) { border-top-color: #ec4899; }
.profile-kpi:nth-child(5) .profile-kpi-num { color: #ec4899; }
.profile-kpi:nth-child(6) { border-top-color: #f59e0b; }
.profile-kpi:nth-child(6) .profile-kpi-num { color: #f59e0b; }
.profile-kpi:nth-child(7) { border-top-color: #ef4444; }
.profile-kpi:nth-child(7) .profile-kpi-num { color: #ef4444; }
.profile-kpi:nth-child(8) { border-top-color: #8b5cf6; }
.profile-kpi:nth-child(8) .profile-kpi-num { color: #8b5cf6; }
.profile-kpi:nth-child(9) { border-top-color: #FF5E00; }
.profile-kpi:nth-child(9) .profile-kpi-num { color: #FF5E00; }
.profile-kpi:nth-child(10) { border-top-color: #06b6d4; }
.profile-kpi:nth-child(10) .profile-kpi-num { color: #06b6d4; }

.profile-kpi-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.profile-kpi-main .profile-kpi-num { font-size: 26px; }
.profile-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

/* Body */
.profile-body { padding-top: 32px; padding-bottom: 64px; }
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* Sections */
.profile-section {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.profile-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--blue);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

/* Stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.profile-stat-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.profile-stat-accent { background: var(--blue); }
.profile-stat-accent .profile-stat-num,
.profile-stat-accent .profile-stat-label { color: var(--white); }
.profile-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.5px;
}
.profile-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Barres */
.profile-bars { margin-top: 4px; }
.profile-console-list { display: flex; flex-direction: column; gap: 10px; }
.profile-console-row { display: flex; align-items: center; gap: 10px; }
.profile-console-name { font-size: 13px; font-weight: 500; min-width: 100px; color: var(--text); }
.profile-console-count { font-size: 12px; color: var(--text-muted); min-width: 48px; text-align: right; }

/* Reviews */
.profile-reviews { display: flex; flex-direction: column; gap: 14px; }
.profile-review-card {
  display: flex; gap: 14px;
  padding: 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}
.profile-review-cover { flex-shrink: 0; }
.profile-review-cover img {
  width: 48px; height: 64px;
  object-fit: cover; border-radius: 4px;
}
.profile-review-cover-placeholder {
  width: 48px; height: 64px;
  background: var(--gray-100);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.profile-review-content { flex: 1; min-width: 0; }
.profile-review-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.profile-review-title { font-size: 14px; font-weight: 600; color: var(--text); }
.profile-review-title:hover { color: var(--blue); }
.profile-review-note { font-size: 13px; font-weight: 700; color: var(--yellow-dark); white-space: nowrap; }
.profile-review-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.profile-review-meta { display: flex; align-items: center; gap: 8px; }

/* Sidebar widgets */
.profile-sidebar { display: flex; flex-direction: column; gap: 16px; }
.profile-widget {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.profile-widget-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.profile-note-display { text-align: center; padding: 8px 0; }
.profile-note-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px; font-weight: 800;
  color: var(--blue); letter-spacing: -2px;
}
.profile-note-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Top list */
.profile-top-list { display: flex; flex-direction: column; gap: 8px; }
.profile-top-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--gray-100);
  color: var(--text);
  font-size: 13px;
}
.profile-top-item:last-child { border-bottom: none; }
.profile-top-item:hover { color: var(--blue); }
.profile-top-rank { font-size: 11px; font-weight: 700; color: var(--text-muted); min-width: 16px; }
.profile-top-cover { width: 28px; height: 38px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.profile-top-name { flex: 1; font-size: 12px; }
.profile-top-note { font-size: 12px; font-weight: 700; color: var(--yellow-dark); white-space: nowrap; }

@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-kpis { grid-template-columns: repeat(5, 1fr); }
  .profile-kpi { min-width: 60px; }
}
@media (max-width: 600px) {
  .profile-identity { flex-direction: column; align-items: flex-start; }
  .profile-kpi-main .profile-kpi-num { font-size: 22px; }
}

/* ── Profile tabs ────────────────────────────── */
.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 0;
  flex-wrap: wrap;
}
.profile-tab {
  padding: 9px 18px;
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-muted);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.profile-tab:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--text);
}
.profile-tab.active {
  background: #fff;
  border-bottom-color: #fff;
  font-weight: 700;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

/* ── Grille amis profil public ───────────────── */
.amis-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.amis-grid .ami-card {
  width: 110px;
  flex-shrink: 0;
}
.ami-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: var(--text);
  padding: 12px 8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.ami-card:hover { background: var(--blue-pale); color: var(--blue); }
.ami-card-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}
.ami-card-name { font-size: 12px; font-weight: 600; color: var(--pseudo); }
.ami-card-last { font-size: 10px; color: var(--text-muted); }

/* Grille amis sidebar profil -->
.profile-amis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
}
.profile-ami-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--text);
}
.profile-ami-name { color: var(--pseudo); font-weight: 700; }
.profile-ami-item:hover .profile-ami-name { color: var(--pseudo); font-weight: 700; }
.profile-ami-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gray-200);
}
.profile-ami-name {
  font-size: 10px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* ── Ami card : nb_jeux ─────────────────────────────────────── */
.ami-card { text-align: center; }
.ami-card-jeux {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}

/* ── Photo card : meta (date/desc/comms) ────────────────────── */
.photo-card-wrap { display: flex; flex-direction: column; }
.photo-card-meta {
  padding: 6px 4px 4px;
  font-size: 11px; color: var(--text-muted);
  line-height: 1.4;
}
.photo-card-date  { font-size: 10px; color: var(--text-muted); }
.photo-card-desc  { font-size: 11px; color: var(--text); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.photo-card-comms { font-size: 10px; color: var(--blue); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   SYSTÈME DE BADGES & RANGS
   ════════════════════════════════════════════════════════════ */

/* ── Rangs : badge inline (sous le pseudo) ──────────────────── */
.rank-badge-inline {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 10px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.rank-bronze  { background: linear-gradient(135deg, #cd7f32, #a0522d); color: #fff; }
.rank-argent  { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #1a1a1a; }
.rank-or      { background: linear-gradient(135deg, #f5c518, #d4a017); color: #1a1a1a; }
.rank-platine {
  background: linear-gradient(135deg, #e8e8e8, #a0b2c8);
  color: #1a1a1a;
  box-shadow: 0 0 10px rgba(160, 178, 200, 0.7);
}

/* ── Macaron rang sur l'avatar ───────────────────────────────── */
.avatar-badge-wrap { position: relative; display: inline-block; }
.rank-macaron {
  position: absolute;
  bottom: -4px; right: -4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  border: 2px solid var(--white, #fff);
  line-height: 1;
  cursor: default;
  z-index: 2;
}
.rank-macaron.rank-bronze  { background: linear-gradient(135deg, #cd7f32, #a0522d); }
.rank-macaron.rank-argent  { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); }
.rank-macaron.rank-or      { background: linear-gradient(135deg, #f5c518, #d4a017); }
.rank-macaron.rank-platine {
  background: linear-gradient(135deg, #e8e8e8, #a0b2c8);
  box-shadow: 0 0 6px rgba(160, 178, 200, 0.8);
}

/* ── Pastille "en ligne" ─────────────────────────────────────── */
.online-dot {
  position: absolute;
  top: 0; right: 0;
  width: 18px; height: 18px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 3;
  animation: pulse-online 2.5s ease-in-out infinite;
}
@keyframes pulse-online {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* ── Grille de badges (onglet profil) ────────────────────────── */
.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge-card {
  display: flex; flex-direction: column; align-items: center;
  width: 90px; text-align: center;
  padding: 10px 6px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-card, #fff);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
}
.badge-card.badge-earned {
  border-color: #f5c518;
  background: linear-gradient(160deg, #fffbea, #fff8d0);
  box-shadow: 0 2px 8px rgba(245,197,24,0.2);
}
.badge-card.badge-earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(245,197,24,0.35);
}
.badge-card.badge-locked {
  opacity: 0.38;
  filter: grayscale(60%);
}
.badge-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 5px;
}
.badge-nom {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.badge-date {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Table derniers ajouts amis ─────────────────────────────── */
.amis-ajouts-table-wrap { overflow-x: auto; }
.amis-ajouts-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.amis-ajouts-table th {
  padding: 5px 6px; background: var(--gray-50, #f8fafc);
  border-bottom: 2px solid var(--border);
  font-weight: 700; font-size: 11px; color: var(--text-muted);
  text-align: left; white-space: nowrap;
}
.amis-ajouts-table td {
  padding: 5px 6px; border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.amis-ajouts-table tr:hover td { background: var(--blue-light); }

/* ── Profile status badges (ligne sous pseudo) ── */
.profile-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* ← centre horizontalement */
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  line-height: 1;
  width: 100px;
}

.icon {
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff;
}

.profile-status-badge.rank-bronze {
  background: rgba(205, 127, 50, 0.25);
  border-color: #cd7f32aa;
  color: #ffd090;
}

.profile-status-badge.rank-argent {
  background: rgba(192, 192, 192, 0.2);
  border-color: #c0c0c0aa;
  color: #e8e8e8;
}

.profile-status-badge.rank-or {
  background: rgba(245, 197, 24, 0.2);
  border-color: #f5c518aa;
  color: #f5c518;
}

.profile-status-badge.rank-platine {
  background: rgba(180, 230, 255, 0.2);
  border-color: #b4e6ffaa;
  color: #b4e6ff;
}

.profile-badge-gamelist {
  background: var(--gamelist-bg) !important;
  color: #fff !important;
  border-color: #2a5a9f !important;
}

.profile-badge-gametheque {
  background: var(--gametheque-bg) !important;
  color: #fff !important;
  border-color: #a93226 !important;
}

.profile-badge-wishlist {
  background: var(--wishlist-bg) !important;
  color: #fff !important;
  border-color: #3d6115 !important;
}

/* ── Couleurs individuelles des onglets ──── */
.profile-tab[data-tab="ajouts"]    { background: rgba(59,130,246,0.10);  color: #2563eb; border-color: rgba(59,130,246,0.25); }
.profile-tab[data-tab="photos"]    { background: rgba(139,92,246,0.10);  color: #7c3aed; border-color: rgba(139,92,246,0.25); }
.profile-tab[data-tab="avis"]      { background: rgba(245,158,11,0.12);  color: #b45309; border-color: rgba(245,158,11,0.30); }
.profile-tab[data-tab="amis"]      { background: rgba(236,72,153,0.10);  color: #be185d; border-color: rgba(236,72,153,0.25); }
.profile-tab[data-tab="badges"]    { background: rgba(245,197,24,0.13);  color: #92620a; border-color: rgba(245,197,24,0.35); }
.profile-tab[data-tab="toplistes"] { background: rgba(239,68,68,0.10);   color: #b91c1c; border-color: rgba(239,68,68,0.25); }
.profile-tab[data-tab="wishlist"]  { background: rgba(34,197,94,0.10);   color: #15803d; border-color: rgba(34,197,94,0.25); }

.profile-tab[data-tab="ajouts"]:hover    { background: rgba(59,130,246,0.18); }
.profile-tab[data-tab="photos"]:hover    { background: rgba(139,92,246,0.18); }
.profile-tab[data-tab="avis"]:hover      { background: rgba(245,158,11,0.20); }
.profile-tab[data-tab="amis"]:hover      { background: rgba(236,72,153,0.18); }
.profile-tab[data-tab="badges"]:hover    { background: rgba(245,197,24,0.22); }
.profile-tab[data-tab="toplistes"]:hover { background: rgba(239,68,68,0.18); }
.profile-tab[data-tab="wishlist"]:hover  { background: rgba(34,197,94,0.18); }

.profile-tab[data-tab="ajouts"].active    { background: #fff; border-color: #3b82f6; border-top-width: 3px; color: #2563eb; }
.profile-tab[data-tab="photos"].active    { background: #fff; border-color: #8b5cf6; border-top-width: 3px; color: #7c3aed; }
.profile-tab[data-tab="avis"].active      { background: #fff; border-color: #f59e0b; border-top-width: 3px; color: #b45309; }
.profile-tab[data-tab="amis"].active      { background: #fff; border-color: #ec4899; border-top-width: 3px; color: #be185d; }
.profile-tab[data-tab="badges"].active    { background: #fff; border-color: #d4a017; border-top-width: 3px; color: #92620a; }
.profile-tab[data-tab="toplistes"].active { background: #fff; border-color: #ef4444; border-top-width: 3px; color: #b91c1c; }
.profile-tab[data-tab="wishlist"].active  { background: #fff; border-color: #22c55e; border-top-width: 3px; color: #15803d; }

/* ── Zébrage des listes ──── */
#tab-ajouts .game-row:nth-child(odd),
#tab-amis   .game-row:nth-child(odd)   { background: rgba(26,58,107,0.025); }
#tab-ajouts .game-row:nth-child(even),
#tab-amis   .game-row:nth-child(even)  { background: rgba(245,197,24,0.04); }
#tab-ajouts .game-row:hover,
#tab-amis   .game-row:hover            { background: rgba(47,106,177,0.10); }

/* ── Wishlist & Amis ajouts ── */

/* ══════════════════════════════════════════════
   XP / MgGold / Niveau
══════════════════════════════════════════════ */

/* Badge compact (dans les listes, forum, collectionneurs, etc.) */
.xp-level-badge
 {
    display: inline-flex;
    align-items: center;
    height: 15px;
    background: #0043ff;
    color: #fbbf24;
    font-size: 9px;
    font-weight: 800;
    padding: 0 5px;
    border-radius: 3px;
    letter-spacing: 0.2px;
    vertical-align: middle;
    white-space: nowrap;
}

.xp-level-badge--modo  { background: #16a34a; color: #fff; }
.xp-level-badge--admin { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }

/* Barre de progression complète sur le profil */
.xp-bar-wrap {
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 10px;
}
.xp-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}
.xp-gold-amount {
  font-size: 13px;
  font-weight: 800;
  color: #f5c518;
  letter-spacing: .3px;
}
.xp-rang-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.xp-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.xp-level-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  min-width: 20px;
  text-align: center;
}
.xp-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5c518, #ffd700);
  border-radius: 5px;
  transition: width .4s ease;
  min-width: 2px;
}
.xp-bar-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin-top: 4px;
}

/* ── Profil : éviter la scrollbar horizontale ─────────────── */
.profile-hero { overflow-x: hidden; }
.profile-hero-inner { max-width: 100%; }
/* Badges mini : ne pas dépasser la largeur */
.profile-identity-info { min-width: 0; overflow: hidden; }

/* ── Bloc XP (colonne droite du hero) ───────────────────────── */
.profile-xp-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}
.profile-xp-level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.profile-xp-lv {
  display: inline-flex;
  align-items: center;
  height: 28px;
  background: #1d4ed8;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 900;
  padding: 0 10px;
  border-radius: 4px;
  letter-spacing: .5px;
}
.profile-xp-rang {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.profile-xp-bar-wrap {
  position: relative;
  background: var(--gray-100);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}
.profile-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  border-radius: 6px;
  transition: width .4s;
}
.profile-xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}
.profile-xp-gold {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
}

/* ── Hero profil : layout 3 colonnes ───────────────────────── */
.profile-col1 {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.profile-col2 {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}
.profile-col3 {
  flex-shrink: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-top: 4px;
}
.profile-actions-wrap { /* wrapper bouton action */ }

/* Ligne pseudo + badge rôle */
.profile-pseudo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Badges mini (icônes) */
.profile-badges-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Ligne meta : localisation · date · streak */
.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Gaming IDs */
.profile-gaming-ids {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  align-items: center;
}

/* Badges statuts sous avatar — taille uniforme */
.profile-status-link {
  text-decoration: none;
  font-size: 11px;
  height: 26px;
  padding: 0 10px;
  width: 90px;
}
.profile-status-size {
  font-size: 11px;
  height: 26px;
  padding: 0 10px;
  width: 90px;
  justify-content: center;
}

/* ════════════════════════════════════════════════════════════
   TABLEAUX GAMELIST DANS LES ONGLETS PROFIL
   ════════════════════════════════════════════════════════════ */

/* ── Scroll interne uniquement ── */
.tab-content .gamelist-table-wrap { overflow-x: auto; max-width: 100%; }
.tab-content .gamelist-table      { min-width: 0; }

/* ── Colonne Membre (onglet Amis uniquement) ── */
.col-membre { width: 150px; white-space: nowrap; }
.ami-row-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}
.ami-row-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ami-row-link .pseudo-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Colonnes compactes — règles communes aux onglets Ajouts et Amis ── */
#tab-ajouts .col-region,
#tab-amis   .col-region   { width: 45px; }

#tab-ajouts .col-etat-jeu,
#tab-amis   .col-etat-jeu { width: 76px; }

#tab-ajouts .col-prix,
#tab-amis   .col-prix     { width: 72px; font-weight: 700; }

#tab-ajouts .col-magasin,
#tab-amis   .col-magasin  { width: 68px; }

#tab-ajouts .col-date,
#tab-amis   .col-date     { width: 72px; }

#tab-ajouts .gamelist-game-link,
#tab-amis   .gamelist-game-link {
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
}

/* ── Centrage des en-têtes (Jeu reste à gauche) ── */
#tab-ajouts .gamelist-table th,
#tab-amis   .gamelist-table th               { text-align: center; }

#tab-ajouts .gamelist-table th:not([class]),
#tab-amis   .gamelist-table th.col-membre,
#tab-amis   .gamelist-table th:not([class])  { text-align: left; }

/* ── Couleur du lien jeu dans l'onglet Amis ── */
#tab-amis .gamelist-table td a[href*="/jeu/"] { color: var(--blue); font-weight: 500; }
