/* ============================================================
   ADrard Marketing — Legal Pages CSS  (Shadcn style)
   Pages : cgu · cgv · confidentialite · mentions-legales · cookies
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.legal-hero {
  background: linear-gradient(145deg, #0d1117 0%, #0f172a 50%, #1e3a8a 100%);
  position: relative;
  padding: calc(var(--mk-navbar-h) + var(--mk-sp-16)) 0 var(--mk-sp-14);
  text-align: center;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.legal-hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 75% 15%, rgba(37,99,235,.22) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 10% 90%, rgba(208,255,3,.04) 0%, transparent 55%);
  pointer-events: none;
}
.legal-hero-inner { position: relative; z-index: 1; }

.legal-hero-badge {
  display: inline-block;
  background: rgba(208,255,3,.13);
  color: #D0FF03;
  border: 1px solid rgba(208,255,3,.26);
  padding: 0.28rem 1rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.1rem;
}
.legal-hero h1 {
  color: #fff;
  font-size: clamp(1.55rem, 1.2rem + 1.8vw, 2.6rem);
  max-width: 680px;
  margin: 0 auto 0.7rem;
  letter-spacing: -0.03em;
  line-height: 1.18;
}
.legal-hero p {
  color: rgba(255,255,255,.48);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════
   SECTION WRAPPER — padding section parent
   ════════════════════════════════════════════════════════════ */
.legal-section-wrap {
  padding: var(--mk-sp-12) 0 var(--mk-sp-16);
}

/* ════════════════════════════════════════════════════════════
   LAYOUT — sidebar TOC + contenu
   ════════════════════════════════════════════════════════════ */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 1020px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════
   TABLE DES MATIÈRES  (Shadcn sidebar style)
   ════════════════════════════════════════════════════════════ */
.legal-toc {
  position: sticky;
  top: calc(var(--mk-navbar-h) + 1.5rem);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.04);
}
.legal-toc h3 {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin: 0 0 0.75rem;
  padding: 0 0.5rem;
}
.legal-toc a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #475569;
  text-decoration: none;
  padding: 0.38rem 0.55rem;
  border-radius: 7px;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
  margin-bottom: 1px;
  line-height: 1.4;
}
.legal-toc a:hover {
  color: #2563eb;
  background: #eff6ff;
  border-left-color: #bfdbfe;
}
.legal-toc a.active {
  color: #1d4ed8;
  background: #eff6ff;
  border-left-color: #2563eb;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   CONTENU LÉGAL  (Shadcn typography)
   ════════════════════════════════════════════════════════════ */
.legal-content {
  min-width: 0;
}
.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  scroll-margin-top: calc(var(--mk-navbar-h) + 1.5rem);
  line-height: 1.3;
}
.legal-content h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}
.legal-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.25rem 0 0.5rem;
  line-height: 1.4;
}
.legal-content p {
  color: #475569;
  line-height: 1.85;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
}
.legal-content ul,
.legal-content ol {
  color: #475569;
  line-height: 1.85;
  margin: 0.5rem 0 0.9rem 1.4rem;
  font-size: 0.88rem;
}
.legal-content li { margin-bottom: 0.35rem; }
.legal-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover { color: #1d4ed8; }

/* ── Meta box (Shadcn info card) ── */
.legal-meta {
  background: linear-gradient(135deg, #f8faff, #eff6ff);
  border: 1px solid #dbeafe;
  border-left: 3px solid #2563eb;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.85;
}
.legal-meta strong { color: #0f172a; }

/* ── Callouts ── */
.legal-highlight {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 3px solid #0ea5e9;
  border-radius: 8px;
  padding: 0.875rem 1.1rem;
  margin: 0.9rem 0;
  font-size: 0.85rem;
  color: #0c4a6e;
  line-height: 1.7;
}
.legal-quote {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  padding: 0.875rem 1.1rem;
  margin: 0.9rem 0;
  font-size: 0.85rem;
  font-style: italic;
  color: #78350f;
  line-height: 1.7;
}
.legal-warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 3px solid #f97316;
  border-radius: 8px;
  padding: 0.875rem 1.1rem;
  margin: 0.9rem 0;
  font-size: 0.85rem;
  color: #7c2d12;
  line-height: 1.7;
}

/* ── Footer stamp ── */
.legal-footer-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 2.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.75;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   TABLES LÉGALES  (Shadcn table style)
   ════════════════════════════════════════════════════════════ */
.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin: 1rem 0;
}
.legal-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.legal-table thead th {
  background: #f8fafc;
  color: #374151;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.legal-table tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: top;
  line-height: 1.55;
}
.legal-table tbody tr:last-child td { border-bottom: none; }
.legal-table tbody tr:hover td { background: #fafafa; }

/* ════════════════════════════════════════════════════════════
   COOKIES — composants
   ════════════════════════════════════════════════════════════ */

/* ── Type cards ── */
.cookie-type-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color .15s, box-shadow .15s;
}
.cookie-type-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 10px rgba(37,99,235,.07);
}
.cookie-type-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.cookie-type-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.7;
}

