/* ============================================================
 * PHYSICAL WAY — Pop-up Ebook
 * À placer dans /inc/popup-ebook.css
 * ============================================================ */

/* ===== Overlay ===== */
.pw-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.pw-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}


/* ===== Pop-up box ===== */
.pw-popup {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 14px;
    padding: 44px 36px 36px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pw-popup-overlay.is-visible .pw-popup {
    transform: scale(1) translateY(0);
}


/* ===== Bouton de fermeture ===== */
.pw-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #999;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.pw-popup__close:hover {
    background: #f5f5f5;
    color: #333;
}


/* ===== Contenu ===== */
.pw-popup__title {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.25;
}

.pw-popup__subtitle {
    font-size: 1rem;
    color: #555;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.pw-popup__subtitle p {
    margin: 0;
}


/* ===== Formulaire ===== */
.pw-popup__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pw-popup__field {
    width: 100%;
}

.pw-popup__input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    color: #1a1a1a;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.pw-popup__input:focus {
    outline: none;
    border-color: #b08b4f;
    background: #ffffff;
}

.pw-popup__input::placeholder {
    color: #999;
}


/* ===== Honeypot (caché aux humains) ===== */
.pw-popup__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}


/* ===== Bouton ===== */
.pw-popup__submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    background: #b08b4f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    position: relative;
    overflow: hidden;
}

.pw-popup__submit:hover:not(:disabled) {
    background: #8a6b3a;
}

.pw-popup__submit:active:not(:disabled) {
    transform: scale(0.98);
}

.pw-popup__submit:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.pw-popup__submit-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: pw-popup-spin 0.7s linear infinite;
    margin: 0 auto;
}

.pw-popup__submit.is-loading .pw-popup__submit-label {
    display: none;
}

.pw-popup__submit.is-loading .pw-popup__submit-loader {
    display: block;
}

@keyframes pw-popup-spin {
    to { transform: rotate(360deg); }
}


/* ===== Erreur ===== */
.pw-popup__error {
    color: #c0392b;
    background: #fdf2f0;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}


/* ===== Message de succès ===== */
.pw-popup__success {
    text-align: center;
    padding: 16px 0;
}

.pw-popup__success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 50%;
}

.pw-popup__success-text {
    font-size: 1.05rem;
    color: #1a1a1a;
    line-height: 1.5;
}

.pw-popup__success-text p {
    margin: 0 0 8px 0;
}


/* ===== Responsive ===== */
@media (max-width: 540px) {
    .pw-popup {
        padding: 40px 22px 28px 22px;
        border-radius: 10px;
    }

    .pw-popup__title {
        font-size: 1.4rem;
    }

    .pw-popup__subtitle {
        font-size: 0.95rem;
    }

    .pw-popup__input,
    .pw-popup__submit {
        padding: 13px 16px;
        font-size: 1rem;
    }
}


/* ===== Mention RGPD ===== */
.pw-popup__rgpd {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.45;
    margin-top: -4px;
    text-align: center;
}

.pw-popup__rgpd p {
    margin: 0;
}

.pw-popup__rgpd a {
    color: #b08b4f;
    text-decoration: underline;
}

.pw-popup__rgpd a:hover {
    color: #8a6b3a;
}
