@charset "utf-8";

/* © Bastien Tréhoux — Tous droits réservés */

* {
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

:root {
	--Bg: rgb(240, 240, 240);
	--Tintcolor: rgb(53, 77, 105);
	--Shadow: rgb(0, 0, 0, 0.1);
	--border: rgb(200, 200, 200);
	color-scheme: light dark;
}

html {
	background-color: var(--Bg);
	font-size: 20px;
	padding-bottom: 12rem;
	padding-top: 1rem;
	padding-left: 5%;
	padding-right: 5%;
}

body {
	max-width: 1000px;
	margin: auto;
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header */
header {
	text-align: center;
	margin: auto;
	margin-bottom: 2rem;
	margin-top: 1rem;
	background-color: rgb(240, 240, 240, 0.75);
	background-repeat: repeat;
	background-position: top;
	border-radius: 1rem 1rem 1rem 1rem;
	/*box-shadow: 0px 8px 25px var(--Shadow);*/
	padding: 1rem;
	max-width: 800px;
	backdrop-filter: blur(30px);
	box-shadow: 0px 8px 25px rgb(0, 0, 0, 0.1);
	position: fixed;
	left: 50%;
  	transform: translateX(-50%);
	bottom: 0rem;
	max-width: 85%;
	z-index: 2;
	cursor: default;
}

header ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header li {
	color: var(--Tintcolor);
	text-transform: uppercase;
	font-weight: 900;
	font-size: 1.25rem;
	text-align: right;
}

header li a, header li a:visited {
	color: inherit;
	text-decoration: none;
	font-weight: 500;
	font-stretch: 50%;
}

header ul li:first-child {
	margin-left: 0;
	text-align: left;
}

header ul li:last-child ul li a {
	transition: transform 0.3s ease;
}

header ul li:last-child ul {
	flex-direction: column-reverse;
	align-items: end;
	margin-left: 1rem;
}

header ul li:last-child ul li a:hover {
	transform: scale(0.5);
}

/* Divers */
h1, h2, h3, h4, h5, h6 {
	margin-bottom: 0;
	margin-top: 0;
	/*text-transform: uppercase;*/
	font-stretch: condensed;
	font-weight: 600;
}

h1 {
	margin-bottom: 1rem;
	font-size: 3rem;
	text-align: center;
}

h2 {
	text-align: start;
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

h3 {
	font-size: 1.25rem;
}

p {
	text-align: justify;
	line-height: 1.5;
	margin-top: 0;
	font-stretch: semi-expanded;
}

.icon {
	height: 1em;
	width: 1em;
	vertical-align: middle;
	fill: currentColor;
}

/* Links */
a {
	color: var(--Tintcolor);
}

a:visited {
	color: palevioletred;
}

/* Footer */
footer p {
	text-align: center;
	margin-bottom: 0;
}

footer {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	column-gap: 2rem;
	row-gap: 2rem;
	grid-auto-rows: minmax(1rem, auto);
	margin-top: 2rem;
}

#close {
	display: none;
}

@media(min-width: 800px) {
	html {
		padding-bottom: 2rem;
	}
	
	footer {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 1rem;
	}

	footer nav {
		grid-column: 1;
		grid-row: 1 / 3;
	}

	/*footer #options {
		grid-column: 2 / 4;
		grid-row: 1;
	}*/

	footer #syndication {
		grid-column: 2;
		grid-row: 1;
	}

	footer #informations {
		grid-column: 3;
		grid-row: 1;
	}
	
	header {
		position: sticky;
		top: 1rem;
		left: initial;
		transform: initial;
	}
	
	header ul li:last-child ul {
		flex-direction: row;
	}
	
	header ul li:last-child ul li {
		margin-left: 1rem;
		margin-right: 1rem;
	}
	
	header ul li:last-child ul li:last-child {
	margin-right: 0;
	}
	
	#portfolio {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: minmax(1rem, auto);
		row-gap: 1rem;
		column-gap: 1rem;
		align-items: center;
	}
	
	#portfolio figure {
		margin: 0;
		aspect-ratio: 4 / 3;
		text-align: center;
	}
	
	#portfolio figure img {
		height: -webkit-fill-available;
		height: fill-available;
		transition: transform 0.3s ease;
	}
	
	#portfolio figure img:hover {
		transform: scale(1.05);
		cursor: zoom-in;
	}
	
	#portfolio figure img[class="zoomedPict"] {
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		height: initial;
		max-width: 90%;
  		max-height: 90%;
  		z-index: 3;
  		cursor: zoom-out;
	}
	
	.zoomedPict:hover {
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		cursor: zoom-out;
	}
	
	#portfolio figure:has(.zoomedPict) {
		position: fixed;
		top: 0px;
		left: 0px;
		width: 100%;
		height: 100%;
		background-color: rgb(0, 0, 0, 0.25);
		backdrop-filter: blur(15px);
		z-index: 3;
		cursor: zoom-out;
	}
}

