/* ============================================================
   Profil, Public builds — styles partagés
   ============================================================ */

#profile-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px;
}

.profile-section {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.profile-section h2 {
  color: #3ae3c5;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.profile-section-header h2 { margin: 0; border: none; padding: 0; }

.profile-card { display: flex; flex-direction: column; gap: 12px; }
.profile-field { display: flex; flex-direction: column; gap: 4px; }
.profile-field label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.profile-field input { max-width: 360px; }
.profile-field span  { font-size: 14px; color: var(--text); }

/* Pseudo validation */
.pseudo-wrap    { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pseudo-wrap input { flex: 1; max-width: 260px; }
.pseudo-hint    { font-size: 11px; color: #c0c0c0; margin-top: 4px; }
.pseudo-msg     { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pseudo-ok      { color: #71ef0b; }
.pseudo-current { color: var(--gold); }
.pseudo-taken   { color: #e8196c; }
.pseudo-spin    { display: inline-block; color: var(--muted); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.profile-user-info {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); font-size: 14px;
}
.user-icon { font-size: 18px; color: var(--gold); }

/* Table des builds */
.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.builds-table {
  width: 100%;
  min-width: 540px; /* force le scroll avant que les colonnes se chevauchent */
  border-collapse: collapse;
  font-size: 13px;
}
.builds-table th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.builds-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--bg3);
  vertical-align: middle;
}
.builds-table tr:last-child td { border-bottom: none; }
.builds-table tr:hover td { background: var(--bg2); }
.build-name    { font-weight: 600; color: var(--text); }
.build-utility { font-weight: 700; color: var(--gold); }
/* Numéro de build + filiation (fork) */
.build-num   { display: inline-block; margin-left: 6px; font-weight: 400;
               font-style: normal; font-size: 11px; color: #8b949e; vertical-align: middle; }
.build-based { display: block; margin-top: 2px; font-size: 10px;
               font-style: italic; color: var(--muted); }
/* Couleurs des royaumes */
.realm-albion   { color: #fd5f61; }
.realm-midgard  { color: #80a0ff; }
.realm-hibernia { color: #78f078; }
.build-actions { display: flex; gap: 6px; align-items: center; }
.muted { color: var(--muted); }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.badge {
  display: inline-block; padding: 1px 7px;
  background: var(--bg3); color: var(--muted);
  border-radius: 10px; font-size: 12px; font-weight: 400;
  margin-left: 6px;
}
.badge-muted { color: var(--muted); }

/* Bouton visibilité */
.btn-vis {
  padding: 2px 10px; border-radius: 10px; border: none;
  cursor: pointer; font-size: 12px; font-weight: 600;
  transition: opacity .15s;
}
.btn-vis:hover { opacity: .8; }
.vis-public  { background: rgba(88,166,255,.2); color: var(--blue); }
.vis-private { background: var(--bg3); color: var(--muted); }

/* Filtres publics builds */
.pub-filters {
  display: flex; gap: 10px; align-items: stretch;
  margin-bottom: 16px; flex-wrap: nowrap;
}
.pub-filters select,
.pub-filters .realm-select-wrap { flex: 1; min-width: 0; max-width: 220px; }
.pub-filters .realm-select-btn { width: 100%; }
.pub-filters > a.btn { flex: 0 0 auto; align-self: center; }

/* Bouton Charger → turquoise au survol */
.builds-table .btn-secondary:hover {
  background: #3ae3c5; color: #07241f; border-color: #3ae3c5;
}

.empty-msg { color: var(--muted); font-style: italic; padding: 20px 0; text-align: center; }

/* Mobile : filtres empilés */
@media (max-width: 600px) {
  .pub-filters { flex-wrap: wrap; }
  .pub-filters select,
  .pub-filters .realm-select-wrap { max-width: none; flex: 1 1 45%; }
}
