/* ==========================================================================
   Pages juridiques (CGV…)
   ========================================================================== */
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.page-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.page-hero__meta .ico { width: 16px; height: 16px; color: var(--orange); }

.legal { padding: 48px 0 96px; background: var(--bg-alt); }
.legal__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }

/* Sommaire */
.toc { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 14px 14px; max-height: calc(100vh - 120px); overflow: auto; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 8px 10px; }
.toc ol { counter-reset: toc; }
.toc a { display: flex; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.35; transition: background .15s, color .15s; }
.toc a:hover { background: var(--bg-alt); color: var(--ink); }
.toc a.is-active { background: var(--orange-50); color: var(--orange-600); font-weight: 600; }
.toc a span { flex: none; min-width: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a.is-active span { color: var(--orange-600); }
.toc__print { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px 8px 4px; border: 0; border-top: 1px solid var(--line); background: none; font: 600 14px var(--font-title); color: var(--ink-2); cursor: pointer; }
.toc__print:hover { color: var(--orange-600); }

/* Contenu */
.legal__body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 44px 52px; }
.legal__intro { font-size: 17px; color: var(--ink-2); padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.legal__intro p + p { margin-top: 10px; }

.article { padding: 34px 0 6px; scroll-margin-top: 100px; }
.article + .article { border-top: 1px solid var(--line); }
.article h2 { display: flex; align-items: baseline; gap: 14px; font-size: 21px; font-weight: 800; margin-bottom: 16px; }
.article__num { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--orange-50); color: var(--orange-600); font-size: 15px; transform: translateY(-2px); }
.article h3 { font-size: 16px; margin: 20px 0 8px; }
.article p, .article li { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.article p + p { margin-top: 12px; }
.article ul { margin: 12px 0; display: grid; gap: 8px; }
.article ul li { position: relative; padding-left: 22px; }
.article ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--orange); }
.article a { color: var(--orange-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.article strong { color: var(--ink); }

.note { display: flex; gap: 12px; margin: 18px 0 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg-alt); border-left: 4px solid var(--orange); }
.note .ico { color: var(--orange); margin-top: 3px; }
.note p { font-size: 14.5px !important; }

.address-card { display: inline-block; margin-top: 10px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; line-height: 1.6; background: var(--bg-alt); }

.form-model { margin-top: 16px; padding: 22px 24px; border: 2px dashed var(--line); border-radius: 14px; background: #fcfcfd; }
.form-model p { font-size: 15px !important; }
.form-model p + p { margin-top: 8px !important; }
.form-model__fill { display: inline-block; min-width: 180px; border-bottom: 1px dotted var(--muted); }

.legal__foot { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s, background .2s; }
.to-top .ico { transform: rotate(-90deg); }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--orange); }

@media (max-width: 980px) {
  .legal__grid { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .toc ol { columns: 2; column-gap: 12px; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 640px) {
  .legal { padding: 20px 0 64px; }
  .legal__body { padding: 26px 20px; border-radius: var(--radius); }
  .toc ol { columns: 1; }
  .article h2 { font-size: 18.5px; gap: 10px; }
  .article__num { width: 30px; height: 30px; font-size: 14px; }
}

@media print {
  .topbar, .header, .footer, .toc, .to-top, .skip-link { display: none !important; }
  .page-hero { padding: 0 0 12px; background: none; border: 0; }
  .legal { padding: 0; background: none; }
  .legal__grid { display: block; }
  .legal__body { border: 0; padding: 0; }
  .article { break-inside: avoid-page; padding-top: 18px; }
  .article a { color: inherit; }
  body { font-size: 12px; }
}

/* Tableau d'informations (mentions légales) */
.facts { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 12px 18px; font-size: 15px; }
.facts div:nth-child(odd) { background: var(--bg-alt); }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.facts a { color: var(--orange-600); }
.article p + .facts, .facts + p { margin-top: 14px; }

/* Champ à compléter (à retirer avant la mise en ligne) */
mark.todo { background: #fff4d6; color: #8a5a00; border: 1px dashed #e0a800; border-radius: 6px; padding: 1px 7px; font-weight: 600; font-size: .92em; }

@media (max-width: 640px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; padding: 10px 14px; }
}
