/*
 * @author: Jean-Pierre Pourrez "bazooka07"
 *
 * Published on may, the 4th of 2021
 * */

@font-face {
  font-family: 'fontello';
  src: url('../fonts/fontello/font/fontello.eot?53152753');
  src: url('../fonts/fontello/font/fontello.eot?53152753#iefix') format('embedded-opentype'),
       url('../fonts/fontello/font/fontello.woff2?53152753') format('woff2'),
       url('../fonts/fontello/font/fontello.woff?53152753') format('woff'),
       url('../fonts/fontello/font/fontello.ttf?53152753') format('truetype'),
       url('../fonts/fontello/font/fontello.svg?53152753#fontello') format('svg');
  font-weight: normal;
  font-style: normal;
}

body {
	--bgcolor1: #444;
	--fgcolor1: #fff;

	--bgcolor2: #fff;
	--fgcolor2: #fdc501;

	--bgcolor3: #f8f8f8;
	--fgcolor3: #941700;

	--bgcolor4: #e49e3e;
	--fgcolor4: #fff;

	--fgbutton: #fff;
	--bgbutton: #84200d;
}

hr.clear {
	margin: 0;
	padding: 0;
	height: 1px;
	clear: both;
	color: transparent;
	border: none;
	max-width: 100%;
}

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

textarea {
	width: 100%;
	resize: vertical;
}

blockquote {
	margin: 0;
	padding: 0.25rem;
	background-color: #f4f4f4;
}

[class^="icon-"],
[class^="icon-"] {
	display: inline-block;
	font-family: fontello;
	font-style: normal;
	font-weight: normal;
}

.icon-search::before {
	content: '\e809';
}

.toggle {
	display: none;
}

.main-header > div {
	display: flex;
	align-items: center;
	text-align: center;
}

.main-header .logo {
	min-width: 5rem;
	max-height: 5rem;
}

.main-header .brand {
	flex-grow: 1;
}

.main-header .brand > * {
	margin: 0;
}

#nav-header {
	z-index: 999;
}

#nav-header a {
	display: inline-block;
	width: 100%;
	margin: 0;
	color: inherit;
	white-space: nowrap;
	text-decoration: none;
}

#nav-header .group::after {
	content: '▼';
	margin-left: 1rem;
}

#nav-header .group:hover::after {
	content: '▲'
}

#nav-header .group:not(:hover) {

}

/* -------- static-gallery.php (slideshow) --------------- */

div[data-gallery] figure {
	padding: 0.5rem;
	background-color: var(--bg-menu);
	text-align: center;
	border-radius: 0.5rem;
}

body.slideshow {
	overflow: hidden;
}

.mode-static img[src*=".tb."],
.mode-article img[src*=".tb."] {
	cursor: zoom-in;
}

div[data-gallery] {
	display: flex;
	width: 100%;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 1rem;
}

div[data-gallery] a {
	display: inline-block !important;
	margin: 0;
}

div[data-gallery] figure {
	margin: 0;
	padding: 0.5rem;
	max-width: 20rem;
	background-color: var(--bgcolor3) /* var(--bgfigure) */;
	text-align: center;
	border: 1px solid var(--brcolor1);
	border-radius: 0.5rem;
}
div[data-gallery].no-caption a { margin: 0.5rem 0.5rem; }

#slideshow {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	display: none;
	z-index: 99;
	transition: opacity ease 1.4s;
}

body.slideshow #slideshow {
	display: grid;
	grid-template-rows: 1fr auto;
	align-items: center;
}

#slideshow .overlay {
	position: absolute;
	height: 100%;
	width: 100%;
	background-color: rgb(63,63,63,0.85);
}

#slideshow figure {
	justify-self: center;
	margin: 0;
	padding: 0.3rem;
	text-align: center;
	background-color: var(--bgcolor3);
	border-radius: 0.5rem;
}

body.slideshow #slideshow.no-gallery {
	grid-template-rows: 1fr;
}

