/*
	Modernisation visuelle — surcouche de main.css (Hielo).
	Chargée après main.css : ne modifie pas le template d'origine.
*/

/* Palette « Marte » — terre cuite et sable */

:root {
	--ink: #1d1210;
	--ink-rgb: 29 18 16;
	--ink-soft: #2e1c18;
	--heading: #1d1210;
	--text: #33261f;
	--muted: #7a675c;
	--paper: #f7f1ea;
	--surface: #ffffff;
	--surface-alt: #fbf7f2;
	--line-rgb: 60 35 20;
	--accent: #b9482a;
	--accent-rgb: 185 72 42;
	--accent-hover: #983620;
	--on-accent: #fff;
	--gold: #f2b45a;
	--warn: #b4541f;
	--line: rgb(var(--line-rgb) / 0.09);
	--accent-soft: rgb(var(--accent-rgb) / 0.1);
	--radius: 18px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgb(var(--ink-rgb) / 0.04), 0 8px 24px rgb(var(--ink-rgb) / 0.06);
	--shadow-hover: 0 2px 4px rgb(var(--ink-rgb) / 0.06), 0 18px 40px rgb(var(--ink-rgb) / 0.12);
	--font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* Base */

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	background-color: var(--paper);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body, input, select, textarea {
	font-family: var(--font-text);
	font-weight: 400;
	font-size: 1.0625rem;
	line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--heading);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

a {
	color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--accent-hover);
}

::selection {
	background: var(--accent);
	color: #fff;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* Header */

/* En-tête clair (verre dépoli) une fois la page défilée ; transparent et blanc sur les photos */
#header {
	background: color-mix(in srgb, var(--surface) 88%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 4px 20px rgb(var(--ink-rgb) / 0.05);
	height: 4rem;
	line-height: 4rem;
	font-family: var(--font-display);
}

#header.alt {
	background: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	border-bottom-color: transparent;
	box-shadow: none;
	top: 0.75rem;
}

#header > .logo {
	left: 1.5rem;
}

#header > .logo a {
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--heading);
}

#header > .logo a span {
	font-size: inherit;
	font-weight: 400;
	color: var(--accent);
}

#header > a[href="#menu"] {
	display: inline-block;
	margin-right: 1.25rem;
	padding: 0 1.1rem !important;
	height: 2.4rem;
	line-height: 2.4rem;
	border-radius: 999px;
	border: 1px solid rgb(var(--line-rgb) / 0.2);
	color: var(--heading);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	vertical-align: middle;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

#header > a[href="#menu"]:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
	color: var(--heading);
}

#header.alt > .logo a,
#header.alt > a[href="#menu"],
#header.alt > a[href="#menu"]:hover {
	color: #fff;
}

#header.alt > .logo a span {
	color: var(--gold);
}

#header.alt > a[href="#menu"] {
	border-color: rgba(255, 255, 255, 0.35);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

#header.alt > a[href="#menu"]:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.6);
}

@media screen and (max-width: 980px) {
	#header {
		height: 3.5rem;
		line-height: 3.5rem;
	}
}

@media screen and (max-width: 480px) {
	#header > .logo a span {
		display: none;
	}

	#header > a[href="#menu"] {
		margin-right: 0.75rem;
	}
}

/* Menu */

#menu {
	background: var(--surface);
	padding: 4.5rem 2rem 2rem;
	width: 21rem;
	font-family: var(--font-display);
}

#menu .close:before {
	color: var(--muted);
}

#menu > ul.links > li > a:not(.button) {
	border-top: 1px solid var(--line);
	color: var(--text);
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

#menu > ul.links > li > a:not(.button):hover {
	color: var(--accent);
	padding-left: 0.4rem;
}

body.is-menu-visible #menu {
	box-shadow: -20px 0 60px rgb(var(--ink-rgb) / 0.18);
}

/* Banner (accueil) */

.banner {
	background-color: var(--ink);
}

.banner > article:after {
	background: linear-gradient(180deg, rgb(var(--ink-rgb) / 0.35) 0%, rgb(var(--ink-rgb) / 0) 40%, rgb(var(--ink-rgb) / 0.45) 100%);
	opacity: 1;
}

