/* ── Tokens locaux (complètent tracya-tokens.css) ──────────────── */
:root {
  --green:     #10b981;
  --red:       #ef4444;
  --radius:    10px;
  --ink-muted: rgba(23,21,27,.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Switzer', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--sapin); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 700; }

/* ── Nav ────────────────────────────────────────────────────────── */
.lnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,244,237,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.lnav-inner {
  max-width: 760px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.lnav-logo {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -.3px;
  color: var(--ink); text-decoration: none;
}
.lnav-logo:hover { text-decoration: none; }
.lnav-right {
  display: flex; align-items: center; gap: 16px;
}
.lnav-home {
  font-size: .83rem; font-weight: 500; color: var(--ink-muted);
  text-decoration: none; white-space: nowrap;
}
.lnav-home:hover { color: var(--sapin); text-decoration: none; }

/* ── Lang switch ────────────────────────────────────────────────── */
.lang-switch {
  display: flex; border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
}
.lang-btn {
  padding: 4px 10px; border: none; background: transparent;
  font-size: .8rem; font-weight: 700; cursor: pointer;
  color: var(--ink-muted); transition: all .1s; font-family: inherit;
}
.lang-btn.active { background: var(--sapin); color: var(--paper); }

/* ── Main ───────────────────────────────────────────────────────── */
.legal-main {
  flex: 1;
  padding: 52px 24px 80px;
}
.legal-container {
  max-width: 720px; margin: 0 auto;
}

/* ── Page header ────────────────────────────────────────────────── */
.legal-header {
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.legal-badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--mist); color: var(--sapin);
  margin-bottom: 12px;
}
.legal-title {
  font-size: 2rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--ink); line-height: 1.15; margin-bottom: 8px;
}
.legal-updated {
  font-size: .83rem; color: var(--ink-muted);
}

/* ── Content ────────────────────────────────────────────────────── */
.legal-content {
  display: flex; flex-direction: column; gap: 36px;
}
.legal-section h2 {
  font-size: 1rem; font-weight: 700;
  color: var(--ink); margin-bottom: 12px;
}
.legal-section p { margin-bottom: 10px; font-size: .92rem; }
.legal-section p:last-child { margin-bottom: 0; }

/* ── Info card ──────────────────────────────────────────────────── */
.legal-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px;
  margin-top: 12px; display: flex; flex-direction: column; gap: 8px;
}
.legal-row {
  display: flex; gap: 12px;
  font-size: .88rem;
}
.legal-row-label {
  flex-shrink: 0; width: 210px; font-weight: 600;
  color: var(--ink-muted);
}
.legal-row-value { color: var(--ink); }

@media (max-width: 540px) {
  .legal-row { flex-direction: column; gap: 2px; }
  .legal-row-label { width: auto; }
}

