:root {
  --nav:        #3F91E2;
  --nav-dark:   #2e7acc;
  --frame:      #6BB5FF;
  --frame-soft: rgba(107,181,255,0.12);
  --white:      #FFFFFF;
  --bg:         #F0F6FF;
  --bg2:        #E6F1FF;
  --surface:    #FFFFFF;
  --border:     #D0E6FF;
  --text:       #0f2340;
  --text2:      #3a5a82;
  --muted:      #7a9cc0;
  --accent:     #3F91E2;
  --accent2:    #FF5C35;
  --success:    #00C97A;
  --gold:       #F5B800;
  --nav-h:      64px;
  --radius:     10px;
  --shadow:     0 2px 16px rgba(63,145,226,0.10);
  --shadow-lg:  0 8px 40px rgba(63,145,226,0.16);
}
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.team-backbar {
  background: #fff;
  padding: 1.1rem 5% 0.7rem 5%;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(63,145,226,0.04);
  border-bottom: 1px solid #e0e6ef;
  margin-bottom: 0;
}
.team-back-btn {
  display: inline-block;
  background: #f3f4f6;
  color: #7a9cc0;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 1.25rem;
  padding: 0.38rem 1.2rem;
  text-decoration: none;
  border: 1px solid #e0e6ef;
  letter-spacing: 0.04em;
  transition: background 0.18s, color 0.18s;
}
.team-back-btn:hover {
  background: #e6f1ff;
  color: var(--accent);
  border-color: var(--accent);
}

