/* ============================================
   CHRONO VMA PAGE STYLES
   Prédiction de chrono à partir de la VMA
   ============================================ */

/* Intro */
.cv-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 2rem;
}

/* Sections */
.cv-section {
  margin: 3rem 0;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cv-section h2 {
  color: #1e40af;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.cv-section h3 {
  color: #2563eb;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Calculator Box */
.cv-calculator-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid #2563eb;
  width: 100%;
  box-sizing: border-box;
}

.cv-calculator-box label {
  display: block;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 0.5rem;
}

.cv-vma-input-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.cv-vma-input-group input {
  width: 150px;
  padding: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  border: 2px solid #93c5fd;
  border-radius: 8px;
  text-align: center;
  color: #1e40af;
}

.cv-vma-input-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cv-vma-input-group .cv-unit {
  font-size: 1.1rem;
  font-weight: 600;
  color: #64748b;
}

.cv-quick-vma {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cv-quick-vma button {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid #93c5fd;
  background: white;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.cv-quick-vma button:hover,
.cv-quick-vma button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Profile selector */
.cv-profile-select {
  width: 100%;
  padding: 0.7rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: 2px solid #93c5fd;
  border-radius: 8px;
  background: white;
  color: #1e40af;
  margin: 0.5rem 0 0.25rem;
  cursor: pointer;
}

.cv-profile-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cv-profile-hint {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0.25rem 0 0.75rem;
  line-height: 1.5;
  font-style: italic;
}

/* Fourchette column */
.cv-range-cell {
  font-size: 0.85rem;
  color: #64748b;
  white-space: nowrap;
}

/* Diff colors */
.cv-diff-slower {
  color: #dc2626;
  font-weight: 600;
}

.cv-diff-faster {
  color: #059669;
  font-weight: 600;
}

/* Results */
.cv-result-summary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
  animation: cvSlideIn 0.4s ease-out;
}

@keyframes cvSlideIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cv-result-summary h3 {
  color: white;
  margin-top: 0;
  font-size: 1.3rem;
}

.cv-result-summary .cv-vma-display {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

/* Results Table */
.cv-results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cv-results-table th {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.cv-results-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1rem;
}

.cv-results-table tbody tr:nth-child(odd) {
  background: #f8fafc;
}

.cv-results-table tbody tr:hover {
  background: #eff6ff;
}

.cv-results-table .cv-chrono {
  font-weight: 700;
  font-size: 1.15rem;
  color: #1e40af;
}

.cv-results-table .cv-pace {
  color: #059669;
  font-weight: 600;
}

.cv-results-table .cv-percent {
  color: #64748b;
  font-size: 0.9rem;
}

/* Distance icons in table */
.cv-distance-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cv-distance-label .cv-dist-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.cv-dist-1k { background: #10b981; }
.cv-dist-3k { background: #06b6d4; }
.cv-dist-5k { background: #3b82f6; }
.cv-dist-10k { background: #8b5cf6; }
.cv-dist-semi { background: #f59e0b; }
.cv-dist-marathon { background: #ef4444; }

/* Charts */
.cv-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 900px) {
  .cv-charts-grid {
    grid-template-columns: 1fr;
  }
}

.cv-chart-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.cv-chart-box h3 {
  color: #1e40af;
  margin-top: 0;
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 1rem;
}

.cv-chart-container {
  position: relative;
  width: 100%;
}

/* Comparison section */
.cv-comparison-section {
  margin: 2rem 0;
}

.cv-slider-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}

.cv-slider-group input[type="range"] {
  flex: 1;
  min-width: 200px;
  accent-color: #2563eb;
}

.cv-slider-group .cv-range-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2563eb;
  min-width: 90px;
  text-align: center;
}

.cv-compare-chart-container {
  position: relative;
  width: 100%;
  margin-top: 1rem;
}

/* Info note */
.cv-note {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* VMA range bar */
.cv-vma-range-bar {
  margin: 2rem 0;
}

.cv-range-track {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  height: 40px;
  margin: 1rem 0;
}

.cv-range-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  transition: flex 0.3s ease;
}

.cv-range-marker {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.cv-range-marker::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #1e293b;
}

.cv-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
  padding: 0 0.5rem;
}

/* CTA Links */
.cv-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.cv-tool-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cv-tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #2563eb;
}

.cv-tool-card h3 {
  color: #1e40af;
  margin-top: 0;
  font-size: 1.15rem;
}

.cv-tool-card p {
  color: #4b5563;
  margin: 0.5rem 0 0 0;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
  .cv-section {
    padding: 1.25rem;
    margin: 2rem 0;
  }

  .cv-calculator-box {
    padding: 1.25rem;
  }

  .cv-results-table th,
  .cv-results-table td {
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
  }

  .cv-results-table .cv-chrono {
    font-size: 1rem;
  }

  .cv-dist-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.65rem !important;
  }

  .cv-result-summary .cv-vma-display {
    font-size: 2rem;
  }

  .cv-charts-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ONGLETS BARÈME ===== */
.cv-bareme-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 3px solid #e2e8f0;
}

.cv-bareme-tab {
  padding: 0.7rem 1.5rem;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
  top: 3px;
  border-bottom: 3px solid transparent;
}

.cv-bareme-tab:hover {
  background: #e0e7ff;
  color: #1e40af;
}

.cv-bareme-tab.active {
  background: white;
  color: #2563eb;
  border-bottom: 3px solid #2563eb;
  box-shadow: 0 -2px 6px rgba(37, 99, 235, 0.1);
}

@media (max-width: 600px) {
  .cv-bareme-tab {
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
  }
}
