/* Styles spécifiques pour le calculateur VO2max */

.rtc-section {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.rtc-vo2max-widget h2 {
  margin-top: 0;
  color: #0066cc;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.rtc-vo2max-widget p {
  margin: 0.5rem 0;
}

/* Onglets */
.rtc-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.rtc-tab {
  padding: 0.6rem 1.2rem;
  background: #ffffff;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #495057;
  transition: all 0.2s ease;
}

.rtc-tab:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.rtc-tab-active {
  background: #0066cc !important;
  color: #ffffff !important;
  border-color: #0066cc !important;
}

/* Onglets de décennies pour les tableaux VO2 */
.vo2-decade-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.vo2-decade-tab {
  border: 1px solid #ced4da;
  border-radius: 999px;
  padding: 0.4rem 0.6rem;
  background: #fff;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vo2-decade-tab.is-active {
  background: #0066cc;
  color: #fff;
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.vo2-decade-container {
  position: relative;
}

.vo2-decade-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.vo2-decade-block article {
  background: #f8f9fb;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.vo2-decade-block.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.vo2-decade-block[hidden] {
  display: none;
}

.vo2-decade-block h3 {
  margin-top: 0;
}

/* Formulaires */
.rtc-vo2max-widget form {
  margin-top: 1rem;
}

.rtc-vo2max-widget label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #495057;
  font-size: 0.9rem;
}

.rtc-vo2max-widget input[type="number"] {
  width: 100%;
  max-width: 150px;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

/* Garder le style ancien uniquement pour les boutons sans classe rtc-primary-btn */
.rtc-vo2max-widget button[type="submit"]:not(.rtc-primary-btn) {
  background: #0066cc;
  color: #ffffff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 1rem;
}

.rtc-vo2max-widget button[type="submit"]:not(.rtc-primary-btn):hover {
  background: #0052a3;
}

/* Paragraphes et textes du formulaire */
.rtc-form-intro {
  margin-top: 0.5rem;
}

.rtc-time-inputs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

/* Classe pour cacher/afficher les panels */
.rtc-panel-hidden {
  display: none !important;
}

/* Résultats */
#rtc-vo2-result {
  background: #ffffff;
  padding: 1rem;
  border-radius: 6px;
  border: 2px solid #0066cc;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 1rem;
  font-weight: bold;
}

#rtc-vo2-result:empty {
  display: none;
}

#rtc-vo2-note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
  color: #6c757d;
  font-style: italic;
  line-height: 1.5;
}

/* Notes avec différentes couleurs */
.note-blue {
  background: #f0f6ff;
  border-left: 4px solid #0066cc;
}

.note-yellow {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .rtc-vo2max-widget {
    padding: 1rem;
  }

  .rtc-tab {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .rtc-vo2max-widget input[type="number"] {
    max-width: 100%;
  }

  .vo2-decade-block {
    grid-template-columns: 1fr;
  }
}

/* Fallback: si JS désactivé, on montre tout */
.no-js #vo2-cooper-panel { display: block !important; }
.no-js .rtc-tabs { display: none; }