footer .menu ul {
	margin-bottom: 0;
}

figure {
	margin: 1.25rem 0 1.25rem 0;
}

figure img {
	max-width: 100%;
	border-radius: 1rem;
}

#copyright {
	color: darkslategrey;
	cursor: default;
}

/* Menu */
.menu ul {
	display: flex;
	flex-direction: column;
	list-style-type: none;
	box-shadow: 0px 8px 25px var(--Shadow);
	border-radius: 1rem;
	padding: 1rem;
	font-weight: 500;
	text-align: start;
	margin-top: 0.25rem;
	margin-bottom: 2rem;
	cursor: default;
}

.menu ul li {
	margin-left: none;
	border-bottom: 1px solid var(--border);
	margin-bottom: 0;
	padding: 1rem 0 1rem 0;
	width: 100%;
}

.menu ul li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.menu ul li:first-child{
	padding-top: 0;
}

.menu ul li a, .menu ul li label, .menu #articlelist li {
	flex-direction: row;
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-decoration: none;
	width: 100%;
	color: var(--Tintcolor);
}

.menu h2 {
	text-transform: uppercase;
	font-size: medium;
	text-align: center;
	color: darkslategrey;
	margin-bottom: 0.5rem;
	font-stretch: normal;
	cursor: default;
}

.menu a:visited {
	color: var(--Tintcolor);
}

.menu #articlelist li a {
	display: initial;
}

/* Warning */
.warning {
	background-color: rgb(220, 220, 0);
	padding: 1rem;
	border-radius: 1rem;
	max-width: 700px;
	margin: auto;
	margin-bottom: 1rem;
	color: black;
	display: flex;
	align-items: center;
}

.warning::before {
	content: "⚠";
	margin-right: 0.5rem;
	display: block;
	font-size: 1.5rem;
}

/* Inputs */
input[disabled="true"] {
	cursor: not-allowed;
}

label:has(input[disabled="true"]) {
	cursor: not-allowed;
	opacity: 0.7;
}

input[switch] {
	accent-color: var(--Tintcolor);
	margin-left: 10px;
}

button, input[switch], label[class="switch"] {
	cursor: pointer;
}

footer input[type="checkbox"] {
	height: 1rem;
	font-size: 1rem;
}

/* Spoilers */
details[class="spoiler"] summary {
	font-weight: bold;
	color: var(--Tintcolor);
	margin-left: 13px;
}

details[class="spoiler"] p {
	border-left: 3px var(--Tintcolor) solid;
	padding-left: 10px;
}

details[class="spoiler"] summary::before {
	content: url("../svg/eye-slash-fill.svg");
	margin-right: 5px;
	vertical-align: middle;
}

details[class="spoiler"][open] summary::before {
	content: url("../svg/eye-fill.svg");
	vertical-align: middle;
	text-decoration: none;
	margin-right: 5px;
	font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

details[class="spoiler"] summary::-webkit-details-marker {
	display: none;
	font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* Post Info, Tags & Categories */
.post-info {
	font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
	font-weight: 600;
	text-align: center;
	margin-top: 0.5rem;
	margin-bottom: 1rem;
	font-stretch: semi-condensed;
	background-color: var(--Bg);
}

a[class="tag"], a[class="tag"]:visited, .category a, .category a:visited, .author:visited, .menu .author:visited, .menu .author, .author, .post-info time {
	text-decoration: none;
	border-radius: 0.5rem;
	padding: 0.5rem;
	margin: 0.25rem;
	margin-top: 0;
}

.post-info time {
	border-radius: 0.5rem 0 0 0.5rem;
	margin-right: 0;
	box-shadow: 0px 8px 25px var(--Shadow);
}

.author, .menu .author {
	border-radius: 0 0.5rem 0.5rem 0;
	margin-left: 0;
	box-shadow: 0px 8px 25px var(--Shadow);
}

a[class="author"]:visited {
	color: var(--Tintcolor);
}


.taglist, .category {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	font-weight: 500;
	margin-top: 0.5rem;
	text-transform: uppercase;
	font-stretch: 50%;
	font-weight: 700;
}

.category a, .category a:visited {
	background-color: darkslategrey;
	color: var(--Bg);
}

/* Dark mode */
@media(prefers-color-scheme: dark) {
	:root {
		--Tintcolor: rgb(163, 184, 203);
		--Bg: rgb(30, 30, 30);
		--Shadow: rgb(0, 0, 0, 0.4);
		--border: rgb(55, 55, 55);
	}
	
	html {
		background-color: var(--Bg);
	}
	
	header {
		background-color: rgb(30, 30, 30, 0.75);
	}

	.menu ul, header {
		box-shadow: 0px 8px 25px var(--Shadow);
	}

	.menu h2, #copyright {
		color: silver;
	}


@media(prefers-reduced-motion: reduce) {
	#portfolio figure img {
		transform: scale(1);
		transition: none;
	}
}