/* Waa Daara — Pages légales (CGU / Politique de confidentialité)
   Palette alignée sur le reste du site (cf. Waa Daara - Accueil.html / Auth.html). */

:root {
  --green:       #1a6b3c;
  --green-dark:  #0f4225;
  --green-light: #22894e;
  --green-pale:  #e8f5ee;
  --gold:        #c49b2f;
  --gold-light:  #f0c040;
  --gold-pale:   #fdf7e4;
  --ink:         #0a1f13;
  --muted:       #5a7364;
  --paper:       #ffffff;
  --ivory:       #fefdf9;
  --border:      #d4e0d8;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 4px 32px rgba(10, 31, 19, .07);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.page-legal {
  font-family: 'Inter', sans-serif;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.65;
}

/* ── Header ─────────────────────────────────────────────────────── */
.legal-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.legal-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.legal-logo-img { width: 34px; height: 34px; object-fit: contain; }
.legal-logo em { font-style: normal; color: var(--green); }
.legal-back-link {
  color: var(--green);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.legal-back-link:hover { text-decoration: underline; }

/* ── Main container ─────────────────────────────────────────────── */
.legal-main { padding: 48px 24px 80px; }
.legal-container { max-width: 1040px; margin: 0 auto; }

.legal-part-title {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.legal-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 10px;
}
.legal-date {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.legal-meta {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  overflow: hidden;
}
.legal-meta-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 10px 16px;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.legal-meta-row:last-child { border-bottom: none; }
.legal-meta-label { font-weight: 700; color: var(--green-dark); }
.legal-meta-value { color: var(--ink); }

.legal-intro {
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Callouts ───────────────────────────────────────────────────── */
.legal-callout {
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 24px;
  border: 1px solid transparent;
}
.legal-callout-warning {
  background: var(--gold-pale);
  border-color: #ecd9a0;
  color: #6b5417;
}
.legal-callout-info {
  background: var(--green-pale);
  border-color: #bfe2cc;
  color: var(--green-dark);
}
.legal-callout-success {
  background: #e8f5ee;
  border-color: #b8e2c9;
  color: var(--green-dark);
}
.legal-callout-title { display: block; margin-bottom: 4px; }

/* ── Layout : sommaire + contenu ───────────────────────────────── */
.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 90px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.legal-toc-heading {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 12px;
}
.legal-toc-link {
  display: flex;
  gap: 8px;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  font-size: .85rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.legal-toc-link:last-child { border-bottom: none; }
.legal-toc-link:hover { color: var(--green); }
.legal-toc-num {
  flex-shrink: 0;
  width: 20px;
  font-weight: 800;
  color: var(--gold);
}

.legal-content { min-width: 0; }
.legal-article {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.legal-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 16px;
}
.legal-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--green-pale);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 800;
}
.legal-h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin: 18px 0 8px;
}
.legal-p {
  font-size: .92rem;
  color: var(--ink);
  margin-bottom: 12px;
}
.legal-list {
  list-style: none;
  margin: 8px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-list li {
  font-size: .92rem;
  padding-left: 22px;
  position: relative;
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── Footer ─────────────────────────────────────────────────────── */
.legal-footer {
  border-top: 1px solid var(--border);
  background: var(--paper);
  padding: 24px;
  text-align: center;
}
.legal-footer p { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.legal-footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.legal-footer-links a {
  font-size: .82rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.legal-footer-links a:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-article { padding: 22px 18px; }
  .legal-meta-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ── Print ──────────────────────────────────────────────────────── */
@media print {
  .legal-header, .legal-toc, .legal-footer { display: none; }
  .legal-article { box-shadow: none; border: none; }
}
