body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; margin: 0; }

/* Container pour limiter la largeur */
.container {
  max-width: 1200px;
  margin: 0 0 2rem 0;
  width: 100%;
}

header { margin-bottom: 1rem; }
fieldset { border: 1px solid #ddd; padding: 1rem; margin-bottom: 1.5rem; }
label { display: block; margin-top: 0.5rem; }
input, select, button { padding: 0.4rem; font-size: 1rem; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row-type { display:block; margin-bottom: 0.75rem; }
.row-type label { display: inline-block; min-width: 180px; }
.row-type select { min-width: 240px; }
.result { font-weight: 600; margin-top: 1rem; }
.hint { color: #444; }

/* Sections du calculateur */
.calc-section {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
}
.calc-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: #0066cc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.calc-section h3::before {
  font-weight: bold;
  font-size: 1.3rem;
}
.section-distance h3::before { content: '➊'; }
.section-time h3::before { content: '➋'; }
.section-speed h3::before { content: '➌'; }
.section-pace h3::before { content: '➍'; }
.calc-section p.section-hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}
.or-separator {
  text-align: center;
  margin: 1rem 0;
  font-weight: bold;
  color: #999;
  font-size: 1.1rem;
}

/* Sous-sections d'allure */
.pace-subsection {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}
.pace-subsection:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.pace-subsection strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-size: 0.95rem;
}

/* Layout mis à jour */
/* On ne force plus un margin-top global sur tous les h1 pour éviter le décalage spécifique de la home */
h1 { color: #0066cc; margin: 0; }

/* Titre principal de la page d’accueil, aligné comme les autres h1 de calculateurs */
.branding h1 {
  margin: 1.5rem 0 0.5rem 0;
}

.main-nav { background: linear-gradient(to bottom, #f8f9fa, #e9ecef); border: 1px solid #dee2e6; border-radius: 6px; padding: 0.5rem 1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
/* Bannière avec hauteur maximale limitée */
.site-banner img { display:block; width:100%; max-height:300px; height:auto; object-fit:contain; border-radius:8px; }
.ad-slot { width:100%; min-height: 250px; background:#f5f5f5; border:1px solid #ccc; border-radius:4px; display:flex; align-items:center; justify-content:center; font-size:0.85rem; color:#555; box-shadow:0 1px 2px rgba(0,0,0,0.08); }
.converter { grid-column: 1; grid-row: 4; }

/* Footer */
#footer-container {
  margin-top: auto;
  padding-top: 3rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.rtc-footer {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}

.footer-brand strong {
  display: block;
  font-size: 1.1rem;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.footer-sections {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.footer-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem;
}

.footer-nav a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #2563eb;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Responsive footer */
@media (max-width: 1024px) and (min-width: 769px) {
  .footer-sections {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .footer-sections {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .footer-section {
    text-align: center;
  }
}

/* Onglets Vitesse / Allure */
.tabs { display:inline-flex; gap:0.5rem; margin: 0 0 0.5rem; }
.tab { padding: 0.4rem 0.8rem; border:1px solid #ccc; background:#fff; color:#333; border-radius:6px; cursor:pointer; }
.tab[aria-selected="true"], .tab.active { background:#0d6efd; color:#fff; border-color:#0b5ed7; }

/* SEO Content Section */
.seo-content {
  margin: 3rem 0 2rem;
  padding: 0 1rem;
  line-height: 1.7;
}
.seo-content h2 {
  color: #0066cc;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.seo-content h3 {
  color: #333;
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.seo-content p {
  margin-bottom: 1rem;
  color: #444;
}
.seo-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: #444;
}
.seo-content li {
  margin-bottom: 0.5rem;
}
.seo-content strong {
  color: #0066cc;
}
.seo-content em {
  font-style: italic;
  color: #555;
}

/* Animation flash pour les champs recalculés */
@keyframes flashHighlight {
  0% { background-color: #fff3cd; transform: scale(1); }
  50% { background-color: #ffc107; transform: scale(1.05); }
  100% { background-color: #fff3cd; transform: scale(1); }
}

input.flash {
  animation: flashHighlight 0.6s ease-in-out;
}
/* Changement de couleur persistant après recalcul */
input.changed { background-color: #ffe08a; box-shadow: 0 0 0 3px rgba(255,193,7,0.35); transition: background-color 0.8s ease, box-shadow 0.6s ease; }

/* Masquer les flèches des champs number (spinners) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Bouton primaire global, utilisé par les calculateurs (FC max, VO2, calories, etc.) */
.rtc-primary-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.rtc-primary-btn:hover {
  filter: brightness(1.05);
}

/* Panneau générique pour les blocs de calcul (cartes blanches avec ombre) */
.rtc-panel-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