.team-hero {
  background: linear-gradient(135deg, var(--nav) 0%, #1a6fc4 100%);
  padding: clamp(1.5rem, 4vw, 2.5rem) 5%;
  position: relative;
  overflow: hidden;
}
.team-hero::before {
  content: '';
  position: absolute;
  right: 0; 
  top: 0; 
  bottom: 0;
  width: 40%;
  background: rgba(255,255,255,0.04);
  clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 0% 100%);
}
.team-hero-inner {
  max-width: 90rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  position: relative;
  z-index: 1;
}
.team-logo-wrap {
  flex-shrink: 0;
  width: clamp(4.5rem, 8vw, 6rem);
  height: clamp(4.5rem, 8vw, 6rem);
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}
.team-hero-info { flex: 1; }
.team-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: clamp(0.6rem, 0.75vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 0.6rem;
}
.team-hero-name {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.team-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  color: rgba(255,255,255,0.75);
  font-size: clamp(0.75rem, 0.95vw, 0.88rem);
}
.team-hero-meta strong { color: #fff; }
.team-hero-kpis {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-top: 1.25rem;
  max-width: 22rem;
}
.team-hero-kpi {
  flex: 1;
  padding: 0.8rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.team-hero-kpi:last-child { border-right: none; }
.team-hero-kpi .n {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
}
.team-hero-kpi .l {
  font-size: clamp(0.55rem, 0.7vw, 0.68rem);
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  display: block;
}

.team-page { padding-top: var(--nav-h); }
.team-body {
  max-width: 90rem;
  margin: 0 auto;
  padding: 2rem 5% 4rem;
  display: grid;
  grid-template-columns: 1fr 21rem;
  gap: 1.5rem;
  align-items: start;
}

.team-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 0;
}
.team-card-header {
  padding: 1.1rem 1.5rem 0.9rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.team-card-header h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 600;
  color: var(--text);
}
.card-accent {
  width: 3px; height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.team-main { display: flex; flex-direction: column; gap: 1.5rem; }
.team-side { display: flex; flex-direction: column; gap: 1.5rem; }

.riders-table {
  width: 100%;
  border-collapse: collapse;
}
.riders-table thead tr {
  background: var(--bg2);
}
.riders-table th {
  padding: 0.65rem 1.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.riders-table th:first-child { 
  width: 2.5rem; 
  text-align: center; 
}
.riders-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  vertical-align: middle;
}
.riders-table tr:last-child td { border-bottom: none; }
.riders-table tbody tr:hover { background: var(--frame-soft); }
.rider-row-link { 
  text-decoration: none; 
  color: inherit; 
  display: table-row; 
}

.rider-num {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.rider-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.rider-avatar {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.rider-name {
  font-weight: 600;
  color: var(--text);
}
.role-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.pcs-val {
  font-weight: 700;
  color: var(--accent);
  font-size: clamp(0.8rem, 1vw, 0.9rem);
}

.palmares-list { padding: 0.5rem 0; }
.palmares-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.palmares-item:last-child { border-bottom: none; }
.palmares-item:hover { background: var(--frame-soft); }
.palmares-pos {
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pos-1 { background: rgba(245,184,0,0.15); color: var(--gold); }
.pos-2 { background: rgba(122,156,192,0.15); color: var(--muted); }
.pos-3 { background: rgba(180,100,50,0.12); color: #b46432; }
.pos-other { background: var(--bg2); color: var(--text2); font-size: 0.75rem; }
.palmares-info { flex: 1; }
.palmares-info strong { display: block; font-size: 0.88rem; font-weight: 600; }
.palmares-info span { font-size: 0.75rem; color: var(--muted); }

.info-list { padding: 0.5rem 0; }
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: clamp(0.78rem, 0.95vw, 0.875rem);
  gap: 1rem;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--muted); flex-shrink: 0; }
.info-val { font-weight: 600; color: var(--text); text-align: right; }
.info-val.accent { color: var(--accent); }


/* Responsive */

/* Grandes tablettes */

@media (max-width: 1023px) {
  .team-body {
    grid-template-columns: 1fr 18rem;
    padding: 1.5rem 4% 3rem;
  }
}


/* Tablettes */

@media (max-width: 768px) {
 
  /* Layout : colonne unique, sidebar passe sous le main */
  .team-body {
    grid-template-columns: 1fr;
    padding: 1.25rem 4% 3rem;
    gap: 1.25rem;
  }
 
  /* Sidebar remonte les cards en colonne pleine largeur */
  .team-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
 
  /* Hero : réduction du padding */
  .team-hero {
    padding: 1.5rem 4%;
  }
 
  /* Logo légèrement plus petit */
  .team-logo-wrap {
    width: 4rem;
    height: 4rem;
    font-size: 1.7rem;
  }
 
  /* KPIs : étend sur toute la largeur disponible */
  .team-hero-kpis {
    max-width: 100%;
  }
 
  /* Table : scroll horizontal si nécessaire */
  .team-card {
    overflow-x: auto;
  }
  .riders-table th,
  .riders-table td {
    padding: 0.7rem 0.85rem;
  }
 
  /* Masquer la colonne # sur mobile pour gagner de la place */
  .riders-table th:first-child,
  .riders-table td.rider-num {
    display: none;
  }
}
 

/* ─── Mobile (≤ 480px) ────────────────────────────────────── */
@media (max-width: 480px) {
 
  /* Navbar height réduit si besoin */
  :root { --nav-h: 56px; }
 
  /* Backbar */
  .team-backbar {
    padding: 0.8rem 4%;
  }
  .team-back-btn {
    font-size: 0.85rem;
    padding: 0.3rem 0.9rem;
  }
 
  /* Hero : stack logo + infos en colonne */
  .team-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .team-logo-wrap {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }
  .team-hero-badge {
    font-size: 0.62rem;
  }
  .team-hero-name {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }
  .team-hero-kpis {
    width: 100%;
    max-width: 100%;
  }
  .team-hero-kpi {
    padding: 0.6rem 0.5rem;
  }
  .team-hero-kpi .n {
    font-size: 1.2rem;
  }
  .team-hero-kpi .l {
    font-size: 0.58rem;
  }
 
  /* Layout : tout en une seule colonne */
  .team-body {
    padding: 1rem 3.5% 2.5rem;
    gap: 1rem;
  }
  .team-side {
    grid-template-columns: 1fr;
  }
 
  /* Table : masquer colonnes secondaires sur très petit écran */
  .riders-table th:nth-child(5),   /* Âge */
  .riders-table td:nth-child(5) {
    display: none;
  }
 
  /* Réduire padding cellules */
  .riders-table th,
  .riders-table td {
    padding: 0.6rem 0.65rem;
  }
 
  /* Card header */
  .team-card-header {
    padding: 0.9rem 1rem 0.7rem;
  }
 
  /* Palmarès et infos */
  .palmares-item {
    padding: 0.7rem 1rem;
    gap: 0.75rem;
  }
  .info-row {
    padding: 0.65rem 1rem;
  }
 
  /* Role badge : plus compact */
  .role-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
 
  /* Avatar */
  .rider-avatar {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.6rem;
  }
  .rider-name-cell {
    gap: 0.5rem;
  }
}
 
/* ─── Très petit mobile (≤ 360px) ────────────────────────── */
@media (max-width: 360px) {
  /* Masquer aussi la colonne Nat. pour les écrans minuscules */
  .riders-table th:nth-child(3),
  .riders-table td:nth-child(3) {
    display: none;
  }
 
  .team-hero-name {
    font-size: 1.25rem;
  }
}
