/**
 * Formulaire public « Suis-je adhérent ? » ([apaba_verif_adhesion]).
 * S'appuie sur les tokens --apc-* du design system front (apaba-front-tokens.css) avec un
 * repli littéral partout : le shortcode doit rester présentable si la feuille de tokens
 * n'est pas chargée sur la page (elle est conditionnée à la carte producteurs).
 */

.apaba-adh {
    max-width: 620px;
    margin: 0 auto;
    padding: 28px 24px;
    font-family: inherit;
    color: var(--apc-ink, #22271f);
    background: #fff;
    border: 1px solid var(--apc-line, #d7d9d2);
    border-radius: var(--apc-radius-lg, 16px);
    box-shadow: var(--apc-shadow, 0 3px 12px rgba(43, 49, 40, .10));
}

.apaba-adh-titre {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.25;
}

.apaba-adh-intro {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--apc-ink-2, #454c41);
}

/* Honeypot : hors flux ET hors lecture d'écran, jamais display:none (certains bots le détectent). */
.apaba-adh-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.apaba-adh-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.apaba-adh-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.apaba-adh-row input[type="email"] {
    flex: 1 1 240px;
    min-width: 0;                 /* sinon l'input refuse de rétrécir sous 240px en flex */
    padding: 11px 13px;
    font-size: 15px;
    border: 1px solid var(--apc-line, #d7d9d2);
    border-radius: var(--apc-radius, 8px);
    background: #fff;
    color: inherit;
}

.apaba-adh-row input[type="email"]:focus-visible {
    outline: 2px solid var(--apc-brand, #2e7d32);
    outline-offset: 1px;
}

.apaba-adh-submit {
    flex: 0 0 auto;
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--apc-brand, #2e7d32);
    border: 0;
    border-radius: var(--apc-radius, 8px);
    cursor: pointer;
}

.apaba-adh-submit:hover { filter: brightness(1.07); }
.apaba-adh-submit:disabled { opacity: .6; cursor: default; }

/* Réponse : vide tant que rien n'a été demandé (pas de cadre fantôme sur la page). */
.apaba-adh-reponse:empty { display: none; }

.apaba-adh-reponse {
    margin-top: 18px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    border-radius: var(--apc-radius, 8px);
    border-left: 4px solid var(--apc-muted, #6e756a);
    background: #f3f4f1;
}

/* Trois états seulement, et AUCUN ne reflète le statut d'adhésion : il n'arrive jamais
   jusqu'ici (cf. verif-adhesion.js). Une classe de plus par statut rouvrirait la fuite —
   la couleur du bandeau se lit aussi bien qu'un texte. */
.apaba-adh-reponse.is-envoye  { border-left-color: #2e7d32; background: #eef6ee; }
.apaba-adh-reponse.is-erreur  { border-left-color: #c62828; background: #fdeeee; }
.apaba-adh-reponse.is-attente { border-left-color: #d7d9d2; color: var(--apc-muted, #6e756a); }

@media (max-width: 480px) {
    .apaba-adh-submit { flex: 1 1 100%; }
}