#slideshow .gallery {
	padding: 0.2rem;
	text-align: center;
}
#slideshow figure,
#slideshow .gallery {
	z-index: 100; /* more than #slideshow */
}
#slideshow .gallery {
	display: none;
	background-color: var(--bgcolor3);
	overflow-x: hidden;
}
#slideshow.with-gallery .gallery {
	display: flex;
	justify-content: space-between;
}
#slideshow-gallery {
	white-space: nowrap;
	overflow-x: hidden;
}
#slideshow-gallery img {
	height: 100%;
	margin: 0 0.1rem;
	border: 2px solid transparent
}
#slideshow-gallery img.active {
	border-color: red;
}
#slideshow .button {
	font-size: 2rem;
	padding: 0 0.6rem;
}
#slideshow .button,
#slideshow-gallery {
	height: 3rem;
}
#slideshow-gallery img {
	cursor: zoom-in;
}
#slideshow .button,
#slideshow-close {
	cursor: pointer;
}
#slideshow-prev { left: 0.2rem; }
#slideshow-next { right: 0.2rem; }
#slideshow-close {
	padding: 0 0.3rem;
	color: red;
	font-weight: bold;
}
#slideshow-close:hover {
	background-color: #ccc;
}
#slideshow-img {
	max-height: calc(100vh - 7rem);
	max-width: calc(100vw - 2rem);
	border: 2px inset var(--bgcolor2);
	border-radius: 0.4rem;
	transition:  width ease 1.5s, height ease 1.5s;
}
#slideshow figcaption {
	display: flex;
}
#slideshow-caption {
	flex-grow: 1;
	text-transform: capitalize;
}
#slideshow-counter {
	padding: 0 0.3rem;
}

.art-main figure {
	margin: 1rem auto;
	text-align: center;
}

.art-main figcaption span {
	word-wrap: nowrap;
}

#nav-header li:not(:hover) > .sub-menu {
	display: none;
}

#nav-header .categories a {
	display: flex;
	justify-content: space-between;
}

.main-content,
.main-aside {
	padding: 0 1rem;
}

.art-header > div {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
}

.art-footer > * {
	padding-bottom: 0.5rem;
	white-space: nowrap;
	overflow-x: auto;
}

.art.thumbnail {
	float: left;
	padding: 0.25rem 1rem 1rem 0;
}

.button {
	padding: 0;
	font-size: 150%;
}

/* ---------- form ------------------------ */

blockquote p {
	margin: 0;
}

form > div:not(:first-of-type), form > textarea {
	margin-top: 1rem;
}

input:not([type="radio"]):not([type="checkbox"]), select, textarea {
	border: 1px solid var(--brcolor1);
}

input:not([type="checkbox"]):not([type="radio"]) {
	width: 100%;
}

.capcha-challenge {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
}

.capcha-challenge p {
	margin: 0;
}

.capcha-challenge input[type="text"] {
	width: 3rem;
	text-align: center;
}

.capcha-word {
	margin: 0 2rem;
	padding: 0 1rem;
	background-color: var(--bgcolor3);
	border: 1px solid var(--brcolor1);
	font-weight: bold;
	letter-spacing: 0.5rem;
}

form > div:last-of-type {
	text-align: center;
}

#answer-coms .button,
form .button {
	min-width: 6rem;
	padding: 0 1rem;
	background-color: var(--bgbutton);
	color: var(--fgbutton);
	letter-spacing: 0.2rem;
}

#id-comm-title:checked + h3 span:first-of-type,
#id-comm-title:not(:checked) + h3 span:last-of-type {
	display: none;
}

.comments .level-1 { margin-left: 3rem; }
.comments .level-2 { margin-left: 6rem; }
.comments .level-3 { margin-left: 9rem; }

#answer-coms > div {
	display: grid;
	gap: 1rem;
	margin-bottom: 2rem;
	padding: 0.25rem;
	border: 1px solid #ccc;
	border-radius: 0.75rem;
}

/* --------- posts.php ------------- */

.breadcrumb {
	list-style: none;
	padding: 0;
	display: flex;
	gap: 1.5rem;
}

.article.pin {
	background-color: #f4ecec;
	border: 3px double var(--fgcolor3);
	border-radius: 0.75rem;
	padding: 0 1rem;
}

.posts > article:not(:first-of-type) {
	margin-top: 3rem;
}

.posts .art-header {
	white-space: nowrap;
}

.posts .art-header h2 {
	margin: 0;
	padding-bottom: 1rem;
	overflow-x: auto;
}

