/* =========================
   Layout général
   ========================= */
.wrap{
  max-width:1100px;
  margin:18px auto 64px;
  padding:0 12px;
}
.note{
  color:#64748b;
  font-size:12px;
  margin:6px 0 16px;
}

/* =========================
   Boutons / contrôles
   ========================= */
.controls{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin:6px 0 14px;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border:1px solid #dfe5f2;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{
  background:#f7f9ff;
}

/* =========================
   Grille de cartes joueurs
   ========================= */
.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
@media (max-width:1024px){
  .grid{
    grid-template-columns:repeat(2,1fr);
  }
}
@media (max-width:640px){
  .grid{
    grid-template-columns:1fr;
  }
}

.card{
  --accent:#1a2c5e;
  --acR:26;
  --acG:44;
  --acB:94;
  position:relative;
  overflow:hidden;
  border:1px solid #e7eaf2;
  border-radius:16px;
  background:#fff;
  transition:transform .15s ease,border-color .15s ease,box-shadow .2s ease;
}
.card:hover::after{
  opacity: .32;
  transform:
    translate(10px, 10px)
    rotate(-18deg)
    scale(1.18);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.25));
}
.card::after{
  content:"";
  position:absolute;
  right:-60px;
  bottom:-60px;
  width:260px;
  height:260px;
  background-image:var(--team-logo,none);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  opacity:.16;
  filter:grayscale(30%);
  mix-blend-mode:multiply;
  pointer-events:none;
  transform:rotate(-2deg) scale(1);
  transition:opacity .3s ease,transform .3s ease;
}
.card:hover::after{
  opacity:.22;
  transform:rotate(-4deg) scale(1.06);
}

/* Bandeau équipe/nom */
.stripe{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 12px 8px 14px;
  color:#fff;
  border-top-left-radius:16px;
  border-top-right-radius:16px;
  background:linear-gradient(
    90deg,
    rgba(var(--acR),var(--acG),var(--acB),.95) 0%,
    rgba(var(--acR),var(--acG),var(--acB),.60) 70%,
    rgba(var(--acR),var(--acG),var(--acB),0) 100%
  );
}
.name{
  flex:1 1 auto;
  min-width:0;
  font-weight:900;
  font-size:16px;
  line-height:1.1;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  text-overflow:ellipsis;
}
.stripe .name{
  font-size:20px;
  text-align:left;
  margin-left:6px;
}
.stripe-right{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
}
.stripe-logo{
  height:50px;
  width:auto;
  object-fit:contain;
}

/* Corps de carte : portrait + stats */
.card .row{
  position:relative;
  display:flex;
  align-items:stretch;
  min-height:172px;
  padding:12px 14px;
  overflow:hidden;
}
.card .hs-wrap{
  position:absolute;
  left:-10px;
  bottom:6px;
  top:6px;
  width:44%;
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  pointer-events:none;
}
.card .hs{
  height:80%;
  width:auto;
  max-width:none;
  object-fit:contain;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.12));
  border:0;
  border-radius:0;
  background:transparent;
}
.card .stats{
  position:absolute;
  right:10px;
  top:12px;
  bottom:12px;
  left:40%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
  z-index:2;
  padding:0 4px;
  overflow:hidden;
}
.card .line{
  display:grid;
  align-items:start;
}
.card .line.l2{
  grid-template-columns:repeat(2,1fr);
}
.card .line.l3{
  grid-template-columns:repeat(5,1fr);
  column-gap:8px;
  justify-items:center;
}
.card .line.l3 .stat{
  position:relative;
  padding:0 4px;
  text-align:center;
  min-width:0;
}
.card .line.l3 .stat:not(:first-child)::before{
  content:"";
  position:absolute;
  left:0;
  top:4px;
  bottom:4px;
  width:1px;
  background:rgba(15,23,42,.25);
}
.card .stat .label{
  font-size:10px;
  color:#64748b;
  font-weight:700;
  line-height:1.1;
  text-transform:uppercase;
  display:block;
}
.card .stat .val{
  font-size:15px;
  font-weight:900;
  line-height:1.1;
  font-variant-numeric:tabular-nums;
}

