/* ============================================================
   Pages légales : une page de document, blanche et aérée.
   Grand titre, date surlignée au jaune Yaxor, colonne des documents légaux à gauche
   (le document lu est déplié sur ses parties), texte en une colonne lisible.
   ============================================================ */
.legal-page {
  --gris: #5c6784;
  --trait: #e6eaf2;
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
}
.barre,
.titre,
.document,
.pied {
  width: min(1140px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
}

/* ---------- barre du haut ---------- */
.barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0;
}
.barre img { display: block; height: 30px; width: auto; }

/* ---------- titre ---------- */
.titre { padding: 72px 0 0; }
.titre h1 {
  max-width: 900px;
  margin: 0;
  font: 400 clamp(52px, 9vw, 120px)/.92 var(--font-display);
  text-transform: uppercase;
  color: var(--ink);
}
.date { margin: 28px 0 0; font-size: 15px; }
.date mark { padding: 3px 8px; border-radius: 3px; background: var(--yellow); color: var(--ink); font-weight: 500; }
/* onglets du téléphone (sur ordi, la colonne de gauche fait ce travail) */
.onglets { display: none; }

/* ---------- document ---------- */
.document {
  display: grid;
  grid-template-columns: 240px minmax(0, 680px);
  gap: 96px;
  margin-top: 64px;
  padding: 48px 0 120px;
  border-top: 1px solid var(--trait);
}
.documents { position: sticky; top: 32px; align-self: start; }
.documents__titre { margin: 0 0 16px; font-size: 13px; font-weight: 600; color: var(--gris); }
.documents ul { list-style: none; margin: 0; padding: 0; }
.doc > a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--gris);
  text-decoration: none;
  transition: color .2s ease;
}
.doc > a:hover { color: var(--ink); }
.doc.is-active > a { color: var(--ink); font-weight: 600; }
.doc__parties { margin: 4px 0 12px !important; border-left: 1px solid var(--trait); }
.doc__parties a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.35;
  color: var(--gris);
  text-decoration: none;
  transition: color .2s ease, border-color .3s ease;
}
.doc__parties a:hover { color: var(--ink); }
.doc__parties a.is-active { color: var(--blue); border-left-color: var(--blue); }

/* ---------- texte ---------- */
.texte section { scroll-margin-top: 32px; margin: 0 0 48px; }
.texte h2 { margin: 0 0 12px; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.texte p { margin: 0 0 14px; font-size: 16px; line-height: 1.75; color: #2b3550; }
.chapeau { margin: 0 0 56px !important; font-size: 19px !important; line-height: 1.6 !important; color: var(--ink) !important; }
.fiche { margin: 0 0 56px; border-top: 1px solid var(--trait); }
.fiche > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--trait); }
.fiche dt { font-size: 14px; color: var(--gris); }
.fiche dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.fin { margin-top: 64px !important; padding-top: 24px; border-top: 1px solid var(--trait); }

/* liens : soulignés finement, le trait s'épaissit et passe au bleu foncé au survol */
.texte a,
.fiche a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness .2s ease, color .2s ease;
}
.texte a:hover,
.fiche a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }

/* champs à remplir : le même surlignage jaune que la date */
.a-completer { padding: 2px 6px; border-radius: 3px; background: #fff3a6; color: #6b5200; font-weight: 500; }

/* ---------- pied ---------- */
.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--trait);
  font-size: 13px;
  color: var(--gris);
}
.pied p { margin: 0; }
.pied__liens { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.pied a { color: var(--gris); text-decoration: none; transition: color .2s ease; }
.pied a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- tablette et téléphone ---------- */
@media (max-width: 960px) {
  .document { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0; padding-top: 32px; border-top: 0; }   /* le trait des onglets suffit */
  .documents { display: none; }
  .onglets { display: flex; gap: 28px; margin-top: 32px; border-bottom: 1px solid var(--trait); }
  .onglet { margin-bottom: -1px; padding: 0 0 12px; border-bottom: 2px solid transparent; font-size: 15px; font-weight: 500; color: var(--gris); text-decoration: none; }
  .onglet.is-active { border-bottom-color: var(--blue); color: var(--ink); font-weight: 600; }
}
@media (max-width: 640px) {
  .barre { padding: 18px 0; }
  .barre img { height: 26px; }
  .titre { padding-top: 40px; }
  .document { padding-bottom: 80px; }
  .fiche > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .chapeau { font-size: 17px !important; }
  .pied { flex-direction: column; }
}
