/* ════════════════════════════════════════════════════════════════
   Lead Magnet popup — Pédagogie Retraite
   Utilise les variables blue-theme.css (compatible dark/light)
   ════════════════════════════════════════════════════════════════ */

body.lm-no-scroll { overflow: hidden; }

.lm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 36, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.lm-overlay.lm-open {
  display: flex;
  opacity: 1;
}

.lm-modal {
  position: relative;
  background: var(--bg, #0a2240);
  color: var(--ink, #ffffff);
  border: 1px solid var(--border, rgba(201, 169, 97, 0.2));
  border-radius: 6px;
  padding: 44px 40px 36px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: lmFadeUp .35s ease;
}
@keyframes lmFadeUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.lm-close {
  position: absolute;
  top: 14px; right: 16px;
  background: transparent;
  border: none;
  color: var(--ink-muted, rgba(255, 255, 255, 0.55));
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color .2s;
}
.lm-close:hover { color: var(--gold, #c9a961); }

.lm-eyebrow {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold, #c9a961);
  margin-bottom: 14px;
}

.lm-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--ink, #ffffff);
}

.lm-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-soft, rgba(255, 255, 255, 0.8));
  margin: 0 0 24px;
}

/* Form */
.lm-form { display: flex; flex-direction: column; gap: 14px; }

.lm-field { display: flex; flex-direction: column; gap: 6px; }
.lm-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted, rgba(255, 255, 255, 0.55));
  font-weight: 500;
}
.lm-field input {
  background: var(--surface, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(201, 169, 97, 0.2));
  color: var(--ink, #ffffff);
  padding: 12px 14px;
  border-radius: 3px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  outline: none;
}
.lm-field input:focus {
  border-color: var(--gold, #c9a961);
  background: var(--ink-ghost, rgba(255, 255, 255, 0.06));
}

.lm-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-soft, rgba(255, 255, 255, 0.75));
  line-height: 1.5;
  cursor: pointer;
  margin-top: 4px;
}
.lm-consent input { margin-top: 3px; flex-shrink: 0; }

.lm-error {
  background: rgba(231, 76, 60, 0.12);
  border-left: 3px solid #e8836f;
  color: #f3c5b8;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 2px;
  line-height: 1.5;
}

.lm-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--gold, #c9a961);
  color: var(--bg, #0a2240);
  border: none;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 6px;
  transition: background .2s, transform .2s;
}
.lm-submit:hover:not(:disabled) {
  background: var(--gold-lt, #d9bc7a);
  transform: translateY(-1px);
}
.lm-submit:disabled { opacity: .65; cursor: not-allowed; }

.lm-privacy {
  font-size: 11px;
  color: var(--ink-muted, rgba(255, 255, 255, 0.5));
  line-height: 1.5;
  margin: 6px 0 0;
}

/* Success state */
.lm-step-success {
  text-align: center;
  padding: 8px 0;
}
.lm-success-icon {
  display: inline-flex;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(201, 169, 97, 0.15);
  border: 2px solid var(--gold, #c9a961);
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--gold, #c9a961);
  margin: 0 auto 18px;
}
.lm-step-success .lm-title { margin-bottom: 12px; }
.lm-step-success .lm-desc { margin-bottom: 24px; }

.lm-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--gold, #c9a961);
  color: var(--bg, #0a2240);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 2px;
  margin-bottom: 12px;
  transition: background .2s;
}
.lm-download:hover { background: var(--gold-lt, #d9bc7a); }

.lm-close-btn {
  display: block;
  margin: 0 auto;
  background: transparent;
  border: 1px solid var(--border, rgba(201, 169, 97, 0.2));
  color: var(--ink-soft, rgba(255, 255, 255, 0.7));
  padding: 10px 24px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lm-close-btn:hover {
  border-color: var(--gold, #c9a961);
  color: var(--gold, #c9a961);
}

/* Responsive */
@media (max-width: 540px) {
  .lm-modal { padding: 36px 24px 28px; }
  .lm-title { font-size: 22px; }
}
