/*
 * Accessibilité, site public et espace membre : chargée après les feuilles du thème.
 *
 * Contrastes (WCAG AA, 4,5:1 pour le texte) : le thème écrit en blanc sur des fonds trop clairs
 * (boutons et étiquettes entre 1,6:1 et 2,8:1). Mêmes teintes, assombries juste au-delà du seuil :
 *   primary #5ccdde -> #1d808e (4,6:1)    success #afde5c -> #5b801a (4,6:1)
 *   info    #5cafde -> #237aac (4,7:1)    warning #deb25c -> #956d1e (4,7:1)
 *   danger  #de815c -> #c15327 (4,6:1)
 * Les états désactivés gardent les couleurs du thème (non soumis au contraste).
 */

.btn-primary { background-color: #1d808e; border-color: #1d808e; }
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .btn-primary.dropdown-toggle { background-color: #186975; border-color: #186975; }

.btn-success { background-color: #5b801a; border-color: #5b801a; }
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open .btn-success.dropdown-toggle { background-color: #496615; border-color: #496615; }

.btn-info { background-color: #237aac; border-color: #237aac; }
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.open .btn-info.dropdown-toggle { background-color: #1e6893; border-color: #1e6893; }

.btn-warning { background-color: #956d1e; border-color: #956d1e; }
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.open .btn-warning.dropdown-toggle { background-color: #7b5a19; border-color: #7b5a19; }

.btn-danger { background-color: #c15327; border-color: #c15327; }
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open .btn-danger.dropdown-toggle { background-color: #a84822; border-color: #a84822; }

.label-primary { background-color: #1d808e; }
.label-success { background-color: #5b801a; }
.label-info { background-color: #237aac; }
.label-warning { background-color: #956d1e; }
.label-danger { background-color: #c15327; }

/* Alertes et notifications : texte sombre sur les fonds clairs du thème (6,7:1 au moins),
   au lieu du blanc (1,6 à 2,8:1) */
.alert-success,
.alert-info,
.alert-warning,
.alert-danger,
.alert .alert-link { color: #222222; }
.alert .alert-link { text-decoration: underline; opacity: 1; }

/* Textes colorés sur fond clair */
.site-content .text-primary, #page-content .text-primary { color: #1d808e; }
.site-content .text-success, #page-content .text-success { color: #5b801a; }
.site-content .text-info, #page-content .text-info { color: #237aac; }
.site-content .text-warning, #page-content .text-warning { color: #956d1e; }
.site-content .text-danger, #page-content .text-danger { color: #c15327; }

/* Liens et textes secondaires sur fond clair (#5ccdde : 1,9:1 ; #999 : 2,8:1) */
.site-content a:not(.btn),
#page-content a:not(.btn):not(.label):not(.alert-link) { color: #1d808e; }
.site-content a:not(.btn):hover,
#page-content a:not(.btn):not(.label):not(.alert-link):hover { color: #186975; }
.site-content .text-muted,
#page-content .text-muted { color: #666666; }

/* Site public : bouton « Connexion » du menu, liens du pied de page (blanc à 50 % : 3,4:1) */
.site-nav a.featured { background: #1d808e; }
.footer-nav a { opacity: .8; }

/*
 * Focus clavier : le thème le supprime partout (:focus { outline: 0 !important }).
 * :focus-visible ne s'affiche qu'à la navigation au clavier, pas au clic de souris.
 */
:focus-visible {
    outline: 3px solid #1d808e !important;
    outline-offset: 2px;
}

/* Sur les fonds sombres (en-têtes, menu latéral, pied de page), contour blanc */
header :focus-visible,
#sidebar :focus-visible,
.site-footer :focus-visible,
.themed-background-dark :focus-visible,
.themed-background-dark-default :focus-visible {
    outline-color: #ffffff !important;
}