/* Badge mini (V-D, saison...) */
.badge-mini{
  font-size:11px;
  font-weight:700;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.35);
  background:rgba(0,0,0,.12);
  color:#fff;
  white-space:nowrap;
}

/* Reset liens sur la page joueurs */
.page-players a,
.page-players a:visited,
.page-players a:hover,
.page-players a:active{
  text-decoration:none;
  color:inherit;
}
.page-players a.card,
.page-players a.card *{
  text-decoration:none !important;
}
.page-players a:focus{
  outline:2px solid #8ab4f8;
  outline-offset:2px;
}

/* =========================
   Tableau récapitulatif
   ========================= */
.panel{
  border:1px solid #e7eaf2;
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  margin-top:18px;
}
.panel header{
  padding:12px 14px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.tbl{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
  padding:0 12px 12px;
}
.tbl thead th{
  font:12px/1.2 var(--font);
  color:#475569;
  text-align:left;
  padding:6px 8px;
}
.tbl thead th.td-right{
  text-align:right;
}
.tbl tbody tr{
  background:#f8fafc;
  border-radius:10px;
  cursor:pointer;
}
.tbl tbody tr:hover{
  background:#eef4ff;
}
.tbl tbody td{
  padding:8px 8px;
  vertical-align:middle;
}
.tbl tbody td.td-right{
  text-align:right;
}
.tbl tbody td:nth-child(2){
  text-align:left;
}
.badge{
  display:inline-block;
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid #e3e8f1;
  background:#fff;
  color:#0f172a;
}
.avatar{
  width:28px;
  height:28px;
  border-radius:6px;
  object-fit:cover;
  background:#fff;
  border:1px solid #e6eaf3;
}
.logo-sm{
  width:22px;
  height:22px;
  object-fit:contain;
  vertical-align:middle;
  margin-right:6px;
}

/* =========================
   Détail joueur (hero)
   ========================= */
.hero{
  position:relative;
  border:1px solid #e7eaf2;
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.hero::after{
  content:"";
  position:absolute;
  right:-120px;
  bottom:-120px;
  width:520px;
  height:520px;
  background-image:var(--team-logo,none);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  opacity:.14;
  filter:grayscale(30%);
  mix-blend-mode:multiply;
  pointer-events:none;
  transform:rotate(-4deg) scale(1.02);
}

/* ===== Fiche joueur : portrait XL ===== */

.hero-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 26px;
  align-items: flex-start;       /* Décale le portrait un peu plus haut */
  margin-top: 10px;
}

/* Conteneur du portrait */
.hero .hs-wrap {
  width: 230px;
  height: 230px;
  flex: none;
  margin-top: -10px;            /* petit effet visuel "remonté" */
}

/* Portrait */
.hero .hs {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

/* Version mobile */
@media (max-width: 768px) {
  .hero-body {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .hero .hs-wrap {
    width: 170px;
    height: 170px;
    margin-top: 0;
  }
}
.hero .kpis{
  position:static;
}

.hero .stripe{
  height:68px;
}
.hero .stripe-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
}
.hero .left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.hero .right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}


/* KPIs */
.kpis{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.kpis-row{
  display:grid;
  gap:10px;
}
.kpis-row--7{
  grid-template-columns:repeat(7,minmax(0,1fr));
}
.kpis-row--6{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.kpi{
  background:#f8fafc;
  border:1px solid #e6eaf3;
  border-radius:12px;
  padding:10px 12px;
}
.kpi .t{
  font-size:12px;
  color:#64748b;
}
.kpi .v{
  font-size:22px;
  font-weight:900;
}

/* Tables du hero */
table.byyear{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
  margin-top:8px;
}
table.byyear thead th{
  font:12px/1.2 var(--font);
  color:#475569;
  text-align:left;
  padding:6px 10px;
}
table.byyear tbody tr{
  background:#f9fbff;
  border-radius:12px;
}
table.byyear td{
  padding:8px 10px;
}
table.byyear .pts{
  color:#0f172a;
}

table.clean{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
  margin-top:8px;
}
table.clean thead th{
  font:12px/1.2 var(--font);
  color:#475569;
  text-align:left;
  padding:6px 10px;
}
table.clean tbody tr{
  background:#f8fafc;
  border-radius:10px;
}
table.clean td{
  padding:8px 10px;
  vertical-align:middle;
}
td.num{
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.wl{
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid;
  font-weight:700;
}
.wl.w{
  color:#0a7a0a;
  border-color:#b7e3b7;
  background:#effaf0;
}
.wl.l{
  color:#a11a1a;
  border-color:#f0c2c2;
  background:#fff2f2;
}

/* Onglet "Joueurs" actif */
.page-players .main-tabs a.active,
.page-players .main-tabs a.active:hover,
.page-players .main-tabs a.active:focus{
  color:#fff !important;
}

/* Bouton retour au tableau : harmonisation */
.page-players .controls .btn{
  font-size:14px;
  line-height:1.1;
  padding:8px 12px;
}

/* KPIs hero : pas de retour à la ligne foireux */
.hero .kpi .v{
  white-space:nowrap;
  word-break:normal;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:center;
}
.hero .kpi .t{
  white-space:nowrap;
  text-align:center;
}

/* Meilleure répartition horizontale des KPIs */
.hero .kpis-row{
  grid-auto-columns:minmax(0,1fr);
}
@media (min-width:900px){
  .hero .kpis-row--7{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

/* Carte joueur */
.hero{
  position:relative;
  border:1px solid #e7eaf2;
  border-radius:16px;
  overflow:hidden;              /* important pour que tout suive le rayon */
  background:#fff;
}

/* Tuile infos perso */
.profile-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:0;                     /* plus de marge latérale → pleine largeur */
  background:color-mix(in oklab,var(--accent,#1a2c5e) 90%, #000 10%);
  color:#f9fafb;
  border-radius:0 0 16px 16px;  /* arrondi bas gauche + bas droite visibles */
  overflow:hidden;
  border-top:1px solid rgba(15,23,42,.85);
}

/* cellules */
.profile-table tr{
  display:flex;
  flex-wrap:wrap;
}
.profile-table td{
  flex:1 1 180px;
  padding:10px 16px;
  border-right:1px solid rgba(248,250,252,.18);
  border-top:1px solid rgba(15,23,42,.85);
}
.profile-table tr td:last-child{
  border-right:none;
}

.profile-table .label{
  display:block;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#e5e7eb;
  margin-bottom:3px;
}
.profile-table .value{
  display:block;
  font-size:14px;
  font-weight:700;
  color:#f9fafb;
}

/* mobile */
@media (max-width:800px){
  .profile-table{
    margin:0;
    border-radius:0 0 14px 14px;
  }
  .profile-table tr{
    flex-direction:column;
  }
  .profile-table td{
    border-right:none;
  }
}
/* ===== Fiche joueur : parcours & récompenses ===== */
/* ===== Bloc Parcours + Récompenses ===== */

.player-extra {
  display: grid;
  gap: 16px;
  margin: 16px 14px 0;
}

.player-extra-block {
  background: #f9fafb;
  border-radius: 16px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(15,23,42,.05);
}

.player-extra-title {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Timeline Parcours (on garde simple) */
.player-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.player-timeline li {
  font-size: .8rem;
  padding: 2px 0;
}

/* === Récompenses : grille par année bien alignée === */

.awards-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap:12px;
  margin-top:4px;
}

.award-year-card{
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.25);
  padding:10px 12px;
  text-align:left;
}

.award-year-pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#0f172a;
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.award-year-list{
  list-style:none;
  margin:6px 0 0;
  padding:0;
}

.award-item{
  font-size:.85rem;
  color:#0f172a;
  line-height:1.3;
  padding:2px 0;
}

.award-label{
  font-weight:500;
}

.award-league{
  margin-left:4px;
  font-size:.8rem;
  color:#64748b;
}

/* Un peu plus d’air au-dessus du bloc Records */
.player-records{
  margin-top:26px; /* au lieu de 20px si tu avais gardé la valeur d'avant */
}


/* Mobile */
@media (max-width: 768px) {
  .player-extra {
    flex-direction: column;
  }
}

/* ===== Parcours : équipe actuelle + pré-NBA ===== */

.current-team-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15,23,42,.03);
  margin-bottom: 8px;
}

.current-team-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(15,23,42,.25));
}

.current-team-text {
  display: flex;
  flex-direction: column;
}

.current-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(15,23,42,.06);
  margin-bottom: 2px;
}

.current-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: .9rem;
}

