/* ═══════════════════════════════════════════════
   GUIDES — style commun des pages de contenu (calculateur, trail, taux de sudation)
   Reprend les jetons de la charte de index.html, sans GSAP / three.js.
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --dark:     #0A1628;
  --deep:     #050E1A;
  --cyan:     #0aebff;
  --text:     #F1F5F9;
  --slate:    #94A3B8;
  --light:    #F7F9FC;
  --card-fill:   rgba(255,255,255,0.05);
  --card-border: rgba(255,255,255,0.09);
  --card-shadow: 0 12px 32px rgba(0,0,0,0.67);
  --warn:     #FF6B35;
  --font:     'Space Grotesk', sans-serif;
  --body:     'Open Sans', sans-serif;
  --mono:     'Space Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(ellipse 70% 55% at 75% 0%, rgba(10,235,255,0.12), rgba(10,235,255,0) 70%),
    linear-gradient(180deg, #050E1A 0%, #0A1628 50%, #0D1F3C 100%);
  background-color: var(--deep);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }

/* ─── Barre haut ─── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 5vw, 48px);
  background: rgba(10,22,40,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-logo { display: block; width: 104px; }
.topbar-logo img { width: 100%; }
.topbar-cta {
  font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--deep); background: var(--cyan);
  border-radius: 20px; padding: 9px 18px; text-decoration: none; white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}
.topbar-cta:hover { opacity: 0.85; transform: translateY(-1px); }

/* ─── Article ─── */
.guide {
  max-width: 820px; margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(16px, 5vw, 48px) 80px;
}
.breadcrumb {
  font-family: var(--mono); font-size: 12px; color: var(--slate);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--slate); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan); }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font); font-weight: 600; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 28px; height: 1.5px; background: var(--cyan); }
