/* Legal pages (Privacy, Terms, Cookies): layout, prose and the "On this page" reader.
   Primitives (pill, hero, card, button, icon tile, row link, badge) come from the UI kit (components/ui.css). */
.lg {
  --lg-sticky: 7.5rem;
  --lg-offset: 7.5rem;
  --lg-prose: #C9C9D1;
  --lg-num-bg: rgba(183, 139, 245, 0.12);
  --lg-num-line: rgba(183, 139, 245, 0.24);
  --lg-num-text: #C4B5FD;
  --lg-bullet: var(--lavender);
  --lg-link: var(--pink-light);
  --lg-link-line: rgba(240, 171, 252, 0.45);
  --lg-code-text: #E4E4E7;
  --lg-switch-on: var(--ui-line-mid);
  --lg-switch-on-shadow: inset 0 0 0 1px var(--ui-line-mid);
  --lg-mark-next: #3F3F46;
  --lg-mark-done: rgba(183, 139, 245, 0.18);
  --lg-mark-ring: var(--fuchsia);
  --lg-current: rgba(217, 70, 239, 0.08);
  --lg-bar-bg: rgba(18, 18, 26, 0.92);
  --lg-bar-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --lg-sheet-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .lg {
  --lg-prose: #3F3F46;
  --lg-num-bg: rgba(139, 92, 246, 0.08);
  --lg-num-line: rgba(139, 92, 246, 0.26);
  --lg-num-text: #6D28D9;
  --lg-bullet: #9F6BF0;
  --lg-link: #A21CAF;
  --lg-link-line: rgba(162, 28, 175, 0.4);
  --lg-code-text: #3F3F46;
  --lg-switch-on: #FFFFFF;
  --lg-switch-on-shadow: 0 1px 3px rgba(24, 24, 27, 0.10), inset 0 0 0 1px var(--ui-line-mid);
  --lg-mark-next: #D4D4D8;
  --lg-mark-done: rgba(139, 92, 246, 0.14);
  --lg-mark-ring: var(--orchid);
  --lg-current: rgba(217, 70, 239, 0.07);
  --lg-bar-bg: rgba(255, 255, 255, 0.94);
  --lg-bar-shadow: 0 12px 30px rgba(24, 24, 27, 0.10);
  --lg-sheet-shadow: 0 -20px 60px rgba(24, 24, 27, 0.16);
}

.lg:focus { outline: none; }
.lg-glow-left { --ui-glow-y: 380px; }

/* Wider than .ui-container's 1200px would be: the artboard column is 1080px */
.lg-body {
  position: relative;
  max-width: calc(1080px + 2 * var(--ui-gutter));
  padding-top: 10.5rem;
  padding-bottom: 7.5rem;
}

/* ---------- Hero ---------- */
.lg-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

/* Shares the row with the switcher down to ~900px, then the switcher drops below */
.lg-hero-text {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 720px;
}

.lg-hero .ui-hero { --ui-h1-size: clamp(2.75rem, 4.45vw, 4rem); }
.lg-hero .ui-hero .ui-h1 { margin-top: 1.375rem; line-height: 1.04; hyphens: auto; }
.lg-hero .ui-hero-sub { max-width: none; margin-top: 1.125rem; line-height: 1.55; }

.lg-meta {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.lg-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lg-meta-icon {
  display: flex;
  color: var(--ui-text-faint);
}

/* Creole pages show French text: this line says so, on its own row above the date */
.lg-meta-note { flex-basis: 100%; color: var(--text-primary); }
.lg-meta-note .lg-meta-icon { color: var(--lavender); }

/* ---------- Document switcher ---------- */
.lg-switch {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  height: 52px;
  padding: 5px;
  border-radius: var(--ui-radius-pill);
  background: var(--ui-fill);
  border: 1px solid var(--ui-line);
}

.lg-switch-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  height: 40px;
  padding: 0 1.125rem;
  border-radius: var(--ui-radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.lg-switch-icon {
  display: flex;
  flex-shrink: 0;
  color: var(--ui-text-faint);
}

.lg-switch-item:hover { color: var(--text-primary); background: var(--ui-fill-2); }

.lg-switch-item[aria-current="page"] {
  color: var(--text-primary);
  background: var(--lg-switch-on);
  box-shadow: var(--lg-switch-on-shadow);
}

.lg-switch-item[aria-current="page"] .lg-switch-icon { color: var(--ui-accent-text); }

.lg-rule {
  margin-top: 3rem;
  height: 1px;
  background: var(--ui-line);
}

/* ---------- Reading rail + article ---------- */
.lg-layout {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 100px;
  align-items: start;
}

.lg-aside {
  position: sticky;
  top: var(--lg-sticky);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--lg-sticky) - 1.5rem);
  max-height: calc(100dvh - var(--lg-sticky) - 1.5rem);
}

.lg-article {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  min-width: 0;
  max-width: 720px;
}

.lg-top-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5rem;
  min-height: 40px;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.lg-top-link:hover { color: var(--text-primary); }
.lg-top-link-end { align-self: center; min-height: 44px; margin-top: 0; }

/* ---------- "On this page" card ---------- */
.lg-toc {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
  border-radius: 22px;
  background: var(--ui-surface-solid);
  border: 1px solid var(--ui-line);
}

.lg-toc-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ui-line-soft);
}

