/* lead-form-v2.css — Moteur lead-magnet générique (capture email Brevo + PDF)
   macalculatriceenligne.com
   Charte V5 strict : bordure noire 3px, ombre accent décalée.
   Accent piloté par variable --lfv2-accent (défini inline par cluster en JS ; défaut teal grossesse). */

#lead-form-v2-overlay {
  --lfv2-accent: #0d9488;
  --lfv2-accent-dark: #0f766e;
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 30, 28, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 1rem;
  animation: lfv2-fade-in 0.25s ease-out both;
}
#lead-form-v2-overlay.lfv2-visible { display: flex; }

@keyframes lfv2-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lfv2-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#lead-form-v2-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: #f0fdfa;
  border: 3px solid #000;
  box-shadow: 6px 6px 0 var(--lfv2-accent);
  padding: 1.4rem 1.3rem 1.2rem;
  animation: lfv2-slide-up 0.3s ease-out both;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
}

#lead-form-v2-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #000;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: #000;
}
#lead-form-v2-close:hover { background: #eee; }
#lead-form-v2-close:focus-visible { outline: 3px solid var(--lfv2-accent); outline-offset: 2px; }

.lfv2-header {
  margin: 0 0 0.9rem;
  padding-right: 36px;
}
.lfv2-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.25;
}
.lfv2-header p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #333;
}

#lead-form-v2 {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.lfv2-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.lfv2-row label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #444;
  letter-spacing: 0.01em;
}
.lfv2-row input[type="email"],
.lfv2-row input[type="text"],
.lfv2-row input[type="date"],
.lfv2-row input[type="number"] {
  padding: 0.55rem 0.65rem;
  border: 2px solid #000;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
}
.lfv2-row input:focus-visible {
  outline: 3px solid var(--lfv2-accent);
  outline-offset: 1px;
}
.lfv2-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

/* Case consentement RGPD */
.lfv2-consent { margin-top: 0.15rem; }
.lfv2-consent-label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.74rem;
  font-weight: 600;
  color: #444;
  line-height: 1.4;
  cursor: pointer;
}
.lfv2-consent-label input[type="checkbox"] {
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  width: 16px; height: 16px;
  accent-color: var(--lfv2-accent);
}
.lfv2-consent-label a { color: var(--lfv2-accent-dark); text-decoration: underline; }

#lead-form-v2-submit {
  margin-top: 0.45rem;
  padding: 0.75rem 1rem;
  background: var(--lfv2-accent);
  color: #fff;
  border: 3px solid #000;
  font-weight: 900;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  font-family: inherit;
}
#lead-form-v2-submit:hover { background: var(--lfv2-accent-dark); }
#lead-form-v2-submit:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
#lead-form-v2-submit:focus-visible { outline: 3px solid #ffd600; outline-offset: 2px; }
#lead-form-v2-submit:disabled { background: #aaa; cursor: not-allowed; box-shadow: none; }

.lfv2-msg {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 1.2em;
  line-height: 1.4;
}
.lfv2-msg.lfv2-err { color: #b91c1c; }
.lfv2-msg.lfv2-ok { color: #15803d; }
.lfv2-msg.lfv2-info { color: #1e40af; }

.lfv2-privacy {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  color: #555;
  line-height: 1.45;
}
.lfv2-privacy a { color: var(--lfv2-accent-dark); text-decoration: underline; }

.lfv2-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: lfv2-spin 0.7s linear infinite;
  margin-right: 0.45rem;
  vertical-align: -2px;
}
@keyframes lfv2-spin { to { transform: rotate(360deg); } }

/* Responsive mobile */
@media (max-width: 600px) {
  #lead-form-v2-overlay { padding: 0; }
  #lead-form-v2-modal {
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    box-shadow: none;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .lfv2-row-2 { grid-template-columns: 1fr; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  #lead-form-v2-overlay,
  #lead-form-v2-modal,
  .lfv2-spinner { animation: none !important; }
}
