/**
 * ITSOFT DZ - Legal Pages Styles
 * Mentions légales, Confidentialité, CGV — light/dark via variables
 */

/* ============================================
   HERO SECTION (aligné sur about/contact/services/logiciels)
   ============================================ */

.legal-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  padding: calc(72px + 4rem) 0 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: hidden;
}

.legal-hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
}

.legal-hero .hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0, 163, 224, 0.08) 0%, transparent 50%);
}

.legal-hero .hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.legal-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.legal-hero .hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 102, 204, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0066CC;
  margin-bottom: 2rem;
}

.legal-hero .hero-label i {
  font-size: 1rem;
}

.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.legal-hero h1 .line {
  display: block;
}

.legal-hero .hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #334155;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 0 1rem;
}

.legal-updated {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(0, 102, 204, 0.08);
  border: 1px solid rgba(0, 102, 204, 0.15);
  border-radius: 2rem;
  padding: 0.375rem 0.875rem;
  margin: 0;
}

[data-theme="dark"] .legal-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .legal-hero .hero-mesh {
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 163, 224, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0, 102, 204, 0.1) 0%, transparent 50%);
}

[data-theme="dark"] .legal-hero .hero-grid {
  background-image:
    linear-gradient(rgba(0, 163, 224, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 163, 224, 0.05) 1px, transparent 1px);
}

[data-theme="dark"] .legal-hero .hero-label {
  background: rgba(0, 102, 204, 0.2);
  color: #00A3E0;
}

[data-theme="dark"] .legal-hero h1 {
  color: #f1f5f9;
}

[data-theme="dark"] .legal-hero .hero-description {
  color: #cbd5e1;
}

[data-theme="dark"] .legal-updated {
  color: #94a3b8;
  background: rgba(0, 102, 204, 0.12);
  border-color: rgba(0, 102, 204, 0.25);
}

/* ============================================
   ARTICLE
   ============================================ */

.legal-content {
  background: var(--bg);
  padding: 4rem 0 6rem;
}

.legal-article {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
}

.legal-article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.legal-article h2:first-child {
  padding-top: 0;
  border-top: none;
}

.legal-article h2:not(:first-child) {
  margin-top: 2rem;
}

.legal-article p {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  margin: 0 0 1rem;
}

.legal-article p:last-child,
.legal-article ul:last-child {
  margin-bottom: 0;
}

.legal-article ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-article li {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.7;
}

.legal-article strong {
  color: var(--text-main);
}

.legal-article code {
  font-size: 0.875em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.125rem 0.375rem;
  color: var(--text-main);
}

[data-theme="dark"] .legal-article {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
  .legal-hero {
    min-height: auto;
    padding: calc(64px + 3rem) 0 3rem;
  }

  .legal-content {
    padding: 3rem 0 4rem;
  }
}