.lg-toc-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lg-toc-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.lg-toc-left {
  min-height: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ui-text-faint);
}

.lg-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.lg-toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ui-text-faint);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.lg-toc-link:hover { color: var(--text-primary); }

.lg-toc-link:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: -2px;
}

.lg-toc-link.is-done { color: var(--text-secondary); }

.lg-toc-link.is-active {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--lg-current);
}

/* Upcoming: empty circle. Done: filled check. Current: ring + gradient dot. */
.lg-toc-mark {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--lg-mark-next);
  color: var(--lg-num-text);
  transition: border-color 0.2s, background 0.2s;
}

.lg-toc-mark > svg {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s var(--ui-ease);
}

.lg-toc-mark::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-button);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.2s, transform 0.25s var(--ui-ease);
}

.is-done > .lg-toc-mark {
  border-color: transparent;
  background: var(--lg-mark-done);
}

.is-done > .lg-toc-mark > svg { opacity: 1; transform: none; }

.is-active > .lg-toc-mark {
  border: 2px solid var(--lg-mark-ring);
  background: transparent;
}

.is-active > .lg-toc-mark::after { opacity: 1; transform: none; }

/* ---------- Progress ring ---------- */
.lg-ring {
  position: relative;
  flex-shrink: 0;
  width: var(--lg-ring, 52px);
  height: var(--lg-ring, 52px);
}

.lg-ring > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lg-ring-track { stroke: var(--ui-line); }
.lg-ring-stop-a { stop-color: var(--orchid); }
.lg-ring-stop-b { stop-color: var(--indigo); }
.lg-ring-arc { transition: stroke-dasharray 0.3s var(--ui-ease); }
.lg-ring-arc.is-empty { visibility: hidden; }

.lg-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* ---------- Sections ---------- */
.lg-h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-family: var(--ui-display);
  font-size: 1.625rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  scroll-margin-top: var(--lg-offset);
}

.lg-h2:focus { outline: none; }

.lg-h2:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: 6px;
  border-radius: 10px;
}

.lg-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lg-num-bg);
  border: 1px solid var(--lg-num-line);
  color: var(--lg-num-text);
  font-family: Inter, 'Inter Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.lg-prose p {
  margin: 0 0 18px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--lg-prose);
}

.lg-prose ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lg-prose li {
  position: relative;
  padding-left: 24px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--lg-prose);
}

.lg-prose li::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lg-bullet);
}

.lg-prose p:last-child,
.lg-prose ul:last-child { margin-bottom: 0; }

.lg-prose strong {
  font-weight: 600;
  color: var(--text-primary);
}

.lg-prose a {
  color: var(--lg-link);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--lg-link-line);
  transition: color 0.2s;
}

.lg-prose a:hover { color: var(--text-primary); }

.lg-prose a:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: 2px;
  border-radius: 4px;
}

.lg-prose h3 {
  margin: 28px 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.lg-prose h3:first-child { margin-top: 0; }

.lg-prose code,
.lg-table code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--ui-fill-2);
  border: 1px solid var(--ui-line);
  font-family: var(--ui-mono);
  font-size: 0.86em;
  color: var(--lg-code-text);
  overflow-wrap: anywhere;
}

/* Privacy: data storage facts */
.lg-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lg-fact {
  --ui-card-pad: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  background: var(--ui-surface-panel);
}

