/* PROTECH EST — pages légales (mentions-legales.html, confidentialite.html).
   Complète style.css sans le modifier : mêmes jetons (béton, oxyde, anthracite), mêmes polices
   (Big Shoulders pour les titres, Barlow pour le texte). Rien ici ne s'applique à index.html. */

/* En-tête, menu mobile et bouton « Cookies » : balisage identique à index.html, styles de style.css,
   comportement de site.js (en-tête plein d'emblée sur les pages sans héros, menu #mnav, bandeau). */

/* ---------- Page ---------- */
.legal { padding-top: var(--hdr); }
.legal .token { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Bandeau de titre (rouge oxyde, comme le bandeau de l'accueil) */
.legal__head { background: var(--oxyde); color: #fff; padding: clamp(52px, 7vw, 104px) var(--gut) clamp(40px, 5vw, 64px); }
.legal__head ::selection { background: var(--anthracite); color: #fff; }
.legal__kicker {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  font: 600 .875rem/1 var(--f-text); letter-spacing: .04em; color: var(--oxyde-tint);
}
.legal__kicker::before { content: ""; flex: none; width: 28px; height: 2px; background: currentColor; }
.legal__title {
  margin: 0; max-width: 16ch;
  font: 850 clamp(2.6rem, 7.4vw, 6.25rem)/.92 var(--f-display); text-transform: uppercase; letter-spacing: -.004em;
  overflow-wrap: break-word; hyphens: manual;
}
.legal__lede { margin: 24px 0 0; max-width: 62ch; font-size: 1.125rem; line-height: 1.55; color: var(--oxyde-pale); }
.legal__maj { margin: 16px 0 0; font-size: .875rem; font-weight: 500; letter-spacing: .01em; color: var(--oxyde-tint); }

/* Sommaire + texte */
.legal__layout { padding: clamp(48px, 6.5vw, 96px) var(--gut) clamp(72px, 9vw, 128px); }
.legal__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }

.legal__toc { grid-column: 1 / span 3; position: sticky; top: calc(var(--hdr) + 32px); }
.legal__toc-t { margin: 0 0 14px; font: 800 1.375rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.legal__toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.legal__toc li { border-bottom: 1px solid var(--rule); }
.legal__toc a {
  display: grid; grid-template-columns: 2.4em minmax(0, 1fr); align-items: baseline; column-gap: 6px;
  padding: 11px 0; font-weight: 500; font-size: .9375rem; line-height: 1.3; text-decoration: none;
  transition: color .25s var(--ease-out);
}
.legal__toc a span { font-weight: 600; font-size: .8125rem; letter-spacing: .03em; font-variant-numeric: tabular-nums; color: var(--oxyde); }
.legal__toc a:hover { color: var(--oxyde-d); }

.legal__body { grid-column: 5 / -1; min-width: 0; }
.legal__body > .legal__sec > :where(p, ul, ol, dl, h3) { max-width: 70ch; }

.legal__sec { padding-top: 26px; border-top: 2px solid var(--anthracite); scroll-margin-top: calc(var(--hdr) + 16px); }
.legal__sec + .legal__sec { margin-top: clamp(56px, 7vw, 88px); }
.legal__sec h2 {
  margin: 0 0 22px;
  font: 800 clamp(1.875rem, 3.4vw, 2.625rem)/.98 var(--f-display); text-transform: uppercase; letter-spacing: .004em;
}
.legal__no {
  display: block; margin-bottom: 12px;
  font: 600 .875rem/1 var(--f-text); letter-spacing: .03em; font-variant-numeric: tabular-nums; color: var(--oxyde);
}
.legal__sec h3 { margin: 34px 0 12px; font: 750 1.375rem/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .012em; }

.legal__body p { margin: 0 0 1em; line-height: 1.65; }
.legal__body strong { font-weight: 600; }
.legal__body ul { list-style: none; margin: 0 0 1.3em; padding: 0; }
.legal__body ul li { position: relative; padding-left: 22px; margin-bottom: .6em; line-height: 1.6; }
.legal__body ul li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 7px; height: 7px; background: var(--oxyde); }
.legal__body a {
  color: var(--oxyde-d); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.legal__body a:hover { text-decoration-thickness: 2px; }
.legal__note { font-size: .9375rem; color: var(--texte-2); }

/* Fiches (éditeur, hébergeur, contact) */
.legal__dl { margin: 0 0 1.5em; border-top: 1px solid var(--rule-strong); }
.legal__dl > div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); column-gap: 24px; row-gap: 3px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.legal__dl dt { padding-top: 2px; font-size: .875rem; font-weight: 600; letter-spacing: .01em; color: var(--texte-2); }
.legal__dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Tableaux (finalités, durées, cookies) */
.legal__table { width: 100%; margin: 6px 0 1.6em; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.legal__table caption { caption-side: top; padding: 0 0 10px; text-align: left; font-size: .875rem; font-weight: 500; color: var(--texte-2); }
.legal__table th, .legal__table td { padding: 13px 18px 13px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.legal__table th:last-child, .legal__table td:last-child { padding-right: 0; }
.legal__table thead th { padding-top: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--texte-2); border-bottom: 1px solid var(--rule-strong); }
.legal__table tbody th { font-weight: 600; }
.legal__table code { font: 500 .875rem/1.35 ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace; color: var(--anthracite); overflow-wrap: anywhere; }
.legal__table .t-sub { display: block; margin-top: 4px; font-size: .8125rem; font-weight: 500; color: var(--texte-2); }
.legal__table--cookies th:first-child { width: 24%; }
.legal__table--cookies td:nth-child(3) { width: 17%; }
.legal__table--cookies td:nth-child(4) { width: 22%; }
.legal__table--2 th:first-child, .legal__table--2 td:first-child { width: 52%; }

/* ---------- Adaptatif ---------- */
@media (max-width: 1099px) {
  .legal__toc, .legal__body { grid-column: 1 / -1; }
  .legal__toc { position: static; margin-bottom: 56px; }
  .legal__toc ol { columns: 2; column-gap: 32px; }
  .legal__toc li { break-inside: avoid; }
}
@media (max-width: 760px) {
  .legal__head { padding: 44px 16px 36px; }
  .legal__title { font-size: clamp(2.5rem, 11.6vw, 3.4rem); line-height: .95; }
  .legal__lede { margin-top: 18px; font-size: 1.0625rem; }
  .legal__layout { padding: 40px 16px 72px; }
  .legal__toc { margin-bottom: 48px; }
  .legal__toc ol { columns: 1; }
  .legal__sec h3 { margin-top: 28px; font-size: 1.25rem; }
  .legal__dl > div { grid-template-columns: minmax(0, 1fr); }

  /* tableaux empilés : une fiche par ligne, l'intitulé de colonne repris devant chaque valeur */
  .legal__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .legal__table, .legal__table caption, .legal__table tbody, .legal__table tr, .legal__table th, .legal__table td { display: block; width: auto !important; }
  .legal__table tbody tr { padding: 14px 0 15px; border-bottom: 1px solid var(--rule); }
  .legal__table tbody tr:first-child { border-top: 1px solid var(--rule-strong); }
  .legal__table tbody th, .legal__table tbody td { padding: 0; border: 0; }
  .legal__table tbody td { margin-top: 9px; }
  .legal__table tbody td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .75rem; font-weight: 600; letter-spacing: .03em; color: var(--texte-2); }
}

@media (prefers-reduced-motion: reduce) {
  .legal__toc a { transition: none; }
}

@media print {
  .hdr, .ftr, .skip, .legal__toc, .mnav { display: none !important; }
  body { background: #fff; }
  .legal { padding-top: 0; }
  .legal__head { background: none; color: var(--anthracite); padding: 0 0 24px; }
  .legal__kicker, .legal__lede, .legal__maj { color: var(--texte-2); }
  .legal__layout { padding: 0; }
  .legal__body { grid-column: 1 / -1; }
  .legal__body a { color: inherit; }
  .legal__sec { break-inside: auto; }
}
