/* ==========================================================================
   AMENEWS — bloc d'inscription à la newsletter (Brevo)
   Surcharge des styles Brevo (sib-styles.css) aux couleurs AMELEGAL.
   Deux variantes : .amenews--light (fond clair) et .amenews--dark (footer).
   ========================================================================== */

.amenews {
    font-family: inherit;
    margin: 0;
}

/* --- Réinitialisation des conteneurs Brevo ------------------------------- */
.amenews .sib-form {
    padding: 0 !important;
    background: none !important;
    background-image: none !important;
    text-align: left !important;
    direction: ltr;
}

.amenews .sib-form-container {
    max-width: none !important;
    width: 100% !important;
}

.amenews #sib-container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    text-align: left !important;
    display: block !important;
}

.amenews form#sib-form {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}

.amenews .sib-form-block,
.amenews .sib-input,
.amenews .form__entry,
.amenews .entry_block,
.amenews .form__label-row {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    display: block !important;
    width: 100% !important;
}

/* --- Carte ---------------------------------------------------------------- */
.amenews__card {
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
}

.amenews--light .amenews__card {
    background: linear-gradient(135deg, #F8FBEF 0%, #EFF5C8 100%);
    border: 1px solid #DDE8B4;
}

.amenews--dark .amenews__card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(155, 203, 59, 0.35);
}

@media (min-width: 768px) {
    .amenews__card {
        padding: 2.75rem 2.5rem;
    }
}

/* --- Textes --------------------------------------------------------------- */
.amenews__eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.amenews--light .amenews__eyebrow {
    color: #5B8C1D;
}

.amenews--dark .amenews__eyebrow {
    color: #9BCB3B;
}

.amenews__title {
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .amenews__title {
        font-size: 2.25rem;
    }
}

.amenews--light .amenews__title {
    color: #3B6D11;
}

.amenews--dark .amenews__title {
    color: #9BCB3B;
}

.amenews__tagline {
    font-size: 1.02rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
}

.amenews--light .amenews__tagline {
    color: #1F2A12;
}

.amenews--dark .amenews__tagline {
    color: #FFFFFF;
}

.amenews__text {
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0 0 1.4rem;
    max-width: 46rem;
}

.amenews--light .amenews__text {
    color: #4A5340;
}

.amenews--dark .amenews__text {
    color: #D1D5DB;
}

/* --- Champ + bouton ------------------------------------------------------- */
.amenews__row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .amenews__row {
        flex-direction: row;
        align-items: stretch;
    }

    .amenews__field {
        flex: 1 1 auto;
    }
}

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

.amenews input#EMAIL.input {
    width: 100% !important;
    box-sizing: border-box;
    height: auto !important;
    padding: 0.85rem 1.15rem !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
    color: #1F2A12 !important;
    background-color: #FFFFFF !important;
    border: 1px solid #C7D3B4 !important;
    border-radius: 9999px !important;
    text-align: left !important;
    transition: border-color .2s, box-shadow .2s;
}

.amenews--dark input#EMAIL.input {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.amenews input#EMAIL.input:focus {
    outline: none !important;
    border-color: #7AA51B !important;
    box-shadow: 0 0 0 3px rgba(122, 165, 27, 0.25) !important;
}

.amenews input#EMAIL.input::placeholder {
    font-family: inherit !important;
    color: #9AA88C !important;
    text-align: left !important;
}

.amenews .sib-form-block__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 2rem !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    background-color: #7AA51B !important;
    border: 0 !important;
    border-radius: 9999px !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, transform .2s;
}

@media (min-width: 640px) {
    .amenews .sib-form-block__button {
        width: auto;
    }
}

.amenews .sib-form-block__button:hover {
    background-color: #5B8C1D !important;
}

.amenews .sib-form-block__button:active {
    transform: translateY(1px);
}

.amenews .sib-form-block__button .icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.amenews .sib-hide-loader-icon {
    display: none !important;
}

/* --- Mentions et messages ------------------------------------------------- */
.amenews .entry__specification {
    display: none !important;
}

.amenews__legal {
    font-size: 0.78rem;
    line-height: 1.55;
    margin: 1rem 0 0;
}

.amenews--light .amenews__legal {
    color: #6B7563;
}

