/* ============================
   Page mentions légales
   ============================ */

/* Hero legal */
.legal-hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-900) 0%, #0f2460 60%, var(--blue-700) 100%);
  padding: 140px 0 72px;
  overflow: hidden;
}

.legal-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(59,130,246,.2) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(30,64,175,.25) 0%, transparent 70%);
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.legal-hero-content {
  position: relative;
  z-index: 2;
}

.legal-hero-content .hero-eyebrow {
  color: var(--blue-300);
  margin-bottom: 16px;
}

.legal-hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -.03em;
}

.legal-hero-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
}

/* Main layout */
.legal-main {
  background: var(--gray-50);
  padding: 64px 0 80px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

/* Table of contents */
.legal-toc {
  position: relative;
}

.toc-sticky {
  position: sticky;
  top: 90px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 14px;
}

.toc-sticky nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-sticky nav a {
  display: block;
  font-size: .82rem;
  color: var(--gray-600);
  padding: 5px 8px;
  border-radius: 6px;
  font-weight: 500;
  transition: all var(--transition);
  line-height: 1.4;
}

.toc-sticky nav a:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}

/* Content */
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 40px 36px;
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.highlight-section {
  border-color: var(--blue-200);
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 60%);
}

.legal-section-label {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 3rem;
  font-weight: 900;
  color: var(--gray-100);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-100);
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-800);
  margin: 24px 0 10px;
}

.legal-section p {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section a {
  color: var(--blue-500);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-section a:hover { color: var(--blue-700); }

/* Info card / table */
.info-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.info-card h3 {
  background: var(--blue-600);
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 20px;
  margin: 0;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr:not(:last-child) {
  border-bottom: 1px solid var(--gray-200);
}

.info-table th {
  text-align: left;
  width: 160px;
  padding: 10px 20px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--gray-50);
  white-space: nowrap;
}

.info-table td {
  padding: 10px 20px;
  font-size: .9rem;
  color: var(--gray-800);
}

/* RGPD badge */
.rgpd-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-600);
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.rgpd-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Inline info block */
.inline-info {
  background: var(--blue-50);
  border-left: 3px solid var(--blue-500);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: .875rem;
  color: var(--gray-700);
  margin: 14px 0;
  line-height: 1.7;
}

/* Legal list */
.legal-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--gray-600);
}

.legal-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--blue-500);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Rights grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.right-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 18px 16px;
  transition: all var(--transition);
}

.right-item:hover {
  border-color: var(--blue-200);
  background: var(--blue-50);
  transform: translateY(-2px);
}

.right-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  line-height: 1;
}

.right-item h4 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 6px;
}

.right-item p {
  font-size: .8rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

/* Cookie table */
.cookie-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.cookie-table thead {
  background: var(--blue-600);
  color: var(--white);
}

.cookie-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.cookie-table td {
  padding: 10px 16px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.cookie-table tbody tr:last-child td { border-bottom: none; }

.cookie-table code {
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .82rem;
}

/* Legal update note */
.legal-update {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .82rem !important;
  color: var(--gray-400) !important;
  margin-top: 20px !important;
  font-style: italic;
}

/* Footer links override for legal page */
.footer-bottom a {
  color: rgba(255,255,255,.5);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--blue-300); }

/* Responsive */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-toc { display: none; }
  .legal-section { padding: 28px 24px; }
  .rights-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .legal-section { padding: 22px 16px; }
  .rights-grid   { grid-template-columns: 1fr; }
  .info-table th { width: 110px; }
}
