/* pAIsteque : pages légales (confidentialité, CGU)
   S'appuie sur les variables et composants de styles.css. */

body.legal {
  background:
    radial-gradient(60% 50% at 15% 0%, #FF9A76 0%, transparent 70%),
    radial-gradient(55% 45% at 90% 100%, #C9B6F2 0%, transparent 70%),
    var(--pink);
  background-attachment: fixed;
  min-height: 100vh;
}

.legal__header {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper); border-bottom: var(--stroke);
}
.legal__nav {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.legal__logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.legal__logo img:first-child { height: 46px; width: auto; }
.legal__logo img:last-child { height: 24px; width: auto; }

.legal__wrap { padding: clamp(24px, 5vw, 56px) var(--gutter) clamp(40px, 6vw, 80px); }
.legal__card {
  max-width: 860px; margin: 0 auto; background: var(--paper);
  border: var(--stroke); border-radius: 34px; box-shadow: 12px 12px 0 var(--ink);
  padding: clamp(24px, 5vw, 56px);
}
.legal__card h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 5vw, 46px); line-height: 1.08; margin-top: 14px;
}
.legal__date { margin-top: 10px; font-weight: 700; font-size: 15px; color: var(--muted); }
.legal__intro { margin-top: 20px; font-size: 18px; color: var(--muted); }

.legal__toc {
  margin-top: 28px; padding: 18px 22px; background: var(--blue-pale);
  border: var(--stroke-thin); border-radius: 20px;
}
.legal__toc strong { font-family: var(--font-display); font-size: 18px; }
.legal__toc ol { list-style: decimal; margin: 10px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.legal__toc li { font-weight: 700; font-size: 15px; line-height: 1.5; break-inside: avoid; padding: 2px 0; }
@media (max-width: 640px) { .legal__toc ol { columns: 1; } }

.legal__card section { margin-top: 38px; scroll-margin-top: 90px; }
.legal__card h2 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3vw, 28px); line-height: 1.15;
  display: flex; align-items: baseline; gap: 12px;
}
.legal__card h2 span {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 8px; background: var(--yellow);
  border: var(--stroke-thin); border-radius: 999px; font-size: 16px; box-shadow: var(--shadow-s);
  position: relative; top: -2px;
}
.legal__card h3 { font-weight: 900; font-size: 18px; margin-top: 20px; }
.legal__card p { margin-top: 12px; color: var(--muted); }
.legal__card p strong, .legal__card li strong { color: var(--ink); }
.legal__card ul { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.legal__card ul li { position: relative; padding-left: 22px; color: var(--muted); }
.legal__card ul li::before {
  content: ''; position: absolute; left: 2px; top: .5em; width: 9px; height: 12px;
  background: var(--ink); border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
}

.legal__table { width: 100%; margin-top: 16px; border-collapse: separate; border-spacing: 0; border: var(--stroke-thin); border-radius: 16px; overflow: hidden; font-size: 15.5px; }
.legal__table th, .legal__table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1.5px solid var(--lilac); }
.legal__table th { background: var(--pink-pale); font-weight: 900; border-bottom: var(--stroke-thin); }
.legal__table tr:last-child td { border-bottom: 0; }
.legal__table td { color: var(--muted); }
.legal__table td:first-child { color: var(--ink); font-weight: 700; }
@media (max-width: 640px) {
  .legal__table, .legal__table tbody, .legal__table tr, .legal__table td { display: block; }
  .legal__table thead { display: none; }
  .legal__table tr { border-bottom: var(--stroke-thin); padding: 6px 0; }
  .legal__table tr:last-child { border-bottom: 0; }
  .legal__table td { border: 0; padding: 4px 14px; }
}

/* champ à compléter avant mise en ligne */
mark.todo {
  background: var(--yellow-pale); color: var(--ink); font-weight: 800;
  padding: 1px 6px; border: 1.5px dashed var(--ink); border-radius: 6px;
}
.legal__note {
  margin-top: 28px; padding: 14px 18px; background: var(--yellow-pale);
  border: var(--stroke-thin); border-radius: 18px; font-weight: 700; font-size: 15px; color: var(--ink);
}

.legal__footer {
  max-width: 860px; margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font-weight: 800; font-size: 15px;
}
.legal__footer a { color: var(--ink); }
