/* =====================================================================
   P'tit Nous — pages légales (CGU, confidentialité, mentions légales,
   sécurité des enfants) et page 404.
   S'appuie sur core.css (tokens, polices, nav, footer). Voir DESIGN.md.
   Règle : la lisibilité prime. Le texte juridique n'est jamais masqué
   par une animation, sauf le titre (révélé en < 1 s) et de légères
   apparitions au scroll des intertitres, tableaux et encadrés.
   ===================================================================== */

:root {
  --measure: 38rem;                  /* ≈ 70–72 caractères en Nunito 18 px */
  --toc-w: 16.5rem;
  --nav-clear: 96px;                 /* hauteur dégagée sous l'en-tête pilule */
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --hairline: rgba(59, 43, 63, 0.1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .17 0 0 0 0 .25 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html { scroll-padding-top: var(--nav-clear); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Fond « aube » : dégradé pastel + grain très léger ---------- */
body.legal {
  background: var(--cream);
  position: relative;
  isolation: isolate;
}
body.legal::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60vmax 50vmax at 100% 0%, rgba(230, 221, 251, 0.75), transparent 60%),
    radial-gradient(55vmax 45vmax at 0% 18%, rgba(255, 216, 194, 0.45), transparent 60%),
    var(--grad-dawn);
  pointer-events: none;
}
body.legal::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image: var(--grain);
  opacity: 0.05;
  pointer-events: none;
}

/* Langue : sans JS, les deux versions sont visibles l'une après l'autre. */
.js[data-show="fr"] [data-lang="en"],
.js[data-show="en"] [data-lang="fr"] { display: none; }

/* Le <main> reçoit le focus du lien d'évitement : pas de cadre sur tout le document. */
.legal-main:focus { outline: none; }

/* En-tête masqué : sortir aussi son ombre de l'écran (core : -120 %, l'ombre reste visible). */
.nav[data-hidden="true"] .nav__bar { transform: translateY(calc(-100% - 40px)); }

/* ---------- Barre de progression de lecture ---------- */
.read-progress {
  position: fixed; inset: 0 0 auto; z-index: 120;
  height: 3px;
  pointer-events: none;
}
.read-progress span {
  display: block; height: 100%;
  background: var(--grad-pair);
  transform-origin: 0 50%;
  transform: scaleX(0);
  box-shadow: 0 0 12px rgba(242, 132, 158, 0.55);
}
html:not(.js) .read-progress { display: none; }

/* ---------- En-tête de document (hero éditorial) ---------- */
.doc + .doc { border-top: 1px solid var(--hairline); }  /* sans JS : séparation FR / EN */

.doc-hero {
  position: relative;
  overflow-x: clip; /* le motif décoratif déborde à droite sans créer de scroll horizontal */
  padding: calc(var(--nav-clear) + clamp(28px, 6vw, 72px)) 0 clamp(36px, 6vw, 72px);
}
.doc-hero__inner { position: relative; z-index: 1; }

/* Motif du logo : deux cercles au trait qui se frôlent, cœur au centre */
.doc-hero__art {
  position: absolute; z-index: 0;
  top: calc(var(--nav-clear) - 20px);
  right: max(-120px, calc((100vw - var(--maxw)) / 2 - 140px));
  width: clamp(300px, 46vw, 680px);
  pointer-events: none;
  opacity: 0.9;
}
.doc-hero__art svg { width: 100%; height: auto; overflow: visible; }
.doc-hero__art .o {
  fill: none;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center;
}
.doc-hero__art .o--a { stroke: rgba(242, 132, 158, 0.55); fill: rgba(255, 201, 214, 0.22); }
.doc-hero__art .o--b { stroke: rgba(139, 115, 224, 0.42); fill: rgba(230, 221, 251, 0.3); }
.doc-hero__art .o-heart {
  fill: rgba(229, 110, 143, 0.5);
  transform-box: fill-box; transform-origin: 50% 60%;
}
@media (prefers-reduced-motion: no-preference) {
  .js .doc-hero__art .o--a { animation: orbit-a 9s var(--ease-in-out) infinite alternate; }
  .js .doc-hero__art .o--b { animation: orbit-b 9s var(--ease-in-out) infinite alternate; }
  .js .doc-hero__art .o-heart { animation: heartbeat 0.857s ease-in-out infinite; } /* ≈ 70 bpm */
}
@keyframes orbit-a { from { transform: translate(-14px, 6px); } to { transform: translate(10px, -4px); } }
@keyframes orbit-b { from { transform: translate(14px, -6px); } to { transform: translate(-10px, 4px); } }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.14); }
  28% { transform: scale(1); }
  42% { transform: scale(1.08); }
  70% { transform: scale(1); }
}
@media (max-width: 759px) {
  .doc-hero__art { width: 74vw; right: -32vw; top: calc(var(--nav-clear) - 34px); opacity: 0.42; }
}

