/*
 * reCAPTCHA v3 badge - visibility-aware
 *
 * Le badge Google flottant (.grecaptcha-badge) est masqué par défaut pour ne
 * pas polluer le visuel d'une page sans formulaire. Il est révélé uniquement
 * quand un formulaire portant l'attribut [data-recaptcha-form] entre dans le
 * viewport (cf. recaptcha_badge.js).
 *
 * Google autorise explicitement de cacher le badge à condition d'afficher une
 * mention légale alternative dans le formulaire :
 * https://developers.google.com/recaptcha/docs/faq
 *
 * Pour préserver l'accessibilité on utilise visibility + opacity (pas
 * display:none) — le widget reCAPTCHA reste accessible aux lecteurs d'écran
 * et au JS de Google même quand il est invisible.
 */

.grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
    /* On garde le z-index Google natif (~9999), on ne le change pas */
}

body.recaptcha-form-visible .grecaptcha-badge {
    visibility: visible;
    opacity: 1;
}

/* Variante : si le badge gêne sur très petit écran (ex: chevauche un bouton
   fixed bottom-right), le décaler. Décommenter si nécessaire dans le projet.

@media (max-width: 640px) {
    body.recaptcha-form-visible .grecaptcha-badge {
        bottom: 80px !important;
    }
}
*/

/* Mention légale rendue dans le partial _field.html — styles minimaux,
   surchargeables côté projet. */
.recaptcha-legal {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #6b7280;
    margin-top: 0.5rem;
}

.recaptcha-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recaptcha-legal a:hover {
    color: #374151;
}
