/* ============================================================
   Ajouts propres à WordPress.

   style.css porte le design system. Tout ce qui n'existe que sous
   WordPress (barre d'admin, prose de l'éditeur, WooCommerce) vit ici.
   ============================================================ */

/* La barre d'administration est en position:fixed sur 32px de haut.
   Sans cette règle, elle recouvre le haut du bloc collant. */
.admin-bar .sticky-top { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .sticky-top { top: 46px; }
}

/* Classes exigées par le cœur de WordPress. */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: static;
  width: auto; height: auto;
  clip: auto;
  background: #fff;
  color: var(--ink);
  padding: 14px 20px;
}

.alignleft   { float: left;  margin: 0 1.5em 1em 0; }
.alignright  { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption:not(.photo figcaption) { color: var(--faint); font-size: 13px; }
.sticky { position: static; }   /* la classe WP "sticky post", pas notre bloc collant */

/* Contenu libre de l'éditeur, rendu dans le style du thème. */
.apcm-prose { color: var(--muted); font-size: 15.5px; line-height: 1.68; }
.apcm-prose > * + * { margin-top: 16px; }
.apcm-prose h2 { color: var(--ink); font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.03em; margin-top: 32px; }
.apcm-prose h3 { color: var(--ink); font-size: 18.5px; letter-spacing: -.02em; margin-top: 26px; }
.apcm-prose a  { color: var(--red); font-weight: 600; }
.apcm-prose a:hover { text-decoration: underline; }
.apcm-prose ul, .apcm-prose ol { padding-left: 22px; }
.apcm-prose li + li { margin-top: 8px; }
.apcm-prose img { border-radius: var(--radius); }
.apcm-prose blockquote {
  border-left: 3px solid var(--red);
  padding-left: 18px;
  color: var(--ink-soft);
}

/* ============================================================
   PAGES LÉGALES (page-legale.php)

   Du texte long, lu en diagonale ou en cherchant une phrase. On borne la
   largeur de lecture, on élargit l'interligne, et on donne un sommaire
   collant sur grand écran. Aucune animation : rien ne doit bouger sous
   l'œil de quelqu'un qui cherche la clause 6.4.
   ============================================================ */
.page-hero .legal-maj {
  margin-top: 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.legal-section { padding-top: clamp(24px, 3vw, 40px); }

.legal-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.legal-grid--solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 0 auto; }

/* Sommaire : collant sous le bloc d'en-tête, jamais sous la nav. */
.legal-toc { position: sticky; top: calc(var(--sticky-h) + 24px); }
.legal-toc h2 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint); font-weight: 600; margin-bottom: 14px;
}
.legal-toc ol { list-style: none; counter-reset: none; padding: 0; margin: 0; }
.legal-toc li + li { margin-top: 9px; }
.legal-toc a {
  display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted);
  padding-left: 12px; border-left: 2px solid var(--line);
  transition: color .2s, border-color .2s;
}
.legal-toc a:hover { color: var(--red); border-color: var(--red); }

.legal-body { max-width: 720px; font-size: 16.5px; line-height: 1.78; }
.legal-body > * + * { margin-top: 18px; }
.legal-body h2 {
  font-size: clamp(20px, 2.2vw, 25px);
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: calc(var(--sticky-h) + 24px);
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body h3 { font-size: 17.5px; margin-top: 30px; }
.legal-body hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.legal-body strong { color: var(--ink-soft); font-weight: 600; }

/* Renvois vers les autres pages légales. */
.legal-siblings {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: clamp(48px, 6vw, 72px); padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.legal-siblings a { color: var(--muted); transition: color .2s; }
.legal-siblings a:hover { color: var(--red); }
.legal-siblings a:last-child { color: var(--red); font-weight: 600; margin-left: auto; }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  /* Collant sur une colonne, le sommaire recouvrirait le texte. */
  .legal-toc { position: static; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .legal-toc ol { columns: 2; column-gap: 24px; }
  .legal-body { max-width: none; font-size: 16px; }
  .legal-siblings a:last-child { margin-left: 0; }
}
@media (max-width: 520px) {
  .legal-toc ol { columns: 1; }
}

/* Pagination du repli index.php */
.pagination, .nav-links.pagination { display: inline-flex; gap: 8px; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--muted); font-size: 14px; font-weight: 600;
}
.page-numbers.current { background: var(--grad-btn); color: #fff; border-color: transparent; }
.page-numbers:hover { border-color: var(--red); color: var(--red); }

/* Le style WooCommerce vit dans assets/css/woocommerce.css, chargé
   uniquement sur les pages de la boutique. */
