/*
 * MediQual — États actifs définitifs V3
 * Compatibilité complète menu + footer.
 */

/* ==========================================================
   1. SOUS-MENU SPÉCIALITÉS
   ========================================================== */

/*
 * Tous les éléments, y compris Bloc opératoire :
 * même survol bleu ciel.
 */
.site-nav .sub-menu a,
.site-nav .dropdown a {
    transition:
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease !important;
    border-radius: 10px !important;
}

.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible,
.site-nav .dropdown a:hover,
.site-nav .dropdown a:focus-visible {
    color: #0b6ea8 !important;
    background: #eef7fa !important;
    transform: translateX(2px) !important;
}

/* Élément réellement sélectionné */
.site-nav .sub-menu a.mq-menu-active-final,
.site-nav .dropdown a.mq-menu-active-final,
.site-nav .sub-menu .current-menu-item > a,
.site-nav .dropdown .current-menu-item > a {
    color: #0b6ea8 !important;
    background: #eef7fa !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
}

/* Parent Spécialités actif */
.site-nav > .nav-list > li > a.mq-menu-parent-active-final,
.site-nav > .menu > li > a.mq-menu-parent-active-final {
    color: #0b6ea8 !important;
    background: #eef7fa !important;
    border-radius: 12px !important;
}

/* ==========================================================
   2. PIED DE PAGE — TOUS LES LIENS
   ========================================================== */

/*
 * On cible absolument tous les liens du footer :
 * Navigation, Spécialités, Contact, Mentions légales, devis, etc.
 */
.site-footer a,
.site-footer .footer-links a,
.site-footer .footer-bottom a,
.mq-site-footer a,
.mq-site-footer .mq-footer-list a,
.mq-site-footer .mq-footer-contact a,
.mq-site-footer .mq-footer-bottom a {
    display: inline-block !important;
    color: inherit !important;
    text-decoration: none !important;
    transform: translateX(0) scale(1);
    transform-origin: left center;

    transition:
        color 170ms ease,
        transform 170ms ease,
        text-decoration-color 170ms ease !important;
}

/*
 * Survol : tous deviennent blancs,
 * y compris Bloc opératoire et les liens Navigation.
 */
.site-footer a:hover,
.site-footer a:focus-visible,
.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible,
.site-footer .footer-bottom a:hover,
.site-footer .footer-bottom a:focus-visible,
.mq-site-footer a:hover,
.mq-site-footer a:focus-visible,
.mq-site-footer .mq-footer-list a:hover,
.mq-site-footer .mq-footer-list a:focus-visible,
.mq-site-footer .mq-footer-contact a:hover,
.mq-site-footer .mq-footer-contact a:focus-visible,
.mq-site-footer .mq-footer-bottom a:hover,
.mq-site-footer .mq-footer-bottom a:focus-visible {
    color: #ffffff !important;
    text-decoration: underline !important;
    text-decoration-color: #ffffff !important;
    text-decoration-thickness: 1.5px !important;
    text-underline-offset: 4px !important;
    transform: translateX(4px) scale(1.03) !important;
}

/*
 * État actif permanent :
 * orange + souligné + petit zoom quand la souris n'est pas dessus.
 */
.site-footer a.mq-footer-active-final,
.mq-site-footer a.mq-footer-active-final {
    color: #f47a2a !important;
    text-decoration: underline !important;
    text-decoration-color: #f47a2a !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 5px !important;
    font-weight: 700 !important;
    transform: translateX(5px) scale(1.045) !important;
}

/*
 * Même un lien actif devient blanc au survol,
 * puis redevient orange dès que le curseur quitte le lien.
 */
.site-footer a.mq-footer-active-final:hover,
.site-footer a.mq-footer-active-final:focus-visible,
.mq-site-footer a.mq-footer-active-final:hover,
.mq-site-footer a.mq-footer-active-final:focus-visible {
    color: #ffffff !important;
    text-decoration-color: #ffffff !important;
    transform: translateX(6px) scale(1.055) !important;
}

/* ==========================================================
   ACCESSIBILITÉ
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    .site-nav .sub-menu a,
    .site-nav .dropdown a,
    .site-footer a,
    .mq-site-footer a {
        transition: none !important;
    }
}
