/* ==========================================================================
   Pages légales et réassurance Petit Canon
   confidentialite, conditions-vente (préfixe lg-) et compléments de
   livraison-retours (préfixe lr-). Chargée après info.css ; s'appuie sur les
   jetons et composants de base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Valeurs à compléter et bloc « Identité du commerçant »
   -------------------------------------------------------------------------- */
/* Sobre : on voit qu'il manque une information, sans alarmer le visiteur. */
.pc-legal-vide {
  font-style: italic;
  color: var(--pc-texte-doux);
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
}

.pc-legal-identite { display: grid; gap: 0; margin: 0; }
.pc-legal-identite__ligne {
  display: grid;
  gap: 0.15rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--pc-trait);
}
.pc-legal-identite__ligne:last-child { border-bottom: 0; }
.pc-legal-identite dt { font-size: var(--pc-fs-sm); color: var(--pc-texte-doux); }
.pc-legal-identite dd { margin: 0; font-weight: 600; color: var(--pc-encre); overflow-wrap: anywhere; }
@media (min-width: 36em) {
  .pc-legal-identite__ligne { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--pc-space-4); align-items: baseline; }
}

/* --------------------------------------------------------------------------
   2. Mise en page des pages légales
   -------------------------------------------------------------------------- */
.lg-maj { margin-top: var(--pc-space-3); font-size: var(--pc-fs-sm); color: var(--pc-texte-doux); }

.lg-page { display: grid; gap: var(--pc-space-7); padding-bottom: var(--pc-section); }
@media (min-width: 64em) {
  .lg-page { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--pc-space-8); align-items: start; }
}

/* Sommaire : liste simple sur mobile, colonne collante sur grand écran */
.lg-sommaire {
  padding: var(--pc-space-5);
  border: 1px solid var(--pc-trait);
  border-radius: var(--pc-radius-m);
  background: var(--pc-surface);
}
.lg-sommaire__titre { font-family: var(--pc-font-ui); font-size: var(--pc-fs-sm); font-weight: 650; color: var(--pc-texte-doux); }
.lg-sommaire ol { margin-top: var(--pc-space-2); padding-left: 1.4em; font-size: var(--pc-fs-sm); }
.lg-sommaire li::marker { color: var(--pc-terracotta); }
.lg-sommaire a {
  display: inline-flex;
  align-items: center;
  min-height: var(--pc-tap);
  color: var(--pc-lien);
  text-underline-offset: 0.2em;
}
@media (min-width: 64em) {
  .lg-sommaire { position: sticky; top: calc(var(--pc-header-h) + 1.5rem); max-height: calc(100vh - var(--pc-header-h) - 3rem); overflow-y: auto; }
  .lg-sommaire a { min-height: 2.25rem; }
}

.lg-texte { min-width: 0; }
.lg-texte.pc-prose { max-width: 70ch; }
/* Les ancres ne passent pas sous l'en-tête collant */
.lg-texte [id] { scroll-margin-top: calc(var(--pc-header-h) + 1rem); }
.lg-texte h2 { counter-increment: lg-section; }
.lg-texte { counter-reset: lg-section; }
.lg-texte h2::before { content: counter(lg-section) ". "; color: var(--pc-terracotta); }
.lg-texte h2.lg-sans-numero { counter-increment: none; }
.lg-texte h2.lg-sans-numero::before { content: none; }

/* Encadré « En bref » */
.lg-bref {
  padding: var(--pc-space-5) var(--pc-space-5) var(--pc-space-4);
  border-radius: var(--pc-radius-l);
  background: var(--pc-creme);
  color: var(--pc-encre);
}
.lg-bref__titre { font-size: var(--pc-fs-lg); }
.lg-bref ul { margin-top: var(--pc-space-3); padding-left: 1.25em; }
.lg-bref li + li { margin-top: 0.4em; }

