/* ========================================================================
   POPUP NEWSLETTER (lead magnet −7%) — composant autonome anonyme
   Chargé par base.html.twig ET baseV2.html.twig (visiteurs non logués).
   Vanilla, sans dépendance (ni jQuery ni migration-v2.css). Date : 10/06/2026
   ======================================================================== */

.ap-nl-popup { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.ap-nl-popup[hidden] { display: none; }

.ap-nl-overlay { position: absolute; inset: 0; background: rgba(13, 26, 24, .55); }

.ap-nl-dialog {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 460px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
    overflow: hidden;
    text-align: center;
    font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    animation: ap-nl-in .28s ease-out;
}

.ap-nl-close {
    position: absolute; top: 8px; right: 10px;
    width: 30px; height: 30px; line-height: 28px;
    font-size: 22px; font-weight: 700; color: #fff;
    background: rgba(0, 0, 0, .18); border: 0; border-radius: 50%;
    cursor: pointer; padding: 0; transition: background .15s;
}
.ap-nl-close:hover { background: rgba(0, 0, 0, .35); }

.ap-nl-title {
    margin: 0; padding: 22px 26px;
    background: #00a799; color: #fff;
    font-size: 21px; line-height: 1.3; font-weight: 700;
}
.ap-nl-title-success { background: #0d8a7e; }

.ap-nl-body { padding: 22px 26px 26px; }

.ap-nl-lead { margin: 0 0 18px; font-size: 15.5px; line-height: 1.55; color: #2a3b39; }
.ap-nl-lead strong, .ap-nl-lead b { color: #0d4a45; }

.ap-nl-input {
    width: 100%; box-sizing: border-box;
    padding: 13px 14px; margin: 0 0 12px;
    font-size: 15px; color: #1a1a2e;
    border: 1px solid #cfd9d6; border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}
.ap-nl-input:focus { outline: 0; border-color: #00a799; box-shadow: 0 0 0 3px rgba(0, 167, 153, .15); }

.ap-nl-submit {
    display: block; width: 100%; box-sizing: border-box;
    padding: 14px 20px; border: 0; border-radius: 8px;
    background: #00a799; color: #fff;
    font-size: 16px; font-weight: 700; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background .15s, opacity .15s;
}
.ap-nl-submit:hover { background: #0d8a7e; }
.ap-nl-submit:disabled { opacity: .6; cursor: default; }
.ap-nl-success-cta { margin-top: 4px; }

.ap-nl-error { margin: 0 0 12px; font-size: 14px; color: #d9534f; font-weight: 600; }
.ap-nl-consent { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: #8a948f; }

/* Honeypot + label accessibles : retirés du flux visuel sans display:none (anti-bot). */
.ap-nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ap-nl-sronly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Conteneur Turnstile (partagé popup + prefooter) — centré, visible seulement si challenge. */
.ap-nl-turnstile { margin: 4px 0 12px; display: flex; justify-content: center; }
.ap-nl-turnstile[hidden] { display: none; }

@keyframes ap-nl-in { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================================================
   PREFOOTER NEWSLETTER — bandeau permanent en pied de page (anonymes)
   ======================================================================== */
.ap-nlf {
    position: relative;
    padding: 48px 20px;
    color: #fff;
    background-color: #273444; /* fallback + teinte de base sous la photo */
    background-image: url('https://www.avygeo.com/Avygeo/uploads/1/albums/img5_68f635cdcbc0d.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
/* Voile sombre pour garantir le contraste du texte sur la photo (WCAG). */
.ap-nlf::before { content: ''; position: absolute; inset: 0; background: rgba(39, 52, 68, .7); }
.ap-nlf-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; text-align: center; }
.ap-nlf-title { margin: 0 0 8px; font-size: 23px; line-height: 1.3; font-weight: 800; color: #fff; }
.ap-nlf-desc { margin: 0 auto 20px; max-width: 660px; font-size: 15.5px; line-height: 1.55; color: #fff; opacity: .95; }

.ap-nlf-row { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.ap-nlf-input { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 13px 15px; font-size: 15px; color: #1a1a2e; background: #fff; border: 0; border-radius: 8px; }
.ap-nlf-input:focus { outline: 0; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.ap-nlf-submit { flex: 0 0 auto; padding: 13px 22px; border: 0; border-radius: 8px; background: #fff; color: #0a5b53; font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, opacity .15s; }
.ap-nlf-submit:hover { background: #eafaf7; }
.ap-nlf-submit:disabled { opacity: .65; cursor: default; }

.ap-nlf-msg { margin: 12px 0 0; font-size: 14px; }
.ap-nlf-error { color: #ffe2de; font-weight: 600; }
.ap-nlf-consent { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #fff; opacity: .8; }
.ap-nlf-success-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.ap-nlf-success-cta { display: inline-block; margin-top: 12px; }

@media (max-width: 600px) {
    .ap-nl-dialog { width: 94%; }
    .ap-nl-title { font-size: 19px; padding: 20px; }
    .ap-nl-body { padding: 20px; }
    .ap-nlf { padding: 30px 18px; }
    .ap-nlf-title { font-size: 20px; }
    .ap-nlf-row { flex-direction: column; }
    .ap-nlf-submit { width: 100%; }
}
