/* ============================================ */
/* LEGAL PAGES - Lowai Studio                   */
/* Design system: extends theme.css             */
/* theme.css must be loaded BEFORE legal.css    */
/* ============================================ */

:root {
  /* Legal pages use a narrower container */
  --container: 860px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

::selection { background: var(--accent); color: white; }

a { color: inherit; text-decoration: none; }

.mono { font-family: 'Geist Mono', monospace; letter-spacing: 0; }
.italic { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--text-dim); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 20px; } }

/* NAV */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 100;
  padding: 0 32px;
  transition: transform 0.4s var(--ease);
}
@media (max-width: 640px) { .nav { padding: 0 16px; top: 12px; } }
.nav.hidden { transform: translateY(-120%); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 100px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; letter-spacing: -0.01em; }
.logo-mark { width: 22px; height: 22px; }
.logo-mark svg { width: 100%; height: 100%; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.nav-cta) {
  color: var(--text-dim); font-size: 13px;
  padding: 8px 14px; border-radius: 100px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:not(.nav-cta):hover { color: var(--text); background: var(--surface-2); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 18px;
  background: var(--text); color: var(--bg);
  border-radius: 100px; font-size: 13px; font-weight: 500;
  margin-left: 8px; transition: background 0.2s var(--ease);
}
.nav-cta:hover { opacity: 0.85; }
.nav-cta svg { width: 10px; height: 10px; transition: transform 0.2s var(--ease); }
.nav-cta:hover svg { transform: translateX(2px); }
@media (max-width: 780px) { .nav-links a:not(.nav-cta) { display: none; } }

/* HEADER de page */
.page-header {
  padding: 180px 0 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.page-header::before {
  content: ''; position: absolute;
  top: 30%; left: 50%;
  width: 100%; height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 1; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--text-dim); letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px 6px 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 32px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.back-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.back-link svg { width: 10px; height: 10px; transition: transform 0.2s var(--ease); }
.back-link:hover svg { transform: translateX(-2px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--text-faint); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 20px;
}
.eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--text-faint); }

.page-title {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1; letter-spacing: -0.035em;
  font-weight: 500; margin-bottom: 16px;
  max-width: 18ch;
}

.page-lead {
  font-size: 16px; color: var(--text-dim);
  max-width: 56ch; letter-spacing: -0.005em;
}

.meta-strip {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex; gap: 48px;
  flex-wrap: wrap;
}
.meta-item .label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 6px;
}
.meta-item .val { font-size: 14px; color: var(--text); }

/* CONTENU */
.legal-content {
  padding: 80px 0 120px;
}
@media (max-width: 640px) { .legal-content { padding: 60px 0 80px; } }

.toc {
  padding: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 64px;
}
.toc-title {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--text-faint); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 16px;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li {
  counter-increment: toc;
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 20px;
}
.toc a {
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
  line-height: 1.5;
}
.toc a:hover { color: var(--text); }

.article-section {
  margin-bottom: 56px;
  scroll-margin-top: 100px;
}
.article-section:last-child { margin-bottom: 0; }

.section-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.article-section h2 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-bottom: 20px;
  max-width: 28ch;
}

.article-section h3 {
  font-size: 17px;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 32px 0 12px;
  color: var(--text);
}

.article-section p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 72ch;
}
.article-section p:last-child { margin-bottom: 0; }

.article-section p strong {
  color: var(--text);
  font-weight: 500;
}

.article-section a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease);
}
.article-section a:hover {
  text-decoration-color: var(--accent);
}

.article-section ul, .article-section ol {
  margin: 0 0 16px 0;
  padding-left: 0;
  list-style: none;
}
.article-section ul li, .article-section ol li {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  padding: 6px 0 6px 24px;
  position: relative;
  max-width: 72ch;
}
.article-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 1px;
  background: var(--text-faint);
}

/* Tableau d'infos (identité, contact, etc.) */
.info-grid {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0 24px;
}
.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row .k {
  padding: 14px 18px;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}
.info-row .v {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
}
.info-row .v.placeholder {
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
}
@media (max-width: 600px) {
  .info-row { grid-template-columns: 1fr; }
  .info-row .k { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .info-row .v { padding: 12px 16px; }
}

/* Highlight box (important notices) */
.highlight {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--accent-soft);
  border: 1px solid rgba(200, 16, 46, 0.3);
  border-radius: var(--radius);
}
.highlight .label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.highlight p {
  color: var(--text);
  font-size: 14px;
  margin: 0;
  max-width: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
  background: var(--bg);
}
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
}
.foot-bottom a {
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.foot-bottom a:hover { color: var(--text); }
.foot-legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