.lg-prose .lg-fact-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9375rem;
}

.lg-fact-title > span {
  display: flex;
  color: var(--lg-num-text);
}

.lg-prose .lg-fact p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Cookies: summary table (stacked cards on phones) */
.lg-table-wrap {
  margin-top: 22px;
  border-radius: 18px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface-panel);
  overflow: hidden;
  overflow-x: auto;
}

.lg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.lg-table thead tr { background: var(--ui-fill-soft); }

.lg-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-text-faint);
}

.lg-table td {
  padding: 16px 20px;
  color: var(--lg-prose);
  line-height: 1.5;
}

.lg-table tbody tr { border-top: 1px solid var(--ui-line-soft); }

.lg-table .lg-table-end {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lg-table td.lg-table-end { color: var(--text-primary); }
.lg-table .lg-table-name code { white-space: nowrap; overflow-wrap: normal; }
.lg-table { --ui-badge-fs: 0.8125rem; --ui-badge-fw: 600; }

/* ---------- Contact card + other documents ---------- */
.lg-contact {
  --ui-card-pad: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--ui-surface-solid);
  border-color: var(--ui-line-mid);
}

.lg-contact-icon {
  --ui-tile: 56px;
  border-radius: 16px;
}

.lg-contact-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lg-contact-title { letter-spacing: -0.01em; }

.lg-contact-sub {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.lg-contact-btn { flex-shrink: 0; }

.lg-next {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lg .lg-eyebrow { color: var(--ui-text-faint); }

.lg-next-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lg-next-link {
  justify-content: flex-start;
  gap: 14px;
  height: 100%;
  min-height: 76px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--ui-surface-panel);
  color: var(--text-primary);
}

.lg-next-link:hover { background: var(--ui-surface-panel); }

.lg-next-icon { color: var(--ui-text-soft); }

.lg-next-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lg-next-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.lg-next-sub {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-secondary);
}

.lg-next-arrow { color: var(--ui-text-faint); }

/* ---------- Phone contents entry (sticks under the header, above its blur band) ---------- */
.lg-bar {
  position: sticky;
  top: 84px;
  z-index: 120;
  margin-top: 16px;
}

.lg-bar-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--ui-line-mid);
  background: var(--lg-bar-bg);
  box-shadow: var(--lg-bar-shadow);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lg-bar-btn:focus-visible {
  outline: 2px solid var(--ui-focus-border);
  outline-offset: 2px;
}

.lg-bar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lg-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ui-text-faint);
}

.lg-bar-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.lg-bar-chevron {
  display: flex;
  color: var(--text-secondary);
}

.lg-bar-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gradient-button);
  transform: scaleX(var(--lg-progress, 0));
  transform-origin: left center;
  transition: transform 0.2s linear;
}

/* ---------- Phone contents sheet ---------- */
.lg-sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(664px, calc(100dvh - 3.5rem));
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  overflow: visible;
}

.lg-sheet::backdrop {
  background: rgba(5, 5, 10, 0.66);
  opacity: 0;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .lg-sheet::backdrop { background: rgba(24, 24, 27, 0.4); }
.lg-sheet.is-open::backdrop { opacity: 1; }

.lg-sheet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: inherit;
  padding: 10px 12px 0;
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--ui-line-mid);
  /* Opaque, so no backdrop-filter here: it would only cost a GPU pass and it
     nests badly with the progressive blur the sticky header uses. */
  background: var(--lg-sheet-bg, var(--ui-surface-solid));
  box-shadow: var(--lg-sheet-shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.35s var(--ui-ease);
}

.lg-sheet.is-open .lg-sheet-panel { transform: none; }

/* 32px grab strip with a thin pill inside, matching the other sheets */
/* The grab area comes from the kit (.ui-sheet-grab) */

/* No background of its own: the section list scrolls under it and the kit's progressive
   blur veils it. */
.lg-sheet-head {
  margin: 0 -12px;
  padding: 2px 16px 12px;
}

.lg-sheet-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lg-sheet-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lg-sheet-title {
  margin: 0;
  font-family: var(--ui-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.lg-sheet-sub {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ui-text-faint);
}

.lg-sheet-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.lg-sheet .lg-toc-list {
  padding: 8px 0 calc(56px + env(safe-area-inset-bottom, 0px));
  overflow: visible;
}

.lg-sheet .lg-toc-link {
  min-height: 44px;
  font-size: 0.9375rem;
}

.lg-sheet-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--ui-surface-solid) 80%);
  pointer-events: none;
}

