/* Shared CGV + barème print styles — identical for every theme.
 * Body pages keep theme --doc-font; ToS pages always use the Helvetica stack
 * (Bosch standard), so legal layout stays one-to-one across themes. */

.doc-tos-header {
  font-size: 9pt;
  font-weight: 300;
  margin: 10mm 0 4mm;
  border-bottom: 1px solid #ccc;
  padding-bottom: 2mm;
}

/* CGV + barème : 3 colonnes, texte noir, marges réduites.
 * @page margin is 0 → full A4 height is usable. */
.doc-page.is-tos {
  --tos-margin-x: 4mm;
  --tos-margin-top: 3mm;
  --tos-margin-bottom: 6mm;
  box-sizing: border-box;
  height: 297mm;
  max-height: 297mm;
  min-height: 0;
  overflow: hidden;
  padding: var(--tos-margin-top) var(--tos-margin-x) var(--tos-margin-bottom);
  page-break-after: always;
  page-break-inside: avoid;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
}

.doc-page.is-tos .doc-tos-header {
  font-size: 5.5pt;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 1.5mm;
  padding: 0 0 0.8mm;
  border-bottom: 0.5px solid #000;
  color: #000;
}

.doc-page.is-tos .doc-company-footer {
  font-size: 5pt;
  font-weight: 300;
  color: #000;
  left: var(--tos-margin-x);
  right: var(--tos-margin-x);
  bottom: 2mm;
}

/* Classic newspaper columns: three explicit columns filled top→bottom,
 * left→right in Ruby (Chromium print ignores column-fill:auto). */
.doc-tos.doc-tos--legal {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 2.5mm;
  /* Page 297mm − top pad 3mm − header ~5mm − footer band ~9mm ≈ 280mm */
  height: 280mm;
  max-height: 280mm;
  overflow: hidden;
  font-size: 5pt;
  line-height: 1.15;
  font-weight: 400;
  color: #000;
  text-align: justify;
  hyphens: auto;
}

.doc-tos.doc-tos--legal .doc-tos-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  padding-right: 1.5mm;
  border-right: 0.3px solid #ccc;
}

.doc-tos.doc-tos--legal .doc-tos-col:last-child {
  border-right: none;
  padding-right: 0;
}

.doc-tos.doc-tos--legal h1,
.doc-tos.doc-tos--legal h2,
.doc-tos.doc-tos--legal h3 {
  color: #000;
  break-after: avoid;
  margin: 1mm 0 0.5mm;
  font-weight: 700;
}

.doc-tos.doc-tos--legal h1 { font-size: 6.5pt; margin-top: 0; }
.doc-tos.doc-tos--legal h2 { font-size: 5.5pt; }
.doc-tos.doc-tos--legal h3 { font-size: 5.25pt; }

.doc-tos.doc-tos--legal p,
.doc-tos.doc-tos--legal li {
  margin: 0 0 0.7mm;
  orphans: 2;
  widows: 2;
  color: #000;
  font-weight: 400;
}

.doc-tos.doc-tos--legal ul,
.doc-tos.doc-tos--legal ol {
  margin: 0 0 1mm;
  padding-left: 3mm;
}

.doc-tos.doc-tos--legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 3.6pt;
  line-height: 1.05;
  margin: 0.8mm 0 1.2mm;
  color: #000;
}

.doc-tos.doc-tos--legal thead {
  break-after: avoid;
}

.doc-tos.doc-tos--legal th,
.doc-tos.doc-tos--legal td {
  border: 0.5px solid #000;
  padding: 0.2mm 0.3mm;
  vertical-align: top;
}

.doc-tos.doc-tos--legal strong {
  font-weight: 700;
  color: #000;
}

.doc-tos.doc-tos--legal hr {
  border: none;
  border-top: 0.5px solid #000;
  margin: 1.2mm 0;
}

.doc-tos.doc-tos--legal a.anchor {
  display: none;
}

.doc-tos h1, .doc-tos h2 {
  color: var(--doc-brand, #111111);
  font-size: 11pt;
  font-weight: 700;
}

.doc-tos p {
  margin: 2mm 0;
  font-weight: 300;
}