.banner > article h2 {
	font-family: var(--font-display);
	font-size: clamp(3rem, 9vw, 7.5rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.banner > article h2 a {
	display: inline-block;
	transition: transform 0.3s ease, color 0.3s ease;
}

.banner > article h2 a:hover {
	color: var(--gold);
	transform: translateY(-3px);
}

.banner > article h2 a:after {
	content: "Descoperă \2192";
	display: block;
	margin-top: 1.5rem;
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	text-shadow: none;
}

/* Sections */

.wrapper {
	padding: 4.5rem 0 3rem;
}

.wrapper > .inner {
	width: min(76rem, calc(100% - 2.5rem));
}

.wrapper.style2 {
	background-color: var(--paper);
	color: var(--text);
}

.wrapper.style2 a {
	color: var(--accent);
}

.wrapper.style2 h1, .wrapper.style2 h2, .wrapper.style2 h3,
.wrapper.style2 h4, .wrapper.style2 h5, .wrapper.style2 h6,
.wrapper.style2 strong, .wrapper.style2 b {
	color: var(--heading);
}

.wrapper.style2 + .wrapper.style2 {
	padding-top: 0;
}

/* Bandeau de titre des pages */

.wrapper.style3 {
	padding: 9rem 0 4.5rem;
	background-position: center 30%;
	overflow: hidden;
}

.wrapper.style3:before {
	background: linear-gradient(180deg, rgb(var(--ink-rgb) / 0.3) 0%, rgb(var(--ink-rgb) / 0.55) 100%) !important;
	opacity: 1 !important;
}

.wrapper.style3 header h1 {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	color: #fff;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
	margin: 0;
}

.wrapper.style3 header p {
	font-family: var(--font-display);
	color: rgba(255, 255, 255, 0.75);
	letter-spacing: 0.2em;
	margin: 0;
}

.wrapper.style3 header p:after {
	display: none;
}

/* Cartes */

.box {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.box .content {
	padding: 2.25rem 2.5rem;
}

.box header p {
	font-family: var(--font-display);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	color: var(--muted);
	margin-bottom: 0.75rem;
	padding-bottom: 0;
}

.box header p:after {
	display: none;
}

.box header h2 {
	font-size: 1.55rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

.box footer {
	margin-top: auto;
}

@media screen and (max-width: 736px) {
	.box .content {
		padding: 1.75rem 1.5rem;
	}
}

/* Grille de lectures */

.grid-style {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
	gap: 2rem;
	margin: 0;
}

.grid-style > *,
.grid-style > :nth-child(n) {
	width: auto;
	padding: 0;
}

.grid-style > * > .box {
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-style > * > .box:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-hover);
}

.grid-style .box .image.fit {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	width: auto;
	margin: 0.75rem 0.75rem 0;
	border-radius: 12px;
	background: var(--ink-soft);
	isolation: isolate;
}

/* Liseré intérieur + léger voile en bas pour adoucir les photos très claires */
.grid-style .box .image.fit:after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
	background: linear-gradient(180deg, transparent 60%, rgb(var(--ink-rgb) / 0.18) 100%);
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.grid-style .box .image.fit img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	filter: saturate(0.92);
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

.grid-style > * > .box:hover .image.fit img {
	transform: scale(1.05);
	filter: saturate(1.05);
}

.grid-style > * > .box:hover .image.fit:after {
	opacity: 0.4;
}

/* Illustration en tête d'une œuvre */

.reading-cover {
	margin: 0 0 2.5rem;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 20px 50px rgb(var(--ink-rgb) / 0.18);
	background: var(--ink-soft);
}

.reading-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media screen and (max-width: 736px) {
	.reading-cover {
		border-radius: 12px;
		margin-bottom: 1.75rem;
	}
}

.grid-style .box .content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.75rem 1.75rem 2rem;
}

.grid-style .box .content > p {
	color: var(--muted);
	font-size: 1rem;
	margin-bottom: 1.5rem;
}

/* Boutons */

input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	height: 2.75rem;
	line-height: 2.75rem;
	padding: 0 1.6rem;
	border-radius: 999px;
	background-color: var(--accent);
	color: var(--on-accent) !important;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.wrapper.style2 input[type="submit"],
.wrapper.style2 input[type="reset"],
.wrapper.style2 input[type="button"],
.wrapper.style2 button,
.wrapper.style2 .button {
	background-color: var(--accent);
	color: var(--on-accent) !important;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover,
.wrapper.style2 input[type="submit"]:hover,
.wrapper.style2 input[type="reset"]:hover,
.wrapper.style2 input[type="button"]:hover,
.wrapper.style2 button:hover,
.wrapper.style2 .button:hover {
	background-color: var(--accent-hover);
	box-shadow: 0 6px 18px rgb(var(--accent-rgb) / 0.3);
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
	transform: translateY(1px);
}

.wrapper.style2 .button.alt,
.button.alt {
	background-color: transparent;
	box-shadow: inset 0 0 0 1.5px var(--accent);
	color: var(--accent) !important;
}

.wrapper.style2 .button.alt:hover,
.button.alt:hover {
	background-color: var(--accent);
	color: var(--on-accent) !important;
	box-shadow: inset 0 0 0 1.5px var(--accent), 0 6px 18px rgb(var(--accent-rgb) / 0.25);
}

.wrapper.style2 .button.special,
input[type="submit"].special,
input[type="button"].special,
button.special,
.button.special {
	background-color: var(--accent);
	color: var(--on-accent) !important;
}

input[type="submit"].special:hover,
input[type="button"].special:hover,
button.special:hover,
.button.special:hover {
	background-color: var(--accent-hover);
}

.button.icon:before {
	margin-right: 0.5em;
}

/* Formulaires */

input[type="text"],
input[type="password"],
input[type="email"],
input:not([type]),
select,
textarea,
.wrapper.style2 input[type="text"],
.wrapper.style2 input[type="password"],
.wrapper.style2 input[type="email"],
.wrapper.style2 input:not([type]),
.wrapper.style2 select,
.wrapper.style2 textarea {
	background: var(--surface);
	border: 1px solid rgb(var(--line-rgb) / 0.16);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:not([type]) {
	height: 2.75rem;
	padding: 0 1rem;
	width: 100%;
	margin-top: 0.5rem;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input:not([type]):focus,
select:focus,
textarea:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
	outline: none;
}

/* Accueil : présentation */

.box header h1.site-title {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	margin-bottom: 0.5rem;
}

.box header h1.site-title + h4 {
	margin-top: 1.25rem;
}

.site-title ~ h4 {
	display: inline-block;
	margin: 0.35rem 0.25rem;
	font-size: 0.95rem;
	font-weight: 500;
}

.site-title ~ h4 a {
	display: inline-block;
	padding: 0.45rem 1.1rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent) !important;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.site-title ~ h4 a:hover {
	background: var(--accent);
	color: var(--on-accent) !important;
}

/* Lecture d'une œuvre */

.reading {
	max-width: 42rem;
	margin: 0 auto;
	padding-top: 1rem;
}

.reading header h1 {
	font-size: clamp(2rem, 4vw, 2.85rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	margin-bottom: 2rem;
}

.reading .text {
	font-size: 1.15rem;
	line-height: 1.85;
	color: var(--text);
}

.reading .text.lead {
	font-size: 1.3rem;
	line-height: 1.75;
}

.reading .text.lead:first-letter {
	float: left;
	font-family: var(--font-display);
	font-size: 3.6em;
	font-weight: 600;
	line-height: 0.85;
	margin: 0.08em 0.12em 0 0;
	color: var(--accent);
}

.reading .contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	font-family: var(--font-display);
	color: var(--muted);
	margin: 0;
}

.reading .text.poem {
	text-align: center;
	font-style: italic;
}

.reading-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	padding: 1.25rem 2.5rem;
	border-top: 1px solid var(--line);
	background: var(--surface-alt);
	font-family: var(--font-display);
	font-size: 0.9rem;
	color: var(--muted);
}

@media screen and (max-width: 736px) {
	.reading-actions {
		padding: 1rem 1.5rem;
		flex-wrap: wrap;
	}
}

.reading-stats {
	font-family: var(--font-display);
	font-size: 0.9rem;
	color: var(--muted);
	text-align: right;
	margin: 0;
}

/* Commentaires */

.comment {
	border-radius: var(--radius-sm);
	padding: 1rem 1.25rem;
	margin: 0 0 1rem 0;
	background: var(--surface-alt);
	border-left: 3px solid rgb(var(--line-rgb) / 0.15);
}

.comment blockquote {
	border: 0;
	padding: 0;
	margin: 0;
	font-style: normal;
}

.comment .comment-meta {
	display: block;
	font-family: var(--font-display);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--heading);
	margin-bottom: 0.35rem;
}

.comment.comment-admin {
	background: var(--accent-soft);
	border-left-color: var(--accent);
}

.comment.comment-pending {
	opacity: 0.85;
	border-left-color: var(--gold);
}

.comment.comment-pending .comment-status {
	display: block;
	margin-top: 0.5rem;
	font-family: var(--font-display);
	font-size: 0.85rem;
	color: var(--warn);
}

.box.box-muted {
	background: var(--surface-alt);
	box-shadow: none;
}

.box.box-slim .content {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.reading .text {
	margin-bottom: 1rem;
}

/* Pied de page */

#footer {
	background: var(--surface-alt);
	padding: 3rem 0 2.5rem;
	border-top: 1px solid var(--line);
}

#footer .copyright {
	font-family: var(--font-display);
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.8;
	margin: 0;
}

/* Téléphones */

@media screen and (max-width: 736px) {
	.banner.full {
		min-height: 70vh;
		height: 70vh !important;
	}

	.wrapper {
		padding: 2.5rem 0 1.5rem;
	}

	.wrapper > .inner {
		width: calc(100% - 1.5rem);
	}

	.wrapper.style3 {
		padding: 6.5rem 0 2.5rem;
	}

	.grid-style {
		gap: 1.25rem;
	}

	.box {
		margin-bottom: 1.25rem;
	}

	.reading .text {
		font-size: 1.1rem;
		line-height: 1.75;
	}

	.reading header h1 {
		margin-bottom: 1.25rem;
	}

	.reading-actions .button,
	.reading-actions button {
		width: auto;
		padding: 0 1.4rem;
	}

	.reading-stats {
		text-align: left;
	}

	#footer {
		padding: 2rem 0 1.5rem;
	}
}

@media screen and (max-width: 400px) {
	#header > .logo {
		left: 1rem;
	}

	#header > .logo a {
		font-size: 0.95rem;
	}

	#header > a[href="#menu"] {
		padding: 0 0.85rem !important;
	}
}

/* Accessibilité : réduire les animations */

@media (prefers-reduced-motion: reduce) {
	*, *:before, *:after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}
