/* ============================================================
   HORIZON GEO - Encart newsletter dans le contenu (prefixe hgeo-nl)
   Fichier : /wp-content/themes/Divi-child/css/hgeo-newsletter.css
   Charge par dm_nl_assets() sur les articles et les fiches LLM
   Les !important neutralisent le style inline du formulaire MailPoet
   ============================================================ */

.hgeo-nl {
    position: relative;
    box-sizing: border-box;
    max-width: 760px;
    margin: 40px auto !important;
    padding: 30px 32px 24px;
    overflow: hidden;
    background: #1a1a2e;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(13, 13, 26, 0.18);
    color: #ffffff;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
    text-align: left;
}

/* Barre degradee 4px (charte Digital-m) */
.hgeo-nl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6a1c, #fce721);
}

/* Fiches LLM : l'encart est dans un module pleine largeur */
.hgeo-nl--fiche {
    width: calc(100% - 32px);
    margin: 48px auto !important;
}

.hgeo-nl p {
    margin: 0 !important;
    padding: 0 !important;
}

.hgeo-nl .hgeo-nl__label {
    margin-bottom: 10px !important;
    color: #ff6a1c !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hgeo-nl .hgeo-nl__titre {
    margin-bottom: 8px !important;
    color: #ffffff !important;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
}

.hgeo-nl .hgeo-nl__texte {
    margin-bottom: 18px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 16px;
    line-height: 1.6;
}

.hgeo-nl .hgeo-nl__hint {
    margin-top: 12px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px;
    line-height: 1.4;
}

/* ---- Formulaire MailPoet ---- */
.hgeo-nl .mailpoet_form,
.hgeo-nl form.mailpoet_form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
}

.hgeo-nl form.mailpoet_form {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 10px !important;
}

/* Le titre interne du formulaire ferait doublon avec celui de l'encart */
.hgeo-nl .mailpoet_form h1,
.hgeo-nl .mailpoet_form h2,
.hgeo-nl .mailpoet_form h3,
.hgeo-nl .mailpoet_form .mailpoet-heading {
    display: none !important;
}

.hgeo-nl .mailpoet_paragraph {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Bloc du bouton : largeur du contenu (deux regles separees :
   un navigateur sans :has() ignore seulement la seconde) */
.hgeo-nl .mailpoet_paragraph.last {
    flex: 0 0 auto !important;
}

.hgeo-nl .mailpoet_paragraph:has(.mailpoet_submit) {
    flex: 0 0 auto !important;
}

.hgeo-nl .mailpoet_form label,
.hgeo-nl .mailpoet_text_label {
    display: block;
    margin-bottom: 6px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.hgeo-nl .mailpoet_text,
.hgeo-nl input[type="email"],
.hgeo-nl input[type="text"] {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #1a1a2e !important;
    font-size: 16px !important; /* 16px : pas de zoom auto sur iOS */
}

.hgeo-nl .mailpoet_text:focus,
.hgeo-nl input[type="email"]:focus,
.hgeo-nl input[type="text"]:focus {
    outline: 2px solid #fce721 !important;
    outline-offset: 2px;
}

.hgeo-nl .mailpoet_submit,
.hgeo-nl input[type="submit"] {
    width: auto !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 28px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #ff6a1c, #fce721) !important;
    color: #1a1a2e !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hgeo-nl .mailpoet_submit:hover,
.hgeo-nl input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 106, 28, 0.35);
}

.hgeo-nl .mailpoet_message {
    flex: 1 1 100% !important;
}

.hgeo-nl .mailpoet_validate_success {
    margin-top: 8px !important;
    color: #4ade80 !important;
    font-weight: 600;
}

.hgeo-nl .mailpoet_validate_error,
.hgeo-nl .parsley-errors-list {
    color: #fca5a5 !important;
}

.hgeo-nl .parsley-errors-list {
    margin: 6px 0 0 !important;
    padding: 0 !important;
    font-size: 13px;
    list-style: none !important;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
    .hgeo-nl {
        margin: 28px auto !important;
        padding: 24px 18px 20px;
        border-radius: 14px;
    }

    .hgeo-nl .hgeo-nl__titre {
        font-size: 20px;
    }

    .hgeo-nl form.mailpoet_form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .hgeo-nl .mailpoet_paragraph,
    .hgeo-nl .mailpoet_paragraph.last {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    .hgeo-nl .mailpoet_paragraph:has(.mailpoet_submit) {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    .hgeo-nl .mailpoet_submit,
    .hgeo-nl input[type="submit"] {
        width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hgeo-nl .mailpoet_submit,
    .hgeo-nl input[type="submit"] {
        transition: none;
    }

    .hgeo-nl .mailpoet_submit:hover,
    .hgeo-nl input[type="submit"]:hover {
        transform: none;
    }
}
