﻿/* Pop-up inscription newsletter — design maquette ESSENTIANA */

#newsletter-popup-root[hidden] {
    display: none !important;
}

#newsletter-popup-root:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 2147482990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.newsletter-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.newsletter-popup-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    font-family: 'Nunito Sans', sans-serif;
    isolation: isolate;
}

.newsletter-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.65rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.newsletter-popup-close span {
    pointer-events: none;
    line-height: 1;
}

.newsletter-popup-close:hover {
    color: #c0392b;
}

.newsletter-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}

.newsletter-popup-visual {
    overflow: hidden;
    background: #f3f3f3;
}

.newsletter-popup-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.newsletter-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem 1.75rem;
    text-align: center;
    color: #1a1a1a;
}

.newsletter-popup-discount {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.newsletter-popup-subtitle {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.newsletter-popup-community {
    margin: 1.25rem 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: #F77F77;
}

.newsletter-popup-lead {
    margin: 0 0 1.25rem;
    max-width: 26rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #333;
}

.newsletter-popup-form {
    width: 100%;
    max-width: 280px;
}

.newsletter-popup-input {
    width: 100%;
    height: 38px;
    padding: 0 0.75rem;
    border: 1px solid #1a1a1a;
    background: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    color: #1a1a1a;
    box-sizing: border-box;
}

.newsletter-popup-input:focus {
    outline: 2px solid #F77F77;
    outline-offset: 1px;
}

.newsletter-popup-input[readonly] {
    background: #f7f7f7;
    color: #555;
}

.newsletter-popup-error {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: #c0392b;
    text-align: left;
}

.newsletter-popup-submit {
    width: 100%;
    margin-top: 0.85rem;
    height: 40px;
    border: none;
    background: #F77F77;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-popup-submit:hover:not(:disabled) {
    background: #e85a5a;
}

.newsletter-popup-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.newsletter-popup-success {
    margin: 0.75rem 0 0;
    max-width: 26rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #1a1a1a;
}

.newsletter-popup-success strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.newsletter-popup-legal {
    margin: 1.25rem 0 0;
    max-width: 26rem;
    font-size: 0.62rem;
    line-height: 1.4;
    color: #888;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 720px) {
    .newsletter-popup-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .newsletter-popup-visual {
        max-height: 220px;
    }

    .newsletter-popup-content {
        padding: 1.75rem 1.25rem 1.25rem;
    }
}
