/* =========================================================
   Fermcoop · pages légales (mentions légales, confidentialité)
   Chargée après css/style.css : n'utilise que ses variables.
   ========================================================= */

/* ---------- En-tête ---------- */
.site-header__back { margin-left: auto; white-space: nowrap; }

/* ---------- Mise en page ---------- */
.legal { padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 104px); }
.legal__body { max-width: 960px; }
.legal__body > p,
.legal__body > ul,
.legal__body > h1,
.legal__body > h2,
.legal__body > .legal__callout,
.legal__body > .table-wrap { max-width: min(70ch, 37em); } /* ~70 caractères par ligne en DM Sans */
.legal__body > .table-wrap--wide { max-width: none; }

.legal__title { margin-bottom: .5em; }
.legal__meta { color: var(--ink-soft); font-size: .95em; }

.legal__body h2 {
  font-size: clamp(21px, 1.6vw + 12px, 26px);
  font-weight: 700;
  margin: 2.2em 0 .7em;
  padding-top: .9em;
  border-top: 1px solid var(--line);
}
.legal__body h1 + h2,
.legal__body .legal__meta + h2 { border-top: 0; padding-top: 0; }

.legal__body ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal__body li { margin-bottom: .45em; }
.legal__body li::marker { color: var(--green-500); }

.legal__body a { color: var(--green-900); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.legal__body a:hover { text-decoration-color: var(--green-500); text-decoration-thickness: 2px; }

/* Avertissement sur les titres participatifs */
.legal__callout {
  background: var(--beige);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 0 0 1.2em;
}
.legal__callout p { margin: 0; }

/* ---------- Tableaux ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.4em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.table-wrap:focus-visible { outline-offset: 2px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9em;
  line-height: 1.45;
}
.legal table.table--wide { min-width: 760px; }
.legal th,
.legal td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.legal thead th {
  font-family: var(--f-title);
  font-weight: 700;
  color: var(--green-900);
  background: var(--beige);
  white-space: nowrap;
}
.legal tbody th { font-weight: 600; color: var(--green-900); min-width: 12em; }
.legal tbody tr:last-child > * { border-bottom: 0; }
.legal tbody tr:nth-child(even) > * { background: rgba(244, 240, 233, .45); }

/* Mentions à compléter : visibles tant qu'elles ne sont pas remplies */
mark.todo {
  background: #fff6d1;
  color: #6b4a00;
  border: 1px dashed #c99a00;
  border-radius: 4px;
  padding: 0 .25em;
  font-weight: 500;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Texte réservé aux lecteurs d'écran */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Pied de page ---------- */
.site-footer a { color: var(--white); text-underline-offset: 3px; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer__legal a[aria-current="page"] { text-decoration-thickness: 2px; text-decoration-color: var(--yellow); }