.art-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.more {
	text-align: end;
	white-space: nowrap;
	overflow-x: hidden;
	text-overflow: ellipsis;
}

.more a::after {
	font-family: fontello;
  	content: '\e803';
	padding-left: 1rem;
}

.rss::before {
	font-family: fontello;
	content: '\f143';
	color: var(--bgcolor4);
	padding-right: 1rem;
}

#pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 26rem;
	margin: 0 auto;
}

#art-navigation ul {
	display: flex;
	justify-content: space-between;
	gap: 2.5rem;
	max-width: 24rem;
	margin: 0;
	list-style: none;
}

/*  ---- categorie.php -------- */

.cat-description {
	display: flex;
	gap: 1rem;
}

/* --------- sidebar.php ---------- */

.main-aside {
	--columns: 2;
}

.main-aside .active {
	padding: 0 0.5rem;
	background-color: var(--bgcolor4);
	color: var(--fgcolor4);
}

.main-aside ul {
	list-style: none;
	padding: 0;
	white-space: nowrap;
}

.main-aside > ul > li {
	margin: 1.5rem 0;
}

.main-aside ul ul li {
	margin: 0.25rem 0;
}

.main-aside h3 {
	color: var(--fgcolor3);
}

.main-aside li {
	overflow-x: hidden;
	text-overflow: ellipsis;
}

#cat-list li,
#author-list li,
#arch-list li {
	display: flex;
	justify-content: space-between;
}

#tag-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	align-items: center;
	padding: 0;
	gap: 0.25rem;
}

/* https://www.w3schools.com/colors/colors_2019.asp - The Hottest Autumn 2019 / Winter 2020 Colors */
/* https://www.w3schools.com/lib/w3-colors-2020.css */
.tag-size-1   a { font-size:  40%; color:#34568B; } /* classic-blue */
.tag-size-2   a { font-size:  56%; color:#CD212A; } /* flame-scarlet */
.tag-size-3   a { font-size:  72%; color:#FFA500; } /* saffron */
.tag-size-4   a { font-size:  88%; color:#1C6D57; } /* #23866c */
.tag-size-5   a { font-size: 104%; color:#4B5335; } /* chive */
.tag-size-6   a { font-size: 120%; color:#446ED5; } /* #6e8cd5 */
.tag-size-7   a { font-size: 136%; color:#C84803; } /* #FA7A35 orange-peel */
.tag-size-8   a { font-size: 152%; color:#6B5876; } /* grape-compote */
.tag-size-9   a { font-size: 168%; color:##7A6027; } /* #93742f */
.tag-size-10  a { font-size: 184%; color:#B6472E; } /* #E8A798 coral-pink */
.tag-size-11  a { font-size: 200%; color:#9C4722; } /* cinnamon-stick */

#toggle-arch-list + h3 label::after {
	content: '▼';
	margin-left: 1rem;
}

#toggle-arch-list:checked + h3 label::after {
	content: '▲'
}

body:not(.mode-archives) #toggle-arch-list:not(:checked) + h3 + ul {
	display: none;
}
/* ------------- footer.php ----------- */

#nav-footer {
	display: flex;
	justify-content: space-around;
	white-space: nowrap;
	flex-wrap: wrap;
	padding-top: 2rem;
	border-top: 0.25rem solid #aaa;
}

/* ----------- comments.php ---------- */

.frm-comment input[type="text"],
.frm-comment input[type="email"],
.frm-comment input[type="url"],
.frm-comment textarea {
	border: 1px solid #666;
}

.frm-comment .infos {
	column-count: 2;
	margin: 1rem 0 0;
}

/* ============== Responsive design ========= */

@media screen and (max-width: 575px) {
	#art-navigation {
		text-align: center;
	}

	#art-navigation ul {
		margin: 0 auto;
	}

	.main-aside ul ul {
		padding: 0;
	}

	#answer-coms > div {
		grid-template-columns: auto 1fr;
	}

	.com-main, .com-footer {
		grid-column: 1 / -1;
		text-align: center;
	}

}

@media screen and (min-width: 576px) {
	.main-header {
		padding: 0 5%;
	}

	.art-header > div {
		justify-content: space-between;
	}

	#art-navigation {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.main-aside {
		--columns: 3;
	}

	.main-aside ul ul,
	.main-aside .rss {
		padding-left: 2rem;
	}

	#answer-coms > div {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: 'avatar header footer' 'avatar main footer';
	}

	.com-avatar { grid-area: avatar; }
	.com-header { grid-area: header; }
	.com-main   { grid-area: main; }
	.com-footer { grid-area: footer; align-self: center; }

}

@media screen and (max-width: 767px) {
	.main-header {
		margin-top: 3rem;
	}

	#nav-header {
		position: fixed;
		width: 100vw;
		top: 0;
	}

	#nav-header button {
		width: 100vw;
		padding: 0.5rem;
		background-color: var(--bgcolor1);
		color: var(--fgcolor1);
	}

	#nav-header > ul {
		width: max-content;
		max-height: calc(100vh - 5rem);
		margin: 0 1rem 0 0.25rem;
		padding: 1rem;
		overflow-y: auto;
		background-color: var(--bgcolor3);
		color: var(--fgcolor3);
		border-radius: 0.5rem;
	}

	#nav-header li {
		margin: 0.25rem 0;
	}

	#nav-header:not(:hover) > ul {
		display: none;
	}

	#nav-header a,
	#nav-header .group {
		padding: 0.25rem 1rem;
	}

	#nav-header li.active > a,
	#nav-header li:not(.active) > a:hover {
		background-color: var(--bgcolor4);
		color: var(--fgcolor4);
	}

}

