/* Barre de retour */
.rider-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: 1.2rem;
}
.rider-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;
}
.rider-back-btn:hover {
  background: #e6f1ff;
  color: var(--accent);
  border-color: var(--accent);
}
: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;
  overflow-x: hidden;
}

.rider-page {
  padding-top: var(--nav-h);
  max-width: 900px;
  margin: 0 auto;
}

.breadcrumb {
  padding: 0.85rem 5%;
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 90rem;
  margin: 0 auto;
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--muted); }

.rider-hero {
  background: linear-gradient(135deg, var(--nav) 0%, #1a6fc4 100%);
  padding: clamp(1.5rem, 4vw, 3rem) 5%;
  position: relative;
  overflow: hidden;
}
.rider-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%);
}
.rider-hero-inner {
  max-width: 90rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}
.rider-photo-wrap {
  flex-shrink: 0;
  width: clamp(6rem, 12vw, 10rem);
  height: clamp(6rem, 12vw, 10rem);
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.35);
  overflow: hidden;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rider-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.rider-photo-wrap .rider-initials {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
}
.rider-hero-info {
  flex: 1;
}
.rider-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.75rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 1.25rem;
  margin-bottom: 0.75rem;
}
.rider-hero-name {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.rider-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: rgba(255,255,255,0.75);
  font-size: clamp(0.75rem, 0.95vw, 0.9rem);
}
.rider-hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rider-hero-meta .meta-item strong {
  color: #fff;
}
.rider-hero-stats {
  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.5rem;
  max-width: 28rem;
}
.rider-hero-stat {
  flex: 1;
  padding: 0.9rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.rider-hero-stat:last-child { border-right: none; }
.rider-hero-stat .n {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
}
.rider-hero-stat .l {
  font-size: clamp(0.55rem, 0.7vw, 0.7rem);
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  display: block;
}

.rider-body {
  max-width: 90rem;
  margin: 0 auto;
  padding: 2rem 5% 3rem;
  display: grid;
  grid-template-columns: 1fr 22rem;
  gap: 1.5rem;
  align-items: start;
}

.rider-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rider-card-header {
  padding: 1.1rem 1.5rem 0.9rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.rider-card-header h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 600;
  color: var(--text);
}
.rider-card-header .card-accent {
  width: 3px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.skills-list {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.skill-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.skill-label {
  width: 5.5rem;
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  color: var(--text2);
  flex-shrink: 0;
}
.skill-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg2);
  border-radius: 99px;
  overflow: hidden;
}
.skill-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, #6BB5FF 100%);
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
}
.skill-value {
  width: 2rem;
  text-align: right;
  font-size: clamp(0.78rem, 0.95vw, 0.9rem);
  font-weight: 600;
  color: var(--text);
}

.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: clamp(0.75rem, 0.95vw, 0.9rem);
  font-weight: 700;
  flex-shrink: 0;
}
.palmares-pos.pos-1 {
  background: rgba(245,184,0,0.15);
  color: var(--gold);
}
.palmares-pos.pos-2 {
  background: rgba(122,156,192,0.15);
  color: var(--muted);
}
.palmares-pos.pos-3 {
  background: rgba(180,100,50,0.12);
  color: #b46432;
}
.palmares-pos.pos-other {
  background: var(--bg2);
  color: var(--text2);
  font-size: 0.75rem;
}

.palmares-info { flex: 1; }
.palmares-info strong {
  display: block;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  font-weight: 600;
}
.palmares-info span {
  font-size: clamp(0.68rem, 0.82vw, 0.78rem);
  color: var(--muted);
}
.palmares-date {
  font-size: clamp(0.68rem, 0.82vw, 0.78rem);
  color: var(--muted);
  white-space: nowrap;
}

.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-row .info-key { color: var(--muted); flex-shrink: 0; }
.info-row .info-val {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.info-row .info-val.accent { color: var(--accent); }

.teams-list {
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.team-badge {
  background: var(--frame-soft);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: clamp(0.75rem, 0.9vw, 0.85rem);
  color: var(--text2);
  font-weight: 500;
}

.rider-main { display: flex; flex-direction: column; gap: 1.5rem; }
.rider-side { display: flex; flex-direction: column; gap: 1.5rem; }

.doping-simple {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-top: none;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}
.doping-simple-stripe {
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    #1a1a00 0px, #1a1a00 16px,
    #F5B800 16px, #F5B800 32px
  );
}
.doping-simple-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.65rem 1.25rem 0.75rem;
}
.doping-simple-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: black;
  display: flex; align-items: center; 
  justify-content: center;
  flex-shrink: 0;
}
.doping-simple-icon svg { 
  width: 18px; 
  height: 18px; 
}
.doping-simple-text {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1100;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .rider-body {
    grid-template-columns: 1fr;
    padding: 1.5rem 4% 2.5rem;
    gap: 1.25rem;
  }

  .rider-hero-stats {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .rider-backbar {
    padding: 0.75rem 4% 0.6rem;
    margin-bottom: 0;
  }
  .rider-back-btn {
    font-size: 0.82rem;
    padding: 0.32rem 0.95rem;
  }

  .rider-hero {
    padding: 1.5rem 4%;
  }
  .rider-hero::before { display: none; }

  .rider-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .rider-photo-wrap {
    width: 5rem;
    height: 5rem;
    border-width: 2px;
  }
  .rider-hero-badge {
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
  }
  .rider-hero-name {
    font-size: clamp(1.5rem, 7vw, 2rem);
    margin-bottom: 0.4rem;
  }
  .rider-hero-meta {
    font-size: 0.75rem;
    gap: 0.4rem 0.9rem;
  }
  .rider-hero-stats {
    margin-top: 1rem;
    max-width: 100%;
    border-radius: 0.6rem;
  }
  .rider-hero-stat {
    padding: 0.7rem 0.5rem;
  }
  .rider-hero-stat .n { font-size: clamp(0.95rem, 4vw, 1.2rem); }
  .rider-hero-stat .l { font-size: 0.52rem; }

  .rider-body {
    padding: 1rem 4% 2rem;
    gap: 1rem;
  }

  .rider-card-header {
    padding: 0.85rem 1.1rem 0.75rem;
  }
  .rider-card-header h2 { font-size: 0.9rem; }

  .skills-list {
    padding: 1rem 1.1rem;
    gap: 0.8rem;
  }
  .skill-label { width: 4.5rem; font-size: 0.78rem; }
  .skill-value { font-size: 0.78rem; }

  .palmares-item {
    padding: 0.65rem 1.1rem;
    gap: 0.75rem;
  }
  .palmares-info strong { font-size: 0.8rem; }
  .palmares-info span   { font-size: 0.68rem; }
  .palmares-date        { font-size: 0.65rem; }

  .info-row {
    padding: 0.65rem 1.1rem;
    font-size: 0.78rem;
  }
  .info-row .info-val { font-size: 0.78rem; }
}

@media (max-width: 400px) {
  .rider-photo-wrap { width: 4rem; height: 4rem; }
  .rider-hero-name  { font-size: 1.35rem; }

  /* Stats en grille 2×2 */
  .rider-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .rider-hero-stat {
    border-right: 1px solid rgba(255,255,255,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  .rider-hero-stat:nth-child(2n)      { border-right: none; }
  .rider-hero-stat:nth-last-child(-n+2) { border-bottom: none; }
}