/**
    TABLE DES MATIÈRES

    1. Variables et styles globaux
    2. Typographie
    3. Liens et boutons
    4. Entête
    5. Bouton hamburger
    5. Sidebar Navigation
    6. Alertes
    7. Layout
    8. Animation
    9. Media queries
    10. Print styles
*/

:root {
    --theme-text: #171717;
    --theme-hyperlink: #0065b3;
    --theme-body-background: #fff;
    --theme-body-background-medium: #f2f2f2;
    --theme-text-glow-high-contrast: #171717;
    --header-height: 3.6rem;
    --sidebar-width: 20rem;
    --z-index-navbar: 10;
    --z-index-sidebar: 6;
    --c-divider-light: rgba(60, 60, 67, .12);
    --c-divider: var(--c-divider-light);
    --c-white: #fff;
    --c-bg: var(--c-white);
    --nav-toggle-bar-height: 2px;
    --nav-toggle-bar-width: 2rem;
    --nav-toggle-bar-color: var(--theme-text);
}

body, html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: 'Roboto',Segoe UI,SegoeUI,Helvetica Neue,Helvetica,Arial,sans-serif;
    font-weight: 400;
    color: var(--theme-text);
    line-height: 25.6px;
}

a:focus:not(:focus-visible), button:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
a:focus, button:focus {
    box-shadow: 0 0 0 2px #fff,0 0 0 5px #007aff !important;
}


/**
    2. Typographie
*/

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 {
    margin: 1.5rem 0;
    font-weight: 500;
}

h2, .h2 {
    font-size: 1.8em;
}

h3, .h3 {
    font-size: 1.5em;
}

h4, .h4 {
    font-size: 1.2em;
}

h5, .h5 {
    font-size: 1em;
}

:is(table,p,ul) {
    letter-spacing: 0.16px;
    line-height: 24px;
}

/**
    3. Liens et boutons
*/

a {
    word-wrap: break-word;
    color: var(--theme-hyperlink);
    cursor: pointer;
    text-decoration: none;
}

.page__container a {
       text-decoration: underline;
    
}


:is(header, main) a {
    border-bottom: 1px solid transparent;
    transition: border 300ms ease-in-out;
}

:is(header, main) a:hover {
    border-color: currentColor;
}

.sidebar.open {
    transform: translate(0);
}

.sidebar-button {
    width: 1.25rem;
}

.lien-editer {
    position: relative;
    top: -2px;
}


img {
    max-width: 100%;
    height: auto;
}

/**
    4. Entête
*/

.header__page-name {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1rem;
}

.lien-editer {
    display: block;
}
.lien-editer svg {
    fill: #171717;
    transition: transform 350ms ease-in-out;
}

.lien-editer:hover svg {
    transition: transform 350ms ease-in-out;
    transform: scale(1.5);
    transform-origin: center;
}

.lien-rechercher {
    display: block;
    width: 1.5rem;
    height: auto;
    transition: transform 350ms ease-in-out;
}

.lien-rechercher:hover {
    transform: scale(1.5);
    transform-origin: center;
    border: none;
}

.lien-rechercher svg {
    width: 100%;
    height: auto;
}

.search-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

/**
    5. Hamburger button
*/

	.nav-toggle {
		cursor: pointer;
		height: calc(16 * var(--nav-toggle-bar-height));
		width: var(--nav-toggle-bar-width);
        position: relative;
	}
	.nav-toggle-bar,
	.nav-toggle-bar::after,
	.nav-toggle-bar::before {
		position: absolute;
		top: 50%;
        left:0;
		transform: translateY(-50%);
		content: '';
		height: var(--nav-toggle-bar-height);
		width: 100%;
        background-color: var(--nav-toggle-bar-color);
        transition: transform .5s ease-in-out, background .5s ease-in-out, margin .5s ease-in-out;
	}
	.nav-toggle-bar::after { margin-top: calc(4 * var(--nav-toggle-bar-height)); }
	.nav-toggle-bar::before { margin-top: calc(-4 * var(--nav-toggle-bar-height)); }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(-45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after,
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
		margin-top: calc(-1 * var(--nav-toggle-bar-height));
	}