/* Bloc de coordonnées dans le texte */
.lg-carte {
  padding: var(--pc-space-2) var(--pc-space-5);
  border: 1px solid var(--pc-trait);
  border-radius: var(--pc-radius-m);
  background: var(--pc-surface);
}

/* Tableaux : défilement horizontal contenu dans le cadre, jamais la page */
.lg-texte .pc-table-wrap { max-width: 100%; overflow-x: auto; }
.lg-texte .pc-table { min-width: 34rem; font-size: var(--pc-fs-sm); }
.lg-texte .pc-table th[scope="row"] { white-space: nowrap; }
.lg-texte .pc-table code { font-size: 0.92em; overflow-wrap: anywhere; }

.lg-note { font-size: var(--pc-fs-sm); color: var(--pc-texte-doux); }
.lg-texte .pc-alert { margin-top: var(--pc-space-4); }

/* --------------------------------------------------------------------------
   3. Livraison et retours : retour en 3 étapes, échange de pointure
   -------------------------------------------------------------------------- */
.lr-sous-titre { margin-top: var(--pc-space-6); scroll-margin-top: calc(var(--pc-header-h) + 1rem); }
.lr-etapes {
  display: grid;
  gap: var(--pc-space-4);
  margin-top: var(--pc-space-5);
  padding: 0;
  list-style: none;
  counter-reset: lr-etape;
}
@media (min-width: 48em) { .lr-etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lr-etape {
  counter-increment: lr-etape;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: var(--pc-space-3);
  align-items: start;
  padding: var(--pc-space-4);
  border: 1px solid var(--pc-trait);
  border-radius: var(--pc-radius-m);
  background: var(--pc-surface);
}
@media (min-width: 48em) { .lr-etape { grid-template-columns: 1fr; } }
.lr-etape__icone {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--pc-creme);
  color: var(--pc-terracotta-fonce);
}
.lr-etape__icone svg { width: 1.6rem; height: 1.6rem; }
/* Numéro de l'étape, en pastille sur l'icône */
.lr-etape__icone::after {
  content: counter(lr-etape);
  position: absolute;
  right: -0.3rem;
  bottom: -0.3rem;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--pc-encre);
  color: var(--pc-papier);
  font-family: var(--pc-font-ui);
  font-size: var(--pc-fs-xs);
  font-weight: 700;
}
.lr-etape__titre { font-size: var(--pc-fs-lg); }
.lr-etape__texte { margin-top: 0.3rem; color: var(--pc-encre-douce); font-size: var(--pc-fs-sm); }

.lr-precisions { margin-top: var(--pc-space-5); }
.lr-precisions dt { font-weight: 650; color: var(--pc-encre); }
.lr-precisions dd { margin: 0.2rem 0 0; color: var(--pc-encre-douce); max-width: 62ch; }
.lr-precisions dd + dt { margin-top: var(--pc-space-3); }

.lr-echange {
  margin-top: var(--pc-space-7);
  padding: var(--pc-space-5);
  border-radius: var(--pc-radius-l);
  background: var(--pc-creme);
  scroll-margin-top: calc(var(--pc-header-h) + 1rem);
}
.lr-echange__titre { display: flex; align-items: center; gap: var(--pc-space-3); }
.lr-echange__titre svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--pc-terracotta-fonce); }
.lr-echange p { margin-top: var(--pc-space-3); max-width: 62ch; color: var(--pc-encre-douce); }
.lr-echange ol { margin-top: var(--pc-space-3); padding-left: 1.25em; color: var(--pc-encre-douce); }
.lr-echange li + li { margin-top: 0.35em; }

.lr-liens-legaux { margin-top: var(--pc-space-5); font-size: var(--pc-fs-sm); color: var(--pc-texte-doux); }

/* Mention de confidentialité sous un formulaire (page contact) */
.lg-mention-form { font-size: var(--pc-fs-sm); color: var(--pc-texte-doux); max-width: 62ch; }

@media (prefers-reduced-motion: reduce) {
  .lg-sommaire a { scroll-behavior: auto; }
}
