/* ============================================================
   Pages légales RÉSONANCE — aligné sur la charte du site
   (police Outfit auto-hébergée, jetons de marque, dark mode auto).
   Partagé par les pages FR (site/legal/) et EN (site/legal/en/).
   ============================================================ */

/* Police Outfit auto-hébergée — identique au site principal et au 404,
   pour une typographie cohérente sur toutes les pages.
   url() relative à CE fichier (site/legal/legal.css → site/assets/fonts/). */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/outfit-variable.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  /* Jetons alignés sur resonance-v16.css (clair) */
  --bg: #FAF6F0;
  --fg: #1E1D1B;
  --muted: #555555;
  --accent: #D02020;
  --card: #FFFFFF;
  --border: #1E1D1B;
  --shadow: 4px 4px 0 var(--border);
  --font: 'Outfit', sans-serif;
}

/* Dark mode automatique (pages légales sans JS : suit le réglage système).
   Jetons alignés sur resonance-v16.css (sombre) : même noir #0F0E0D. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0E0D;
    --fg: #FAF6F0;
    --muted: rgba(250, 246, 240, 0.72);
    --accent: #E06B6A; /* rouge éclairci pour le contraste sur fond sombre (cf. --red-text du site) */
    --card: #1A1918;
    --border: rgba(250, 246, 240, 0.35);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

.container {
  width: min(920px, calc(100% - 2.25rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--border);
  padding: 0.25rem 0.5rem;
  font-weight: 700;
}

h1 {
  margin: 1.5rem 0 0.3rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}

p,
li {
  font-size: 1rem;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}

ul {
  padding-left: 1.2rem;
}

.footer-nav {
  margin-top: 2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Respect des préférences de mouvement réduit (cohérent avec le reste du site) */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
