/* ═══════════════════════════════════════════════════════════════════
   FootActu — Design enrichi fiches entités (joueur, équipe, etc.)
   Inspiré Foot Mercato / FlashScore — Mobile-first
═══════════════════════════════════════════════════════════════════ */

/* ── HERO entité : fond bleu dégradé, photo grande ────────────────── */
.fa-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 20px 0 0;
  position: relative;
  overflow: hidden;
}
.fa-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(255,255,255,.06), transparent 40%);
  pointer-events: none;
}
.fa-hero .fa-wrap { position: relative; z-index: 1; }

/* Fil d'Ariane sur hero */
.fa-hero-bc {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: rgba(255,255,255,.8);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.fa-hero-bc a { color: rgba(255,255,255,.85); transition: color .15s; }
.fa-hero-bc a:hover { color: #fff; }
.fa-hero-bc span.sep { color: rgba(255,255,255,.5); }

/* Identité — photo + nom */
.fa-hero-identity {
  display: flex; gap: 16px; align-items: flex-end;
  padding-bottom: 18px;
}
.fa-hero-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 3px solid rgba(255,255,255,.25);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.fa-hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.fa-hero-photo.team {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}
.fa-hero-photo.team img {
  object-fit: contain;
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.fa-hero-info { flex: 1; min-width: 0; padding-bottom: 4px; }
.fa-hero-name {
  font-size: 22px; font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.15;
  margin-bottom: 8px;
  color: #fff;
}
.fa-hero-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255,255,255,.9);
}
.fa-hero-meta a {
  color: rgba(255,255,255,.95);
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600;
}
.fa-hero-meta a:hover { color: #fff; text-decoration: underline; }
.fa-hero-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  display: inline-block;
}
.fa-hero-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}
.fa-hero-badge.injured {
  background: #dc2626;
  color: #fff;
}

/* ── BANDE MÉTRIQUES PRINCIPALES (sous hero) ──────────────────────── */
.fa-hero-kpis {
  display: flex;
  background: rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.12);
  margin: 0 -16px;
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fa-hero-kpis::-webkit-scrollbar { display: none; }

.fa-hero-kpi {
  flex: 0 0 auto;
  padding: 14px 18px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.1);
  min-width: 78px;
}
.fa-hero-kpi:last-child { border-right: none; }
.fa-hero-kpi-val {
  display: block;
  font-size: 22px; font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.4px;
}
.fa-hero-kpi-lbl {
  display: block;
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
}

/* ── SECTIONS STATS (style Foot Mercato) ──────────────────────────── */
.fa-stat-section {
  margin-bottom: 20px;
}
.fa-stat-section-title {
  display: flex; align-items: center;
  gap: 8px;
  padding: 0 2px;
  margin-bottom: 10px;
}
.fa-stat-section-title h3 {
  font-size: 15px; font-weight: 800;
  color: var(--ink);
  letter-spacing: -.2px;
  margin: 0;
}
.fa-stat-section-title .accent-bar {
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

/* Liste stats horizontales (1 stat par ligne, like FM) */
.fa-stat-list {
  background: var(--surface);
  border-radius: var(--r12);
  overflow: hidden;
  border: 1px solid var(--border);
}
.fa-stat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.fa-stat-item:last-child { border-bottom: none; }
.fa-stat-item-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  color: var(--ink2);
  font-weight: 500;
}
.fa-stat-item-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--accent-bg);
  color: var(--accent);
  flex-shrink: 0;
}
.fa-stat-item-value {
  font-size: 15px; font-weight: 800;
  color: var(--ink);
  letter-spacing: -.2px;
}
.fa-stat-item-value.good { color: var(--green); }
.fa-stat-item-value.bad { color: var(--live); }
.fa-stat-item-value.muted { color: var(--ink3); font-weight: 600; }

/* Barre de progression inline (pour taux, pourcentage) */
.fa-stat-bar {
  display: inline-flex; align-items: center; gap: 10px;
}
.fa-stat-bar-track {
  width: 80px; height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.fa-stat-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .3s;
}
.fa-stat-bar-fill.green { background: var(--green); }
.fa-stat-bar-fill.amber { background: var(--amber); }

