/* Analyseur GPX — style.css */

/* ── DROP ZONE ───────────────────────────────────── */
.drop-zone {
  position: relative;
  border: 2px dashed var(--rim-2);
  border-radius: var(--r-xl);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
  background: var(--ink-1);
  -webkit-tap-highlight-color: transparent;
}
.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: var(--lime);
  background: var(--lime-lo);
  outline: none;
}
.drop-zone.drag-over {
  border-color: var(--lime);
  background: var(--lime-lo);
  transform: scale(1.01);
}
.drop-zone__input {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; height: 100%;
}
.drop-zone__inner {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  pointer-events: none;
}
.drop-zone__icon {
  width: 48px; height: 48px;
  background: var(--lime-lo); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.drop-zone__icon svg { width: 28px; height: 28px; fill: var(--lime); }
.drop-zone__title {
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em; color: var(--txt);
}
.drop-zone__sub {
  font-size: .8rem; color: var(--dim); font-weight: 300;
}
.drop-zone__hint {
  font-family: var(--mono); font-size: .62rem; color: var(--faint);
  letter-spacing: .04em;
}

/* Note confidentialité */
.privacy-note {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .62rem; color: var(--faint);
  margin-top: .625rem; justify-content: center;
}
.privacy-note svg { width: 12px; height: 12px; fill: var(--faint); flex-shrink: 0; }

/* ── FILE HEADER ─────────────────────────────────── */
.file-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
  flex-wrap: wrap;
}
.file-name {
  font-family: var(--mono); font-size: .72rem; color: var(--lime);
  background: var(--lime-lo); border: 1px solid rgba(200,240,90,.2);
  border-radius: var(--r-pill); padding: 4px 12px;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reset-btn {
  font-family: var(--mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim); background: none;
  border: 1px solid var(--rim-1); border-radius: var(--r-pill);
  padding: 4px 12px; cursor: pointer;
  transition: color var(--t-base), border-color var(--t-base);
  white-space: nowrap;
}
.reset-btn:hover { color: var(--txt); border-color: var(--rim-2); }

/* ── PROFIL ALTIMÉTRIQUE ─────────────────────────── */
.profile-block {
  background: var(--ink-1); border-radius: var(--r-xl);
  padding: 1.25rem; margin-top: 1px;
  overflow: hidden;
}
.profile-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem;
}
.profile-legend {
  display: flex; gap: .75rem; flex-wrap: wrap;
}
.legend-item {
  display: flex; align-items: center; gap: .375rem;
  font-family: var(--mono); font-size: .62rem; color: var(--dim);
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.profile-svg-wrap {
  position: relative;
  padding-left: 36px; padding-bottom: 24px;
}
#elevation-svg {
  width: 100%; height: 180px; display: block;
  overflow: visible;
}

.profile-y-labels {
  position: absolute; left: 0; top: 0; bottom: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  pointer-events: none;
}
.profile-y-label {
  font-family: var(--mono); font-size: .6rem; color: var(--faint);
  text-align: right; width: 32px; line-height: 1;
}

.profile-x-labels {
  position: absolute; left: 36px; right: 0; bottom: 0;
  display: flex; justify-content: space-between;
}
.profile-x-label {
  font-family: var(--mono); font-size: .6rem; color: var(--faint);
}

/* ── SEGMENTS ────────────────────────────────────── */
.segments-wrap {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--rim-1); border-radius: var(--r-md); overflow: hidden;
  margin-top: .75rem;
  max-height: 280px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.segment-row {
  display: grid;
  grid-template-columns: 48px 1fr 56px 56px;
  align-items: center; gap: .5rem;
  padding: .5rem .75rem;
  background: var(--ink-2);
  font-family: var(--mono); font-size: .72rem;
}
.segment-row:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.segment-km  { color: var(--dim); }
.segment-bar-wrap { position: relative; height: 6px; }
.segment-bar-track { height: 100%; background: var(--rim-1); border-radius: 99px; }
.segment-bar-up {
  position: absolute; left: 0; top: 0; height: 50%;
  background: var(--lime); border-radius: 99px 99px 0 0; opacity: .8;
}
.segment-bar-down {
  position: absolute; left: 0; bottom: 0; height: 50%;
  background: #38BDF8; border-radius: 0 0 99px 99px; opacity: .6;
}
.segment-up   { color: var(--lime); text-align: right; }
.segment-down { color: #38BDF8;     text-align: right; }

/* En-tête tableau segments */
.segment-header {
  display: grid;
  grid-template-columns: 48px 1fr 56px 56px;
  gap: .5rem; padding: .375rem .75rem;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint);
  background: var(--ink-1);
}

/* ── ÉQUIVALENCES ────────────────────────────────── */
#equiv-list { display: flex; flex-direction: column; gap: 1px; margin-top: .75rem; }
.equiv-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .875rem;
  background: var(--ink-2); border-radius: 0;
}
.equiv-row:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.equiv-row:last-child  { border-radius: 0 0 var(--r-md) var(--r-md); }
.equiv-row.is-match    { background: var(--lime-lo); }

.equiv-bar-wrap { flex: 1; }
.equiv-bar-track { height: 4px; background: var(--rim-1); border-radius: 99px; overflow: hidden; }
.equiv-bar-fill  {
  height: 100%; background: var(--lime); border-radius: 99px;
  width: 0%; transition: width 600ms cubic-bezier(.34,1.4,.64,1);
}
.equiv-row.is-match .equiv-bar-fill { background: var(--lime); }

.equiv-name { font-size: .78rem; font-weight: 600; color: var(--txt); min-width: 140px; }
.equiv-row.is-match .equiv-name { color: var(--lime); }
.equiv-kme  { font-family: var(--mono); font-size: .68rem; color: var(--dim); min-width: 60px; text-align: right; }

/* ── PARTAGE ─────────────────────────────────────── */
.share-block { margin-top: 1rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .04em; padding: 7px 14px;
  border-radius: var(--r-pill); cursor: pointer;
  color: var(--lime); background: var(--lime-lo);
  border: 1px solid rgba(200,240,90,.3);
  transition: background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.share-btn:hover { background: var(--lime-md); }

/* Desktop */
@media (min-width: 900px) {
  #elevation-svg { height: 220px; }
  .segment-row { font-size: .75rem; padding: .625rem 1rem; }
  .equiv-name { min-width: 180px; }
}
