/* @override 
	https://vibvib.fr/fiches/themes/recettes/css/style.css?* */
	
/* RESET/GLOBAL */
/*
  1. Use a more-intuitive box-sizing model.
*/

/* @group joshwcomeau css reset + custom */

*, *::before, *::after {
	box-sizing: border-box;
}

/*
  Typographic tweaks!
  3. Add accessible line-height
  4. Improve text rendering
*/

html {
	font-size: 62.5%; /* Now 10px = 1rem! */
	-webkit-text-size-adjust: 100%;
}


body {
	font-family: sans-serif;
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1.5;
	margin: 0;
}

@media screen and (min-width: 90rem) {
	body {
		font-size: 1.8rem;
	}
}

/*
  5. Improve media defaults
*/

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	/* Custom by me */
	height: auto;
}
/*
  6. Remove built-in form typography styles
*/

input, button, textarea, select {
	font: inherit;
}
/*
  7. Avoid text overflows
*/

p, h1, h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
}

ul {
	list-style-type: none;
}

a {
	color: currentColor;
	text-decoration: underline;
}

a:hover {
	text-decoration: none;
}

/* @end */


/* All root stuffs */

:root {
	--sidebar-width: 30vw;
	--padding: 2.5rem;
	--background: white;
	--foreground: black;
}

@media screen and (min-width: 120rem) {
	:root {
		--sidebar-width: 20vw;
	}
}

.main {
	padding: calc(var(--padding) / 2);
}

#main_nav {
	/* Value for the javascript to open/close <detail>
	 * Seems to make the CSS validator buggy */
	--details-force-closed: (max-width: 60rem);
}

@media (max-width:60rem) {
	.main_summary {
		display: inline-block;
		user-select: none;
		-moz-user-select: none;
		-webkit-text-select: none;
		-webkit-user-select: none;
		cursor: pointer;
		position: absolute;
		right: 0;
		top: 0;
		padding: calc(var(--padding) / 2);
		background-color: var(--background);
		/* Background color requiered
		 * for display when first section is active
		 */
	}
	
	summary::-webkit-details-marker {
		/*	hide triangle on safari*/
		display: none
	}
	
	#main_nav {
/*		position: relative;*/
		top: 0;
		left: 0;
		width: 100%;
		z-index: 50;
		background-color: var(--background);
	}
}


@media (min-width:60rem) {
	.main_summary {
		display: none;
	}
}


@media (min-width: 60rem) {
	.sidebar {
		position: fixed;
		height: 100vh;
		width: var(--sidebar-width);
		top: 0;
		left: 0;
		overflow: scroll;
		border-right: 1px solid #333;
	}
	
	.main {
		position: absolute;
		width: calc(100vw - var(--sidebar-width) - var(--padding));
		right: 0;
		height: 100vh;
		top: 0;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
}

.sidebar header {
	position: sticky;
	top: 0;
	background-color: white;
	border-bottom: 1px solid #333;
}

.main article,
.sub-pages {
	max-width: 80rem;
}

.sidebar-navigation, .subfolder {
	padding: 0;
	margin: 0;
}

.sidebar-navigation li.file a {
	padding: calc(var(--padding) / 2);
	border-bottom: 1px solid currentColor;
	display: block;
}

.sidebar-navigation .file a::before {
	content: '🗒️';
	padding-right: 1ch;
	font-size: 75%;
}

.sidebar-navigation .subfolder li.file a {
	padding: calc(var(--padding) / 2);
	border-bottom: 1px solid currentColor;
	display: block;
}

.sidebar-navigation li.folder > a {
	padding: calc(var(--padding) / 2);
	display: block;
	font-weight: 600;
	border-bottom: 1px solid currentColor;
	text-transform: uppercase;
	font-size: 75%;
}

.sidebar-navigation li.folder > a::before {
	content: '📁';
	padding-right: 1ch;
}

@media (min-width: 60rem) {
	.sidebar-navigation li.folder > a {
		padding: calc(var(--padding) / 2);
		padding-left: var(--padding);
	}
	
	.sidebar-navigation li.file a {
		padding: var(--padding);
	}
	
	.sidebar-navigation .subfolder li.file a {
		padding: var(--padding);
		padding-left: calc(var(--padding) / 2);
	}
	
	.sidebar-navigation .subfolder li.file {
		padding-left: calc(var(--padding) / 2);
	}
}


.sidebar-navigation .file.active a, .sidebar-navigation .file a:hover {
	background-color: black;
	color: white;
}

.sidebar a {
	text-decoration: none;
	cursor: pointer;
}


.sidebar .logo p {
	margin: 0;
	padding: calc(var(--padding) / 2);
	font-weight: bolder;
}

@media (min-width: 60rem) {
	.sidebar .logo p {
		padding: var(--padding);
	}
}

code:not(.hljs) {
	background-color: #e8e8e8;
	background-image: linear-gradient(45deg, #FFDEE9 0%, #B5FFFC 100%);
	padding: 2px 5px;
}

.sub-pages {
	padding: 0;
	margin: 0;
}

.sub-pages h2 {
	margin-bottom: 0;
}
.sub-pages li {
	border-bottom: 1px solid CurrentColor;
	padding-bottom: 1ch;
}

.sub-pages li p:first-of-type {
	margin-top: 0;
}

.sub-pages a {
	text-decoration: none;
}

h1 {
	font-size: 3rem;
	margin-top: 0;
}

footer {
	padding-bottom: 3rem;
	padding-top: 3rem;
	opacity: .5;
}