/**
 * 0xCyberLiTech · CLT1 — MODALE MENTIONS LÉGALES & CONFIDENTIALITÉ (CSS)
 * Design System Luminous Supreme · Règle 14 (Découplage strict < 400L)
 * Conformité : Loi LCEN 2004-575 · RGPD 2016/679 · CNIL 2026
 */

/* ── Bouton d'ouverture dans le footer ── */
.btn-footer-legal {
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-family: inherit;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-footer-legal:hover {
  color: var(--accent-cyan, #0284c7);
  background: rgba(2, 132, 199, 0.08);
}
.btn-footer-legal:focus-visible {
  outline: 2px solid var(--accent-cyan, #0284c7);
  outline-offset: 2px;
}

/* ── Conteneur modal plein écran ── */
.clt-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  pointer-events: none;
}

.clt-legal-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Arrière-plan flouté ── */
.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

/* ── Fenêtre centrale popup ── */
.legal-modal-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.3), 0 0 50px rgba(2, 132, 199, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.clt-legal-modal.is-active .legal-modal-stage {
  transform: scale(1);
}

/* ── En-tête de la modale ── */
.legal-modal-header {
  padding: 22px 28px 18px 28px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.legal-header-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-chip {
  align-self: flex-start;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  font-weight: 800;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-modal-title {
  margin: 4px 0 0 0;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-headline, #0f172a);
}

.legal-modal-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.legal-modal-close {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.legal-modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  transform: rotate(90deg);
}

/* ── Corps défilable ── */
.legal-modal-body {
  padding: 22px 28px;
  overflow-y: auto;
  max-height: calc(88vh - 170px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}

.legal-modal-body::-webkit-scrollbar {
  width: 6px;
}
.legal-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* ── Cartes d'information légales ── */
.legal-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}
.legal-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.legal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.legal-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-headline, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-card-title i {
  color: #0284c7;
  font-size: 0.95rem;
}

.legal-badge-pill {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  letter-spacing: 0.03em;
}

.legal-card-text {
  margin: 0;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.65;
}
.legal-card-text strong {
  color: #0f172a;
}
.legal-card-text + .legal-card-text {
  margin-top: 8px;
}

.legal-sub-list {
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.6;
}

/* ── Pied de la modale ── */
.legal-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-seal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.80rem;
  font-weight: 700;
  color: #059669;
}