.amenews--dark .amenews__legal {
    color: #9CA3AF;
}

.amenews__legal a {
    text-decoration: underline;
}

.amenews--light .amenews__legal a {
    color: #5B8C1D;
}

.amenews--dark .amenews__legal a {
    color: #9BCB3B;
}

.amenews .entry__error {
    display: block;
    max-width: none !important;
    margin-top: 0.55rem !important;
    padding: 0.6rem 0.9rem !important;
    font-family: inherit !important;
    font-size: 0.85rem !important;
    color: #661D1D !important;
    background-color: #FFEDED !important;
    border: 1px solid #FF4949 !important;
    border-radius: 0.6rem !important;
}

.amenews .entry__error:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: none !important;
}

.amenews .sib-form-message-panel {
    max-width: none !important;
    margin: 0 0 1rem !important;
    padding: 0.9rem 1.1rem !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    line-height: 1.55;
    border-radius: 0.75rem !important;
    border-width: 1px !important;
    border-style: solid !important;
    text-align: left !important;
}

.amenews #error-message {
    color: #661D1D !important;
    background-color: #FFEDED !important;
    border-color: #FF4949 !important;
}

.amenews #success-message {
    color: #085229 !important;
    background-color: #E7FAF0 !important;
    border-color: #13CE66 !important;
}

.amenews .sib-form-message-panel__text {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    text-align: left !important;
    justify-content: flex-start !important;
}

.amenews .sib-notification__icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    fill: currentColor;
}

.amenews .input--hidden {
    display: none !important;
}

/* --- Pop-up d'accueil ----------------------------------------------------- */
.amenews-pop {
    position: fixed;
    z-index: 60;
    right: 1.5rem;
    bottom: 1.5rem;
    left: 1.5rem;
    max-width: 24rem;
    opacity: 0;
    transform: translateY(1.5rem) scale(0.98);
    transition: opacity .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1);
}

@media (min-width: 640px) {
    .amenews-pop { left: auto; width: 24rem; }
}

.amenews-pop.is-open { opacity: 1; transform: translateY(0) scale(1); }
.amenews-pop[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .amenews-pop { transition: opacity .2s linear; transform: none; }
    .amenews-pop.is-open { transform: none; }
}

.amenews-pop__card {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 1.5rem 1.4rem;
    background: #12180E;
    border: 1px solid rgba(155, 203, 59, 0.28);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px -12px rgba(9, 13, 6, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* halo vert discret en haut à droite */
.amenews-pop__card::before {
    content: "";
    position: absolute;
    top: -5.5rem;
    right: -4.5rem;
    width: 13rem;
    height: 13rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 165, 27, 0.30) 0%, rgba(122, 165, 27, 0) 70%);
    pointer-events: none;
}

.amenews-pop__card > * { position: relative; }

.amenews-pop__close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    font-size: 1.35rem;
    line-height: 1;
    color: #8D9A7C;
    background: rgba(255, 255, 255, 0.06);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}

.amenews-pop__close:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.14); }


.amenews--pop .amenews__eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    margin-bottom: 0.4rem;
    color: #9BCB3B;
}

.amenews--pop .amenews__title {
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    margin: 0 0 0.5rem;
    color: #FFFFFF;
}

.amenews--pop .amenews__text {
    font-size: 0.875rem;
    line-height: 1.55;
    margin: 0 0 1.15rem;
    color: #C3CBB8;
}

.amenews--pop .amenews__row { flex-direction: column; gap: 0.5rem; }

.amenews--pop input#EMAIL.input {
    padding: 0.72rem 1.05rem !important;
    font-size: 0.94rem !important;
    color: #1F2A12 !important;
    background-color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    -webkit-text-fill-color: #1F2A12 !important;
    caret-color: #3B6D11 !important;
}

.amenews--pop input#EMAIL.input::placeholder { color: #9AA88C !important; }

.amenews--pop input#EMAIL.input:focus {
    background-color: #FFFFFF !important;
    border-color: #9BCB3B !important;
    box-shadow: 0 0 0 3px rgba(155, 203, 59, 0.28) !important;
}

