/* Modale documents légaux (CGU / politique) — alignée dialog Flutter */

.zic-legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(15, 7, 34, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.zic-legal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.zic-legal-overlay[hidden] {
  display: none !important;
}

.zic-legal-dialog {
  width: min(1000px, 96vw);
  height: min(700px, 88vh);
  max-height: 88vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.zic-legal-overlay.is-open .zic-legal-dialog {
  transform: translateY(0) scale(1);
}

.zic-legal-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(109, 40, 217, 0.12);
  background: linear-gradient(180deg, #faf8ff 0%, #fff 100%);
}

.zic-legal-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  letter-spacing: -0.03em;
  color: #1a0a3d;
  line-height: 1.2;
  padding-right: 8px;
}

.zic-legal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(109, 40, 217, 0.08);
  color: #6d28d9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.zic-legal-close:hover {
  background: rgba(109, 40, 217, 0.16);
  color: #4c1d95;
}

.zic-legal-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  background: #f5f5f5;
}

body.zic-legal-open {
  overflow: hidden;
}

/* Pages dédiées /terms et /policy : fond derrière la modale */
body.zic-legal-route-body {
  margin: 0;
  min-height: 100vh;
  background: #0b0b14;
  font-family: "DM Sans", system-ui, sans-serif;
}

.zic-legal-route-fallback {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.zic-legal-route-fallback a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.zic-legal-route-fallback a:hover {
  color: #fff;
}

.zic-footer-legal {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}
.zic-footer-legal:hover {
  color: rgba(255, 255, 255, 0.75);
}

.zic-inline-legal {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