/**
    6. Sidebar Navigation
*/

.sidebar a:hover {
    color: var(--theme-text);
    text-decoration: underline;
}

.sidebar a[aria-expanded]:hover {
    text-decoration: none;
}

.tree ul, ul.tree {
    list-style-type: none;
    margin-bottom: 0;
    margin: 0;
    padding: 0;
}

ul.tree {
    font-size: .875rem;
    line-height: 1.5;
    position: relative;
}

.table-of-contents {
    min-height: 4.5em;
    margin-left: -.5rem;
}

.tree-item {
    display: block;
    padding-bottom: 2px;
    padding-left: 1rem;
    padding-top: 2px;
    color: var(--theme-text);
    position: relative;
}

a.tree-item {
    display: inline-block;
    padding-right: 1rem;
}

.tree-item[aria-expanded]::before {
    content: "";
    display: block;
    position: absolute;
    top: 8px;
    left: 0;
    height: 10px;
    width: 6px;
    background-image: url(../img/icons/caret-right.svg);
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 300ms ease-in;
    transform-origin: center;
}

.tree-item[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.tree-item-search::before {
    content: "";
    display: block;
    position: absolute;
    top: 10px;
    left: 16px;
    height: 11px;
    width: 11px;
    background-image: url(../img/icons/search-svgrepo-com.svg);
    background-repeat: no-repeat;
    background-position: center;
}

.tree-item-search {
    padding-left: 2rem;
    padding-bottom: .5rem;
}

.tree-item.active {
    background-color: var(--theme-body-background-medium);
    color: var(--theme-text-glow-high-contrast) !important;
    font-weight: 600;
    text-decoration: none;
    cursor:default;
    pointer-events:none;
}




li:not(.tree-item) > a.tree-item {
    line-height: 20px;
    margin: 8px 0 4px 0;
    padding-left: 0.75rem;
    display: flex;
    gap: 0.375rem;
}


/**
    7. Alertes
*/

.alert {
    margin-bottom: 2rem;
}

.alert .bi {
    font-size: 2rem;
    margin: 1rem 0 0 0;
}

.alert p {
    margin: 0;
}

.alert a {
   color: currentColor;
   font-weight: 500;
   border-bottom: 1px solid currentColor;
}

.alert br {
    display: block;
    content: " ";
    padding: 6px 0;
}

/**
    8. Layout
*/

.content {
    opacity: 0;
    animation: fadeIn ease-in 1;
    animation-fill-mode: forwards;
    animation-duration: 800ms;
    padding-top: var(--header-height);
}

.page__container {
    margin: 0 auto;
    padding: 2rem;
    max-width: 60rem;
}

.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: var(--z-index-navbar);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--c-divider);
    padding: 0 2rem;
    height: var(--header-height);
    background-color: var(--c-bg);
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    padding-left: 1rem;
    z-index: var(--z-index-sidebar);
    border-right: 1px solid var(--c-divider);
    width: var(--sidebar-width);
    padding-top: 2rem;
    background-color: var(--c-bg);
    overflow-y: auto;
    transform: translate(-100%);
    transition: transform .25s ease;
}

/**
    9. Animation
*/
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/**
    10. Media queries
*/
@media (min-width: 720px) {

    .header__page-name {
        display: block;
    }

    .content {
        margin-left: var(--sidebar-width);
    }

    .sidebar {
        transform: translate(0);
    }

    .sidebar-button {
        display:none;
    }
} 

/**
    11. Print styles
*/

@media print {
    .content {
        padding-top: 1rem;
    }
}


/**
    12. Member Login
*/

.main__login {

    max-width: 500px;

}

/**
    13. buttons
*/

.btn-primary {
    color: #fff;
    border-color: #df6200;
    border-style: solid;
    border-width: 2px;
    background-color: #df6200;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border-color: #c35600;
    background-color: #c35600;
}

.code-block > pre {
    background: transparent;
    color: #f2f2f2;
    padding: 0;
    margin: -24px 0;
    line-height: 1.5;
}