/* ── GRILLE DE KPI (2 ou 4 colonnes) ──────────────────────────────── */
.fa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
@media (min-width: 680px) {
  .fa-kpi-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.fa-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  padding: 14px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.fa-kpi-card .fa-kpi-card-val {
  display: block;
  font-size: 26px; font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.fa-kpi-card .fa-kpi-card-lbl {
  display: block;
  font-size: 10.5px; font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.fa-kpi-card .fa-kpi-card-sub {
  display: block;
  font-size: 10.5px;
  color: var(--ink4);
  margin-top: 2px;
}

/* Accent colors on KPI cards */
.fa-kpi-card.win {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-color: #d1fae5;
}
.fa-kpi-card.win .fa-kpi-card-val { color: var(--green); }
.fa-kpi-card.lose {
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
  border-color: #fecaca;
}
.fa-kpi-card.lose .fa-kpi-card-val { color: var(--live); }
.fa-kpi-card.accent {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  border-color: #bfdbfe;
}
.fa-kpi-card.accent .fa-kpi-card-val { color: var(--accent); }

/* ── TABLEAU DOMICILE/EXTÉRIEUR ───────────────────────────────────── */
.fa-he-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  overflow: hidden;
  margin-bottom: 16px;
}
.fa-he-header {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) repeat(6, 1fr);
  background: var(--bg);
  padding: 10px 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 1px solid var(--border);
}
.fa-he-header > div {
  text-align: center;
  padding: 0 4px;
}
.fa-he-header > div:first-child { text-align: left; padding-left: 14px; }
.fa-he-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) repeat(6, 1fr);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
}
.fa-he-row:last-child { border-bottom: none; }
.fa-he-row > div {
  text-align: center;
  padding: 0 4px;
  font-weight: 700;
  color: var(--ink);
}
.fa-he-row > div:first-child {
  text-align: left;
  padding-left: 14px;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink2);
}
.fa-he-row.total {
  background: var(--bg);
  font-weight: 800;
}
.fa-he-row .win { color: var(--green); }
.fa-he-row .lose { color: var(--live); }
.fa-he-row .muted { color: var(--ink3); font-weight: 600; }

/* ── CARTES DISCIPLINE ────────────────────────────────────────────── */
.fa-discipline-row {
  display: flex; gap: 8px;
  margin-bottom: 16px;
}
.fa-card-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  padding: 14px 10px;
  text-align: center;
  position: relative;
}
.fa-card-card .visual {
  display: inline-block;
  width: 22px; height: 30px;
  border-radius: 2px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.fa-card-card.yellow .visual { background: #fbbf24; }
.fa-card-card.yellowred .visual { background: linear-gradient(135deg, #fbbf24 0% 50%, #dc2626 50% 100%); }
.fa-card-card.red .visual { background: #dc2626; }
.fa-card-card-val {
  display: block;
  font-size: 22px; font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.fa-card-card-lbl {
  display: block;
  font-size: 10px; font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: .3px;
}

/* ── FORM DOTS (reprend et améliore le composant existant) ────────── */
.fa-form {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.fa-form-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px; font-weight: 800;
  line-height: 1;
}
.fa-form-dot.W { background: var(--green); }
.fa-form-dot.D { background: var(--ink3); }
.fa-form-dot.L { background: var(--live); }

/* ── TABLEAU COMPÉTITIONS (joueur) ────────────────────────────────── */
.fa-comp-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  overflow: hidden;
  overflow-x: auto;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.fa-comp-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 520px;
}
.fa-comp-table thead th {
  padding: 10px 8px;
  background: var(--bg);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .3px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.fa-comp-table thead th:first-child { text-align: left; padding-left: 14px; }
.fa-comp-table tbody td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.fa-comp-table tbody td:first-child {
  text-align: left; padding-left: 14px;
  font-weight: 600; color: var(--ink);
}
.fa-comp-table tbody tr:last-child td { border-bottom: none; }
.fa-comp-table .comp-name {
  display: flex; align-items: center; gap: 8px;
}
.fa-comp-table .comp-name img {
  width: 20px; height: 20px; object-fit: contain;
}
.fa-comp-table .goal-hi { color: var(--green); font-weight: 800; }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .fa-hero-photo { width: 80px; height: 80px; }
  .fa-hero-name { font-size: 19px; }
  .fa-hero-kpi { padding: 12px 14px; min-width: 68px; }
  .fa-hero-kpi-val { font-size: 19px; }
  .fa-kpi-card { padding: 12px 8px; }
  .fa-kpi-card .fa-kpi-card-val { font-size: 22px; }
  .fa-he-header, .fa-he-row { font-size: 11px; }
  .fa-he-row > div:first-child { padding-left: 10px; }
}
@media (min-width: 768px) {
  .fa-hero { padding-top: 28px; }
  .fa-hero-photo { width: 110px; height: 110px; }
  .fa-hero-name { font-size: 28px; }
  .fa-hero-kpi-val { font-size: 24px; }
  .fa-kpi-card .fa-kpi-card-val { font-size: 30px; }
}
