/* ==========================================================================
   KzNewsParrain - popup newsletter / code de bienvenue
   ========================================================================== */

#kznp-root {
    position: relative;
    z-index: 100000;
}

/* --- Overlay (mode modal) --- */
.kznp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
}

/* --- Bloc popup commun --- */
.kznp-popup {
    box-sizing: border-box;
    width: 92%;
    max-width: 480px;
    background-color: #fff;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 100001;
}

.kznp-popup * {
    box-sizing: border-box;
}

.kznp-content {
    padding: 28px 24px;
    max-height: 90vh;
    overflow-y: auto;
}

.kznp-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}
.kznp-close:hover {
    opacity: 1;
}

.kznp-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 16px;
}

.kznp-message {
    margin-bottom: 18px;
    text-align: center;
}
.kznp-message h1, .kznp-message h2, .kznp-message h3 {
    margin-top: 0;
}

.kznp-form .kznp-field {
    margin-bottom: 12px;
}

.kznp-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

#kznp-email,
.kznp-field input[type="email"],
.kznp-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.kznp-field input[disabled] {
    background-color: #f4f4f4;
    color: #777;
    cursor: not-allowed;
}

.kznp-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
.kznp-field--checkbox input {
    margin-top: 3px;
}

.kznp-submit {
    width: 100%;
    padding: 13px 14px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    background-color: #222;
    color: #fff;
    cursor: pointer;
}
.kznp-submit:hover {
    opacity: 0.9;
}
.kznp-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.kznp-error {
    color: #d9534f;
    font-size: 13px;
    margin-top: 10px;
    min-height: 0;
}

.kznp-success {
    text-align: center;
}
.kznp-success-text {
    margin-bottom: 14px;
    font-weight: 600;
}
.kznp-code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px dashed #999;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.kznp-code-value {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}
.kznp-copy {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #222;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
}
.kznp-copied {
    color: #3c763d;
    font-size: 13px;
}

/* ==========================================================================
   Positionnement : modal centré (par défaut)
   ========================================================================== */
.kznp-popup--modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   Positionnement : bandeau bas de page
   ========================================================================== */
.kznp-popup--bottom_bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 6px 6px 0 0;
    margin: 0 auto;
}
.kznp-popup--bottom_bar .kznp-content {
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 782px) {
    .kznp-popup--bottom_bar {
        max-width: 100%;
    }
    .kznp-popup--bottom_bar .kznp-content {
        display: flex;
        align-items: center;
        gap: 24px;
        text-align: left;
        padding: 16px 24px;
    }
    .kznp-popup--bottom_bar .kznp-image {
        flex: 0 0 auto;
        max-width: 120px;
        margin-bottom: 0;
    }
    .kznp-popup--bottom_bar .kznp-image img {
        margin-bottom: 0;
    }
    .kznp-popup--bottom_bar .kznp-message {
        flex: 1 1 auto;
        margin-bottom: 0;
        text-align: left;
    }
    .kznp-popup--bottom_bar .kznp-form {
        flex: 0 0 auto;
        width: 320px;
    }
    .kznp-popup--bottom_bar .kznp-success {
        flex: 1 1 auto;
    }
}

/* ==========================================================================
   Positionnement : ouverture via lien fixe en haut de page
   ========================================================================== */
.kznp-trigger-link {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 99999;
    background-color: #222;
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Le mode top_link : la popup reprend le style modal une fois ouverte */
.kznp-popup--top_link {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .kznp-popup {
        width: 94%;
    }
    .kznp-content {
        padding: 22px 16px;
    }
    .kznp-trigger-link {
        padding: 8px 12px;
        font-size: 12px;
        top: 8px;
        right: 8px;
    }
}

/* ==========================================================================
   Bandeau d'accroche (menu / pied de page) - discret par défaut, pensé
   pour s'insérer dans la nav ou le footer du thème plutôt que de leur
   imposer un style : ajuster/surcharger ces classes via le CSS du thème
   si besoin d'une intégration plus poussée.
   ========================================================================== */
.kznp-teaser {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.kznp-teaser:hover {
    text-decoration: underline;
    color: inherit;
}

.kznp-teaser--nav {
    padding: 6px 14px;
}

/* Emplacement "haut de page" (hook displayTop, à côté du logo) : plus
   compact que celui du menu, pensé pour s'insérer dans une zone d'en-tête
   étroite sans casser sa mise en page. */
.kznp-teaser--top {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid currentColor;
    border-radius: 30px;
}

.kznp-teaser--footer {
    display: block;
    width: fit-content;
    max-width: 480px;
    margin: 12px auto;
    padding: 10px 18px;
    text-align: center;
    white-space: normal;
    background-color: #222;
    color: #fff;
    border-radius: 4px;
}
.kznp-teaser--footer:hover {
    color: #fff;
}
