/* ============================================================
   Terms & Conditions — refonte 2026 (CGT Alkor)
   Layout « lecture légale » : hero compact + sommaire sticky +
   corps éditorial typographié. Dépend de refonte.css + project.css.
   Mobile-first.
   ============================================================ */

/* ---------- Hero compact ---------- */
.legal-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(240px, 40vw, 360px);
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 9vw, 64px) 0 clamp(22px, 6vw, 48px);
  overflow: hidden;
}
.legal-hero-bg {
  position: absolute;
  inset: -8% 0 -8% 0;
  z-index: -2;
  will-change: transform;
}
.legal-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.legal-hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 15, 30, 0.5) 0%, rgba(3, 15, 30, 0.72) 60%, var(--bg-deep) 100%),
    radial-gradient(120% 80% at 15% 100%, rgba(3, 15, 30, 0.6), transparent 70%);
}
.legal-hero-inner { width: 100%; }
.legal-hero-title { margin: 10px 0 0; }
.legal-hero-meta {
  margin: 12px 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--text-3);
}

/* ---------- Layout ---------- */
.legal-section { padding-top: clamp(28px, 6vw, 64px); }
.legal-grid {
  display: grid;
  gap: clamp(24px, 5vw, 48px);
}

/* ---------- Sommaire ---------- */
.legal-toc {
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  padding: 18px 18px 14px;
  background: rgba(8, 44, 82, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.legal-toc-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 12px;
}
.legal-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.legal-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s var(--ease-out), background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.legal-toc a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--accent);
}

/* ---------- Document ---------- */
.legal-doc {
  max-width: 72ch;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.75;
}
.legal-intro {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 clamp(24px, 5vw, 40px);
  padding-bottom: clamp(20px, 4vw, 32px);
  border-bottom: 1px solid var(--hairline);
}
.legal-block { margin: 0 0 clamp(26px, 5vw, 40px); scroll-margin-top: 96px; }
.legal-block:last-child { margin-bottom: 0; }
.legal-doc h2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 12px;
  position: relative;
  padding-top: 14px;
}
.legal-doc h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.legal-doc h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}
.legal-doc p { margin: 0 0 14px; }
.legal-doc p:last-child { margin-bottom: 0; }
.legal-doc a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent-muted);
  transition: text-decoration-color 0.18s var(--ease-out);
}
.legal-doc a:hover { text-decoration-color: var(--accent); }

.legal-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.legal-list li {
  position: relative;
  padding-left: 22px;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.legal-list strong { color: var(--text); font-weight: 600; }

/* ============================================================
   Desktop : sommaire sticky en colonne
   ============================================================ */
@media (min-width: 1024px) {
  .legal-grid {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
  .legal-toc {
    position: sticky;
    top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hero-bg { transform: none !important; }
  html { scroll-behavior: auto; }
}
