/* ═══════════════════════════════════════════════════════════════
   StreamLoaders — assets/legal-shared.css
   Styles partagés par les pages légales. Alignés sur style.css.
   ═══════════════════════════════════════════════════════════════ */


/* POLICIES */

/* vietnamese */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage_grotesque_vietnamese.woff2) format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage_grotesque_latin_ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage_grotesque_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;
}
/* latin-ext */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument_sans_latin_ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/instrument_sans_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;
}

/* ─── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}

/* ─── Tokens (identiques à style.css) ──────────────────────────── */
:root {
  --font-sans:
    "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display:
    "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas,
    monospace;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --bg-2: #efede7;
  --bg-3: #e4e1d9;
  --text: #17171a;
  --text-dim: #4b4a52;
  --text-muted: #6e6c75;
  --border: #e2dfd7;
  --border-2: #cfcbc1;
  --accent: #7b5ff5;
  --accent-ink: #5a40d0;
  --accent-soft: #eeeafe;
  --success: #1e7f49;
  --success-soft: #e2f1e7;
  --error: #c42b3a;
  --error-soft: #f9e2e4;
  --header-bg: rgba(246, 245, 241, 0.86);
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, 0.06);
  --shadow-md:
    0 1px 2px rgba(23, 23, 26, 0.05), 0 12px 32px -16px rgba(23, 23, 26, 0.2);
  --shadow-lg:
    0 2px 6px rgba(23, 23, 26, 0.06), 0 32px 64px -24px rgba(23, 23, 26, 0.32);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --container: 1120px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #212125;
  --surface: #2a2a2f;
  --bg-2: #313137;
  --bg-3: #3c3c43;
  --text: #f1f0ec;
  --text-dim: #c4c2c9;
  --text-muted: #9d9ba6;
  --border: #38383f;
  --border-2: #4a4a53;
  --accent: #8f7af8;
  --accent-ink: #b5a7ff;
  --accent-soft: rgba(143, 122, 248, 0.18);
  --success: #52c487;
  --success-soft: rgba(82, 196, 135, 0.13);
  --error: #f2646f;
  --error-soft: rgba(242, 100, 111, 0.13);
  --header-bg: rgba(33, 33, 37, 0.86);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:
    0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 36px -16px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 32px 72px -20px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #212125;
    --surface: #2a2a2f;
    --bg-2: #313137;
    --bg-3: #3c3c43;
    --text: #f1f0ec;
    --text-dim: #c4c2c9;
    --text-muted: #9d9ba6;
    --border: #38383f;
    --border-2: #4a4a53;
    --accent: #8f7af8;
    --accent-ink: #b5a7ff;
    --accent-soft: rgba(143, 122, 248, 0.18);
    --success: #52c487;
    --success-soft: rgba(82, 196, 135, 0.13);
    --error: #f2646f;
    --error-soft: rgba(242, 100, 111, 0.13);
    --header-bg: rgba(33, 33, 37, 0.86);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:
      0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 36px -16px rgba(0, 0, 0, 0.65);
    --shadow-lg: 0 32px 72px -20px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

/* ─── Base ─────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection {
  background: var(--accent-soft);
  color: var(--text);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
a:hover {
  color: var(--accent);
}

/* ─── Nav ──────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  padding-inline: max(24px, calc((100% - var(--container)) / 2));
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.nav-logo svg {
  width: 24px;
  height: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-2);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}
.nav-icon-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-icon-btn:hover {
  background: var(--bg-2);
  color: var(--text);
}
.nav-icon-btn svg {
  width: 17px;
  height: 17px;
}
.nav-cta {
  height: 36px;
  padding: 0 16px;
  margin-inline-start: 6px;
  display: inline-flex;
  align-items: center;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-cta:hover {
  opacity: 0.86;
  color: var(--bg);
}
.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-inline-start: 6px;
  padding: 0 12px 0 4px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  max-width: 220px;
}
.nav-user-chip:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.nav-user-chip #navEmail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.plan-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
}
@media (max-width: 520px) {
  nav {
    padding-inline: 16px;
    gap: 12px;
  }
  .nav-cta {
    padding: 0 13px;
  }
  .nav-user-chip #navEmail {
    display: none;
  }
}
@media (max-width: 360px) {
  .nav-logo span {
    display: none;
  }
}

/* ─── Page légale ──────────────────────────────────────────────── */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
@media (max-width: 640px) {
  .legal-page {
    padding: 32px 18px 64px;
  }
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.legal-back:hover {
  color: var(--text);
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 44px;
}
@media (max-width: 640px) {
  .legal-card {
    padding: 28px 22px;
    border-radius: var(--r-md);
  }
}

.legal-card h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.legal-intro {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 24px;
}
.legal-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}
.legal-card p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 14px;
}
.legal-card p:last-child {
  margin-bottom: 0;
}
.legal-card ul,
.legal-card ol {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.75;
  padding-inline-start: 24px;
  margin-bottom: 16px;
}
.legal-card li {
  margin-bottom: 6px;
}
.legal-card strong {
  color: var(--text);
  font-weight: 600;
}
.legal-card code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
}

.legal-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.legal-card th,
.legal-card td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.legal-card th {
  background: var(--bg-2);
  font-weight: 600;
  color: var(--text);
  font-size: 13.5px;
}
.legal-card td {
  color: var(--text-dim);
}
@media (max-width: 640px) {
  .legal-card table {
    display: block;
  }
  .legal-card thead {
    display: none;
  }
  .legal-card tbody,
  .legal-card tr,
  .legal-card td {
    display: block;
  }
  .legal-card tr {
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    margin-bottom: 12px;
    overflow: hidden;
  }
  .legal-card td {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
  }
  .legal-card td:last-child {
    border-bottom: none;
  }
}

/* Highlight blocks */
.legal-warn-box,
.legal-info-box {
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 14.5px;
  line-height: 1.65;
}
.legal-warn-box {
  background: var(--error-soft);
  border: 1px solid color-mix(in srgb, var(--error) 30%, transparent);
}
.legal-warn-box strong {
  color: var(--error);
  font-size: 14.5px;
  display: block;
  margin-bottom: 6px;
}
.legal-warn-box p {
  margin: 0 !important;
  color: var(--error) !important;
}
.legal-info-box {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
}
.legal-info-box p {
  margin: 0 !important;
  color: var(--text-dim) !important;
}

.legal-ok {
  color: var(--success);
  font-weight: 600;
}

.legal-fill {
  background: #fef3c7;
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 500;
}
[data-theme="dark"] .legal-fill {
  background: rgba(254, 243, 199, 0.14);
  color: #fcd34d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal-fill {
    background: rgba(254, 243, 199, 0.14);
    color: #fcd34d;
  }
}

/* ─── Footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 24px 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 34ch;
  margin: 16px 0 20px;
}
.footer-social {
  display: flex;
  gap: 8px;
}
.social-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text-dim);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.social-icon-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--surface);
}
.social-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.footer-col h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  width: fit-content;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-top > .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 520px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner {
    padding: 48px 18px 24px;
  }
}

/* ─── Réduction animations ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