/* l'autoremplissage Chrome impose son propre fond : on le neutralise */
.amenews input#EMAIL.input:-webkit-autofill,
.amenews input#EMAIL.input:-webkit-autofill:hover,
.amenews input#EMAIL.input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1F2A12 !important;
    -webkit-box-shadow: 0 0 0 40rem #FFFFFF inset !important;
    caret-color: #3B6D11 !important;
}

.amenews--pop .sib-form-block__button {
    width: 100% !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.95rem !important;
    color: #12180E !important;
    background-color: #9BCB3B !important;
}

.amenews--pop .sib-form-block__button:hover { background-color: #B0DB55 !important; }

.amenews--pop .amenews__legal {
    margin-top: 0.85rem;
    font-size: 0.7rem;
    line-height: 1.5;
    color: #7F8B70;
}

.amenews--pop .amenews__legal a { color: #9BCB3B; }

.amenews--pop .sib-form-message-panel {
    font-size: 0.83rem !important;
    padding: 0.75rem 0.9rem !important;
    border-radius: 0.7rem !important;
}

/* --- Variante désinscription --------------------------------------------- */
.amenews--unsub .amenews__card {
    background: #FFFFFF;
    border: 1px solid #E3E8D2;
    box-shadow: 0 1px 2px rgba(18, 24, 14, 0.04);
}

.amenews--unsub .amenews__eyebrow {
    color: #8A9179;
}

.amenews--unsub .amenews__title {
    color: #12180E;
}

.amenews--unsub .sib-form-block__button {
    color: #12180E !important;
    background-color: #FFFFFF !important;
    border: 1px solid #C7D3B4 !important;
}

.amenews--unsub .sib-form-block__button:hover {
    background-color: #F1F4E6 !important;
    border-color: #7AA51B !important;
}

.amenews--unsub input#EMAIL.input {
    border-color: #DDE2D2 !important;
}

/* --- Pages newsletter ----------------------------------------------------- */
.nl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

@media (min-width: 640px) {
    .nl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.75rem; }
}

.nl-theme { display: flex; gap: 0.7rem; align-items: flex-start; }

.nl-theme__dot {
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.5rem;
    background: #7AA51B;
    border-radius: 50%;
}

.nl-theme p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: #6B7563; }
.nl-theme p strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
    line-height: 1.35;
    color: #12180E;
}

/* le <br> assure la coupure meme sans feuille de style */
.nl-theme p br { display: none; }

.nl-theme p span {
    display: block;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #6B7563;
}

.nl-etapes { list-style: none; margin: 0; padding: 0; }

.nl-etape {
    position: relative;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 0 0 1.4rem;
}

.nl-etape:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 2rem;
    left: 0.94rem;
    width: 2px;
    height: calc(100% - 2rem);
    background: #E3E8D2;
}

.nl-etape:last-child { padding-bottom: 0; }

.nl-etape__num {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6B7563;
    background: #F1F4E6;
    border: 2px solid #E3E8D2;
    border-radius: 50%;
}

.nl-etape.is-actif .nl-etape__num {
    color: #FFFFFF;
    background: #7AA51B;
    border-color: #7AA51B;
}

.nl-etape strong { display: block; font-size: 1rem; color: #12180E; }
.nl-etape.is-actif strong { color: #3B6D11; }
.nl-etape p { margin: 0.2rem 0 0; font-size: 0.9rem; line-height: 1.55; color: #6B7563; }

.nl-alerte,
.nl-succes {
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
    padding: 1.25rem 1.4rem;
    border-radius: 1rem;
}

.nl-alerte { background: #FDF6E3; border: 1px solid #F0DFAE; }
.nl-succes { background: #E7FAF0; border: 1px solid #A9E5C4; }

.nl-alerte__pic,
.nl-succes__pic {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    border-radius: 50%;
}

.nl-alerte__pic { background: #D19B1E; }
.nl-succes__pic { background: #13CE66; }

.nl-alerte strong,
.nl-succes strong { display: block; margin-bottom: 0.3rem; font-size: 1.02rem; }
.nl-alerte strong { color: #6B4E0A; }
.nl-succes strong { color: #085229; }

.nl-alerte p,
.nl-succes p { margin: 0; font-size: 0.92rem; line-height: 1.6; }
.nl-alerte p { color: #7A5E17; }
.nl-succes p { color: #14653C; }