/* The page behind the open sheet stays put */
body:has(.lg-sheet[open]) { overflow: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .lg-body { padding-top: 8.75rem; padding-bottom: 6rem; }
  .lg-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 48px; }
}

/* Narrow article column (tablet rail, phone): one card per cookie, stacked "Keep reading" links */
@media (max-width: 960px) {
  .lg-next-list { grid-template-columns: minmax(0, 1fr); }

  .lg-table-wrap {
    border: 0;
    border-radius: 0;
    background: none;
    overflow: visible;
  }

  .lg-table,
  .lg-table tbody,
  .lg-table td { display: block; }

  .lg-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .lg-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .lg-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 16px;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-surface-panel);
  }

  .lg-table td { padding: 0; }
  .lg-table .lg-table-purpose { grid-column: 1 / -1; }

  .lg-table td.lg-table-end {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--ui-line-soft);
    text-align: right;
  }

  .lg-table td.lg-table-end::before {
    content: attr(data-label);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ui-text-faint);
  }
}

@media (pointer: coarse) {
  .lg-toc-link,
  .lg-top-link { min-height: 44px; }
  .lg-switch { height: 56px; }
  .lg-switch-item { height: 44px; }
}

/* ---------- Phone ---------- */
@media (max-width: 768px) {
  /* Heading lands under the header (72px) and the sticky contents entry (84 + 64) */
  .lg { --lg-offset: 10.25rem; }

  .lg-body { padding-top: 6.5rem; padding-bottom: 4rem; }

  .lg-hero { display: block; }
  .lg-hero .ui-hero { --ui-h1-size: 2.5rem; }
  .lg-hero .ui-hero .ui-h1 { margin-top: 1.125rem; line-height: 1.06; }
  .lg-hero .ui-hero-sub { margin-top: 0.75rem; }
  .lg-meta { margin-top: 1rem; font-size: 0.8125rem; }

  /* auto tracks share the spare width but let a long label ("Confidentialité") take what it needs */
  .lg-switch {
    display: grid;
    grid-template-columns: repeat(3, auto);
    height: 56px;
    margin-top: 1.5rem;
  }

  .lg-switch-item { height: 44px; padding: 0 0.625rem; }

  .lg-rule,
  .lg-aside { display: none; }

  .lg-layout { display: block; margin-top: 2.5rem; }
  .lg-article { gap: 2.75rem; max-width: none; }

  .lg-h2 { font-size: 1.3125rem; }
  .lg-h2 > .lg-num { width: 32px; height: 32px; }

  .lg-prose p,
  .lg-prose li { font-size: 1rem; }
  .lg-prose li::before { top: 11px; }

  .lg-facts { grid-template-columns: minmax(0, 1fr); }

  .lg-contact {
    --ui-card-pad: 22px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    border-radius: 22px;
  }

  .lg-contact-icon { --ui-tile: 48px; border-radius: 14px; }
  .lg-contact-title { font-size: 1.1875rem; }
  .lg-contact-btn { --ui-btn-h: 52px; width: 100%; }

  .lg-next-list { gap: 10px; }
}

/* Longer titles and switcher labels ("confidentialité") must fit a 335px column */
@media (max-width: 768px) {
  html:not(:lang(en)) .lg-hero .ui-hero { --ui-h1-size: 2.25rem; }
  html:not(:lang(en)) .lg-switch-icon { display: none; }
}

@media (max-width: 359px) {
  .lg-switch-icon { display: none; }
  .lg-switch-item { padding: 0 0.375rem; font-size: 0.8125rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html,
  body { scroll-behavior: auto; }

  .lg-switch-item,
  .lg-top-link,
  .lg-toc-link,
  .lg-toc-mark,
  .lg-toc-mark > svg,
  .lg-toc-mark::after,
  .lg-ring-arc,
  .lg-prose a,
  .lg-bar-progress,
  .lg-sheet-panel,
  .lg-sheet::backdrop { transition: none; }
}


/* The sheet is translucent so its sticky header blurs what scrolls under it */
.lg-sheet { --lg-sheet-bg: var(--ui-surface-solid); }

[data-theme="light"] .lg-sheet { --lg-sheet-bg: var(--ui-surface-solid); }