/* Onglets des documents */
.doc-switch {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: clamp(28px, 5vw, 56px);
}
.doc-switch a {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 0.86rem; font-weight: 750; letter-spacing: 0.01em;
  color: var(--ink-soft); text-decoration: none;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2), box-shadow var(--dur-2);
}
.doc-switch a:hover { background: var(--glass-strong); color: var(--ink); }
.doc-switch a[aria-current="page"] {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 8px 24px -10px rgba(59, 43, 63, 0.55);
}

/* Titre géant */
.doc-title {
  max-width: 15ch;
  font-size: clamp(2.55rem, 1.25rem + 5.6vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 450;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0;
  color: var(--ink);
}
.doc-title .it {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  background: linear-gradient(100deg, var(--rose-deep) 0%, #c45a95 45%, var(--lilac-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-right: 0.06em; /* l'italique déborde un peu de sa boîte */
}
/* Masques de lignes SplitText : laisser respirer les jambages */
.doc-title .tl { padding-bottom: 0.08em; margin-bottom: -0.08em; }
/* Avant l'intro, le titre est réservé (pas de saut de mise en page) */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.hero-ready) .doc-title { visibility: hidden; }
}

.doc-hero__foot {
  display: grid; gap: 20px 48px;
  margin-top: clamp(28px, 4.5vw, 52px);
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
@media (min-width: 900px) {
  .doc-hero__foot { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}
.doc-hero__dek {
  max-width: 34ch;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.02rem + 0.75vw, 1.6rem);
  line-height: 1.32;
  font-style: italic;
  font-weight: 380;
  font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 0;
  color: var(--ink-soft);
}
.doc-hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  font-size: var(--fs-small);
}
@media (min-width: 900px) { .doc-hero__meta { justify-content: flex-end; flex-wrap: nowrap; } }
.doc-hero__meta .meta,
.doc-hero__read {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-weight: 650;
}
.doc-hero__meta .meta::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad-pair);
  box-shadow: 0 0 0 3px rgba(242, 132, 158, 0.18);
}
.doc-hero__read { color: var(--ink-soft); font-weight: 600; }
.doc-hero__alt {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 0 6px;
  font-weight: 800; color: var(--rose-ink);
}

