/* Lead magnet 1-etape — formulaire inline + popup exit-intent.
   Couleurs alignees sur le bloc eBook existant (accent #f2a842). */

.jc-lead-form {
    margin: 1.2rem 0 0;
    max-width: 620px;
}

/* Badge mode test (admins only) */
.jc-lead-testbadge {
    margin: 0 0 0.7rem;
    padding: 0.4rem 0.7rem;
    background: #fff3cd;
    border: 1px solid #ffe08a;
    border-radius: 6px;
    color: #6b5200;
    font-size: 0.82em;
    font-weight: 600;
}

.jc-lead-admin-hp-note {
    margin: 0 0 1rem;
    padding: 0.55rem 0.8rem;
    background: #fff3cd;
    border: 1px solid #ffe08a;
    border-radius: 6px;
    color: #6b5200;
    font-size: 0.9rem;
    font-weight: 600;
}

.jc-lead-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: stretch;
}

.jc-lead-email,
.jc-lead-firstname {
    flex: 1 1 280px;
    min-width: 0;
    padding: 0.85rem 0.95rem;
    font-size: 1.08em;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    background: #fff;
    color: #222;
}

.jc-lead-email:focus,
.jc-lead-firstname:focus,
.jc-lead-submit:focus,
.jc-lead-consent input:focus {
    outline: 2px solid #f2a842;
    outline-offset: 2px;
}

.jc-lead-submit {
    flex: 0 0 230px;
    display: inline-block;
    background: #f2a842;
    color: #000;
    padding: 0.85rem 1.3rem;
    border: 0;
    border-radius: 4px;
    font-size: 1.08em;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
}

.jc-lead-submit:hover { background: #e69a31; }
.jc-lead-submit:disabled { opacity: 0.7; cursor: default; }

/* Honeypot : hors-ecran, surtout PAS display:none */
.jc-lead-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.jc-lead-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.65rem;
    font-size: 0.82em;
    line-height: 1.4;
    color: #444;
}

.jc-lead-consent input { margin-top: 0.2rem; flex: 0 0 auto; }
.jc-lead-consent a { color: #1a6fb5; text-decoration: underline; }

.jc-lead-msg {
    margin: 0.7rem 0 0;
    font-size: 0.95em;
    min-height: 1.2em;
}

.jc-lead-msg.is-success { color: #088800; font-weight: 600; }
.jc-lead-msg.is-error { color: #c0392b; font-weight: 600; }

/* Accessibilite : label visuellement masque */
.jc-lead-form .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

/* ------------------------------ Popup exit-intent ------------------------------ */

.jc-lead-popup[hidden] { display: none; }

.jc-lead-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.jc-lead-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.jc-lead-popup-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.8rem 1.8rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow: auto;
}

.jc-lead-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.7rem;
    background: transparent;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

.jc-lead-popup-close:hover { color: #222; }

.jc-lead-popup-title {
    font-size: 1.5rem;
    margin: 0 0 0.6rem;
    padding-right: 1.5rem;
}

.jc-lead-popup-desc {
    margin: 0 0 0.4rem;
    color: #444;
}

.jc-lead-popup .jc-lead-form { max-width: 100%; }

body.jc-lead-popup-open { overflow: hidden; }

@media (max-width: 600px) {
    .jc-lead-fields { flex-direction: column; }
    .jc-lead-submit { flex-basis: auto; width: 100%; }
    .jc-lead-popup-card { padding: 1.6rem 1.2rem; }
}
