/*
 * Documents classiques (Confidentialité, Mentions légales, Contact) : gabarit de lecture partagé.
 * Fond clair, aucune animation ni scène (cahier : ces pages restent des documents).
 * La colonne de lecture démarre à l'aplomb du logo du header : conteneur du header,
 * largeur de texte limitée sur les enfants. Classes doc-* reprises de la maquette (lg-*).
 */

.doc-paper {
  --ps-link: var(--ps-orange-dark);
  --ps-link-hover: var(--ps-ink);
  color: #2d1f18;
  background: #fffdfb;
}

.doc-w {
  box-sizing: border-box;
  max-width: var(--ps-container);
  margin: 0 auto;
  padding: 64px var(--ps-gutter) 112px;
  font-size: 19px;
  line-height: 1.6;
}

.doc-w > * {
  max-width: 760px;
}

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

.doc-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8a7266;
  font-size: 14px;
}

.ps-page main .doc-crumbs a {
  color: inherit;
  text-decoration: none;
}

.ps-page main .doc-crumbs a:hover {
  color: var(--ps-ink);
  text-decoration: underline;
}

.doc-crumbs [aria-current="page"] {
  color: var(--ps-ink);
}

.ps-page .doc-title {
  margin: 28px 0 8px;
  color: var(--ps-ink);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.ps-page .doc-meta {
  color: #8a7266;
  font-size: 15px;
}

.ps-page .doc-intro {
  margin-top: 20px;
  color: var(--ps-muted-light);
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

/* ---------- Sommaire ---------- */

.doc-toc {
  box-sizing: border-box;
  margin: 32px 0 8px;
  padding: 18px 22px;
  border: 1px solid #e6dbd2;
  border-radius: 10px;
  background: #fbf6f2;
}

.doc-toc-title {
  color: var(--ps-muted-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.doc-toc ol {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  column-gap: 24px;
  columns: 2;
}

.doc-toc li {
  break-inside: avoid;
}

.ps-page main .doc-toc a {
  color: var(--ps-ink);
  font-size: 17px;
  text-decoration: none;
}

.ps-page main .doc-toc a:hover {
  color: var(--ps-orange-dark);
  text-decoration: underline;
}

/* ---------- Corps ---------- */

.ps-page .doc-w h2 {
  margin: 44px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #e6dbd2;
  color: var(--ps-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  scroll-margin-top: calc(var(--ps-header-height) + 18px);
}

.ps-page .doc-w h3 {
  margin: 22px 0 6px;
  color: var(--ps-ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  scroll-margin-top: calc(var(--ps-header-height) + 18px);
}

.ps-page .doc-w p {
  margin: 0 0 12px;
}

.doc-w ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.doc-w li {
  margin: 4px 0;
}

/* Liens du texte : soulignés, comme les liens secondaires du site. */
.ps-page main .doc-w :is(p, li, dd) a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.doc-w strong {
  color: var(--ps-ink);
}

.doc-dl {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
}

.doc-dl dt {
  color: var(--ps-ink);
  font-weight: 700;
}

.doc-dl dd {
  margin: 0;
}

.doc-dl--lead {
  margin-top: 28px;
}

/* ---------- Formulaire (Contact) ---------- */

.doc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.doc-form label {
  color: var(--ps-ink);
  font-size: 17px;
  font-weight: 700;
}

.doc-form input,
.doc-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d9ccc4;
  border-radius: 8px;
  background: #fff;
  color: var(--ps-ink);
  font: inherit;
}

.doc-form textarea {
  resize: vertical;
}

.doc-form [aria-invalid="true"] {
  border-color: var(--ps-status-invalid);
}

.doc-form .ps-btn {
  align-self: flex-start;
  margin-top: 4px;
  border: 0;
  border-radius: var(--ps-radius-pill);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.ps-page .doc-form-status {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff1e6;
  color: #3a2a22;
}

.doc-form-status[hidden] {
  display: none;
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .doc-w {
    padding-top: 40px;
    padding-bottom: 80px;
  }
}

@media (max-width: 640px) {
  .doc-toc ol {
    columns: 1;
  }

  .doc-dl {
    grid-template-columns: 1fr;
  }

  .doc-dl dd {
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-form .ps-btn {
    transition: none;
  }
}

/* ---------- Points clés et tableaux (Confidentialité) ---------- */

/* Points clés : même taille que le texte du document. */
.ps-page main .doc-keys {
  margin-top: 24px;
}

.ps-page main .doc-keys li {
  font-size: 19px;
  line-height: 1.55;
}

/* Tableau dans un cadre fermé, plus large que la colonne de texte. */
.doc-w > .doc-tablewrap {
  max-width: 1080px;
  margin: 16px 0 20px;
  overflow-x: auto;
  border: 1px solid var(--ps-line-light);
  border-radius: var(--ps-radius-card);
  background: #fff;
}

.doc-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 17px;
  line-height: 1.5;
}

.doc-table th,
.doc-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ps-line-light);
  text-align: left;
  vertical-align: top;
}

.doc-table thead th {
  background: var(--ps-peach-light);
  color: var(--ps-ember);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.doc-table tbody th {
  color: var(--ps-ink);
  font-weight: 700;
}

.doc-table tbody tr:last-child > * {
  border-bottom: 0;
}

/* Sommaire : liens sans soulignement (la règle des liens du texte ne s'y applique pas). */
.ps-page main .doc-w .doc-toc li a {
  font-weight: 600;
  text-decoration: none;
}

.ps-page main .doc-w .doc-toc li a:hover {
  text-decoration: underline;
}

.doc-table strong {
  font-weight: 700;
}

.ps-page .doc-w .doc-dl + p {
  margin-top: 16px;
}