/* Entrée du hero (éléments d'interface uniquement, rapide) */
@media (prefers-reduced-motion: no-preference) {
  .js.hero-ready .doc-switch,
  .js.hero-ready .doc-hero__dek,
  .js.hero-ready .doc-hero__read,
  .js.hero-ready .doc-hero__alt,
  .js.hero-ready .doc-hero__art {
    animation: rise var(--dur-3) var(--ease-out) both;
  }
  .js.hero-ready .doc-hero__dek { animation-delay: 0.18s; }
  .js.hero-ready .doc-hero__read { animation-delay: 0.24s; }
  .js.hero-ready .doc-hero__alt { animation-delay: 0.3s; }
  .js.hero-ready .doc-hero__art { animation: art-in 1.4s var(--ease-out) both; }
  .js.hero-ready .toc { animation: rise var(--dur-3) var(--ease-out) 0.2s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes art-in { from { opacity: 0; transform: scale(0.92) rotate(-4deg); } to { opacity: 0.9; transform: none; } }

/* ---------- Corps : sommaire + texte ---------- */
.doc-body {
  /* Bloc (et non grille) sous 1024 px : le sommaire collant doit pouvoir
     coller sur toute la hauteur du texte, pas seulement dans sa cellule. */
  display: block;
  padding-bottom: clamp(72px, 12vw, 160px);
}
@media (min-width: 1024px) {
  .doc-body {
    display: grid;
    grid-template-columns: var(--toc-w) minmax(0, var(--measure));
    justify-content: start;
    column-gap: clamp(56px, 9vw, 136px);
  }
}

/* ---------- Sommaire ---------- */
.toc { position: relative; z-index: 20; }
.toc details > summary { list-style: none; }
.toc details > summary::-webkit-details-marker { display: none; }
.toc__label {
  font-size: var(--fs-micro); font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.toc__chev { width: 20px; height: 20px; flex: none; transition: transform var(--dur-2) var(--ease-out); }
.toc details[open] .toc__chev { transform: rotate(180deg); }
.toc nav { position: relative; }
.toc ol { margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  position: relative;
  display: grid; grid-template-columns: 2.1em minmax(0, 1fr); align-items: baseline;
  padding: 7px 12px 7px 18px;
  border-radius: 12px;
  font-size: 0.9rem; line-height: 1.35; font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
  transition: color var(--dur-2), background-color var(--dur-2);
}
.toc a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.5); }
.toc__n {
  font-family: var(--font-display); font-style: italic;
  font-size: 0.82rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  opacity: 0.85;
  transition: color var(--dur-2);
}
.toc a[aria-current="true"] { color: var(--ink); font-weight: 800; }
.toc a[aria-current="true"] .toc__n { color: var(--rose-ink); opacity: 1; }
.toc a::before {
  content: "";
  position: absolute; left: -4px; top: 50%;
  width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%;
  background: var(--grad-pair);
  box-shadow: 0 0 0 4px rgba(255, 246, 243, 0.95), 0 0 14px rgba(242, 132, 158, 0.7);
  transform: scale(0);
  transition: transform var(--dur-2) var(--ease-spring);
}
.toc a[aria-current="true"]::before { transform: scale(1); }
.toc__rail {
  position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px;
  background: var(--hairline);
}
.toc__rail span {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--rose), var(--lilac));
  transform-origin: 50% 0;
  transform: scaleY(0);
}

/* Bureau : colonne collante */
@media (min-width: 1024px) {
  .toc {
    position: sticky; top: 108px; align-self: start;
    max-height: calc(100vh - 132px);
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 4px 4px 4px 0;
  }
  .toc summary { display: flex; align-items: center; gap: 10px; margin: 0 0 14px 18px; cursor: default; pointer-events: none; }
  .toc__current, .toc__chev { display: none; }
}

/* Mobile / tablette : barre repliable collée en haut */
@media (max-width: 1023px) {
  .toc { margin: 0 0 clamp(28px, 6vw, 44px); }
  .toc summary {
    display: flex; align-items: center; gap: 12px;
    min-height: 52px; padding: 0 16px 0 20px;
    border-radius: var(--r-pill);
    background: var(--glass-strong);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 10px 30px -14px rgba(59, 43, 63, 0.3);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    cursor: pointer;
    user-select: none;
  }
  .toc__current {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-weight: 700; font-size: 0.92rem; color: var(--ink);
  }
  .toc__current:not(:empty)::before { content: "· "; color: var(--ink-faint); }
  .toc__label { flex: none; }
  .toc__chev { margin-left: auto; color: var(--ink-soft); }
  .toc nav { padding: 12px 6px 8px 8px; }
  .toc__rail { left: 8px; top: 18px; bottom: 14px; }

  .js .toc {
    position: sticky; top: 86px;
    transition: top var(--dur-3) var(--ease-out);
  }
  .js[data-nav-hidden="true"] .toc { top: 12px; }
  .js .toc nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    max-height: min(64vh, 560px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 14px 10px 12px 12px;
    border-radius: var(--r-md);
    background: #fffaf8; /* opaque : un fond translucide laisse « fantômer » le texte dessous */
    box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-float);
  }
  .js .toc__rail { left: 12px; top: 20px; bottom: 18px; }
  @media (prefers-reduced-motion: no-preference) {
    .js .toc details[open] nav { animation: drop var(--dur-2) var(--ease-out); }
  }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Typographie de lecture ---------- */
