/* Fiche Joueur V1 — identité individuelle (ADN shell, personnalité distincte de la Fiche Club) */

.fj-sheet {
  min-width: 0;
  overflow-x: hidden;
}

.fj-hero {
  position: relative;
  margin: 0 0 14px;
  padding: 16px 14px 14px;
  border-radius: 22px;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  box-shadow: var(--m-shadow);
}

.fj-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.7), transparent);
  z-index: 2;
}

.fj-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.08);
  filter: saturate(0.95) contrast(1.08);
  pointer-events: none;
}

.fj-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, rgba(7, 11, 20, 0.35) 0%, rgba(7, 11, 20, 0.78) 58%, rgba(7, 11, 20, 0.94) 100%),
    radial-gradient(280px 140px at 100% 0%, rgba(250, 204, 21, 0.14), transparent 62%);
  pointer-events: none;
}

.fj-sheet[data-poste="G"] .fj-hero::after {
  background:
    linear-gradient(165deg, rgba(7, 11, 20, 0.32) 0%, rgba(20, 16, 8, 0.82) 100%),
    radial-gradient(280px 140px at 0% 100%, rgba(202, 138, 4, 0.22), transparent 65%);
}

.fj-hero-inner {
  position: relative;
  z-index: 1;
}

.fj-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.fj-poste-mark {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-family: var(--m-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

.fj-poste-mark.poste-G { background: #a16207; color: #fffbeb; }
.fj-poste-mark.poste-D { background: #1d4ed8; color: #eff6ff; }
.fj-poste-mark.poste-M { background: #15803d; color: #ecfdf5; }
.fj-poste-mark.poste-A { background: #b91c1c; color: #fef2f2; }

.fj-hero-id {
  min-width: 0;
}

.fj-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.fj-nom {
  margin: 0;
  font-family: var(--m-display);
  font-size: clamp(1.28rem, 5vw, 1.68rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.fj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 500;
}

.fj-niv {
  color: var(--m-gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fj-club {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.fj-club:active {
  border-color: rgba(147, 197, 253, 0.45);
}

@media (hover: hover) and (pointer: fine) {
  a.fj-club:hover {
    border-color: rgba(147, 197, 253, 0.4);
  }
}

.fj-club-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(7, 11, 20, 0.7);
  flex-shrink: 0;
}

.fj-club-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fj-club-nom {
  font-weight: 700;
  font-size: 0.92rem;
  color: #93c5fd;
}

.fj-div-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.38);
}

.fj-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 6px;
}

.fj-kpi-tile {
  padding: 10px 6px 9px;
  border-radius: 14px;
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  text-align: center;
}

.fj-kpi-tile--hl {
  border-color: rgba(250, 204, 21, 0.28);
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.1), rgba(30, 41, 59, 0.55));
}

.fj-kpi-tile--note .fj-kpi-v {
  color: var(--m-gold);
}

.fj-kpi-v {
  display: block;
  font-family: var(--m-display);
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.fj-kpi-k {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m-muted);
}

.fj-kpi-hint {
  margin: 0 0 16px;
  font-size: 0.72rem;
  color: var(--m-muted);
}

.fj-comp {
  position: relative;
  margin-bottom: 18px;
}

.fj-comp > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fj-tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.fj-tabbar label {
  text-align: center;
  padding: 8px 6px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--m-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--m-border);
  cursor: pointer;
}

.fj-panel {
  display: none;
}

.fj-panel .m-section-label {
  display: block;
  margin-top: 14px;
}

#fj-tab-champ:checked ~ .fj-tabbar label[for="fj-tab-champ"],
#fj-tab-coupe:checked ~ .fj-tabbar label[for="fj-tab-coupe"],
#fj-tab-total:checked ~ .fj-tabbar label[for="fj-tab-total"] {
  color: #0b1220;
  background: var(--m-gold);
  border-color: transparent;
}

#fj-tab-champ:checked ~ .fj-panel[data-p="champ"],
#fj-tab-coupe:checked ~ .fj-panel[data-p="coupe"],
#fj-tab-total:checked ~ .fj-panel[data-p="total"] {
  display: block;
}

.fj-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fj-stat {
  padding: 12px 8px 10px;
  border-radius: var(--m-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--m-border);
  text-align: center;
}

.fj-stat--hl {
  border-color: rgba(59, 130, 246, 0.28);
}

.fj-sheet[data-poste="G"] .fj-stat--hl {
  border-color: rgba(250, 204, 21, 0.28);
}

.fj-stat-v {
  display: block;
  font-family: var(--m-display);
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fj-stat--note .fj-stat-v {
  color: var(--m-gold);
}

.fj-stat-k {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m-muted);
}

.fj-ranks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.fj-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--m-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--m-border);
}

.fj-rank-label {
  font-weight: 650;
  font-size: 0.9rem;
}

.fj-rank-pos {
  font-family: var(--m-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--m-gold);
  letter-spacing: -0.03em;
}

@media (max-width: 380px) {
  .fj-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
