/* Morellia — documents contractuels.
   Mise en page sobre et sans ornement, indépendante de main.css : ces pages
   n'ont ni en-tête, ni pied de page, ni typographie de marque. L'architecture
   (numérotation, filets, retraits) sert la lecture point par point, pas la
   décoration : aucune couleur, aucune ombre, aucun arrondi.

   Le gras est réservé aux clauses limitatives (responsabilité, garantie,
   prescription, révocation). En droit suisse, une clause inhabituelle noyée
   dans une masse indifférenciée risque d'être écartée par la règle de
   l'insolite. Ne pas le retirer. */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #fff;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  font-size: 13.5px;
  line-height: 1.52;
}

.doc {
  max-width: 47rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* ——— En-tête du document ——— */

.doc-party {
  font-size: 12.5px;
  line-height: 1.45;
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #000;
}

h1 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.legal-meta {
  font-size: 12.5px;
  text-align: center;
  padding: 0.45rem 0;
  margin-bottom: 1.6rem;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.legal-meta span:not(:last-child)::after {
  content: "  ·  ";
}

.legal-intro {
  margin-bottom: 1.5rem;
}

/* ——— Sommaire ——— */

.legal-toc {
  padding: 1rem 1.25rem 1.1rem;
  margin-bottom: 2rem;
  border: 1px solid #000;
  font-size: 13px;
}

.legal-toc::before {
  content: "Sommaire";
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  padding-bottom: 0.5rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid #000;
}

.legal-toc ol {
  columns: 2;
  column-gap: 2.25rem;
  padding-left: 1.9rem;
}

@media (max-width: 34rem) {
  .legal-toc ol {
    columns: 1;
  }
}

.legal-toc li {
  break-inside: avoid;
  padding: 0.14rem 0;
  line-height: 1.4;
}

.legal-toc a {
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

/* ——— Articles ——— */

.legal-section {
  padding-top: 1.85rem;
  scroll-margin-top: 1rem;
}

.legal-section > h2 {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
  padding-bottom: 0.3rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #000;
}

.legal-num::after {
  content: ".";
}

.legal-section h3 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 1.05rem 0 0.3rem;
}

.legal-section h3:first-of-type {
  margin-top: 0.15rem;
}

.legal-body p {
  text-align: justify;
  hyphens: auto;
  margin-bottom: 0.65rem;
}

.legal-body p:last-child {
  margin-bottom: 0;
}

.legal-body strong {
  font-weight: 700;
}

/* ——— Listes ——— */

.legal-list {
  margin: 0.15rem 0 0.85rem;
  padding-left: 2.1rem;
  list-style: disc;
}

.legal-list li {
  text-align: justify;
  hyphens: auto;
  padding-bottom: 0.3rem;
}

.legal-list li:last-child {
  padding-bottom: 0;
}

.legal-list--num {
  list-style: decimal;
}

/* ——— Encadrés : clauses limitatives et avertissements ——— */

.legal-callout {
  padding: 0.7rem 0.9rem;
  margin: 0.9rem 0 1rem;
  border: 1px solid #000;
}

.legal-callout p {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

/* ——— Fiches d'identité ——— */

.legal-idcard {
  margin: 0.5rem 0 0.9rem;
  padding-left: 1.6rem;
}

.legal-idcard div {
  padding-bottom: 0.32rem;
}

.legal-idcard dt,
.legal-idcard dd {
  display: inline;
}

.legal-idcard dt {
  font-weight: 700;
}

.legal-idcard dt::after {
  content: " : ";
  font-weight: 400;
}

/* ——— Tableaux ——— */

.legal-tablewrap {
  overflow-x: auto;
  margin: 0.7rem 0 1rem;
}

.legal-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.42;
}

.legal-table th,
.legal-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid #000;
}

.legal-table th {
  font-weight: 700;
}

/* ——— Marqueur de donnée manquante — doit rester criant ——— */

.legal-fill {
  background: #ffe9a8;
  border-bottom: 1px dashed #b8860b;
  font-weight: 700;
}

/* ——— Fin de document ——— */

.legal-foot {
  margin-top: 2.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid #000;
  font-size: 12.5px;
}

.legal-crosslinks {
  margin-top: 0.45rem;
}

.legal-crosslinks a:not(:last-child)::after {
  content: "  ·  ";
  display: inline-block;
  text-decoration: none;
}

@media print {
  body {
    font-size: 10pt;
    line-height: 1.4;
  }

  .doc {
    max-width: none;
    padding: 0;
  }

  .legal-toc {
    break-after: page;
  }

  .legal-section {
    break-inside: avoid;
  }

  .legal-fill {
    background: none;
    border-bottom: 1px solid #000;
  }
}