.prose {
  min-width: 0;
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--ink);
  font-weight: 450;
  hanging-punctuation: first;
  font-variant-numeric: oldstyle-nums proportional-nums;
}
@media (min-width: 760px) { .prose { font-size: 1.125rem; } }
.prose > * + * { margin-top: 1.1em; }
.prose p { overflow-wrap: break-word; }
.prose strong { font-weight: 800; color: var(--ink); }

.prose__lead {
  font-size: 1.18em; line-height: 1.6;
  color: var(--ink);
}

.clause {
  position: relative;
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.clause > * + * { margin-top: 1em; }
.clause h2 {
  position: relative;
  font-size: clamp(1.55rem, 1.2rem + 1.25vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 500;
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 0;
  padding-top: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  margin-bottom: 0.15em;
  scroll-margin-top: 120px;
}
.clause h2::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(242, 132, 158, 0.55), rgba(185, 166, 242, 0.35) 45%, var(--hairline) 70%);
  transform-origin: 0 50%;
}
.clause h2 .num {
  display: inline-block;
  margin-right: 0.12em;
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
  color: var(--rose-ink);
}
.prose h3 {
  margin-top: 2em;
  font-size: clamp(1.18rem, 1.08rem + 0.4vw, 1.38rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 600;
  font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 0;
}
.prose h3 + * { margin-top: 0.55em; }

/* Listes : pastille en dégradé rose → lilas */
.prose ul { padding: 0; list-style: none; }
.prose ul > li { position: relative; padding-left: 1.55em; }
.prose ul > li + li { margin-top: 0.6em; }
.prose ul > li::before {
  content: "";
  position: absolute; left: 0.25em; top: 0.68em;
  width: 0.42em; height: 0.42em; border-radius: 50%;
  background: var(--grad-pair);
}

/* Liens : soulignement fin, puis trait en dégradé qui se dessine au survol */
.prose a,
.doc-hero__alt {
  color: var(--rose-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(178, 58, 94, 0.38);
  background: linear-gradient(90deg, var(--rose-deep), var(--lilac-deep)) no-repeat 0 100% / 0 2px;
  transition: background-size var(--dur-3) var(--ease-out), text-decoration-color var(--dur-2), color var(--dur-2);
  overflow-wrap: anywhere;
  border-radius: 2px;
}
.prose a:hover,
.doc-hero__alt:hover {
  color: var(--rose-deep);
  text-decoration-color: transparent;
  background-size: 100% 2px;
}
.doc-hero__alt { text-decoration: none; }
.doc-hero__alt span { display: inline-block; margin-left: 0.3em; transition: transform var(--dur-2) var(--ease-out); }
.doc-hero__alt:hover span { transform: translateX(3px); }

/* Copier le lien d'une section */
.h-link {
  position: absolute; top: clamp(1.4rem, 1rem + 1.4vw, 2rem); right: 0;
  width: 36px; height: 36px; margin-top: -2px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px var(--hairline);
  opacity: 0.7;
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-spring), color var(--dur-2), background-color var(--dur-2);
}
.h-link svg { width: 17px; height: 17px; }
.h-link:hover { color: var(--rose-ink); background: var(--white); transform: scale(1.06); }
.h-link[data-copied="true"] { color: var(--white); background: var(--rose-deep); opacity: 1; }
.clause:has(.h-link) h2 { padding-right: 48px; }
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .h-link { right: auto; left: -52px; opacity: 0; transform: translateX(6px); }
  .clause:has(.h-link) h2 { padding-right: 0; }
  .clause:hover > .h-link,
  .h-link:focus-visible,
  .h-link[data-copied="true"] { opacity: 1; transform: none; }
}

