/* common */

/* https://google-webfonts-helper.herokuapp.com/fonts/source-sans-pro?subsets=latin */
/* https://webdesign.tutsplus.com/tutorials/how-to-self-host-google-fonts--cms-34775 */

/* source-sans-pro-regular - latin */
@font-face {
	font-family: 'Source Sans Pro';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: local(''),
	     url('/fonts/source-sans-pro-v18-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
	     url('/fonts/source-sans-pro-v18-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-sans-pro-italic - latin */
@font-face {
	font-family: 'Source Sans Pro';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: local(''),
	     url('/fonts/source-sans-pro-v18-latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
	     url('/fonts/source-sans-pro-v18-latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-sans-pro-700 - latin */
@font-face {
	font-family: 'Source Sans Pro';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: local(''),
	     url('/fonts/source-sans-pro-v18-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
	     url('/fonts/source-sans-pro-v18-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-sans-pro-700italic - latin */
@font-face {
	font-family: 'Source Sans Pro';
	font-style: italic;
	font-weight: 700;
	font-display: swap;
	src: local(''),
	     url('/fonts/source-sans-pro-v18-latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
	     url('/fonts/source-sans-pro-v18-latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

:root {
	--color-text: black;
	--color-hreflang: #999;
	--color-aside-ul: #222;
	--color-aside-p: #555;

	--color-background: white;
	--color-bgnd-warn: #EDD097;
	--color-bgnd-danger: #fa0;
	--color-bgnd-subtitle: #eee;
	--color-bgnd-h234: #ccc;
	--color-bgnd-h56: #ddd;
	--color-bgnd-pre: #FFF8ED;

	--color-bgnd-aside: #ccc;
	--color-bgnd-aside-sidetitle: white;

	--color-border-subtitle: #aaa;
	--color-border-def: #369;
	--color-border-alt: #58b;
	--color-border-pre: #CBCBCB;

	--color-border-td: #eee;

	--color-link: maroon;
	--color-link-hover: red;
}

@media (prefers-color-scheme: dark) {
	:root {
		--color-text: #eee;
		--color-hreflang: #777;
		--color-aside-ul: #666;
		--color-aside-p: #666;

		--color-background: #121212;
		--color-bgnd-warn: #4D3608;
		--color-bgnd-danger: #c70;
		--color-bgnd-subtitle: #1C1C1C;
		--color-bgnd-h234: #262626;
		--color-bgnd-h56: #444;
		--color-bgnd-pre: #93846c;

		--color-bgnd-aside: #262626;
		--color-bgnd-aside-sidetitle: #121212;

		--color-border-subtitle: #555;
		--color-border-def: #246;
		--color-border-alt: #368;
		--color-border-pre: #999;

		--color-border-td: #555;

		--color-link: #C51616;
		--color-link-hover: red;
	}
	img {
		filter: brightness(.8) contrast(1.2);
	}
}

@viewport {
	width: device-width;
	zoom: 1.0;
}

html {
	color: var(--color-text);
	background-color: var(--color-background);
	margin: 0;
	padding: 0;
}

body {
	position: absolute;
	margin:0;
	padding:0;
	font: 11pt/1.3 'Source Sans Pro', Helvetica, Arial, sans-serif;
	min-height: 100%;
	width: 100%;
}

h1 {
	font-size: 2.0em;
}

h2 {
	font-size: 1.6em;
}

h3 {
	font-size: 1.3em;
}

h4, h5, h6 {
	font-size: 1em;
}

li p {
	margin: .2em 0;
}

a img {
	border: 0;
}

dt {
	font-weight: bold;
}


/* eye catchers */
.warning {
	background-color: var(--color-bgnd-warn);
	padding: 1pt;
}

.error {
	color: red;
	background-color: var(--color-bgnd-warn);
	padding: 1pt;
}

.danger {
	background-color: var(--color-bgnd-danger);
	font-weight: bold;
	padding: 1pt;
}

/* screen */

h2, h3, h4 {
	background-color: var(--color-bgnd-h234);
	border-color: var(--color-border-def);
	padding-top: 2px;
	padding-bottom: 2px;
}

h5, h6 {
	background-color: var(--color-bgnd-h56);
	border-color: var(--color-border-alt);
}

h2, h3, h4, h5, h6 {
	border-width: 1px;
	border-style: solid;
	margin-top: 1.3em;
	margin-bottom: 1em;
	padding-left: 10px;
}

a {
	text-decoration: none;
}

a:link {
	color: var(--color-link);
}

a:visited {
	color: var(--color-link);
}

a:hover {
	color: var(--color-link-hover);
	text-decoration: underline;
}

a[hreflang]::after {
	display: inline-block;
	color: var(--color-hreflang);
	content: "\00a0[" attr(hreflang) "]"; 
	vertical-align: super;
	font-size: 70%;
} 

pre {
	background-color: var(--color-bgnd-pre);
	border-width: 1px;
	border-style: solid;
	border-color: var(--color-border-pre);
	padding: .5em;
	clear: none;
}

code {
	overflow-wrap: break-word;
}

hr {
	border-style: none;
	border-bottom: 1px solid var(--color-border-pre);
	clear: both;
}

td {
	border: 1px solid var(--color-border-td);
}

/* user interface styles */

main {
	margin-top: 10px;
	margin-left: 250px;
	margin-right: 20px;
	margin-bottom: 20px;
}

#content {
	text-align: justify;
}

#subtitle {
	background-color: var(--color-bgnd-subtitle);
	border: 1px solid var(--color-border-subtitle);
        padding-top: 10px;
        padding-bottom: 10px;
	padding-left: 10px;
}

#subtitle h1 {
	margin: 0;
	font-size: 1.8em;
}

#banner {
	margin: 0;
	text-align: center;
}

aside {
	background-color: var(--color-bgnd-aside);
	border-right: 1px solid var(--color-border-def);
	border-left: 1px solid var(--color-border-def);
	display: block;
	position: absolute;
	top: 0px;
	left: 20px;
	width: 210px;
	height: 100%;
	min-height: 1050px;
	font-size: 9pt;
}

aside ul {
	color: var(--color-aside-ul);
	line-height: 1.5em;
	margin: 0.5em 0em 1.5em 3em;
}

aside p {
	color: var(--color-aside-p);
}

aside .sidetitle {
	background-color: var(--color-bgnd-aside-sidetitle);
	border: 1px solid var(--color-border-alt);
	font-size: 8pt;
	font-weight: bold;
	padding: 2px;
	margin-top: 20px;
	margin-left: 10px;
	margin-right: 10px;
	margin-bottom: 5px;
	letter-spacing: .3em;
	text-align: center;
	font-family: Verdana, Helvetica, Arial, sans-serif;
}		

aside .sideicons {
	text-align: center;
	margin-top: 30px;
}

aside .sitelicense {
	font-size: xx-small;
}

aside .lastmod {
	position: absolute;
	font-size: xx-small;
	bottom: 10px;
	margin-left: 25px;
	margin-top: 30px;
}

ul {
	list-style-type: square;
	margin: 0.5em 0em 0.5em 3em;
	padding: 0;
}

li {
	text-align: left;
}

abbr {
	cursor: help;
}

figure {
	display: inline;
	margin: 0;
}

figure.inserts img {
	margin: .25em 0px;
	max-height: 150px;
}

table {
	width: 100%;
}

iframe {
	border: 0;
}

#nav-check {
	display: none;
}

header {
	display: none;
}

@media (max-width: 768px) {
	/* passer body (et tous les éléments de largeur fixe) en largeur automatique */
	body {
		width: auto;
	}

	/* fixer une largeur maximale de 100% aux éléments potentiellement problématiques */
	img,
	table,
	td,
	blockquote,
	code,
	pre,
	textarea,
	input,
	iframe,
	object,
	embed,
	video {
		max-width: 100%;
	}

	/* conserver le ratio des images */

	img {
		height: auto;
	}

	/* gestion des mots longs */
	textarea,
	table,
	td,
	th,
	code,
	pre,
	samp {
		-webkit-hyphens: auto; /* césure propre */
		-moz-hyphens: auto;
		hyphens: auto;
		word-wrap: break-word; /* passage à la ligne forcé */
	}

	code,
	pre,
	samp {
		white-space: pre-wrap; /* passage à la ligne spécifique pour les éléments à châsse fixe */
	}

	aside {
		display: none;
		left: 0;
		border: 0;
	}

	main {
		margin-left: 10px;
		margin-right: 10px;
	}

	header {
		display: block;
		overflow: auto;
	}

	#nav-check:checked ~ aside {
		display: block;
	}

/*	#nav-check:checked ~ main {
		left: 220px;
	}
*/
	label[for="nav-check"] {
		float: right;
		clear: both;
		margin-right: 20px;
		margin-top: 20px;
		font-size: 32px;
		cursor: pointer;
	}
}

/* iPhone/iPad fixup */
@media (max-width: 768px) and (orientation: landscape) {
	html {
		-webkit-text-size-adjust: 100%;
		-ms-text-size-adjust: 100%;
	}
}

@media print {
	body {
		all: revert;
		font: 11pt/1.3 'Source Sans Pro', "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
	}
	body > *:not(main) {
		display: none;
	}
	main {
		all: revert;
	}
	a[href^="http"]::after {
		content: " (" attr(href) ")";
	}
	abbr[title]::after {
		content: " (" attr(title) ")";
	}
}
