/* Calculateurs VO² Cycling — réécriture JavaScript (22/11/2026)
   Pages affichées dans un cadre (iframe) à l'intérieur des articles. */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Outfit:wght@500;600;700&display=swap");

:root {
  --ink: #111111;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --soft: #f4f4f4;
  --radius: 12px;
  --title: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --read: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #fff; }
body { font-family: var(--read); font-size: 16px; line-height: 1.5; color: var(--text); padding: 2px; }
a { color: var(--ink); font-weight: 600; }
a:hover { color: #000; }

.calc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.06);
  padding: 18px 20px 20px;
  margin: 0 0 18px;
  max-width: 820px;
}
.calc h2 { font-family: var(--title); font-size: 20px; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.calc .intro { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.calc h3 { font-family: var(--title); font-size: 15px; font-weight: 600; margin: 14px 0 8px; color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 18px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 14px; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .unit { font-size: 14px; color: var(--muted); }
.field.temps { grid-column: 1 / -1; }

input, select {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 0;
}
input { width: 100%; }
input:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
input.short { width: 4.6em; text-align: center; }
input.invalid { border-color: #b00020; background: #fff5f6; }

.results {
  margin-top: 16px;
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 16px;
}
.results.empty { color: var(--muted); font-size: 14px; }
.results table { border-collapse: collapse; width: 100%; }
.results td, .results th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
.results tr:last-child td { border-bottom: 0; }
.results td.num, .results th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.results .big td { font-weight: 700; font-size: 17px; color: var(--ink); }
.results .big-value { font-family: var(--title); font-size: 28px; font-weight: 700; color: var(--ink); }
.results .icons img { height: 52px; width: auto; margin: 0 6px 8px 0; border-radius: 6px; vertical-align: middle; }
.results .detail { color: var(--muted); font-size: 13px; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.source { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* Braquet : un tableau par plateau */
.plateaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.plateaux table th { font-family: var(--title); font-size: 14px; color: var(--muted); font-weight: 600; }

@media (max-width: 480px) {
  .calc { padding: 14px; }
  .grid { grid-template-columns: 1fr; }
}