h1 {
  font-family: var(--font); font-weight: 700;
  font-size: clamp(32px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.03em;
  margin-bottom: 20px;
}
h1 .accent, h2 .accent { color: var(--cyan); }
.lead { font-size: 18px; color: #D9E0EB; max-width: 680px; }
.updated { font-family: var(--mono); font-size: 12px; color: var(--slate); margin-top: 16px; }
h2 {
  font-family: var(--font); font-weight: 700;
  font-size: clamp(24px, 3.6vw, 32px); line-height: 1.2; letter-spacing: -0.02em;
  margin: 64px 0 16px; scroll-margin-top: 90px;
}
h3 {
  font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: -0.01em;
  margin: 32px 0 10px; color: var(--text);
}
.guide p { margin: 14px 0; color: #D9E0EB; }
.guide ul, .guide ol { margin: 14px 0; padding-left: 22px; color: #D9E0EB; }
.guide li { margin: 8px 0; }
strong { color: var(--light); font-weight: 600; }
sup.ref { font-family: var(--mono); font-size: 11px; line-height: 0; }
sup.ref a { text-decoration: none; padding: 0 1px; }
sup.ref + sup.ref::before { content: ','; color: var(--cyan); }

/* Sommaire */
.toc {
  margin: 36px 0 0; padding: 20px 24px;
  background: var(--card-fill); border: 1px solid var(--card-border); border-radius: 16px;
}
.toc-title {
  font-family: var(--font); font-weight: 600; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate); margin-bottom: 8px;
}
.guide .toc ol { margin: 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--cyan); }

/* Chiffres clés */
.key-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
  margin: 24px 0;
}
.key-figure {
  padding: 18px; border-radius: 16px;
  background: rgba(10,235,255,0.07); border: 1px solid rgba(10,235,255,0.22);
}
.key-figure-num {
  font-family: var(--mono); font-weight: 700; font-size: 26px; letter-spacing: -0.03em;
  color: var(--cyan); line-height: 1.1;
}
.key-figure-lbl { font-size: 13px; color: #D9E0EB; margin-top: 6px; line-height: 1.5; }

/* Encadrés */
.callout {
  margin: 24px 0; padding: 18px 20px; border-radius: 14px;
  background: rgba(10,235,255,0.07); border: 1px solid rgba(10,235,255,0.25);
}
.callout.warn { background: rgba(255,107,53,0.08); border-color: rgba(255,107,53,0.35); }
.callout-title {
  font-family: var(--font); font-weight: 700; font-size: 14px; margin-bottom: 4px;
}
.callout.warn .callout-title { color: #ffb499; }
.guide .callout p { margin: 6px 0; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: top; }
th {
  font-family: var(--font); font-weight: 600; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--slate);
}
td { color: #D9E0EB; }
td.num { font-family: var(--mono); color: var(--text); white-space: nowrap; }
caption { caption-side: bottom; text-align: left; font-size: 13px; color: var(--slate); padding-top: 10px; }

/* Bloc outil (calculateurs) */
.tool {
  margin: 36px 0;
  background: var(--card-fill); border: 1px solid var(--card-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
  border-radius: 24px; padding: clamp(20px, 4vw, 32px);
}

/* Encart produit */
.product-cta {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  margin: 56px 0; padding: 28px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(10,235,255,0.14), rgba(10,235,255,0.04));
  border: 1px solid rgba(10,235,255,0.3);
}
.product-cta h2 { margin: 0 0 8px; font-size: 24px; }
.guide .product-cta p { margin: 0; }
.btn {
  display: inline-block; font-family: var(--font); font-weight: 600; font-size: 14px;
  color: var(--deep); background: var(--cyan); text-decoration: none;
  border-radius: 24px; padding: 12px 22px; white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
@media (max-width: 640px) { .product-cta { grid-template-columns: 1fr; } }

/* FAQ */
.faq details {
  border-bottom: 1px solid rgba(255,255,255,0.08); padding: 14px 0;
}
.faq summary {
  cursor: pointer; font-family: var(--font); font-weight: 600; font-size: 17px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--cyan); font-family: var(--mono); }
.faq details[open] summary::after { content: '–'; }

/* Guides liés */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.related a {
  display: block; padding: 18px 20px; border-radius: 16px; text-decoration: none;
  background: var(--card-fill); border: 1px solid var(--card-border); color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.related a:hover { border-color: rgba(10,235,255,0.5); transform: translateY(-2px); }
.related-kicker { font-family: var(--mono); font-size: 11px; color: var(--cyan); letter-spacing: 0.06em; text-transform: uppercase; }
.related-title { font-family: var(--font); font-weight: 600; font-size: 17px; margin-top: 4px; line-height: 1.3; }

/* Sources */
.sources { font-size: 14px; }
.guide .sources li { margin: 10px 0; color: var(--slate); }
.sources a { word-break: break-word; }
.disclaimer { font-size: 13px; color: var(--slate); margin-top: 32px; }

/* Pied de page */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 32px clamp(16px, 5vw, 48px);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--slate);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--slate); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* ═══ Champs des calculateurs (repris de index.html) ═══ */
.calc-title { font-family: var(--font); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 22px; }
.calc-field { margin-bottom: 16px; }
.calc-fields-col { display: flex; flex-direction: column; }
.calc-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 20px; }
.calc-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.calc-label-text { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: rgba(241,245,249,0.8); }
.calc-label-icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--cyan); }
.calc-label-value { font-family: var(--mono); font-size: 12px; color: var(--cyan); font-weight: 700; }
.calc-select, .calc-input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 14px; padding: 10px 12px;
  font-family: var(--body); font-size: 15px; color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.calc-select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%230AEBFF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.calc-select:focus, .calc-input:focus { border-color: var(--cyan); }