/* ---------- Encadré « L'essentiel » ---------- */
.callout {
  position: relative;
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  padding: clamp(22px, 3.4vw, 34px) clamp(20px, 3.4vw, 36px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(230, 221, 251, 0.7), transparent 55%),
    radial-gradient(100% 80% at 0% 100%, rgba(255, 216, 228, 0.65), transparent 60%),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    0 1px 0 rgba(255, 255, 255, 0.9),
    var(--shadow-soft);
  overflow: hidden;
}
.callout::after { /* liseré en dégradé */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(242, 132, 158, 0.55), rgba(185, 166, 242, 0.25) 50%, rgba(242, 132, 158, 0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.callout__icon {
  float: right;
  width: 56px; margin: -4px -6px 8px 16px;
}
.callout__mark { width: 100%; height: auto; overflow: visible; }
.callout__heart { transform-box: fill-box; transform-origin: 50% 60%; }
@media (prefers-reduced-motion: no-preference) {
  .js .callout__heart { animation: heartbeat 0.857s ease-in-out infinite; }
}
.callout__label,
.callout__title strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1;
  color: var(--rose-ink);
}
.callout__label { font-size: 1.2em; line-height: 1; letter-spacing: -0.01em; }
.callout__text { font-size: 1.04em; line-height: 1.68; }
.callout__title strong { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem); letter-spacing: -0.015em; line-height: 1.1; }
.callout__list {
  margin-top: 1em !important;
  display: grid; gap: 0.7em 2em;
}
.prose .callout__list > li + li { margin-top: 0; }
.prose .callout__list > li { padding-left: 2em; }
.prose .callout__list > li::before {
  left: 0; top: 0.2em;
  width: 1.3em; height: 1.3em;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23b23a5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  box-shadow: 0 0 0 1px rgba(242, 132, 158, 0.35), 0 4px 10px -4px rgba(217, 87, 122, 0.4);
}

/* ---------- Tableaux ---------- */
.table {
  margin-block: 1.5em !important;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 14px 40px -24px rgba(59, 43, 63, 0.35);
  overflow: hidden;
  font-size: 0.93em;
  line-height: 1.5;
}
.table table { width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; }
.table th {
  text-align: left; vertical-align: bottom;
  padding: 14px 18px 12px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(255, 227, 234, 0.55);
}
.table td {
  text-align: left; vertical-align: top;
  padding: 14px 18px;
  border-top: 1px solid var(--hairline);
}
.table tr td:first-child { font-weight: 700; color: var(--ink); }
.table tbody tr { transition: background-color var(--dur-2); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.7); }
@media (min-width: 640px) {
  /* Tableau des offres : nom et prix sur une ligne, le type absorbe le reste */
  .table[data-cols="3"] td:first-child,
  .table[data-cols="3"] td:last-child { white-space: nowrap; }
}

/* Mobile : chaque ligne devient une carte (étiquettes issues de data-label) */
@media (max-width: 639px) {
  .table { background: transparent; box-shadow: none; overflow: visible; font-size: 0.95em; }
  .table table, .table tbody, .table tr, .table td { display: block; }
  .table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .table tbody { display: grid; gap: 10px; }
  .table tr {
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 0 10px 30px -22px rgba(59, 43, 63, 0.4);
  }
  .table td { padding: 0; border: 0; }
  .table td + td { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hairline); }
  .table td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    margin-bottom: 2px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-soft);
  }
  .table td:first-child::before { display: none; }
  .table td:first-child { font-family: var(--font-display); font-size: 1.12em; font-weight: 600; line-height: 1.3; font-variation-settings: "opsz" 36, "SOFT" 100; }
  .table td:first-child strong { font-weight: 600; }
}

