:root {
  --brand-blue: #0d4d8b;
  --brand-blue-2: #1f6fb2;
  --brand-orange: #f28a00;
  --brand-bg: #f1f6fd;
  --brand-text: #16263a;
  --brand-muted: #5d728a;
  --brand-card: #ffffff;
  --brand-line: #d4e1f2;
}

* { box-sizing: border-box; }

body {
  background:
    radial-gradient(circle at 0% 0%, #ddeaf9 0, transparent 36%),
    radial-gradient(circle at 100% 100%, #e7f0fb 0, transparent 38%),
    var(--brand-bg);
  color: var(--brand-text);
}

.site-shell,
.wrap {
  max-width: 1150px;
  margin: 24px auto 32px;
  padding: 0 14px;
}

.site-header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  padding: 10px 12px;
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 66, 110, 0.08);
}

.nav-toggle {
  display: none;
  border: 1px solid #c6d9f1;
  background: #dfeafb;
  color: #214d7a;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: auto;
  height: 72px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: visible;
  white-space: normal;
  align-items: center;
  flex: 1 1 100%;
}

.topbar > a,
.topbar .menu-group > summary {
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: #dfeafb;
  color: #214d7a;
  font-weight: 700;
  border: 1px solid #c6d9f1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

.topbar .menu-group > summary::-webkit-details-marker {
  display: none;
}

.topbar .menu-group > summary::after {
  content: "▾";
  font-size: 0.75rem;
  opacity: 0.75;
}

.topbar .menu-group {
  position: relative;
}

.topbar .menu-group[open] > summary,
.topbar .menu-group.active > summary,
.topbar > a.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
}

.topbar .menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 66, 110, 0.16);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 1200;
}

.topbar .menu-panel a {
  text-decoration: none;
  border-radius: 9px;
  padding: 8px 10px;
  background: #f4f8ff;
  color: #214d7a;
  border: 1px solid #d8e5f7;
  font-weight: 700;
}

.topbar .menu-panel a:hover,
.topbar .menu-panel a.active {
  background: #e8f2ff;
  border-color: #c8dbf3;
}

.card {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
}

.hero {
  background: linear-gradient(120deg, #0d4d8b, #1f6fb2 55%, #2f89d0);
  color: #f8fbff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #f8fffb;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.btn.primary, .primary { background: var(--brand-blue); color: #fff; }
.btn.secondary, .secondary { background: var(--brand-orange); color: #fff; }

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.site-footer {
  margin-top: 20px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--brand-line);
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 66, 110, 0.08);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.footer-col h3 {
  margin: 0 0 8px;
  color: var(--brand-blue);
  font-size: 0.98rem;
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: #214d7a;
  font-weight: 400;
  margin: 5px 0;
  line-height: 1.3;
  position: relative;
  padding-left: 12px;
}

.footer-col a::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #8ea7c7;
  font-weight: 700;
}

.footer-col a:hover {
  color: var(--brand-orange);
  text-decoration: underline;
}

.footer-col a.active {
  color: var(--brand-orange);
  font-weight: 500;
}

.topbar > a[href$="index.html"]::before {
  content: "🏠";
}

.topbar > a[href$="simulateur-temps-running.html"]::before {
  content: "⏱️";
}

.topbar > a[href$="passages-route.html"]::before {
  content: "🧭";
}

.topbar > a[href$="calculatrice-running.html"]::before {
  content: "🧮";
}

.topbar > a[href$="vma-tableau.html"]::before {
  content: "📈";
}

.topbar > a[href$="fc-zones.html"]::before {
  content: "❤️";
}

.topbar > a[href$="plans-entrainement.html"]::before {
  content: "📋";
}

.topbar > a[href$="trail-simulation.html"]::before {
  content: "🏔️";
}

.topbar > a[href$="contact.html"]::before {
  content: "✉️";
}

.topbar > a.social-icon.facebook-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #1877f2;
  border: 1px solid #1877f2;
  color: transparent;
  position: relative;
  font-size: 0;
  line-height: 0;
}

.topbar > a.social-icon.facebook-icon::before {
  content: "f";
  color: #fff;
  font-size: 24px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-46%, -51%);
}

.topbar > a.social-icon.facebook-icon:hover {
  background: #166fe0;
  border-color: #166fe0;
}

.footer-meta {
  margin-top: 12px;
  color: var(--brand-muted);
  font-size: 0.9rem;
}

.site-version {
  margin-top: 6px;
  color: var(--brand-muted);
  font-size: 0.88rem;
}

.site-version a {
  color: var(--brand-blue);
  text-decoration: none;
}

.site-version a:hover {
  text-decoration: underline;
}

.footer-logo {
  display: block;
  width: auto;
  height: 58px;
}

.faq-block {
  margin-top: 14px;
}

.faq-block h2 {
  margin: 0 0 10px;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  border: 1px solid #d8e4f3;
  border-radius: 10px;
  background: #f9fcff;
  padding: 8px 10px;
}

.faq-item summary {
  cursor: pointer;
  color: var(--brand-blue);
  font-weight: 700;
}

.faq-item p {
  margin: 8px 0 2px;
  color: var(--brand-text);
  line-height: 1.45;
}

@media (min-width: 980px) {
  .site-header {
    flex-wrap: nowrap;
  }

  .topbar {
    flex: 1 1 auto;
    justify-content: flex-end;
  }
}

@media (max-width: 980px) {
  .site-header {
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .topbar .menu-group {
    width: 100%;
  }

  .topbar {
    display: flex;
    width: 100%;
    margin-top: 4px;
  }

  .js .topbar {
    display: none;
  }

  .js .site-header.nav-open .topbar {
    display: flex;
  }

  .topbar > a {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar > a.social-icon.facebook-icon {
    width: 34px;
    min-width: 34px;
    justify-content: center;
  }

  .topbar .menu-group > summary {
    width: 100%;
    justify-content: space-between;
  }

  .topbar .menu-panel {
    position: static;
    min-width: 100%;
    box-shadow: none;
    border-radius: 10px;
    margin-top: 6px;
  }
}
