/* =========================================================
   Mova Design — pages légales (mentions, CGV, confidentialité)
   Complète ../style.css. Fond blanc, colonne lisible, sommaire collant.
   ========================================================= */

.legal-page { background: #fff; color: var(--ink); }
.legal-page .hdr::before { opacity: 1; }

.legal { padding: calc(var(--hdr-h) + clamp(40px, 6vw, 88px)) 0 clamp(72px, 9vw, 128px); }
.legal__in { display: grid; grid-template-columns: 240px minmax(0, 720px); grid-template-rows: auto 1fr; gap: 0 clamp(40px, 6vw, 96px); justify-content: center; align-items: start; }

/* En-tête de page */
.legal__head { grid-column: 2; }
.legal__k { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); margin-bottom: 20px; }
.legal__k::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.legal__title { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem); line-height: 1; letter-spacing: -.05em; font-weight: 600; text-wrap: balance; }
.legal__date { margin-top: 18px; color: var(--muted); font-size: 12px; }
.legal__note {
  margin-top: 28px; padding: 14px 18px; border-radius: 14px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14.5px; line-height: 1.5; color: var(--muted);
  display: flex; gap: 12px; align-items: flex-start;
}
.legal__note svg { width: 14px; height: 14px; flex: none; margin-top: 4px; color: var(--nova); }
.legal__note b { color: var(--ink); font-weight: 500; }

/* Sommaire */
.toc { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: calc(var(--hdr-h) + 32px); max-height: calc(100vh - var(--hdr-h) - 64px); overflow: auto; padding-bottom: 8px; }
.toc__t { color: var(--muted); margin-bottom: 14px; display: block; }
.toc ol { counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc ol a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; font-size: 14.5px; line-height: 1.35; color: var(--muted); transition: color .25s; }
.toc ol a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; padding-top: 2px; color: var(--muted); opacity: .7; }
.toc ol a:hover, .toc ol a.is-active { color: var(--ink); }
.toc ol a.is-active::before { color: var(--nova); opacity: 1; }
.toc__other { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14.5px; }
.toc__other a { color: var(--ink); justify-self: start; }
.toc__other a[aria-current="page"] { color: var(--nova); }

/* Texte long */
.prose { grid-column: 2; font-size: 17px; line-height: 1.7; color: #2b2b33; }
.prose > section { padding-top: 48px; margin-top: 48px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 16px); }
.prose > section:first-child { margin-top: 40px; }
.prose h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.15; letter-spacing: -.035em; font-weight: 600; color: var(--ink); margin-bottom: 18px; text-wrap: balance; }
.prose h2 .n { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; font-weight: 400; color: var(--nova); margin-bottom: 10px; }
.prose h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.015em; font-weight: 600; color: var(--ink); margin: 28px 0 8px; }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol, .prose ol + p, .prose .tbl-wrap + p, .prose p + .tbl-wrap, .prose ul + ul, .prose dl + p, .prose p + dl, .prose table + p, .prose p + table { margin-top: 14px; }
.prose ul, .prose ol { display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--nova); opacity: .75; }
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; position: relative; padding-left: 30px; }
.prose ol li::before { content: counter(li) "."; position: absolute; left: 0; font-family: var(--f-mono); font-size: 13px; top: .2em; color: var(--nova); }
.prose b, .prose strong { color: var(--ink); font-weight: 600; }
.prose a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--nova) 55%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .25s; overflow-wrap: anywhere; }
.prose a:not(.btn):hover { text-decoration-color: var(--nova); }
.prose em { font-style: italic; }

/* Fiche d'identité (mentions) */
.prose dl { display: grid; grid-template-columns: 200px 1fr; border-top: 1px solid var(--line); }
.prose dt, .prose dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.prose dt { color: var(--muted); font-size: 15px; padding-right: 16px; }
.prose dd { color: var(--ink); }

/* Tableau (paiements, conservation) */
.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.tbl-wrap { overflow-x: auto; margin-top: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.tbl th { font-family: var(--f-mono); font-size: 11.5px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tbl td:first-child { color: var(--ink); font-weight: 500; }

/* Encadré */
.box { margin-top: 18px; padding: 18px 20px; border-radius: 14px; background: var(--lilac); color: #26214f; font-size: 16px; line-height: 1.6; }
.box b { color: #1a1640; }

/* Champs à compléter */
.todo { background: #fff4b3; color: #5a4300; box-shadow: 0 0 0 2px #fff4b3; border-radius: 4px; padding: 0 3px; font-weight: 500; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Fin de page */
.legal__end { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.legal__end p { color: var(--muted); font-size: 15px; max-width: 40ch; }

/* Pas d'animation de pied de page sur ces pages */
.legal-page .foot__word, .legal-page .foot__star { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .legal__in { grid-template-columns: minmax(0, 720px); }
  .legal__head, .prose { grid-column: 1; }
  .toc { grid-column: 1; grid-row: auto; position: static; max-height: none; overflow: visible; margin-top: 32px; padding: 20px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
  .toc ol { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .prose > section:first-child { margin-top: 32px; }
}
@media (max-width: 640px) {
  .prose { font-size: 16.5px; }
  .toc ol { grid-template-columns: 1fr; }
  .prose dl { grid-template-columns: 1fr; }
  .prose dt { padding-bottom: 0; border-bottom: 0; font-size: 13px; }
  .prose dd { padding-top: 4px; }
  .prose > section { padding-top: 36px; margin-top: 36px; }
  .legal-page .foot { padding-bottom: 28px; }
  .legal__end .btn { width: 100%; }
}

@media print {
  .hdr, .toc, .foot, .legal__end .btn, .menu { display: none !important; }
  .legal { padding-top: 0; }
  .legal__in { grid-template-columns: 1fr; }
  .todo { box-shadow: none; }
}