@media screen and (min-width: 768px) {
	#nav-header > button {
		display: none;
	}

	#nav-header {
		position: sticky;
		top: 0;
	}

	#menu a,
	#menu .group {
		padding: 0.25rem 1rem;
	}

	#nav-header,
	#nav-header .sub-menu {
		background-color: var(--bgcolor1);
		color: var(--fgcolor1);
	}

	#nav-header > ul {

	}

	#nav-header > ul > li {
		position: relative;
		display: inline-block;
	}

	#nav-header > ul > li:not(:first-of-type) {
		margin-left: 0.25rem;
	}

	#nav-header li.active a,
	#nav-header li:not(.active):hover > a {
		background-color: var(--bgcolor4);
		color: var(--fgcolor4);
	}

	#nav-header > ul .sub-menu {
		position: absolute;
	}

	.art-footer {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-betwwen;
	}

	#pagination {
		justify-content: space-around;
	}
}

@media screen and (min-width: 576px) and (max-width: 1023px) {
	#author-list {
		column-count: 2;
	}
}

@media screen and (max-width: 1023px) {
	body {
		margin-right: 1rem;
	}

	#cat-list, #arch-list {
		column-count: var(--columns);
	}
}

@media screen and (min-width: 1024px) {
	body {
		display: grid;
		grid-template-rows: auto auto 1fr auto;
		min-height: 100vh;
		grid-gap: 0.5rem 1rem;
		padding: 0.5rem;
	}

	body:not(.with-sidebar) {
		grid-template-areas:
			'header'
			'nav'
			'main'
			'footer';
	}

	body.with-sidebar {
		grid-template-columns: 1fr 27%; /* width of sidebar, .. */
		grid-template-areas:
			'header header'
			'nav nav'
			'main sidebar'
			'footer footer';
	}

	.main-header {
		grid-area: header;
	}

	#nav-header {
		grid-area: nav;
		position: sticky;
		top: 0;
		margin-bottom: 2rem;
		border-bottom: 1px solid var(--brcolor1);
		z-index: 50;
	}

	.main-content {
		grid-area: main;
		overflow-y: auto;
		scrollbar-width: thin;
	}

	.main-aside {
		grid-area: sidebar;
	}

	#nav-footer {
		grid-area: footer;
		position: sticky;
		bottom: 0;
		background-color: var(--fgcolor1);
		margin: 0 1rem;
	}
}

@media screen and (min-width: 1024px) and (orientation: landscape) {
	body {
		padding-right: 1.25rem;
	}
}

@media screen and (max-width: 1329px) {
}

@media screen and (min-width: 1330px) {
	html {
		background-color: #666;
	}

	body {
		max-width: 120rem;
		margin: 0 auto;
	}

}
