/* Nobula — pages légales. S'appuie sur styles.css (jetons, nav, boutons, pied de page). */

/* ---------- Bandeau sombre : titre, date, autres documents ---------- */
.lg-head {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 96px)) 0 clamp(36px, 5vw, 56px);
  background: var(--night); color: var(--night-ink);
}
/* Le rond du logo, en halo flou dans le coin : la seule couleur du bandeau. */
.lg-head::before {
  content: ""; position: absolute; z-index: -1;
  width: 620px; height: 620px; right: -180px; top: -260px; border-radius: 50%;
  background: var(--grad); opacity: .22; filter: blur(110px);
}
.lg-kicker { color: var(--night-ink-2); }
.lg-title {
  max-width: 18ch; margin-top: 18px;
  font-size: clamp(38px, 5.6vw, 72px); font-weight: 600; line-height: 1.04; letter-spacing: -.035em;
}
.lg-date { margin-top: 22px; color: var(--night-ink-2); }

.lg-docs { display: flex; gap: 8px; margin-top: clamp(32px, 4vw, 48px); overflow-x: auto; scrollbar-width: none; }
.lg-docs::-webkit-scrollbar { display: none; }
.lg-docs a {
  flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
  color: var(--night-ink-2); font-size: 14px; font-weight: 500;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.lg-docs a:hover { color: var(--night-ink); border-color: rgba(255, 255, 255, .4); }
.lg-docs a[aria-current="page"] { background: var(--night-ink); border-color: var(--night-ink); color: var(--ink); }

/* ---------- Corps : sommaire + feuille ---------- */
.lg-body {
  display: grid; grid-template-columns: 230px minmax(0, 800px);
  justify-content: start; gap: clamp(48px, 7vw, 112px);
  padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 112px);
}

.lg-toc-fold { display: none; }
.lg-toc-side { position: sticky; top: calc(var(--nav-h) + 32px); }
.lg-toc-side > p { color: var(--ink-2); margin-bottom: 14px; }
.toc-link {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 0 7px 14px; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--ink-2); font-size: 14px; line-height: 1.35;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lg-toc nav { border-left: 1px solid var(--line); }
.toc-link:hover { color: var(--ink); }
.toc-link.active { color: var(--ink); border-left-color: var(--rose); font-weight: 500; }
.toc-num { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-2); }
.toc-link.active .toc-num { color: var(--rose); }

/* La feuille : le document lui-même, posé sur le fond chaud. */
.lg-doc {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(28px, 5vw, 64px);
  color: var(--ink-2); font-size: 16.5px; line-height: 1.75;
}
.lg-doc > :first-child { margin-top: 0; }
.lg-doc h2 {
  display: flex; align-items: baseline; gap: 14px;
  margin: 64px 0 16px; scroll-margin-top: calc(var(--nav-h) + 24px);
  color: var(--ink); font-size: clamp(22px, 2.2vw, 27px); font-weight: 600; line-height: 1.2; letter-spacing: -.025em;
}
.lg-doc > h2:first-child { margin-top: 0; }
.lg-doc > p:first-child + h2 { margin-top: 48px; }
.lg-num {
  flex: none; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: var(--rose); transform: translateY(-2px);
}
.lg-doc h3 { margin: 32px 0 8px; color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.lg-doc p { margin: 0 0 14px; }
.lg-doc ul, .lg-doc ol { margin: 0 0 18px; padding-left: 0; }
.lg-doc li { position: relative; margin-bottom: 8px; padding-left: 26px; }
.lg-doc ul > li::before {
  content: ""; position: absolute; left: 4px; top: .78em;
  width: 10px; height: 2px; border-radius: 2px; background: var(--grad);
}
.lg-doc ol { counter-reset: lg; list-style: none; }
.lg-doc ol > li { counter-increment: lg; }
.lg-doc ol > li::before {
  content: counter(lg, decimal-leading-zero); position: absolute; left: 0; top: .32em;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--rose);
}
.lg-doc strong { color: var(--ink); font-weight: 600; }
.lg-doc a:not(.btn) {
  color: var(--rose); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: rgba(190, 18, 61, .35);
  transition: text-decoration-color .2s var(--ease);
}
.lg-doc a:not(.btn):hover { text-decoration-color: currentColor; }

/* Encadré : une phrase à ne pas manquer. */
.lg-doc .callout {
  margin: 24px 0; padding: 18px 22px;
  background: #fbf0f2; border: 1px solid rgba(190, 18, 61, .14); border-radius: 10px;
  color: var(--ink);
}
.lg-doc .callout p:last-child { margin-bottom: 0; }

/* Paragraphe d'ouverture (suppression des données). */
.lg-doc .legal-lead { color: var(--ink); font-size: 19px; line-height: 1.6; letter-spacing: -.01em; }

/* Bouton « copier le lien » des mentions légales : visible au survol du titre. */
.anchor-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer;
  opacity: 0; transition: opacity .15s var(--ease), color .15s var(--ease);
}
.anchor-btn svg { width: 16px; height: 16px; }
.lg-doc h2:hover .anchor-btn, .anchor-btn:focus-visible { opacity: 1; }
.anchor-btn:hover { color: var(--rose); }

/* Aide : carte sombre, comme le bandeau du haut. */
.lg-help {
  margin-top: 72px; padding: clamp(24px, 3.5vw, 36px);
  background: var(--night); color: var(--night-ink-2); border-radius: 10px;
  font-size: 15px; line-height: 1.6;
}
.lg-help .lg-help-title { display: block; margin: 0 0 6px; color: var(--night-ink); font-size: 20px; }
.lg-help p { margin: 0 0 20px; max-width: 46ch; }

/* ---------- Tablette ---------- */
@media (max-width: 1080px) {
  .lg-body { grid-template-columns: 190px minmax(0, 1fr); gap: 40px; }
}

/* ---------- Téléphone : sommaire replié au-dessus, feuille bord à bord ---------- */
@media (max-width: 760px) {
  .lg-body { display: block; padding-top: 24px; }
  .lg-toc-side { display: none; }
  .lg-toc-fold { display: block; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
  .lg-toc-fold summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 48px; padding: 0 16px; color: var(--ink); cursor: pointer; list-style: none;
  }
  .lg-toc-fold summary::-webkit-details-marker { display: none; }
  .lg-toc-fold summary::after {
    content: ""; width: 8px; height: 8px; margin-top: -4px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform .2s var(--ease);
  }
  .lg-toc-fold[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .lg-toc-fold nav { margin: 0 16px 14px; }
  .toc-link { padding-top: 10px; padding-bottom: 10px; font-size: 15px; }

  .lg-doc { margin-inline: calc(-1 * var(--gutter)); padding: 28px var(--gutter) 36px; border-inline: 0; border-radius: 0; font-size: 16px; }
  .lg-doc h2 { margin-top: 48px; }
  .lg-help { margin-inline: calc(-1 * var(--gutter) + 8px); }
  .anchor-btn { opacity: 1; }
}