/* ── Sub-card (nested info box) ─────────────────────────────────── */
.legal-subcard {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 18px; margin-top: 10px;
}
.legal-subcard-title {
  font-size: .83rem; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.legal-subcard .legal-row-label { width: 160px; }

/* ── Lists ──────────────────────────────────────────────────────── */
.legal-list {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
  margin-top: 10px;
}
.legal-list li {
  display: flex; gap: 10px; font-size: .88rem; align-items: flex-start;
}
.legal-list li::before {
  content: '·'; color: var(--sapin); font-weight: 700;
  flex-shrink: 0; margin-top: 1px; font-size: 1.1rem; line-height: 1.4;
}

/* ── Rights grid ────────────────────────────────────────────────── */
.legal-rights-grid {
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.legal-right-item {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px;
}
.legal-right-name {
  font-size: .8rem; font-weight: 700; color: var(--ink);
  margin-bottom: 2px;
}
.legal-right-desc { font-size: .8rem; color: var(--ink-muted); }

/* ── Data table ─────────────────────────────────────────────────── */
.legal-data-cards {
  display: flex; flex-direction: column; gap: 10px; margin-top: 12px;
}
.legal-data-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 18px;
}
.legal-data-card-title {
  font-size: .88rem; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.legal-data-row {
  display: flex; gap: 6px; font-size: .8rem; margin-bottom: 4px;
}
.legal-data-row:last-child { margin-bottom: 0; }
.legal-data-key {
  font-weight: 600; color: var(--ink-muted); flex-shrink: 0; width: 100px;
}
.legal-data-val { color: var(--ink); }

/* ── Processors table ───────────────────────────────────────────── */
.legal-processor-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 18px; margin-bottom: 8px;
}
.legal-processor-header {
  display: flex; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.legal-processor-name {
  font-size: .88rem; font-weight: 700; color: var(--ink);
}
.legal-processor-country {
  font-size: .78rem; color: var(--ink-muted); font-weight: 500;
}
.legal-processor-row {
  font-size: .8rem; margin-bottom: 3px;
}
.legal-processor-row:last-child { margin-bottom: 0; }
.legal-processor-label { font-weight: 600; color: var(--ink-muted); }

/* ── Legal bases summary table ─────────────────────────────────── */
.legal-basis-table-wrap {
  overflow-x: auto; margin-top: 12px; border-radius: 8px;
  border: 1px solid var(--line);
}
.legal-basis-table {
  width: 100%; border-collapse: collapse; font-size: .8rem;
}
.legal-basis-table thead tr { background: var(--mist); }
.legal-basis-table th {
  padding: 10px 14px; text-align: left; font-weight: 700;
  color: var(--ink); font-size: .75rem; text-transform: uppercase;
  letter-spacing: .04em; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.legal-basis-table td {
  padding: 10px 14px; vertical-align: top;
  border-bottom: 1px solid var(--mist); color: var(--ink);
  line-height: 1.5;
}
.legal-basis-table tbody tr:last-child td { border-bottom: none; }
.legal-basis-table tbody tr:nth-child(even) td { background: var(--paper); }
.legal-basis-tags { display: flex; flex-direction: column; gap: 4px; }
.legal-basis-tag {
  display: inline-block; font-size: .72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.basis-contract   { background: #e8f4fd; color: #1a6fa8; }
.basis-legal      { background: #fef3e2; color: #9a5a00; }
.basis-legitimate { background: #e9f5ee; color: #1a7a3c; }
.basis-necessary  { background: var(--mist); color: var(--ink-muted); }
.legal-basis-note {
  margin-top: 12px; font-size: .8rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 16px; line-height: 1.6;
}

/* ── FAQ ────────────────────────────────────────────────────────── */
.faq-category-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.faq-cat-btn {
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 14px; font-size: .8rem; font-weight: 700;
  background: var(--paper); color: var(--ink); cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.faq-cat-btn.active {
  background: var(--sapin); color: var(--paper); border-color: var(--sapin);
}
.faq-cat-btn:hover:not(.active) { border-color: var(--sapin); color: var(--sapin); }

.faq-section { display: none; }
.faq-section.visible { display: flex; flex-direction: column; gap: 4px; }

.faq-item {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: none; border: none; cursor: pointer;
  text-align: left; font-size: .9rem; font-weight: 600;
  color: var(--ink); gap: 14px; font-family: inherit;
}
.faq-icon {
  font-size: 1.1rem; color: var(--sapin); flex-shrink: 0;
  transition: transform .2s; font-weight: 400;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  overflow: hidden; max-height: 0; transition: max-height .3s ease;
}
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner {
  padding: 0 18px 16px; font-size: .87rem; color: var(--ink);
  border-top: 1px solid var(--mist);
  display: flex; flex-direction: column; gap: 6px;
}
.faq-answer-inner p { margin: 0; }
.faq-answer-inner p + p { margin-top: 6px; }

/* ── Contact form ───────────────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-label { display: flex; flex-direction: column; gap: 6px; }
.form-label-text {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-muted);
}
.form-input, .form-select, .form-textarea {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: .92rem; font-family: inherit;
  color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--sapin);
  box-shadow: 0 0 0 3px rgba(31,78,61,.12);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-char-count { font-size: .75rem; color: var(--ink-muted); text-align: right; }
.form-char-count.warn { color: #f59e0b; }
.form-error {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; padding: 10px 14px;
  font-size: .85rem; color: var(--red);
}
.form-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; background: var(--sapin); color: var(--paper);
  border: none; border-radius: 8px; padding: 12px 28px;
  font-size: .95rem; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: opacity .15s;
}
.form-btn:hover { opacity: .88; }
.form-btn:disabled { opacity: .55; cursor: not-allowed; }
.form-required { color: var(--red); margin-left: 1px; }
.form-check-row { display: flex; align-items: flex-start; gap: 10px; }
.form-check-label { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--ink); line-height: 1.5; cursor: pointer; }
.form-check-input { margin-top: 3px; flex-shrink: 0; accent-color: var(--sapin); width: 15px; height: 15px; }
.form-notice { margin-top: 4px; padding: 12px 16px; border-radius: 8px; font-size: .88rem; line-height: 1.5; }
.form-notice-success { background: #d1fae5; color: #065f46; }
.form-notice-error   { background: #fee2e2; color: #991b1b; }
.form-note {
  font-size: .8rem; color: var(--ink-muted); text-align: center; line-height: 1.6;
}
.contact-direct {
  margin-top: 28px; padding: 20px 22px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-direct-label {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-muted); margin-bottom: 4px;
}
.contact-direct-email {
  font-size: 1.05rem; font-weight: 700; color: var(--sapin);
}
.contact-success {
  text-align: center; padding: 48px 24px;
}
.contact-success-icon {
  width: 52px; height: 52px; background: #d1fae5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 1.5rem;
}
.contact-success h2 {
  font-size: 1.4rem; font-weight: 800; color: var(--ink); margin-bottom: 8px;
}
.contact-success p { font-size: .92rem; }
.contact-success-back {
  margin-top: 24px; background: none; border: none; font-family: inherit;
  font-size: .85rem; color: var(--ink-muted); cursor: pointer; text-decoration: underline;
}
.contact-success-back:hover { color: var(--ink); }

/* ── Index hub ──────────────────────────────────────────────────── */
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-top: 12px;
}
.hub-card {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .1s;
  background: var(--paper);
}
.hub-card:hover {
  border-color: var(--sapin); box-shadow: 0 4px 16px rgba(31,78,61,.1);
  transform: translateY(-2px); text-decoration: none;
}
.hub-card-icon { font-size: 1.5rem; }
.hub-card-title { font-size: .95rem; font-weight: 700; color: var(--ink); }
.hub-card-desc  { font-size: .82rem; color: var(--ink-muted); line-height: 1.5; }
.hub-card-arrow {
  margin-top: auto; font-size: .85rem; color: var(--sapin);
  font-weight: 600;
}

/* ── Footer nav (bottom of legal page) ─────────────────────────── */
.legal-footer-nav {
  margin-top: 52px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  font-size: .8rem;
}
.legal-footer-nav a {
  color: var(--ink-muted); text-decoration: none; font-weight: 500;
}
.legal-footer-nav a:hover { color: var(--sapin); }

/* ── Site footer ────────────────────────────────────────────────── */
.lfooter {
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 24px;
}
.lfooter-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.lfooter-links {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  justify-content: center; font-size: .8rem;
}
.lfooter-links a { color: var(--ink-muted); text-decoration: none; font-weight: 500; }
.lfooter-links a:hover { color: var(--sapin); }
.lfooter-copy {
  font-size: .78rem; color: var(--ink-muted);
}
