/* ==========================================
   FENÊTRE NEWSLETTER — layouts/newsletter-popup.blade.php
   Carte bleu marine (comme les chiffres clés de l'accueil), au-dessus du bouton WhatsApp.
   Couleurs fixes : la carte ne s'inverse pas en mode sombre.
   ========================================== */
.nl-popup {
    position: fixed;
    right: 1.5rem;
    bottom: calc(1.5rem + 3.5rem + 1rem); /* au-dessus du bouton WhatsApp (app.css .whatsapp-fab) */
    z-index: 1000;
    width: 22rem;
    max-width: calc(100vw - 2rem);
    padding: 1.4rem 1.4rem 1.2rem;
    border-radius: 14px;
    color: #FFFFFF;
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 203, 132, 0.2), transparent 55%),
        #122F6B;
    box-shadow: 0 18px 40px rgba(18, 47, 107, 0.35);
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nl-popup.is-visible {
    opacity: 1;
    transform: none;
}

.nl-popup__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #B9C6E4;
    font-size: 1rem;
    cursor: pointer;
}

.nl-popup__close:hover,
.nl-popup__close:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.nl-popup__form-view,
.nl-popup__success {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.nl-popup__form-view[hidden],
.nl-popup__success[hidden] {
    display: none;
}

.nl-popup__icon {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    background: rgba(95, 203, 132, 0.18);
    color: #5FCB84;
    font-size: 1.1rem;
}

.nl-popup__title {
    margin: 0;
    padding-right: 1.5rem;
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
}

.nl-popup__text {
    margin: 0;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #B9C6E4;
}

.nl-popup__form {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.nl-popup__form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
}

.nl-popup__form input[type="email"]::placeholder {
    color: #B9C6E4;
}

.nl-popup__form input[type="email"]:focus {
    outline: 2px solid #5FCB84;
    outline-offset: 1px;
}

.nl-popup__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.nl-popup__submit {
    padding: 0.6rem 0.9rem;
    border: 0;
    border-radius: 8px;
    background: #5FCB84;
    color: #0E2A18;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.nl-popup__submit:hover { filter: brightness(1.06); }
.nl-popup__submit:disabled { opacity: 0.6; cursor: wait; }
.nl-popup__submit:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

.nl-popup__error {
    margin: 0;
    font-size: 0.8rem;
    color: #FFC9C2;
}

.nl-popup__legal {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #B9C6E4;
}

.nl-popup__legal a {
    color: #FFFFFF;
    text-underline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile : bandeau pleine largeur en bas de l'écran, au-dessus du bouton WhatsApp */
@media (max-width: 640px) {
    .nl-popup {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        z-index: 1100;
        padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -10px 30px rgba(18, 47, 107, 0.3);
    }

    .nl-popup .nl-popup__icon { display: none; }
    .nl-popup__form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .nl-popup { transition: none; transform: none; }
}
