/* ═══════════════════════════════════════════════════════════════════
   TEMPLATES — Pages entités et articles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero entity (joueur, entraîneur) ──────────────────────────── */
.fat-hero {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0;
}
.fat-hero-wrap { padding: 16px 0 0; }
.fat-hero-inner {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding-bottom: 0;
}
.fat-hero-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-100);
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.fat-hero-photo-ph {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--gray-500);
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.fat-hero-body { flex: 1; min-width: 0; padding-bottom: 14px; }
.fat-hero-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.fat-hero-name {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.4px;
  color: var(--ink);
  margin-bottom: 8px;
}
.fat-hero-name span {
  font-weight: 400;
  font-size: 18px;
  color: var(--gray-500);
  display: block;
}
.fat-hero-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fat-hero-club-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  transition: color var(--t);
}
.fat-hero-club-link:hover { color: var(--accent); }
.fat-hero-club-link img { width: 18px; height: 18px; object-fit: contain; }

/* Stats strip */
.fat-stats-strip {
  display: flex;
  background: var(--ink);
}
.fat-stats-strip-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-right: 1px solid rgba(255,255,255,.07);
}
.fat-stats-strip-item:last-child { border-right: none; }
.fat-stats-strip-n {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -.4px;
}
.fat-stats-strip-n.g { color: #4ade80; }
.fat-stats-strip-n.r { color: #f87171; }
.fat-stats-strip-l {
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 3px;
  white-space: nowrap;
}

/* ── Hero team / league ────────────────────────────────────────── */
.fat-hero-team {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
}
.fat-hero-team-inner { display: flex; gap: 14px; align-items: center; }
.fat-hero-team-logo { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.fat-hero-team-name { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.fat-hero-team-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }

/* ── Info list ─────────────────────────────────────────────────── */
.fat-info-list { }
.fat-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.fat-info-row:last-child { border-bottom: none; }
.fat-info-icon {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  flex-shrink: 0;
}
.fat-info-lbl { font-size: 11px; color: var(--gray-400); margin-bottom: 1px; }
.fat-info-val { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.fat-info-val a { color: var(--accent); }

/* ── Stats detail grid ─────────────────────────────────────────── */
.fat-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-200);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.fat-sg-item {
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  text-align: center;
}
.fat-sg-num { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.4px; }
.fat-sg-num.g { color: var(--green); }
.fat-sg-num.r { color: var(--accent); }
.fat-sg-lbl { font-size: 9.5px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .3px; margin-top: 4px; }

/* ── Effectif / joueurs ────────────────────────────────────────── */
.fat-effectif-pos {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  padding: 10px 14px 5px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

/* ── Standings ─────────────────────────────────────────────────── */
.fat-standings-wrap { overflow-x: auto; }
.fat-standings-table { min-width: 480px; }
.fat-standings-table .rank { font-weight: 700; color: var(--gray-400); }
.fat-standings-table .team-cell { display: flex; align-items: center; gap: 7px; min-width: 130px; }
.fat-standings-table .team-cell img { width: 16px; height: 16px; object-fit: contain; }
.fat-standings-table .pts { font-weight: 800; font-size: 14px; color: var(--ink); }
.fat-row-cl  td:first-child { border-left: 3px solid var(--blue); }
.fat-row-el  td:first-child { border-left: 3px solid var(--amber); }
.fat-row-rel td:first-child { border-left: 3px solid var(--accent); }

/* ── Career (coach) ────────────────────────────────────────────── */
.fat-career-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.fat-career-row:last-child { border-bottom: none; }
.fat-career-dates { font-size: 11px; color: var(--gray-400); min-width: 80px; flex-shrink: 0; }
.fat-career-club  { display: flex; align-items: center; gap: 8px; flex: 1; }
.fat-career-club-name { font-size: 14px; font-weight: 600; }
.fat-career-current { font-size: 10px; font-weight: 700; color: var(--green); background: #dcfce7; padding: 2px 7px; border-radius: var(--r-xs); }

/* ── Article single ────────────────────────────────────────────── */
.fat-article-hd { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 18px 0 14px; }
.fat-article-cat { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.fat-article-title { font-family: var(--font-display); font-size: 26px; line-height: 1.2; color: var(--ink); letter-spacing: -.3px; margin-bottom: 10px; }
.fat-article-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-400); flex-wrap: wrap; }
.fat-article-sep { width: 2px; height: 2px; border-radius: 50%; background: var(--gray-300); flex-shrink: 0; }
.fat-article-entities { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0 0; border-top: 1px solid var(--gray-100); margin-top: 10px; }
.fat-article-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-md); margin: 16px 0; background: var(--gray-100); }

/* ── Archive header ────────────────────────────────────────────── */
.fat-arch-hd { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 14px 0; }
.fat-arch-hd-inner { display: flex; align-items: center; gap: 12px; }
.fat-arch-icon { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-bg); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.fat-arch-title { font-size: 22px; font-weight: 800; color: var(--ink); }
.fat-arch-count { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ── Homepage hero ─────────────────────────────────────────────── */
.fat-home-hero {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .fat-hero-photo, .fat-hero-photo-ph { width: 68px; height: 68px; }
  .fat-hero-name { font-size: 20px; }
  .fat-article-title { font-size: 20px; }
  .fat-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .fat-stats-strip-n { font-size: 20px; }
  .fat-hero-team-logo { width: 48px; height: 48px; }
  .fat-hero-team-name { font-size: 19px; }
}

/* ── À lire aussi — cards scroll horizontal ─────────────────────── */
.fa-related { margin-top: 28px; }

.fa-related-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.fa-related-scroll::-webkit-scrollbar { display: none; }

.fa-related-card {
  flex-shrink: 0;
  width: 180px;
  background: var(--surface);
  border-radius: var(--r12);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.fa-related-card:active {
  transform: scale(.98);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.fa-related-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.fa-related-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .2s ease;
}
.fa-related-card:hover .fa-related-img img { transform: scale(1.03); }
.fa-related-img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink4); background: var(--bg);
}

.fa-related-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.fa-related-cat  {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--accent);
}
.fa-related-title {
  font-size: 13px; font-weight: 700; line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.fa-related-meta {
  font-size: 11px; color: var(--ink4);
  margin-top: 4px;
}

/* Desktop : cards un peu plus larges */
@media (min-width: 768px) {
  .fa-related-card { width: 210px; }
  .fa-related-scroll { margin-right: 0; }
}

/* ── Pied d'article — un seul séparateur, mobile first ──────────── */

/*
  Structure :
  ┌─────────────────────────────────────────┐ ← border-top unique
  │  Dates (pub / MAJ)                      │
  │  Tags (entités)                         │
  │  Boutons de partage                     │
  └─────────────────────────────────────────┘
  Pas de border entre sections — espace vertical suffit.
*/

.fa-art-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Dates */
.fa-art-dates {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  font-size: 11.5px; color: var(--ink3);
}
.fa-art-dates time    { font-weight: 600; color: var(--ink2); }
.fa-art-dates-dot     { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .4; flex-shrink: 0; }

/* Tags */
.fa-art-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fa-art-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px; font-weight: 500; color: var(--ink2);
  text-decoration: none; transition: border-color .15s, color .15s;
}
.fa-art-tag:hover   { border-color: var(--accent); color: var(--accent); }
.fa-art-tag img     { width: 16px; height: 16px; border-radius: 2px; object-fit: contain; }

/* Partage — mobile first : boutons pleine largeur */
.fa-art-share { display: flex; flex-direction: column; gap: 8px; }
.fa-art-share-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink3);
}
.fa-art-share-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fa-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 14px; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.fa-share-btn:active { transform: scale(.96); opacity: .8; }
.fa-share-x    { background: #000;      color: #fff; }
.fa-share-fb   { background: #1877f2;   color: #fff; }
.fa-share-wa   { background: #25d366;   color: #fff; }
.fa-share-copy { background: var(--bg); color: var(--ink); border: 1px solid var(--border); }

/* Desktop : boutons en ligne, taille naturelle */
@media (min-width: 640px) {
  .fa-art-share        { flex-direction: row; align-items: center; }
  .fa-art-share-label  { flex-shrink: 0; }
  .fa-art-share-btns   { grid-template-columns: repeat(4, auto); }
  .fa-share-btn        { padding: 9px 16px; font-size: 12px; }
}

/* ── Pages entités (équipe, joueur, championnat) ─────────────────── */

/* En-tête */
.fa-ent-hd {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0 16px;
}
.fa-ent-bc {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--ink3);
  margin-bottom: 14px; flex-wrap: wrap;
}
.fa-ent-bc a { color: var(--ink3); text-decoration: none; }
.fa-ent-bc a:hover { color: var(--accent); }

.fa-ent-identity {
  display: flex; align-items: center; gap: 14px;
}
.fa-ent-logo {
  width: 60px; height: 60px;
  object-fit: contain; flex-shrink: 0;
  border-radius: var(--r8);
}
.fa-ent-logo-ph {
  width: 60px; height: 60px;
  background: var(--bg); border-radius: var(--r8);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink3); flex-shrink: 0;
}
.fa-ent-name {
  font-size: 22px; font-weight: 800; color: var(--ink);
  letter-spacing: -.3px; margin: 0 0 5px;
  line-height: 1.2;
}
.fa-ent-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink3);
}
.fa-ent-league {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); text-decoration: none; font-size: 12px;
}

