/* ================================================================
   LEGAL PAGES — CGV / Politique de confidentialité / Mentions légales
   ================================================================ */

.legal-page {
  background: var(--beige-light, #f5f5f0);
  padding: 48px 0 80px;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.legal-breadcrumb a {
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 500;
}
.legal-breadcrumb a:hover { text-decoration: underline; }
.legal-breadcrumb span:last-child { color: var(--green-dark); font-weight: 600; }

/* ── Layout ──────────────────────────────────────────────────── */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Table of contents ───────────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}
.legal-toc-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-toc-list li { }
.legal-toc-list a {
  display: block;
  font-size: .82rem;
  color: var(--green-dark);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  line-height: 1.4;
}
.legal-toc-list a:hover {
  background: var(--beige-light, #f5f5f0);
  color: var(--green-primary);
}

/* ── Article ─────────────────────────────────────────────────── */
.legal-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 52px;
}

/* ── Header ──────────────────────────────────────────────────── */
.legal-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--border);
}
.legal-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.legal-icon--green { background: #eef5ed; color: var(--green-primary); }
.legal-icon--blue  { background: #e8f4fd; color: #1a73e8; }
.legal-icon--amber { background: #fff8e1; color: #d4870a; }

.legal-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--green-dark);
  margin: 0 0 6px;
  line-height: 1.2;
}
.legal-updated {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Intro ───────────────────────────────────────────────────── */
.legal-intro {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 36px;
  padding: 20px 24px;
  background: var(--beige-light, #f5f5f0);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--green-primary);
}

/* ── Sections ────────────────────────────────────────────────── */
.legal-section {
  margin-bottom: 36px;
  scroll-margin-top: 100px;
}
.legal-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--green-dark);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal-section p {
  font-size: .92rem;
  color: var(--green-dark);
  line-height: 1.85;
  margin: 0 0 12px;
}

/* ── Badge ───────────────────────────────────────────────────── */
.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 16px;
  background: #eef5ed;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-primary);
}

/* ── Table (mentions légales) ────────────────────────────────── */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-top: 8px;
}
.legal-table th,
.legal-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.legal-table th {
  background: var(--beige-light, #f5f5f0);
  font-weight: 700;
  color: var(--green-dark);
  width: 180px;
  white-space: nowrap;
}
.legal-table td { color: var(--green-dark); }

/* ── CTA link ────────────────────────────────────────────────── */
.legal-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 9px 18px;
  background: var(--green-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.legal-cta-link:hover { background: var(--green-dark); }

/* ── Back link ───────────────────────────────────────────────── */
.legal-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal-back a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  transition: color .2s;
}
.legal-back a:hover { color: var(--green-dark); }

/* ── RTL ─────────────────────────────────────────────────────── */
.legal-page.rtl,
.legal-page.rtl .legal-breadcrumb,
.legal-page.rtl .legal-content,
.legal-page.rtl .legal-toc {
  direction: rtl;
  text-align: right;
}
.legal-page.rtl .legal-intro {
  border-left: none;
  border-right: 4px solid var(--green-primary);
}
.legal-page.rtl .legal-breadcrumb {
  flex-direction: row-reverse;
}

/* Arabic font size bump for better readability */
.legal-page.rtl .legal-section p,
.legal-page.rtl .legal-intro {
  font-size: 1rem;
  line-height: 2;
}
.legal-page.rtl .legal-header h1 {
  font-family: 'Noto Serif Arabic', serif;
}
.legal-page.rtl .legal-section h2 {
  font-family: 'Noto Serif Arabic', serif;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    position: static;
    order: -1;
  }
  .legal-content {
    padding: 32px 28px;
  }
}

@media (max-width: 640px) {
  .legal-page { padding: 28px 0 60px; }
  .legal-content { padding: 24px 20px; }
  .legal-header { flex-direction: column; gap: 14px; }
  .legal-table th { width: auto; white-space: normal; }
}
