.legal-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 63, 92, .05), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(45, 122, 242, .05), transparent 30%),
    #000;
  color: #f5f5f7;
}

.legal-shell {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 48px;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 120px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
}

.legal-brand picture,
.legal-brand img {
  display: block;
  width: 96px;
  height: 96px;
}

.legal-brand img {
  object-fit: contain;
}

.legal-back {
  color: rgba(255,255,255,.48);
  text-decoration: none;
  font-size: .82rem;
}

.legal-back:hover {
  color: rgba(255,255,255,.82);
}

.legal-hero {
  padding: 74px 0 78px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.legal-kicker,
.legal-card-kicker {
  margin: 0 0 16px;
  color: rgba(255,255,255,.38);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
}

.legal-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(3.2rem, 8vw, 6.3rem);
  line-height: .92;
  letter-spacing: -.06em;
}

.legal-intro {
  max-width: 620px;
  margin: 28px 0 0;
  color: rgba(255,255,255,.56);
  font-size: 1.08rem;
  line-height: 1.55;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 72px 0 86px;
}

.legal-card {
  min-height: 240px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  background: rgba(255,255,255,.025);
  box-sizing: border-box;
}

.legal-card h2 {
  margin: 0 0 32px;
  font-size: 1.55rem;
  letter-spacing: -.03em;
}

.legal-card address,
.legal-card p,
.legal-card a {
  color: rgba(255,255,255,.58);
  font-size: .94rem;
  line-height: 1.75;
  font-style: normal;
}

.legal-card a {
  display: inline-block;
  margin-top: 22px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.22);
}

.legal-card a:hover {
  color: rgba(255,255,255,.9);
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.32);
  font-size: .72rem;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
}

.legal-footer a:hover {
  color: rgba(255,255,255,.68);
}

.legal-footer .legal-social-row {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 20px !important;
  pointer-events: auto !important;
}

.legal-footer .legal-social-row .social-icon {
  position: relative !important;
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  opacity: 1 !important;
}

@media (max-width: 720px) {
  .legal-shell {
    width: min(100% - 32px, 980px);
    padding-top: 24px;
  }

  .legal-header {
    min-height: 104px;
  }

  .legal-brand,
  .legal-brand picture,
  .legal-brand img {
    width: 82px;
    height: 82px;
  }

  .legal-hero {
    padding: 52px 0 58px;
  }

  .legal-grid {
    grid-template-columns: 1fr;
    padding: 54px 0 66px;
  }

  .legal-card {
    min-height: auto;
  }
}

/* La page légale est un document long : elle doit toujours pouvoir défiler. */
html:has(body.legal-page) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.legal-page {
  position: static;
  width: 100%;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.legal-page .legal-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

/* iOS Safari — la page légale doit échapper au verrouillage global du site */
html:has(body.legal-page) {
  height: auto !important;
  min-height: 100% !important;
  width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.legal-page {
  display: block !important;
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.legal-page .legal-shell {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  height: auto !important;
  overflow: visible !important;
}

/* Public legal documents */
.legal-document-hero h1 {
  white-space: pre-line;
}

.legal-document-subtitle,
.legal-document-updated {
  margin: 0;
  white-space: pre-line;
}

.legal-document-subtitle {
  margin-top: 18px;
  font-weight: 700;
}

.legal-document-updated {
  margin-top: 8px;
  opacity: .68;
}

.legal-document-warning {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  white-space: pre-line;
}

.legal-document-content {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.legal-document-section {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 22px;
  background: rgba(255, 255, 255, .035);
}

.legal-document-section h2 {
  margin: 0 0 12px;
}

.legal-document-section p {
  margin: 0;
  white-space: pre-line;
  line-height: 1.65;
}