/* ---------- Fiche d'identité (mentions légales) ---------- */
.ids {
  margin-top: 1.4em !important;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 14px 40px -24px rgba(59, 43, 63, 0.35);
  padding: 6px 20px;
  display: grid; grid-template-columns: minmax(0, 1fr);
}
.ids dt {
  padding-top: 14px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.ids dd { margin: 2px 0 0; padding-bottom: 14px; font-weight: 650; overflow-wrap: anywhere; }
.ids dd:not(:last-child) { border-bottom: 1px solid var(--hairline); }
@media (min-width: 640px) {
  .ids { grid-template-columns: minmax(10rem, 0.8fr) minmax(0, 1.4fr); padding: 6px 26px; }
  .ids dt, .ids dd { padding: 15px 0; margin: 0; }
  .ids dt { line-height: 1.6; padding-top: 18px; }
  .ids dt:not(:last-of-type) { border-bottom: 1px solid var(--hairline); }
}

/* ---------- Apparitions au scroll (légères, JS uniquement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .js .rv.rv-wait { opacity: 0; transform: translateY(14px); }
  .js .clause h2.rv::before { transition: transform 1.1s var(--ease-out) 0.05s; }
  .js .clause h2.rv.rv-wait::before { transform: scaleX(0); }
}

/* ---------- Retour en haut ---------- */
.to-top {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--glass-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 12px 30px -12px rgba(59, 43, 63, 0.4);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring), background-color var(--dur-2), color var(--dur-2);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 100%; height: 100%; }
.to-top circle { fill: none; stroke-width: 2; }
.to-top__track { stroke: var(--hairline); }
.to-top__ring {
  stroke: var(--rose-deep);
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transform: rotate(-90deg); transform-origin: 50% 50%;
}
.js[data-over-footer="true"] .to-top { background: rgba(42, 24, 48, 0.85); color: var(--cream); }
.js[data-over-footer="true"] .to-top__track { stroke: var(--line-night); }
.js[data-over-footer="true"] .to-top__ring { stroke: var(--petal); }

/* ---------- Toast « lien copié » ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 130;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: var(--night-2); color: var(--cream);
  font-size: 0.9rem; font-weight: 700;
  box-shadow: 0 16px 40px -14px rgba(18, 10, 21, 0.6);
  transform: translate(-50%, 20px); opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.toast:empty { visibility: hidden; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pied de page (compléments à core.css) ---------- */
.footer__brand { color: var(--cream) !important; margin-bottom: 14px; }
.footer__tagline { max-width: 30ch; font-size: 1rem; line-height: 1.55; }
.footer__list a { position: relative; display: inline-block; padding-block: 2px; }
.footer__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--grad-pair);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform var(--dur-3) var(--ease-out);
}
.footer__list a:hover::after,
.footer__list a[aria-current="page"]::after { transform: scaleX(1); transform-origin: 0 50%; }
.footer__list a[aria-current="page"] { color: var(--white); }
.footer :focus-visible { outline-color: var(--petal); }
.footer__legal p { margin: 0; }
.footer__wordmark { margin-bottom: 0; }

/* =====================================================================
   404 — « Deux cercles qui se cherchent »
   ===================================================================== */
