/*
 * Socle commun MUHC Guides sur Bootstrap 5.
 * Garde l'aspect de l'ancien site (Bootstrap 3) : typographie, liens, boutons « default »,
 * et sous-menus imbriqués (voir js/dropdown-submenu.js).
 */

:root {
    --bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --bs-body-font-size: 14px;
    --bs-body-line-height: 1.428571429;
    --bs-body-color: #333;
    --bs-body-color-rgb: 51, 51, 51;
    --bs-link-color: #337ab7;
    --bs-link-color-rgb: 51, 122, 183;
    --bs-link-hover-color: #23527c;
    --bs-link-hover-color-rgb: 35, 82, 124;
}

a {
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    line-height: 1.1;
}

h1, h2, h3, .h1, .h2, .h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

h4, h5, h6, .h4, .h5, .h6 {
    margin-top: 10px;
    margin-bottom: 10px;
}

h1, .h1 { font-size: 36px; }
h2, .h2 { font-size: 30px; }
h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; }
h5, .h5 { font-size: 14px; }
h6, .h6 { font-size: 12px; }

p {
    margin: 0 0 10px;
}

/* Boutons */
.btn {
    --bs-btn-font-size: 14px;
    --bs-btn-padding-y: 6px;
    --bs-btn-padding-x: 12px;
}

.btn-sm {
    --bs-btn-font-size: 12px;
    --bs-btn-padding-y: 5px;
    --bs-btn-padding-x: 10px;
}

/* bouton blanc à bordure grise (ancien « btn-default ») */
.btn-default {
    --bs-btn-color: #333;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #ccc;
    --bs-btn-hover-color: #333;
    --bs-btn-hover-bg: #e6e6e6;
    --bs-btn-hover-border-color: #adadad;
    --bs-btn-focus-shadow-rgb: 204, 204, 204;
    --bs-btn-active-color: #333;
    --bs-btn-active-bg: #d4d4d4;
    --bs-btn-active-border-color: #8c8c8c;
    --bs-btn-disabled-color: #333;
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: #ccc;
}

.form-control,
.form-select {
    font-size: 14px;
}

/* Listes déroulantes */
.dropdown-menu {
    --bs-dropdown-font-size: 14px;
    --bs-dropdown-item-padding-x: 20px;
    --bs-dropdown-item-padding-y: 3px;
    --bs-dropdown-padding-y: 5px;
    --bs-dropdown-link-active-color: #333;
    --bs-dropdown-link-active-bg: #e8e8e8;
}

.nav-link:hover,
.nav-link:focus,
.dropdown-item:hover,
.dropdown-item:focus,
.btn:hover,
.btn:focus {
    text-decoration: none;
}

/* Sous-menus imbriqués */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-toggle::after {
    float: right;
    margin-top: .45em;
    margin-left: .5em;
    border-top: .3em solid transparent;
    border-right: 0;
    border-bottom: .3em solid transparent;
    border-left: .3em solid;
}

.dropdown-submenu > .dropdown-menu.show {
    display: block;
}

@media (min-width: 768px) {
    .dropdown-submenu > .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-top: -6px;
        margin-left: -1px;
        border-radius: 0 6px 6px 6px;
    }

    /* survol à la souris : comme l'ancien site */
    @media (hover: hover) {
        .dropdown-submenu:hover > .dropdown-menu {
            display: block;
        }
    }
}

@media (max-width: 767.98px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        margin: 0 0 0 15px;
        border: 0;
        box-shadow: none;
    }

    .dropdown-submenu > .dropdown-toggle::after {
        transform: rotate(90deg);
    }
}
