/* ===================================================================
   Pages légales (mentions.php, confidentialite.php)
   Dépend de common.css (variables --yellow, --cream, --orange…).
   --site-header-offset est la hauteur du header fixe (définie par
   header.php, comme sur index.php) ; 64px = valeur de secours.
   =================================================================== */

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  /* ← CORRECTION : on décale le contenu sous le header fixe */
  padding: calc(var(--site-header-offset, 64px) + 3rem) 2rem 6rem;
}

.legal-nav {
  position: sticky;
  top: calc(var(--site-header-offset, 64px) + 1.5rem);
}

.legal-nav-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--cream);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--yellow);
}

.legal-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.legal-nav a {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255,248,238,0.45);
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.legal-nav a:hover,
.legal-nav a.active {
  color: var(--cream);
  border-left-color: var(--yellow);
}

.legal-section {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  /* les ancres (#editeur…) ne passent plus sous le header */
  scroll-margin-top: calc(var(--site-header-offset, 64px) + 1.5rem);
}
.legal-section:last-of-type { margin-bottom: 0; }
.legal-section.visible { opacity: 1; transform: translateY(0); }

.legal-section-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  border-radius: 2px;
  margin-bottom: 0.8rem;
}

.legal-section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: 1px;
  color: var(--cream);
  margin-bottom: 1.2rem;
}
.legal-section h2 span { color: var(--yellow); }

.legal-section p {
  font-size: 0.95rem;
  color: rgba(255,248,238,0.7);
  line-height: 1.8;
  margin-bottom: 0.9rem;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--cream); }

.legal-section ul.legal-list {
  list-style: none;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.legal-section ul.legal-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,248,238,0.7);
}
.legal-section ul.legal-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.7em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--yellow);
}

.legal-section a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.legal-section a:hover { border-bottom-color: var(--orange); }

.info-block {
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,248,238,0.15);
  border-radius: 10px;
  padding: 1.5rem 1.8rem;
  margin: 1.5rem 0;
  color: var(--white);
}
.info-block strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--yellow);
  display: block;
  margin-bottom: 0.7rem;
}
.info-block p { color: rgba(255,255,255,0.7); font-size: 0.88rem; margin-bottom: 0.4rem; }
.info-block p:last-child { margin-bottom: 0; }
.info-block a { color: var(--yellow); }

/* Tableau (confidentialité) — défile dans son conteneur sur mobile */
.legal-table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: 10px; border: 2px solid rgba(255,248,238,0.15); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; padding: 0.8rem 1rem; vertical-align: top; line-height: 1.6; }
.legal-table th {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 2px;
  font-size: 0.95rem;
  color: var(--yellow);
  background: rgba(255,255,255,0.04);
}
.legal-table td { color: rgba(255,248,238,0.7); border-top: 1px solid rgba(255,248,238,0.1); }
.legal-table td:first-child { color: var(--cream); font-weight: 600; }

.legal-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), transparent);
  border: none;
  margin: 2.5rem 0;
  border-radius: 2px;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--gradient-accent);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 3rem;
}
.update-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--white);
  border-radius: 50%;
}

@media (max-width: 860px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: calc(var(--site-header-offset, 64px) + 2rem) 1.5rem 4rem;
  }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
  .legal-nav-title { width: 100%; }
  .legal-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
  .legal-nav a { border-left: none; border-bottom: 2px solid transparent; padding: 0.3rem 0.5rem; font-size: 0.72rem; }
  .legal-nav a:hover, .legal-nav a.active { border-left-color: transparent; border-bottom-color: var(--yellow); }
}