body.lost {
  background: var(--night);
  color: var(--cream);
}
.lost__main {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: calc(var(--nav-clear) + 24px) var(--gutter) clamp(56px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.lost__main::before { /* poussière d'étoiles */
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 246, 243, 0.7), transparent 60%),
    radial-gradient(1px 1px at 78% 14%, rgba(255, 246, 243, 0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 72%, rgba(255, 233, 199, 0.6), transparent 60%),
    radial-gradient(1px 1px at 30% 80%, rgba(255, 246, 243, 0.5), transparent 60%),
    radial-gradient(1px 1px at 88% 58%, rgba(255, 246, 243, 0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 8%, rgba(255, 246, 243, 0.5), transparent 60%),
    radial-gradient(1px 1px at 6% 62%, rgba(255, 246, 243, 0.5), transparent 60%),
    radial-gradient(1px 1px at 52% 46%, rgba(255, 246, 243, 0.35), transparent 60%),
    radial-gradient(70vmax 50vmax at 50% 110%, rgba(185, 166, 242, 0.18), transparent 60%),
    radial-gradient(50vmax 40vmax at 50% -10%, rgba(242, 132, 158, 0.12), transparent 60%);
}
.lost__main::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--grain); opacity: 0.06; pointer-events: none;
}
.lost__inner { width: 100%; max-width: 760px; }
.lost__scene {
  position: relative;
  width: min(420px, 82vw); aspect-ratio: 2 / 1;
  margin: 0 auto clamp(20px, 4vw, 40px);
}
.lost__orb {
  position: absolute; top: 50%; left: 50%;
  width: 34%; aspect-ratio: 1;
  margin: -17% 0 0 -17%;
  border-radius: 50%;
  will-change: transform;
}
.lost__orb--a {
  background: radial-gradient(circle at 35% 30%, #ffd3df, var(--rose) 60%, #c9567e);
  box-shadow: 0 0 40px 6px rgba(242, 132, 158, 0.45), 0 0 120px 20px rgba(242, 132, 158, 0.18);
  transform: translateX(-118%);
}
.lost__orb--b {
  background: radial-gradient(circle at 35% 30%, #f0eaff, var(--lilac) 60%, #8b73e0);
  box-shadow: 0 0 40px 6px rgba(185, 166, 242, 0.45), 0 0 120px 20px rgba(185, 166, 242, 0.18);
  transform: translateX(118%);
  opacity: 0.94;
}
.lost__heart {
  position: absolute; top: 50%; left: 50%;
  width: 11%; margin: -6.5% 0 0 -5.5%;
  opacity: 0; transform: scale(0.4);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}
.lost__heart svg { width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .lost__orb--a { animation: seek-a 7s var(--ease-in-out) infinite; }
  .lost__orb--b { animation: seek-b 7s var(--ease-in-out) infinite; }
  .lost__heart { animation: found 7s var(--ease-out) infinite; }
}
/* Ils se cherchent, se frôlent… et repartent. */
@keyframes seek-a {
  0%   { transform: translate(-118%, 0); }
  18%  { transform: translate(-150%, -30%); }
  34%  { transform: translate(-90%, 22%); }
  48%, 54% { transform: translate(-42%, 0); }
  70%  { transform: translate(-128%, 26%); }
  86%  { transform: translate(-160%, -12%); }
  100% { transform: translate(-118%, 0); }
}
@keyframes seek-b {
  0%   { transform: translate(118%, 0); }
  16%  { transform: translate(92%, 28%); }
  32%  { transform: translate(150%, -24%); }
  48%, 54% { transform: translate(42%, 0); }
  68%  { transform: translate(140%, -28%); }
  84%  { transform: translate(104%, 18%); }
  100% { transform: translate(118%, 0); }
}
@keyframes found {
  0%, 44% { opacity: 0; transform: scale(0.4); }
  49% { opacity: 1; transform: scale(1.15); }
  52% { opacity: 1; transform: scale(0.95); }
  55% { opacity: 0.9; transform: scale(1.05); }
  62%, 100% { opacity: 0; transform: scale(0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .lost__orb--a { transform: translate(-60%, 0); }
  .lost__orb--b { transform: translate(60%, 0); }
  .lost__heart { opacity: 1; transform: none; }
}
.lost__code {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--petal);
}
.lost__code::before, .lost__code::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.5; }
.lost__title {
  margin-top: 18px;
  font-size: clamp(2.5rem, 1.3rem + 5vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 450;
  color: var(--cream);
}
.lost__title em {
  color: transparent;
  background: linear-gradient(100deg, #ffc9d6, #d9c9ff);
  -webkit-background-clip: text; background-clip: text;
  padding-right: 0.06em;
}
.lost__text { max-width: 36rem; margin: 20px auto 0; color: rgba(255, 246, 243, 0.78); font-size: var(--fs-lead); line-height: 1.55; }
.lost__en {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(22px, 3vw, 30px);
  border-top: 1px solid var(--line-night);
}
.lost__en h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem);
  font-weight: 450; line-height: 1.1;
  color: rgba(255, 246, 243, 0.92);
}
.lost__en h2 em { font-style: italic; }
.lost__en p { margin-top: 10px; color: rgba(255, 246, 243, 0.66); }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.lost .btn--ghost { color: var(--cream); background: rgba(255, 246, 243, 0.08); box-shadow: inset 0 0 0 1px var(--line-night); }
.lost .btn--ghost:hover { background: rgba(255, 246, 243, 0.16); }
.lost__docs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  margin-top: clamp(32px, 5vw, 48px);
  font-size: var(--fs-small);
  list-style: none; padding: 0;
}
.lost__docs a { color: rgba(255, 246, 243, 0.72); text-underline-offset: 0.25em; text-decoration-color: rgba(255, 246, 243, 0.3); }
.lost__docs a:hover { color: var(--white); text-decoration-color: var(--petal); }
.lost :focus-visible { outline-color: var(--petal); }
.lost .footer { border-top: 1px solid var(--line-night); }

/* =====================================================================
   Impression : texte noir, pas d'interface, URL des liens
   ===================================================================== */
@media print {
  @page { margin: 18mm 16mm; }
  html { scroll-padding-top: 0; }
  body.legal, body.legal::before, body.legal::after { background: #fff !important; }
  body.legal::before, body.legal::after { display: none; }
  body { color: #000; font-size: 10.5pt; }
  .nav, .footer, .skip-link, .read-progress, .to-top, .toast, .toc,
  .doc-switch, .doc-hero__art, .doc-hero__read, .doc-hero__alt, .doc-hero__dek, .h-link, .callout__icon { display: none !important; }
  .doc-hero { padding: 0 0 8mm; }
  .doc-hero__foot { margin-top: 4mm; padding-top: 3mm; border-color: #000; }
  .doc-hero__meta .meta { padding: 0; background: none; box-shadow: none; color: #000; min-height: 0; }
  .doc-hero__meta .meta::before { display: none; }
  .doc-title { visibility: visible !important; max-width: none; font-size: 26pt; color: #000; }
  .doc-title .it { color: #000; background: none; -webkit-text-fill-color: #000; }
  .container { padding: 0; max-width: none; }
  .doc-body { display: block; padding: 0; }
  .prose { max-width: none; font-size: 10.5pt; line-height: 1.5; color: #000; }
  .prose strong, .table tr td:first-child { color: #000; }
  .clause { margin-top: 7mm; break-inside: auto; }
  .clause h2 { font-size: 15pt; padding-top: 3mm; break-after: avoid; }
  .clause h2::before { background: #000; transform: none !important; }
  .clause h2 .num { color: #000; }
  .prose h3 { break-after: avoid; }
  .rv, .rv-wait { opacity: 1 !important; transform: none !important; }
  .prose a, .doc-hero__alt { color: #000; background: none; text-decoration-color: #000; font-weight: 600; }
  .prose a[href^="http"]::after,
  .prose a[href^="/"]::after { content: " (" attr(href) ")"; font-weight: 400; font-size: 0.9em; overflow-wrap: anywhere; }
  .prose a[href^="/"]::after { content: " (https://ptitnous.com" attr(href) ")"; }
  .prose a[href^="mailto:"]::after { content: ""; }
  .callout { background: none; box-shadow: none; border: 1pt solid #000; border-radius: 3mm; break-inside: avoid; padding: 4mm 5mm; }
  .callout::after { display: none; }
  .callout__label, .callout__title strong { color: #000; }
  .prose ul > li::before { background: #000; }
  .prose .callout__list > li::before { background: none; content: "✓"; box-shadow: none; width: auto; height: auto; top: 0; }
  .callout__list { grid-template-columns: 1fr !important; }
  .table, .ids { background: none; box-shadow: none; border: 0.75pt solid #000; border-radius: 0; break-inside: avoid; }
  .table thead { position: static !important; width: auto; height: auto; clip: auto; }
  .table table { display: table !important; }
  .table thead { display: table-header-group !important; }
  .table tbody { display: table-row-group !important; }
  .table tr { display: table-row !important; padding: 0; box-shadow: none; background: none; }
  .table td, .table th { display: table-cell !important; padding: 2mm 3mm !important; border-top: 0.5pt solid #000 !important; margin: 0 !important; color: #000; background: none; font-family: inherit !important; font-size: 9.5pt !important; }
  .table td::before { display: none !important; }
  .ids dt, .ids dd { color: #000; border-color: #000 !important; }
  .js[data-show] .doc { border: 0; }
}

/* Appareils tactiles : pas de flou d'arrière-plan recalculé à chaque image de scroll */
@media (hover: none), (pointer: coarse) {
  .toc summary, .to-top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, 0.96); }
}