/* Stats bar scrollable */
.fa-ent-stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.fa-ent-stats-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fa-ent-stats-scroll::-webkit-scrollbar { display: none; }
.fa-ent-stat {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 12px 20px;
  border-right: 1px solid var(--border);
  flex-shrink: 0; min-width: 70px;
  text-align: center;
}
.fa-ent-stat:last-child { border-right: none; }
.fa-ent-stat strong { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; }
.fa-ent-stat span { font-size: 10.5px; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; margin-top: 1px; }
.fa-ent-stat--win strong { color: #16a34a; }
.fa-ent-stat--loss strong { color: #dc2626; }

/* Onglets */
.fa-ent-tabs-wrap {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky; top: var(--nav-h); z-index: 50;
}
.fa-ent-tabs {
  display: flex; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.fa-ent-tabs::-webkit-scrollbar { display: none; }
.fa-ent-tab {
  padding: 13px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--ink3); text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px; flex-shrink: 0;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.fa-ent-tab:hover { color: var(--ink); }
.fa-ent-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Bloc SEO text */
.fa-seo-text {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.fa-seo-h2 {
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px; letter-spacing: -.2px;
}
.fa-seo-p {
  font-size: 13.5px; color: var(--ink2); line-height: 1.65;
  margin: 0 0 16px;
}
.fa-seo-text .fa-seo-h2:not(:first-child) { margin-top: 16px; }

/* Scroll full-width sur mobile uniquement (pas de sidebar) */
@media (max-width: 767px) {
  .fa-related-scroll--full {
    margin-left: calc(-1 * var(--pad));
    margin-right: calc(-1 * var(--pad));
    padding-left: var(--pad);
    padding-right: var(--pad);
  }
}

/* Vide */
.fa-empty {
  padding: 32px 0;
  text-align: center;
  font-size: 14px; color: var(--ink3);
}

/* ── Badge notification onglets ─────────────────────────────────── */
.fa-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px;
  background: var(--accent);
  color: #fff;
  font-size: 9px; font-weight: 700; line-height: 17px;
  border-radius: 20px;
  margin-left: 5px;
  vertical-align: middle;
  box-sizing: border-box;
  text-align: center;
}

/* ── Carrière entraîneur ─────────────────────────────────────────── */
.fa-career-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.fa-career-row:first-child { padding-top: 14px; }
.fa-career-row:last-child { padding-bottom: 14px; }
.fa-career-row:last-child { border-bottom: none; }
.fa-career-img {
  flex-shrink: 0; width: 34px; display: flex; justify-content: center;
}
.fa-career-img img { width: 30px; height: 30px; object-fit: contain; }
.fa-career-info { flex: 1; min-width: 0; }
.fa-career-team {
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.fa-career-team a { color: var(--ink); text-decoration: none; }
.fa-career-team a:hover { color: var(--accent); }
.fa-career-period {
  font-size: 11.5px; color: var(--ink3); margin-top: 2px;
}

/* Placeholder écusson carrière quand logo absent */
.fa-career-img-ph {
  width: 30px; height: 30px;
  background: var(--bg);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink3);
  flex-shrink: 0;
}

/* ── Sub-headers dans onglets stats ────────────────────────────────── */
.fa-sh-sub {
  font-size: 11px; font-weight: 700;
  color: var(--ink3); text-transform: uppercase;
  letter-spacing: .4px;
  margin: 14px 2px 8px;
}

/* ── Tuiles stats enrichies ───────────────────────────────────────── */
.fa-stat-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px 8px; text-align: center;
  background: var(--surface);
  min-height: 64px;
}
.fa-stat-val {
  font-size: 20px; font-weight: 800;
  color: var(--ink); line-height: 1;
  letter-spacing: -.3px;
}
.fa-stat-lbl {
  font-size: 9.5px; font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase; letter-spacing: .3px;
  margin-top: 4px;
}
.fa-stat-tile--win .fa-stat-val { color: #16a34a; }
.fa-stat-tile--lose .fa-stat-val { color: #dc2626; }
.fa-stat-tile--accent .fa-stat-val { color: var(--accent); }

/* La grille fa-stats-grid existe déjà dans main.css mais on s'assure du bon rendu */
.fa-stats-grid + .fa-stat-tile,
.fa-stats-grid .fa-stat-tile { background: var(--surface); }