.current-league {
  font-size: .75rem;
  opacity: .7;
}

.pre-nba {
  margin: 4px 0 8px;
  font-size: .8rem;
}

.pre-nba-label {
  font-weight: 500;
  margin-right: 4px;
}

.pre-nba-team {
  opacity: .85;
}

/* Timeline parcours NBA */

.player-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  border-left: 2px solid rgba(15,23,42,.08);
}

.player-timeline li {
  position: relative;
  left: -4px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: .8rem;
  padding: 2px 0;
}

.player-timeline li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent, #1a2c5e);
  margin-top: 5px;
  margin-right: 4px;
}

.player-timeline-empty {
  font-size: .8rem;
  opacity: .7;
  margin: 4px 0 0;
}
.rec-link {
  text-decoration: none;
  color: #0f766e;
  font-weight: 700;
}

.rec-link:hover {
  text-decoration: underline;
  color: #0c4a6e;
}

    /* --- Blocs repliables (Parcours / Récompenses / Records) --- */
    .fold-toggle{
      width:100%;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:.5rem;
      padding:8px 16px;
      border:0;
      background:transparent;
      cursor:pointer;
    }
    .fold-toggle .fold-label{
      text-transform:uppercase;
      letter-spacing:.08em;
      font-size:.8rem;
      color:#475569;
    }
    .fold-icon{
      font-size:1.1rem;
      line-height:1;
      color:#94a3b8;
    }
    .fold-content{
      display:none;
    }
    .fold-content.is-open{
      display:block;
    }

    /* Parcours : texte centré + sans puces */
    .player-timeline{
      list-style:none;
      margin:10px 0 0;
      padding:0;
      text-align:center;
    }
    .player-timeline li{
      margin:2px 0;
    }
    .player-timeline .line-text{
      display:inline-block;
    }
    .pre-nba{
      text-align:center;
      margin-top:4px;
    }