/* ── Badges ── */
.cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.14rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cookie-badge.required  { background: #dcfce7; color: #15803d; }
.cookie-badge.analytics { background: #dbeafe; color: #1d4ed8; }
.cookie-badge.marketing { background: #fef9c3; color: #854d0e; }

/* ── Cookies table ── */
.cookies-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin: 1rem 0;
}
.cookies-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.cookies-table thead th {
  background: #f8fafc;
  color: #374151;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.cookies-table tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: middle;
  line-height: 1.5;
}
.cookies-table tbody tr:last-child td { border-bottom: none; }
.cookies-table tbody tr:hover td { background: #fafafa; }
.cookies-table code {
  font-family: 'SFMono-Regular', ui-monospace, Consolas, monospace;
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* ── Pref cards ── */
.cookie-pref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}
.cookie-pref-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
}
.cookie-pref-card h4 {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.45rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.cookie-pref-card p {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — tablette étroite (≤ 900px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 200px 1fr;
    gap: 1.75rem;
  }
  .legal-toc { padding: 1rem 0.85rem; }
  .legal-toc a { font-size: 0.75rem; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — tablette (≤ 768px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .legal-hero {
    padding-top: calc(var(--mk-navbar-h) + 2.5rem);
    padding-bottom: 2.5rem;
  }
  .legal-hero h1 { font-size: clamp(1.35rem, 5vw, 1.9rem); }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* TOC → pill chips horizontaux */
  .legal-toc {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0.85rem 1rem;
    border-radius: 10px;
  }
  .legal-toc h3 {
    width: 100%;
    margin-bottom: 4px;
    font-size: 0.58rem;
  }
  .legal-toc a {
    display: inline-flex;
    padding: 0.22rem 0.7rem;
    border-radius: 9999px;
    border-left: none;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.7rem;
    margin-bottom: 0;
    line-height: 1.3;
  }
  .legal-toc a:hover,
  .legal-toc a.active {
    background: #dbeafe;
    border-color: #2563eb;
    font-weight: 700;
    color: #1d4ed8;
  }

  .legal-content h2 { font-size: 1rem; margin-top: 2rem; }
  .legal-content h3 { font-size: 0.87rem; }
  .legal-content p,
  .legal-content ul,
  .legal-content ol { font-size: 0.85rem; }
  .legal-meta { font-size: 0.78rem; padding: 0.85rem 1rem; }

  .cookie-pref-grid { grid-template-columns: 1fr; gap: 0.6rem; }

  .legal-section-wrap { padding: 2rem 0 3rem; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — mobile (≤ 480px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Hide TOC entirely — too cramped, article links replace navigation */
  .legal-toc { display: none; }

  .legal-hero h1 { font-size: 1.35rem; }
  .legal-hero p  { font-size: 0.78rem; }

  .legal-meta {
    font-size: 0.75rem;
    padding: 0.75rem 0.9rem;
    line-height: 1.75;
  }

  .legal-content h2 { font-size: 0.95rem; }
  .legal-content h3 { font-size: 0.85rem; }
  .legal-content p,
  .legal-content li { font-size: 0.82rem; }
  .legal-content ul,
  .legal-content ol { margin-left: 1.1rem; }

  .legal-highlight,
  .legal-quote,
  .legal-warn { padding: 0.7rem 0.9rem; font-size: 0.8rem; }

  .legal-footer-note { font-size: 0.72rem; padding: 0.85rem; }

  .cookie-type-card { padding: 0.85rem 1rem; }
  .cookie-type-card h3 { font-size: 0.83rem; }
  .cookie-type-card p  { font-size: 0.8rem; }
  .cookies-table thead th,
  .cookies-table tbody td { padding: 0.5rem 0.7rem; font-size: 0.75rem; }
  .legal-table thead th,
  .legal-table tbody td  { padding: 0.5rem 0.7rem; font-size: 0.75rem; }

  .legal-section-wrap { padding: 1.5rem 0 2.5rem; }
}
