/* Shared CSS for /cgu, /confidentialite, /suppression-compte
   ────────────────────────────────────────────────────────────
   Cohérent avec la vitrine (DM Sans + Instrument Serif, palette rose
   gold, max-width 1240px). Optimisé pour la lecture longue (typo
   serif possible sur le body, line-height généreuse, mesure 65ch).
*/

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
:root {
  --primary: #E91E63;
  --primary-deep: #AD1457;
  --primary-soft: #FCE4EC;
  --accent: #F472B6;
  --ink: #18181B;
  --ink-2: #27272A;
  --muted: #71717A;
  --line: rgba(24, 24, 27, 0.08);
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --radius: 16px;
  --max: 880px;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* AA : `--primary` (#E91E63) sur blanc plafonne à 4,35:1 — sous le 4,5:1
   exigé pour du texte. `--primary-deep`, déjà dans la palette, monte à
   6,97:1 (et 5,79:1 sur `--primary-soft`). On ne le substitue QUE là où la
   couleur porte du TEXTE : les fonds, bordures et le spinner gardent
   `--primary`, où le ratio de texte ne s'applique pas. */
a { color: var(--primary-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }

/* Nav (idem que /tarifs pour cohérence) */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 249, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 28px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 0 0 4px rgba(233,30,99,0.12);
}
.nav-back {
  font-size: 0.9rem; color: var(--muted); font-weight: 500;
  text-decoration: none;
}
.nav-back:hover { color: var(--ink); text-decoration: none; }

/* Header */
.hero {
  padding: 64px 28px 32px;
  max-width: var(--max);
  margin: 0 auto;
  text-align: left;
}
.hero .crumb {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero .meta {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero .meta strong { color: var(--ink-2); font-weight: 600; }

/* Markdown body */
.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 28px 80px;
  font-size: 1.02rem;
}
.content h1 { display: none; /* duplicate of hero h1 in markdown */ }
.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
  color: var(--ink);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 24px; }
.content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--ink);
}
.content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 6px;
  color: var(--ink-2);
}
.content p { margin: 14px 0; max-width: 65ch; }
.content ul, .content ol { margin: 14px 0 14px 24px; max-width: 65ch; }
.content li { margin: 6px 0; }
.content li > ul, .content li > ol { margin-top: 6px; }
.content strong { font-weight: 700; color: var(--ink); }
.content em { font-style: italic; }
.content blockquote {
  border-left: 3px solid var(--primary);
  padding: 8px 16px;
  margin: 16px 0;
  color: var(--ink-2);
  background: var(--primary-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(24, 24, 27, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}
.content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* Tables (les Privacy & CGU en utilisent beaucoup) */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.92rem;
}
.content thead { background: var(--primary-soft); }
.content th, .content td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.content th { font-weight: 700; color: var(--ink); }

/* 🔴 Sur téléphone, ces tableaux (sous-traitants, cookies) réclament plus de
   place que l'écran : mesuré à 698 px de large sur le OnePlus (écran 360),
   ce qui portait le viewport de MISE EN PAGE à 726 px. Sur Android ce
   viewport ne redescend plus, et tout ce qui est `position: fixed` — le
   bandeau cookies au premier chef — s'étale alors dessus, moitié hors champ.
   On ne les écrête surtout pas (une mention légale coupée ne vaut rien) :
   le tableau défile DANS sa propre boîte, et la page garde sa largeur. */
@media (max-width: 700px) {
  .content table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
  }
}
.content tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.015); }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--ink-2); }
footer a:hover { color: var(--primary-deep); }
.footer-links { margin-bottom: 8px; }
.footer-links a { margin: 0 12px; }

/* Loading + error states */
.loading, .error-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
  max-width: var(--max);
  margin: 0 auto;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state .retry-btn {
  display: inline-block; margin-top: 14px;
  padding: 10px 20px;
  /* Le LABEL est du texte : blanc sur `--primary` ne donne que 4,35:1,
     sous AA. Sur `--primary-deep` (déjà l'état :hover juste dessous) il
     monte à 6,97:1 — et le survol devient un simple éclaircissement. */
  background: var(--primary-deep); color: white;
  border-radius: 10px; font-weight: 600;
  cursor: pointer; border: none;
  font-family: inherit; font-size: 0.95rem;
}
.error-state .retry-btn:hover { background: var(--primary); }

/* Print — légal pages sont souvent imprimées par les juristes */
@media print {
  nav, footer, .nav-back { display: none; }
  body { background: white; color: black; font-size: 11pt; }
  .hero { padding: 16px 0; }
  .content { max-width: none; padding: 0; }
  .content a { color: inherit; text-decoration: underline; }
  .content h2 { page-break-after: avoid; }
  .content table { page-break-inside: avoid; }
}
