/* ==========================================================
   Grimo — styles des pages légales
   Partagé par mentions-legales.html, cgu.html et confidentialite.html
   pour ne pas tripler le même CSS.
   ========================================================== */

:root {
  --bg: #F1EDE7;
  --paper: #F8F5F0;
  --surface: #FFFCFB;
  --ink: #2B3438;
  --ink-medium: #5A6569;
  --ink-light: #8B9299;
  --primary: #72896C;
  --primary-dark: #5c7057;
  --secondary: #B8957D;
  --accent: #9EAD9C;
  --border: #DDD9D0;

  --display: 'Fraunces', serif;
  --body: 'Karla', sans-serif;
  --hand: 'Caveat', cursive;
  --wordmark: 'Chillax', var(--display);

  --wrap: 720px;
  --wrap-wide: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ============ NAV ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 237, 231, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { width: 38px; height: 38px; object-fit: contain; }

.brand-name {
  font-family: var(--wordmark);
  font-weight: 600;
  font-size: 27px;
  color: var(--primary);
  letter-spacing: 0.005em;
  position: relative;
  top: 3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-light);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.active {
  background: var(--primary);
  color: var(--surface);
}

.nav-cta {
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  color: var(--surface);
  background: var(--primary);
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ============ CONTENU LÉGAL ============ */

main { position: relative; z-index: 2; }

.legal-head { padding: 70px 0 26px; }

.legal-head h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.16;
  margin: 0 0 10px;
}

.legal-updated {
  font-size: 13.5px;
  color: var(--ink-light);
  margin: 0;
}

.legal-body { padding-bottom: 70px; }

/* Une seule langue visible à la fois. Le texte légal est trop long pour
   une traduction clé par clé : on garde deux blocs complets et on bascule
   l'affichage, ce qui évite aussi de casser la mise en forme. */
.legal-lang { display: none; }
.legal-lang.active { display: block; }

.legal-body h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.legal-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.legal-body h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 15.5px;
  margin: 24px 0 8px;
}

.legal-body p {
  color: var(--ink-medium);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0 0 14px;
}

.legal-body ul {
  color: var(--ink-medium);
  font-size: 15.5px;
  line-height: 1.7;
  padding-left: 20px;
  margin: 0 0 14px;
}

.legal-body li { margin-bottom: 6px; }

.legal-body strong { color: var(--ink); font-weight: 700; }

.legal-body a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bloc d'identité (éditeur, hébergeur) */
.identity {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  margin: 0 0 16px;
}

.identity p { margin: 0 0 4px; font-size: 15px; }
.identity p:last-child { margin-bottom: 0; }

/* Tableau des finalités de traitement */
.legal-table-wrap { overflow-x: auto; margin: 0 0 18px; }

.legal-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-table th {
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
}

.legal-table td { color: var(--ink-medium); }

.legal-note {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.6;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  margin: 24px 0 0;
}

/* ============ FOOTER ============ */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-meta {
  font-size: 13px;
  color: var(--ink-light);
  margin: 0 0 14px;
}

.footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-light);
}

.footer-legal a {
  text-decoration: underline;
  color: var(--ink-light);
}

.footer-legal a:hover { color: var(--ink-medium); }
