/* Long-form legal reading and the standalone not-found page. */
.legal-content {
  --legal-ink: #eef1f8;
  --legal-muted: #b0bad0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(100% - 2rem, 760px);
  margin: 0 auto;
  padding: clamp(1.35rem, 4vw, 3.25rem);
  color: var(--legal-ink);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.012) 55%), #111623;
  border: 1px solid transparent;
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(0,0,0,.2);
  font-family: Inter, var(--font-base), sans-serif;
  line-height: 1.75;
}
.legal-content::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #7c5cff, #00d4ff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.legal-content > * { position: relative; z-index: 1; }
.legal-content h1,
.page-404 h1 {
  margin: 0 0 1.1rem;
  color: #fff;
  font-family: "Unbounded", var(--font-display), sans-serif;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.25;
  text-wrap: balance;
}
.legal-content > p:first-of-type { margin: 0 0 2rem; color: var(--legal-muted); }
.legal-content p { margin: 0 0 1.15rem; color: #d0d7e6; line-height: 1.75; overflow-wrap: anywhere; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content h2 {
  position: relative;
  margin: 2.15rem 0 .75rem;
  padding-left: 1rem;
  color: #f3f5fb;
  font-family: "Unbounded", var(--font-display), sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.23rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.5;
  scroll-margin-top: calc(var(--header-height, 72px) + 1rem);
}
.legal-content h2::before {
  content: "";
  position: absolute;
  top: .28em;
  bottom: .28em;
  left: 0;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, #7c5cff, #00d4ff);
}
.legal-content ul,
.legal-content ol { margin: .25rem 0 1.4rem; padding-left: 1.35rem; color: #d0d7e6; }
.legal-content li { padding-left: .2rem; margin: 0 0 .55rem; line-height: 1.72; }
.legal-content li::marker { color: #70dfff; }
.legal-content code {
  padding: .15rem .4rem;
  border: 1px solid rgba(0,212,255,.22);
  border-radius: 6px;
  background: rgba(0,212,255,.08);
  color: #a8edff;
  font: 500 .88em/1.5 "JetBrains Mono", ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.legal-content a { color: #80e4ff; text-decoration-color: rgba(128,228,255,.45); text-underline-offset: .18em; }
.legal-content a:hover { color: #c4f5ff; text-decoration-color: currentColor; }
.legal-content a:focus-visible,
.legal-content :where(button, input, select, textarea):focus-visible,
.page-404 :where(a, button):focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 4px;
  border-radius: 5px;
}
.legal-content .text-muted { color: var(--legal-muted); }
.legal-content .table-wrap,
.legal-content table {
  max-width: 100%;
  border: 1px solid rgba(177,190,220,.2);
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.012) 55%), #111623;
}
.legal-content .table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.legal-content table { border-collapse: separate; border-spacing: 0; overflow: hidden; }
.legal-content th, .legal-content td { white-space: normal; border-color: rgba(177,190,220,.14); line-height: 1.6; }
.legal-content th { color: #c6d0e4; background: rgba(255,255,255,.04); font: 500 .68rem/1.5 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; }
.legal-content td { color: #d0d7e6; }

/* 404 */
.page-404 { padding-top: clamp(3rem, 9vw, 7rem); padding-bottom: clamp(3rem, 9vw, 7rem); }
.page-404 .empty-state {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) clamp(1.2rem, 5vw, 3.5rem);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.012) 55%), #111623;
  box-shadow: 0 26px 70px rgba(0,0,0,.25);
  text-align: center;
}
.page-404 .empty-state::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #7c5cff, #00d4ff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.page-404 .empty-state > * { position: relative; z-index: 1; }
.page-404 .error-code {
  display: block;
  margin: 0 auto .3em;
  color: transparent;
  background: linear-gradient(115deg, #a58fff 15%, #58e5ff 85%);
  background-clip: text;
  -webkit-background-clip: text;
  /* pas de text-stroke : sur une police variable il trace les contours internes des glyphes */
  font: 800 clamp(6rem, 22vw, 13rem)/.95 "Unbounded", var(--font-display), sans-serif;
  letter-spacing: -.06em;
}
.page-404 h1 { margin-bottom: .75rem; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.page-404 p { max-width: 540px; margin: 0 auto 1.8rem; color: #b0bad0; line-height: 1.7; }
.page-404-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; }
.page-404-actions .btn { min-height: 48px; }
.page-404-actions .btn-outline { border-color: rgba(170,186,215,.32); }
.page-404-actions .btn-outline:hover { border-color: #00d4ff; color: #9ceeff; }

@media (max-width: 480px) {
  .legal-content { width: 100%; padding: 1.25rem 1rem; border-radius: 17px; }
  .legal-content h2 { margin-top: 1.8rem; }
  .page-404 { padding-left: 1rem; padding-right: 1rem; }
  .page-404-actions { display: grid; grid-template-columns: 1fr; }
  .page-404-actions .btn { width: 100%; white-space: normal; }
}