.calc-select option { background: #0F1729; }
.calc-radio-group { display: flex; gap: 8px; }
.calc-radio-label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.14); border-radius: 16px;
  cursor: pointer; font-size: 13px; color: rgba(241,245,249,0.65); transition: all 0.2s; user-select: none;
}
.calc-radio-label.checked { background: rgba(10,235,255,0.16); border-color: rgba(10,235,255,0.55); color: var(--text); }
.calc-radio-label input[type="radio"] { display: none; }
.calc-radio-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; flex-shrink: 0; }
.calc-radio-label.checked .calc-radio-dot { background: var(--cyan); }
.calc-slider-track { position: relative; padding: 4px 0; }
.calc-slider-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 4px; background: rgba(255,255,255,0.14); border-radius: 2px; pointer-events: none;
}
.calc-slider { position: relative; z-index: 1; display: block; width: 100%; height: 15px; background: transparent; outline: none; appearance: none; cursor: pointer; }
.calc-slider::-webkit-slider-runnable-track { height: 15px; background: transparent; }
.calc-slider::-moz-range-track { height: 15px; background: transparent; border: none; }
.calc-slider::-webkit-slider-thumb { appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--cyan); cursor: pointer; }
.calc-slider::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--cyan); border: none; cursor: pointer; }
.calc-slider-fill {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 4px; background: var(--cyan); border-radius: 2px; pointer-events: none;
}
.calc-result-col { display: flex; flex-direction: column; margin-top: 8px; }
.calc-result-block { background: rgba(10,235,255,0.10); border: 1px solid rgba(10,235,255,0.3); border-radius: 16px; padding: 18px; }
.calc-result-row { display: flex; align-items: center; margin-bottom: 14px; }
.calc-result-item { flex: 1; text-align: center; }
.calc-result-num { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; transition: color 0.3s; }
.calc-result-num.alert { color: var(--warn); }
.calc-result-lbl { font-family: var(--font); font-weight: 600; font-size: 10px; color: var(--slate); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 6px; }
.calc-result-sep { width: 1px; height: 36px; background: rgba(10,235,255,0.3); flex-shrink: 0; }
.calc-gauge-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.calc-gauge-fill { height: 100%; border-radius: 2px; background: var(--cyan); transition: width 0.4s var(--ease-out), background 0.3s; }
.calc-gauge-fill.alert { background: var(--warn); }
.calc-message { font-size: 13px; line-height: 1.6; color: rgba(241,245,249,0.85); }
.calc-message.alert { color: #ffb499; }
.calc-note { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--slate); }
.calc-alert-absorption {
  display: none; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px;
  background: rgba(255,107,53,0.12); border: 1px solid rgba(255,107,53,0.35); border-radius: 10px;
  font-size: 11px; color: var(--warn);
}
.calc-alert-absorption.visible { display: flex; }
.calc-reset {
  display: flex; align-items: center; gap: 5px; margin-top: 16px; align-self: flex-start;
  background: none; border: 1px solid rgba(255,255,255,0.16); border-radius: 14px; padding: 7px 12px;
  font-family: var(--body); font-size: 11px; letter-spacing: 0.08em; color: var(--slate); cursor: pointer;
}
.calc-reset:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

/* ═══ Menu « Guides » de la barre haut (même composant que l'accueil) ═══ */
.topbar-right { display: flex; align-items: center; gap: 20px; }
.nav-guides { position: relative; }
.nav-guides summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text); padding: 8px 4px;
}
.nav-guides summary::-webkit-details-marker { display: none; }
.nav-guides summary::after {
  content: ''; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid var(--cyan); border-bottom: 1.5px solid var(--cyan);
  transform: rotate(45deg); transition: transform 0.2s;
}
.nav-guides[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.nav-guides summary:hover { color: var(--cyan); }
.nav-guides-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 240px;
  display: flex; flex-direction: column; padding: 8px;
  background: rgba(10,22,40,0.97); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.nav-guides-menu a {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  color: var(--text); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; transition: background 0.2s, color 0.2s;
}
.nav-guides-menu a:hover, .nav-guides-menu a[aria-current="page"] { background: rgba(10,235,255,0.1); color: var(--cyan); }
.cta-short { display: none; }
@media (max-width: 520px) {
  .topbar-right { gap: 12px; position: relative; }
  .nav-guides { position: static; } /* menu calé sur le bord droit de la barre */
  .cta-long { display: none; }
  .cta-short { display: inline; }
}