/* =========================
   Cellule adversaire (derniers matchs)
   ========================= */
.opp-cell{
  display:flex;
  align-items:center;
  gap:8px;
}

/* =========================
   Responsive
   ========================= */

/* Cartes joueurs (mobile) */
@media (max-width:640px){
  .wrap{
    padding:0 8px;
  }

  .card .row{
    flex-direction:column;
    align-items:stretch;
    min-height:auto;
    padding:10px 10px 12px;
  }
  .card .hs-wrap{
    position:relative;
    left:0;
    top:0;
    bottom:auto;
    width:100%;
    justify-content:center;
    align-items:flex-end;
    margin-bottom:8px;
  }
  .card .hs{
    height:150px;
    width:auto;
    max-width:100%;
    object-fit:contain;
  }
  .card .stats{
    position:static;
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;
    padding:0;
    gap:10px;
    overflow:visible;
  }
  .card .line.l2{
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:8px;
  }
  .card .line.l3{
    grid-template-columns:repeat(3,minmax(0,1fr));
    column-gap:6px;
    row-gap:4px;
  }
  .card .stat .label{
    font-size:9px;
  }
  .card .stat .val{
    font-size:14px;
  }
}

/* KPIs hero */
@media (max-width:1100px){
  .kpis-row--7{
    grid-template-columns:repeat(4,1fr);
  }
  .kpis-row--6{
    grid-template-columns:repeat(3,1fr);
  }
}
@media (max-width:700px){
  .kpis-row--7{
    grid-template-columns:repeat(3,1fr);
  }
  .kpis-row--6{
    grid-template-columns:repeat(2,1fr);
  }
}

/* Tableau récap & tableau des matchs : scroll horizontal en mobile */
@media (max-width:900px){
  .panel{
    overflow-x:auto;
  }
  .panel .tbl{
    min-width:760px;
  }
  .hero{
    overflow-x:auto;
  }
  .hero table.clean{
    min-width:880px;
  }
}
