/* ====================================================
   Arms — Page Connexion
   ==================================================== */

.auth-wrap {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}
.auth-card { padding: 40px 36px; }
.auth-icon {
  width: 56px; height: 56px;
  margin: 0 auto 22px;
  border-radius: 16px;
  background: rgba(var(--c-secondary-rgb), 0.1);
  border: 1px solid rgba(var(--c-secondary-rgb), 0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-red-glow);
}
.auth-icon svg { width: 26px; height: 26px; }
.auth-card h2 { font-size: 22px; margin-bottom: 10px; }
.auth-card p { color: var(--c-text-dim); font-size: 14px; line-height: 1.6; margin-bottom: 28px; }

.btn-twitch {
  width: 100%;
  background: #9146FF;
  color: #fff;
}
.btn-twitch:hover { background: #a06aff; box-shadow: 0 0 24px rgba(145,70,255,0.35); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0;
  color: var(--c-text-dim);
  font-size: 12px;
  font-family: var(--f-mono);
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--c-border-strong);
}

.discord-link-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 14px 18px;
}
.discord-link-row .label { font-size: 13.5px; color: var(--c-text-muted); display:flex; align-items:center; gap:10px;}
.link-status { font-family: var(--f-mono); font-size: 11.5px; padding: 4px 10px; border-radius: var(--r-pill); }
.link-status.linked { background: rgba(61,220,132,0.1); color: var(--c-green-live); }
.link-status.unlinked { background: rgba(255,255,255,0.05); color: var(--c-text-dim); }

/* ---------- Grille de plusieurs cartes profil ---------- */
.profile-wrap { max-width: 60rem; }
.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: start;
}
.profile-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(88,101,242,0.12);
  color: #8ea1ff;
}
.profile-server-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.profile-server-row img {
  width: 48px; height: 48px;
  border-radius: 50%;
}
.profile-server-meta { font-size: 13px; color: var(--c-text-dim); }
.profile-server-meta strong { color: var(--c-text); }

/* ---------- Bannière + avatar (+ décoration) Discord ---------- */
/* Bleed la bannière jusqu'aux bords de la carte (.auth-card a un padding
   de 40px 36px) — l'avatar chevauche ensuite le bas de la bannière comme
   sur un profil Discord natif. */
.profile-banner {
  height: 84px;
  margin: -8px -36px 0;
  background-size: cover;
  background-position: center;
}
.profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: -32px 0 14px 4px;
}
.profile-avatar-wrap.no-banner { margin-top: 6px; }
.profile-avatar-wrap .profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid var(--c-surface);
  display: block;
  position: relative;
  z-index: 1;
}
.profile-avatar-wrap .profile-avatar-decoration {
  position: absolute;
  top: -10px; left: -10px;
  width: 92px; height: 92px;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Liste des rôles du serveur ---------- */
.profile-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--role-color) 16%, transparent);
  color: var(--role-color);
  border: 1px solid color-mix(in srgb, var(--role-color) 35%, transparent);
}
.profile-role-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--role-color);
  flex-shrink: 0;
}
.profile-role-pill.has-image::before {
  display: none;
}
.profile-role-pill-img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------- Badges du site (icône seule + tooltip custom au survol) ---------- */
/* Contrairement à .profile-role-pill (rôles Discord, avec texte visible),
   un badge du site n'affiche que son image/emoji : son label n'apparaît
   qu'au survol, via le tooltip personnalisé partagé défini dans tokens.css
   (attribut title + rendu CSS ::after — pas la bulle native du navigateur). */
.profile-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--role-color) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-color) 40%, transparent);
  font-size: 15px;
  line-height: 1;
  cursor: default;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.profile-badge-icon:hover {
  transform: translateY(-2px);
  border-color: var(--role-color);
}
.profile-badge-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Carte "Compte" Twitch, style adapté du composant Uiverse
   "old-eagle-40" (MuhammadHasann) : https://uiverse.io/MuhammadHasann/old-eagle-40
   Structure d'origine = carte produit (image / titre / tailles / prix /
   bouton panier) ; réutilisée ici en remplaçant chaque bloc par son
   équivalent "statuts de compte Twitch" (avatar / pseudo / statuts
   abonné-VIP-modérateur / ancienneté du compte / lien vers la chaîne).
   Palette violette/sombre d'origine conservée à l'identique. ---------- */
.twitch-card {
  --bg-card: #27272a;
  --primary: #6d28d9;
  --primary-800: #4c1d95;
  --primary-shadow: #2e1065;
  --light: #d9d9d9;
  --zinc-800: #18181b;
  --bg-linear: linear-gradient(0deg, var(--primary) 50%, var(--light) 125%);

  background-color: var(--bg-card) !important;
  border-color: var(--primary-shadow) !important;
  text-align: left;
  padding: 22px !important;
}

.twitch-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.twitch-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--primary-800);
  overflow: hidden;
}

.twitch-card-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.twitch-card-name {
  min-width: 0;
}

.twitch-card-name .twitch-card-title {
  overflow: clip;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--light);
  text-wrap: nowrap;
  text-overflow: ellipsis;
}

.twitch-card-name .twitch-card-username {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--light) 65%, transparent);
}

.twitch-card-stats-label {
  font-size: 0.75rem;
  color: var(--light);
}

.twitch-card-stat-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  list-style: none;
}

.twitch-card-stat {
  cursor: default;
  padding: 0.4rem 0.7rem;
  background-color: var(--zinc-800);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--light);
  border: 2px solid var(--zinc-800);
  border-radius: 0.3rem;
  transition: all 0.3s ease-in-out;
}

.twitch-card-stat.is-active {
  background-color: var(--primary);
  border: 2px solid var(--primary-shadow);
  box-shadow: inset 0px 1px 4px var(--primary-shadow);
}

.twitch-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}

.twitch-card-meta {
  min-width: 0;
}

.twitch-card-meta span {
  display: block;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--light) 65%, transparent);
}

.twitch-card-meta strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--light);
}

.twitch-card-action {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  background-image: var(--bg-linear);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--light);
  text-decoration: none;
  text-wrap: nowrap;
  border: 2px solid hsla(262, 83%, 58%, 0.5);
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0.25rem 1px var(--light);
  flex-shrink: 0;
}

.twitch-card-action svg {
  width: 1rem;
  height: 1rem;
}

.twitch-card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--light) 15%, transparent);
}

.twitch-card-footer .profile-role-list,
.twitch-card-footer .profile-badge-list {
  margin-bottom: 12px;
}

.twitch-card-role-line {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--light) 65%, transparent);
  margin-bottom: 12px;
}
