/* ===============================
   HERO NAGEUR
================================= */

.section-nageur-hero {
  margin-top: 150px !important; /* décolle du header */
  margin-bottom: 4rem;
  padding-top: 2em !important;
  padding-bottom: 2em;
  text-align: center;
  position: relative;
  overflow: hidden;

  background: var(--border-subtle);

  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
}

/* ===============================
   TITRE
================================= */

.nageur-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  display: inline-block;
  position: relative;
}

/* soulignement dynamique */
.nageur-title::after {
  content: "";
  display: block;
  width: 80%;
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Homme */
.is-homme .nageur-title::after, .is-homme .section-records .page-title::after, .graph-title::after {
  background: #3aa6c9;
}

/* Femme */
.is-femme .nageur-title::after, .is-femme .section-records .page-title::after {
  background: #ff4da6;
}

/* ===============================
   ÂGE
================================= */

.nageur-age {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 0.6rem;
}

/* ===============================
   META
================================= */

.nageur-meta {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ===============================
   STATS
================================= */

.nageur-stats {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===============================
   RESPONSIVE
================================= */

@media (max-width: 992px) {
  .nageur-title {
    font-size: 2.2rem;
  }

  .nageur-age {
    display: block;
    margin: 0.5rem 0 0 0;
  }

  .section-records{
    padding: 0 !important;
  }

  .records-table{
    border-radius: 0 !important;
  }
}

/* ===============================
   TABLE RECORDS
================================= */

.section-records {
  margin-bottom: 5rem;
}

.records-wrapper {
  overflow-x: auto;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--border-subtle);
}

.graphe2{
  background-color: var(--border-subtle);
  padding: 0.25em 0 !important;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  overflow: hidden;
}

/* HEADER */
.records-table thead {
  background: var(--bg-card-light);
}

.records-table th {
  padding: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* NAGE COLUMN */
.nage-name {
  padding: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card-light);
  border-right: 1px solid var(--border-subtle);
}

/* CELLS */
.records-table td {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

/* RECORD CELL */
.record-cell {
  transition: 0.2s ease;
}

.record-cell a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.record-cell .time {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.record-cell .year {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.record-cell:hover {
  background: var(--bg-card-hover);
}

/* EMPTY CELL */
.record-empty {
  opacity: 0.25;
  font-weight: 500;
}


/* HEADER COLOR DYNAMIQUE */

.is-homme .records-table thead {
  background: rgba(58, 166, 201, 0.15) !important;
}

.is-femme .records-table thead {
  background: rgba(255, 77, 166, 0.15) !important;
}

.section-records {
  margin-bottom: 5rem;
  padding: 0 10em;
}

@media (min-width: 992px) {
  .records-wrapper {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Cell clickable uniquement si vidéo */
.record-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Curseur pointer uniquement si vidéo */
.has-video {
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Hover background léger */
.has-video:hover {
  background: var(--bg-card-hover);
}

/* Temps par défaut */
.record-cell .time {
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

/* Hover couleur selon sexe */
.is-homme .has-video:hover .time {
  color: #3aa6c9;
}

.is-femme .has-video:hover .time {
  color: #ff4da6;
}

.record-cell {
  text-align: center;
  padding: 1rem;
}

.record-cell .time,
.record-cell .year {
  display: block;
}

.record-cell .time {
  font-weight: 600;
  font-size: 1rem;
}

.record-cell .year {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.table-wrapper {
  position: relative;
  overflow-x: auto;
}

.table-wrapper::after {
  content: "";
  position: sticky;
  right: 0;
  top: 0;
  width: 24px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to left, rgba(0,0,0,0.35), transparent);
}

.records-wrapper {
  position: relative;
  overflow-x: auto;
}

.scroll-hint-overlay {
  position: absolute;
  top: 5px; /* ajuste selon ton thead */
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;

  padding: 8px 16px;
  font-size: 18px;
  color: #fff;

  background: rgba(202, 202, 202, 0.171);
  box-shadow: 0 3px 12px rgba(0,0,0,0.32);
  font-weight: 500;

  backdrop-filter: blur(6px);
  border-radius: 999px;


  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.scroll-hint-overlay.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
}

.scroll-hint-overlay {
  animation: hintFloat 1.8s ease-in-out infinite;
}

@keyframes hintFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

@media (min-width: 992px) {
  .scroll-hint-overlay {
    display: none;
  }
}

.performances-wrapper {
  max-height: calc(8 * 56px); /* hauteur d’une ligne */
  overflow-y: auto;
}


.performances-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.performance-item {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: 110px 1fr 90px 32px;
  align-items: center;
}

.performances-empty {
  display: none;
  text-align: center;
  padding: 24px 12px;
  font-size: 14px;
  opacity: 0.6;
}

.performances-wrapper {
  max-height: calc(8 * 52px);
  overflow-y: auto;
}

.performance-item {
  display: grid;
  grid-template-columns: 110px 1fr 90px 28px;
  align-items: center;

  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}

.perf-date {
  opacity: 0.85;
}

.perf-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perf-time {
  font-weight: 600;
  letter-spacing: 0.3px;
}

.perf-video {
  display: flex;
  justify-content: flex-end;
}

.perf-video svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.perf-video.is-active {
  color: #ff3b6b; /* rose */
}

.perf-video.is-active:hover {
  color: #ff5f86;
}

.perf-video.is-disabled {
  color: rgba(255,255,255,0.25);
}

.perf-video.is-active {
  cursor: pointer;
}

.perf-video.is-disabled {
  cursor: default;
}

.performance-item {
  padding-right: 16px;
}

.performance-item:hover {
  background: rgba(255,255,255,0.03);
}

.performances-wrapper::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  height: 24px;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.8),
    transparent
  );
  pointer-events: none;
}

.performance-item {
  font-size: 18px;
}

.perf-time {
  font-size: 18px;
}

.perf-type {
  font-size: 18px;
}

i.fa-brands.fa-youtube {
  font-size: 30px !important;
  transition: transform 0.15s ease, color 0.15s ease;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  color: #fff;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.6;
}

.select-wrapper select:hover {
  background: rgba(255,255,255,0.12);
}

.select-wrapper select:focus {
  outline: none;
  border-color: #2fbadf;
}

.performance-item {
  padding: 16px 14px;
}

.performance-item {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.performances-wrapper {
  padding-bottom: 8px;
}

.select-wrapper select {
  padding: 10px 38px 10px 16px;
}

/* wrapper */
.custom-select {
  position: relative;
  min-width: 140px;
}

/* bouton */
.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  padding: 10px 14px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;

  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* dropdown */
.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  background: #12171c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;

  list-style: none;
  margin: 0;
  padding: 6px 0;

  max-height: 220px;
  overflow-y: auto;

  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;

  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

/* ouvert */
.custom-select.is-open .custom-select-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* option */
.custom-select-option {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}

.custom-select-option:hover {
  background: rgba(255,255,255,0.08);
}

/* chevron */
.custom-select-trigger .chevron {
  opacity: 0.6;
  font-size: 12px;
}

.performance-item {
  display: grid;
  grid-template-columns: 140px 1fr 110px 36px;
  column-gap: 5em;

  align-items: center;
  padding: 16px 20px;
}

.perf-date {
  opacity: 0.75;
}

.perf-type {
  padding-left: 8px;
}

.perf-time {
  padding-right: 8px;
}

.perf-video {
  justify-self: end;
}

/* ===== Scrollbar dark (WebKit) ===== */
.performances-wrapper::-webkit-scrollbar,
.custom-select-options::-webkit-scrollbar {
  width: 8px;
}

.performances-wrapper::-webkit-scrollbar-track,
.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.performances-wrapper::-webkit-scrollbar-thumb,
.custom-select-options::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.performances-wrapper::-webkit-scrollbar-thumb:hover,
.custom-select-options::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* ===== Firefox ===== */
.performances-wrapper,
.custom-select-options {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.performances-wrapper,
.custom-select-options {
  padding-right: 4px;
}

.performances-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.14);
}

.custom-select {
  min-width: 180px;
}

.custom-select-trigger {
  padding: 14px 18px;
  font-size: 16px;
  border-radius: 10px;
}

.filters {
  gap: 16px;
  margin-bottom: 32px;
}

.perf-date {
  font-size: 15px;
  opacity: 0.7;
}

.performances{
  background-color: var(--border-subtle);
  padding-bottom: 2em !important;
  padding-top: 2em !important;
  margin-bottom: 5em;
}

.perf-date {
  font-size: 14px;
  opacity: 0.65;
}

.performance-item:hover {
  background: rgba(255,255,255,0.06);
}

@media (max-width: 992px) {
  .performance-item {
    grid-template-columns: 90px 1fr 72px 44px;
  }

  .perf-type {
    white-space: normal;
    line-height: 1.2;
  }
  .perf-video {
    width: 44px;
    height: 44px;
  }
  .custom-select {
    min-width: 160px;
  }
}

.perf-video {
  justify-self: center;   /* ⬅️ au lieu de end */
  align-self: center;
}

/* ===== BOUTON VIDÉO (Font Awesome FIX) ===== */

.perf-video {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
}

/* icône FA */
.perf-video i {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 22px;

  font-size: 22px;
  line-height: 1;
}

/* IMPORTANT : centrer le pseudo-element */
.perf-video i::before {
  display: block;
  line-height: 1;
}

/* états */
.perf-video.is-active {
  color: #ff3b6b;
  cursor: pointer;
}

.perf-video.is-active:hover {
  color: #ff5f86;
}

.perf-video.is-disabled {
  color: rgba(255,255,255,0.25);
  cursor: default;
}

.section-progression {
  text-align: center;
  margin: 48px 0;
}

.toggle-graph {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.toggle-graph:hover {
  background: rgba(255,255,255,0.12);
}

.graph-wrapper {
  margin-top: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;

  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.graph-wrapper.is-hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.graph-wrapper {
  position: relative;
  max-width: 900px;
  margin: 24px auto 0;
}

@media (max-width: 992px) {

  .performance-item {
    column-gap: 20px;
  }

  .performances-wrapper2{
    padding: 0 !important;
  }

}

.section-progression{
  background-color: var(--border-subtle);
  padding-top: 1em;
  padding-bottom: 5em;
}

.graph-title{
  padding-bottom: 1em;
}

.section-progression {
  margin: 2rem auto;
  max-width: 1200px;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevation);
}

.section-records{
  padding-left: 0 !important;
  padding-right: 0 !important;

}

.section-records {
  margin: 5rem auto;
  padding: 0 2rem;
}

.records-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
}

.records2{
  background-color: var(--border-subtle);
  padding: 2em 0;
}

/* ===============================
   SECTION PROGRESSION
================================= */

.section-progression {
  margin: 2rem auto;
  padding: 1rem 2rem 3rem;
  max-width: 1200px;

  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevation);
}

/* WRAPPER FIXE */
#progressionChart {
  width: 100%;
  height: 420px !important; /* hauteur desktop */
}

/* Canvas DOIT remplir */
.graph-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 992px) {
  .graph-wrapper {
    height: 240px;
  }

  .performances{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .performance-item {
    font-size: 13px;
  }

  .perf-time {
    font-size: 13px;
  }

  .perf-type {
    font-size: 13px;
  }

  .perf-date{
    font-size: 11px;
  }

  .nageur-age{
    margin-top: 0;
  }

  .nageur-meta, .nageur-stats{
    margin-top: 0.75em;
    font-size: 0.9em;
  } 

.nageur-stats{
    margin-top: 0.5em;
  }

  .records2{
    padding-top: 0;
    padding-bottom: 0;
  }

  .nageur-title{
    font-size: 2.2em !important;
  line-height: 1.25;
  }

  .nageur-age{
    font-size: 0.8rem;
  }

  .section-nageur-hero{
    padding-top: 1em !important;
    padding-bottom: 1em;
  }

  .records-wrapper{
    box-shadow: none;
  }

  .section-progression{
    background-color: #00000000 !important;
    box-shadow: none;
    padding: 0 !important;
    margin: 0;
  }

  .section-records{
    margin-top: 1em;
    margin-bottom: 1.5em;
  }

  .page-title{
    margin-bottom: 0.5em;
  }

  .performances-wrapper{
    max-height: calc(6 * 52px);
  }

  #progressionChart{
    height: 18em !important;
  }

  .graphe2{
    margin-bottom: 2em;
  }

  .graph-wrapper{
    padding-left: 0.75em;
    padding-right: 1em;
    height: 28em;
  }

  .performances{
    margin-bottom: 2em;
  }

  .section-nageur-hero{
    margin-bottom: 2em;
  }
}

.performances{
  padding: 0 8em;
}

/* ===============================
   TOOLTIP GLOBAL
================================= */

.split-tooltip-global {
  position: fixed;
  transform: translate(-50%, -100%) translateY(-8px);

  background: #1e2630;
  color: #fff;

  padding: 10px 14px;
  border-radius: 10px;

  font-size: 13px;
  white-space: nowrap;

  box-shadow: 0 10px 28px rgba(0,0,0,0.5);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9999;
}

.split-tooltip-global.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.split-tooltip-global::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e2630 transparent transparent transparent;
}

/* couleur dynamique */
.split-tooltip-global.is-homme strong {
  color: #3aa6c9;
}

.split-tooltip-global.is-femme strong {
  color: #ff4da6;
}

/* Trait dynamique global */

.is-homme .page-title::after,
.is-homme .nageur-title::after {
  background: #3aa6c9;
}

.is-femme .page-title::after,
.is-femme .nageur-title::after {
  background: #ff4da6;
}

@media (max-width: 992px) {
  .records-wrapper {
    overflow-x: visible;
  }

  .scroll-hint-overlay {
    display: none;
  }
  .records-wrapper {
    overflow-x: visible;
  }

  .scroll-hint-overlay {
    display: none;
  }

  .records-table th {
    white-space: nowrap;
  }

  .records-table {
    font-size: 0.5rem;
  }

  .record-cell{
    padding: 2px !important;
  }

  .nage-name{
    padding: 0.5em !important;
    width: 8em !important;
  }

  .record-cell .time, .records-table th {
    font-size: 0.5rem;
  }

  .record-cell .year {
    font-size: 0.4rem;
  }

}
