/*
 * ===========================================================================
 * ORIQ IA : PAGES LEGALES. Feuille autonome (hors bundle Vite).
 * Reprend les tokens du site (src/styles/tokens.css) : blanc pur, noir
 * profond, bleu Oriq #0066FF, Inter, logo Crimson Pro. Lecture d'abord :
 * colonne ~46rem, hierarchie sobre, zero decoration gratuite.
 * ===========================================================================
 */
/* Polices auto-hébergées (voir /fonts/). Inter = police variable 100-900. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Crimson Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/crimson-pro-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #ffffff;
  --bg-2: #fafafa;
  --ink: #0a0c10;
  --surface-2: #f2f5f9;
  --line: #e9ecf2;
  --line-strong: #d7dce6;
  --text: #0a0c10;
  --text-soft: #3b4356;
  --text-muted: #59637a;
  --brand: #0066FF;
  --cta: #0066FF;
  --cta-hover: #1F7AFF;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-sm: 10px;
  --radius: 14px;
  --dur-fast: 160ms;
  --dur: 380ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
::selection { background: var(--brand); color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* --- Header simplifie : logo Oriq IA cliquable vers /, lien retour --- */
.legal-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__name {
  font-family: "Crimson Pro", Georgia, serif;
  font-weight: 600; font-size: 24px; letter-spacing: -0.025em; line-height: 1;
}
.brand__name b { color: var(--brand); font-weight: 600; }
.brand__dot {
  position: relative; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #0066FF 0%, #0052CC 100%);
  flex: none;
  box-shadow: 0 0 0 1px rgba(0, 102, 255, 0.04);
}
.brand__dot::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 13px; height: 13px; border-radius: 50%;
  background: rgba(0, 102, 255, 0.12);
  transform: translate(-50%, -50%);
  animation: oriqHalo 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes oriqHalo {
  0%   { width: 13px; height: 13px; opacity: 0.45; }
  100% { width: 38px; height: 38px; opacity: 0; }
}

.legal-back {
  font-size: 0.9rem; font-weight: 700; color: var(--text-soft);
  text-decoration: none;
  border: 1.5px solid var(--line-strong);
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.legal-back:hover { border-color: var(--brand); color: var(--brand); }

/* --- Colonne de lecture --- */
.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 7vw, 5rem);
}

.legal-kicker {
  font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.8rem;
}

.legal h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  line-height: 1.1; font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 0.7rem;
}

.legal-meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.6rem; }

/* Navigation entre les trois pages */
.legal-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.legal-tabs a {
  font-size: 0.85rem; font-weight: 700; text-decoration: none;
  color: var(--text-soft);
  padding: 0.42rem 0.95rem; border-radius: 100px;
  border: 1.5px solid var(--line-strong);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.legal-tabs a:hover { border-color: var(--brand); color: var(--brand); }
.legal-tabs a[aria-current="page"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* Chapeau introductif */
.legal-lede { font-size: 1.08rem; color: var(--text-soft); margin-bottom: 2.2rem; }
.legal-lede b { color: var(--text); }

/* --- Corps de texte --- */
.legal h2 {
  font-size: 1.28rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25;
  margin: 2.6rem 0 0.9rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}
.legal h2 .num {
  color: var(--brand); font-variant-numeric: tabular-nums;
  margin-right: 0.55rem;
}
.legal h3 {
  font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em;
  margin: 1.7rem 0 0.5rem;
}
.legal p { margin-bottom: 0.9rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin-bottom: 0.45rem; }
.legal li::marker { color: var(--brand); }
.legal a { color: var(--brand); font-weight: 600; text-decoration: none; }
.legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal strong, .legal b { font-weight: 700; }

/* Bloc identite / encadres */
.legal-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 0 0 1.1rem;
}
.legal-card p { margin-bottom: 0.35rem; }
.legal-card p:last-child { margin-bottom: 0; }

/* Encadre d'engagement : le point cle, en bleu */
.legal-note {
  border-left: 3px solid var(--brand);
  background: rgba(0, 102, 255, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.95rem 1.25rem;
  margin: 1.2rem 0 1.4rem;
  color: var(--text-soft);
}
.legal-note b { color: var(--text); }

/* Tableaux (sous-traitants, durees) : lisibles, scroll horizontal contenu */
.legal-tablewrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
.legal table {
  width: 100%; border-collapse: collapse;
  font-size: 0.92rem; line-height: 1.5;
}
.legal th {
  text-align: left; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.55rem 0.9rem 0.55rem 0;
  border-bottom: 1.5px solid var(--line-strong);
}
.legal td {
  padding: 0.65rem 0.9rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal td:first-child { font-weight: 700; white-space: nowrap; }

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.4em;
}

/* Signature de bas de document */
.legal-sign {
  margin-top: 2.6rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem; color: var(--text-muted);
}

/* --- Footer minimal --- */
.legal-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 1.6rem clamp(1.25rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--text-muted);
}
.legal-footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.legal-footer a {
  color: var(--text-soft); text-decoration: none; font-weight: 600;
  transition: color var(--dur-fast) var(--ease);
}
.legal-footer a:hover { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .brand__dot::before { animation: none; }
}
