@import url("variables.css");

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: clip;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--rt-font-body);
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--rt-color-ink);
	background-color: var(--rt-color-parchment);
	background-image:
		radial-gradient(ellipse at top, rgba(230, 200, 150, 0.35), transparent 55%),
		linear-gradient(180deg, var(--rt-color-parchment) 0%, var(--rt-color-parchment-dark) 100%);
	overflow-x: clip;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--rt-color-forest);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--rt-transition);
}

a:hover,
a:focus-visible {
	color: var(--rt-color-coffee);
}

h1,
h2,
h3,
h4 {
	font-family: var(--rt-font-display);
	font-weight: 600;
	line-height: 1.2;
	color: var(--rt-color-forest-deep);
	letter-spacing: 0.02em;
}

.rt-container {
	width: min(100% - 2rem, var(--rt-max-width));
	margin-inline: auto;
}

.rt-page__content {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.rt-page__content iframe,
.rt-page__content video,
.rt-page__content table,
.rt-page__content pre {
	max-width: 100%;
}

.rt-page__content table {
	display: block;
	overflow-x: auto;
}

.rt-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--rt-color-forest);
	color: var(--rt-color-cream);
}

.rt-skip-link:focus {
	left: 1rem;
	top: 1rem;
}

.rt-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.rt-site__main {
	flex: 1;
}

.rt-page {
	padding-block: var(--rt-space-lg);
}

.rt-page__title {
	margin: 0 0 var(--rt-space-md);
	font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.rt-page__content > *:first-child {
	margin-top: 0;
}

.rt-page__cta {
	margin-top: var(--rt-space-md);
}

.rt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.4rem;
	border: 2px solid var(--rt-color-wood);
	background: var(--rt-color-forest);
	color: var(--rt-color-cream);
	font-family: var(--rt-font-display);
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--rt-transition), color var(--rt-transition), border-color var(--rt-transition);
}

.rt-button:hover,
.rt-button:focus-visible {
	background: var(--rt-color-coffee);
	border-color: var(--rt-color-gold);
	color: var(--rt-color-cream);
}

.rt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 404 plein écran : masquer chrome site */
body.raid-tolkien--404 {
	background: #f0e0bc;
}

body.raid-tolkien--404 .rt-site {
	display: block;
	min-height: 100vh;
	min-height: 100dvh;
}

body.raid-tolkien--404 .site-header,
body.raid-tolkien--404 .site-footer,
body.raid-tolkien--404 .site-header__subnav {
	display: none;
}

body.raid-tolkien--404 .rt-site__main {
	padding: 0;
}

@media (max-width: 720px) {
	body:not(.raid-tolkien--404) {
		font-size: 1rem;
		/* Couleur seule : le fond illustré est dans le hero (évite un 2e téléchargement). */
		background-color: #f3dbb5;
	}

	.rt-container {
		width: min(100% - 1.25rem, var(--rt-max-width));
	}

	.rt-page {
		padding-block: var(--rt-space-md);
	}

	.rt-button {
		width: 100%;
		max-width: 22rem;
		padding: 0.7rem 1.1rem;
		font-size: 0.88rem;
	}
}

@media (max-width: 480px) {
	.rt-page__title {
		font-size: clamp(1.45rem, 7vw, 1.9rem);
	}
}
