@import 'Pic/icon.css';
@import 'CSS/color_variables.css';
@import 'CSS/table.css';
@import 'CSS/connexion.css';
@import 'sidebar/sidebar.css';

@import 'Chapitres/chapter_cards.css';
@import 'Chapitres/chapter.css';
@import 'Chapitres/impression/chapter_print.css';
@import 'Chapitres/edition/edition_mode.css';

@import 'Exercices/filter/filter_exercice.css';

@import 'Sim/sim_style.css';
@import 'Sim/K_illustration/style.css';
@import 'Sim/Influence_K_Cini/style.css';
@import 'Sim/Explore_xeq/style.css';
@import 'Sim/Explore_xeq_hetero/style.css';
@import 'Sim/Titrage_conduc_simple/style.css';

@import 'Infinite_exercises/Avancement_determination/style.css';

@font-face {
    font-family: "Aptos";
    src: url("fonts/Aptos.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;       /* améliore le rendu pendant le chargement */
}

html{
	scroll-behavior: smooth;
	scroll-padding-top: 10px;
}

body {
	background-color: var(--main_background);
	color: var(--main_text);
	font-family: "Aptos", Arial, sans-serif;
	margin: 10px;
	padding: 0;
	display: flex;
	align-items: flex-start;
	margin-bottom: 500px;
	justify-content: center;
}

header {
	margin-right: 5px;
	width: fit-content;
	max-width: 20vw;
	flex: 0 0 auto;
	position: sticky;
	top: 0;
	align-self: flex-start;
	max-height: 50vh;
	overflow-y: auto;
}

nav{
	padding: 0 10px;
}

section {
	flex-grow: 1;
	max-width: 1200px;
	padding-right: 20px;
	padding-left: 20px;
}

strong {
	color: var(--highlight);
}

.hidden {
	display: none;
	transition: all 0.5s ease-in-out;
}

img {
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

a{
	text-decoration: none;
	color: var(--highlight);
}

h1 {
	display: flex;
	background-color: var(--bg_main_color);
	text-align: center;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
}

h1 a{
	text-decoration: none;
	color: var(--main_text);
	transition: color 0.5s ease-in-out;
}

h1 a:hover {
	color: var(--action_color);
}


h2, h3, h4, h5 {
	margin: 10px auto;
	display: flex;
	align-items: center;
	gap: 5px;
}

p {
	margin: 5px auto;
}


.center {
	text-align: center !important;
}

ul, ol {
	margin: 0;
	padding-left: 20px;
}


.exercices-container a,
.chapter-section a{
	text-decoration: none;
	font-weight: bold;
	color: currentColor;
}



#insideBonds1,
#insideBonds2,
#insideBonds3 {
	transform-box: view-box;
	transform-origin: center;
	animation: bondRepel 12s ease-out infinite;
}

#insideBonds2 {
	animation-delay: 1.32s;
}

#insideBonds3 {
	animation-delay: 0.66s;
}

@keyframes bondRepel {
	0% {
		transform: rotate(0deg);
	}
	5.56% {
		transform: rotate(60deg);
	}
	16.67% {
		transform: rotate(60deg);
	}
	22.22% {
		transform: rotate(120deg);
	}
	33.33% {
		transform: rotate(120deg);
	}
	38.89% {
		transform: rotate(180deg);
	}
	50% {
		transform: rotate(180deg);
	}
	55.56% {
		transform: rotate(240deg);
	}
	66.67% {
		transform: rotate(240deg);
	}
	72.22% {
		transform: rotate(300deg);
	}
	83.33% {
		transform: rotate(300deg);
	}
	88.89% {
		transform: rotate(360deg);
	}
	100% {
		transform: rotate(360deg);
	}
}


@media all and (max-width: 900px){
	body{
		display: flex;
		flex-direction: column;
		position: relative;
		margin: 0;
		padding: 0;
		align-items: stretch;
	}

	header
	{
		display: block;
		background-color: var(--main_background);
		border-bottom: 3px solid var(--main_text);
		padding: 0 5px;
		box-shadow: 0 0 5px;
		width: 100%;
		box-sizing: border-box;
		max-width: 100%;
		min-width: 100%;
		margin: 0;
		align-self: stretch;
		z-index: 1000;
		min-height: 45px;
	}

	header #sidebar-toggle .icon-container {
		margin: 0 !important;
	}

	header #sidebar-toggle .icon,
	header #sidebar-toggle .icon-autoColor {
		transform: scaleX(0.5);
	}


	h1 {
		font-size: 1.2em;
	}

	h2 {
		font-size: 1.2em;
	}
	h3 {
		font-size: 1em !important;
	}

	section {
		width: 100%;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	img {
		max-width: 100% !important;
		height: auto;
		margin: 0 auto;
	}

}