/* ═══════════════════════════════════════════════════════════════
   LEGAL.CSS · Pages legal landing Hyvirtus (5 pages)
   ───────────────────────────────────────────────────────────────
   Partagé par : mentions-legales.html, confidentialite.html,
   cookies.html, cgu.html, cgv.html
   Style : mode clair forcé (papier ivoire), sobre, premium.
   Aucun glow, aucun gradient gold. Cream + navy + sigil champagne.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Skip link a11y ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: #1a2238;
  color: #f7f4ec;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  z-index: 999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 8px;
}

/* ─── Layout général ─────────────────────────────────────────── */
.legal-page {
  display: block;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  color: #2d3a52;
  background: transparent;
}

@media (min-width: 1024px) {
  .legal-page {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 64px;
    align-items: start;
  }
}

/* ─── TOC sticky desktop ─────────────────────────────────────── */
.legal-toc {
  font-family: "Inter", system-ui, sans-serif;
}

@media (min-width: 1024px) {
  .legal-toc {
    position: sticky;
    top: 96px;
    align-self: start;
    border-left: 1px solid rgba(15, 20, 36, 0.10);
    padding-left: 16px;
  }
  .legal-toc-mobile > summary {
    display: none;
  }
  .legal-toc-mobile {
    display: block;
  }
  .legal-toc-mobile[open] > nav,
  .legal-toc-mobile > nav {
    display: block !important;
  }
}

/* ─── TOC mobile : repliable ─────────────────────────────────── */
.legal-toc-mobile {
  margin-bottom: 32px;
}
.legal-toc-mobile > summary {
  cursor: pointer;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #1a2238;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 20, 36, 0.10);
  border-radius: 10px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.legal-toc-mobile > summary::-webkit-details-marker {
  display: none;
}
.legal-toc-mobile > summary::after {
  content: "▾";
  transition: transform 0.2s ease;
  color: #c9a36a;
}
.legal-toc-mobile[open] > summary::after {
  transform: rotate(180deg);
}
.legal-toc-mobile nav ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

/* ─── TOC items ──────────────────────────────────────────────── */
.legal-toc-item {
  display: block;
  padding: 8px 0 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #5a6478;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.legal-toc-item:hover {
  color: #1a2238;
}
.legal-toc-item.is-active {
  color: #8d6f3a;
  border-left-color: #8d6f3a;
  font-weight: 600;
}
.legal-toc-item:focus-visible {
  outline: 2px solid #c9a36a;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── Colonne contenu ────────────────────────────────────────── */
.legal-body {
  max-width: 720px;
  font-family: "Inter", system-ui, sans-serif;
}

/* ─── En-tête de page ────────────────────────────────────────── */
.legal-head {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(15, 20, 36, 0.06);
}
.legal-head h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  color: #1a2238;
  margin: 0 0 12px;
  letter-spacing: 0.004em;
}
.legal-sigil {
  width: 22px;
  height: 22px;
  color: #c9a36a;
  flex-shrink: 0;
}
.legal-updated {
  margin: 0;
  font-size: 14px;
  color: #5a6478;
}
.legal-updated em {
  font-style: italic;
  font-weight: 400;
  color: #1a2238;
}

/* ─── Sections ───────────────────────────────────────────────── */
.legal-section {
  scroll-margin-top: 96px;
  margin-bottom: 40px;
}
.legal-section h2 {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1a2238;
  margin: 48px 0 16px;
  line-height: 1.3;
}
.legal-section h2:first-child {
  margin-top: 0;
}
.legal-section h3 {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a2238;
  margin: 24px 0 12px;
  line-height: 1.4;
}
.legal-section p,
.legal-section li {
  font-size: 15px;
  line-height: 1.65;
  max-width: 65ch;
  color: #2d3a52;
}
.legal-section p {
  margin: 0 0 14px;
}
.legal-section ul,
.legal-section ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.legal-section li {
  margin: 0 0 8px;
}
.legal-section a {
  color: #2d3a52;
  text-decoration: underline;
  text-decoration-color: rgba(201, 163, 106, 0.45);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.legal-section a:hover {
  color: #8d6f3a;
  text-decoration-color: #8d6f3a;
}
.legal-section a:focus-visible {
  outline: 2px solid #c9a36a;
  outline-offset: 2px;
  border-radius: 2px;
}
.legal-section strong {
  color: #1a2238;
  font-weight: 600;
}

/* ─── Callout pour clauses critiques ─────────────────────────── */
.legal-callout {
  margin: 20px 0;
  padding: 16px 18px;
  background: #fcfaf4;
  border: 1px solid rgba(15, 20, 36, 0.10);
  border-radius: 10px;
}
.legal-callout p:last-child,
.legal-callout li:last-child {
  margin-bottom: 0;
}
.legal-callout .legal-callout-label {
  display: inline-block;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a36a;
  margin-bottom: 8px;
}

/* ─── Bouton retour en haut ──────────────────────────────────── */
.legal-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(15, 20, 36, 0.14);
  border-radius: 50%;
  color: #2d3a52;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 20, 36, 0.08);
  transition: transform 0.2s ease, background 0.15s ease;
  z-index: 50;
}
.legal-back-to-top.is-visible {
  display: flex;
}
.legal-back-to-top:hover {
  background: #fcfaf4;
  transform: translateY(-2px);
}
.legal-back-to-top:focus-visible {
  outline: 2px solid #c9a36a;
  outline-offset: 2px;
}

/* ─── Print stylesheet ───────────────────────────────────────── */
@media print {
  .lp-topbar,
  .lp-footer,
  .legal-toc,
  .legal-back-to-top,
  .skip-link {
    display: none !important;
  }
  .legal-page {
    display: block;
    max-width: none;
    padding: 0;
    color: #000;
    background: #fff;
  }
  .legal-body {
    max-width: none;
  }
  .legal-section h2 {
    page-break-after: avoid;
  }
  .legal-section p,
  .legal-section li {
    color: #000;
    font-size: 11pt;
  }
  .legal-callout {
    background: none;
    border-color: #000;
  }
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }
}
