/* --- VARIABLES ET THÈME --- */
:root {
	--bg-color: #121214;
	--card-bg: #1a1a1e;
	--accent-color: #daa520;
	--accent-hover: #f5c443;
	--text-color: #e0e0e6;
	--text-muted: #a0a0aa;
	--border-color: #33333a;
	--font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- RESET & BASES --- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	font-family: var(--font-main);
	line-height: 1.6;
	position: relative;
}

a {
	color: var(--accent-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover {
	color: var(--accent-hover);
}

/* --- HEADER & HERO --- */
header {
	background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('../assets/banner.jpg') no-repeat center center/cover;
	padding: 1rem;
	text-align: center;
	border-bottom: 2px solid var(--accent-color);
}

header h1 {
	font-size: 3rem;
	color: var(--accent-color);
	text-transform: uppercase;
	letter-spacing: 3px;
	margin-bottom: 0.5rem;
	text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* --- NAVIGATION --- */
nav {
	background-color: var(--card-bg);
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--border-color);
	box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

nav .burger-menu {
	border-top: solid 1px var(--accent-color);
	display: none;
}

nav .burger-menu button {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	width: 30px;
	height: 25px;
	background: transparent;
	border: none;
	cursor: pointer;
	margin: 10px auto;
}

nav .burger-menu button span {
	width: 100%;
	height: 3px;
	background: var(--accent-color);
	border-radius: 10px;
	transition: 0.3s;
}

nav .burger-menu button.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

nav .burger-menu button.open span:nth-child(2) {
  opacity: 0;
}

nav .burger-menu button.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

nav ul {
	display: flex;
	justify-content: center;
	list-style: none;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
}

nav ul li {
	margin: 0 1.5rem;
	font-weight: bold;
	text-transform: uppercase;
	font-size: 0.9rem;
	letter-spacing: 1px;
	color: var(--accent-color);
	text-decoration: none;
	transition: color 0.3s ease;
	/*cursor: pointer;*/
}

nav ul li:hover {
	color: var(--accent-hover);
}

/* --- CONTENEUR PRINCIPAL --- */
.container {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 1.5rem;
}

section {
	margin-bottom: 4rem;
	scroll-margin-top: 80px; /* Évite que le menu cache le titre lors du clic */
}

h2 {
	font-size: 2rem;
	color: var(--accent-color);
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem;
	position: relative;
}

h2::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 60px;
	height: 2px;
	background-color: var(--accent-color);
}

/* --- GRILLES & CARTES (PAYS / PERSONNAGES) --- */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.grid.personalities {
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
	background-color: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.grid.personalities .card {
	min-height: 430px;
}

.card:hover {
	border-color: var(--accent-color);
}

.card-img {
	width: 100%;
	height: 200px;
	background-color: #2a2a30;
	object-fit: cover;
}

.card-content {
	padding: 1.5rem;
}

.card-content[data-navigate]:hover {
	border-color: var(--accent-color);
}

.card-content.reduced {
	background-color: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	min-height: 164px;
}

.card-content h3 {
	color: var(--accent-color);
	margin-bottom: 0.5rem;
}

.card-content h4 {
	color: var(--accent-color);
	margin-top: -0.5rem;
	margin-bottom: 0.5rem;
	text-transform: capitalize;
}

.card-content.reduced .star::before {
	color: var(--accent-color);
	margin-right: 8px;
	content: "✦";
}

.badge {
	display: inline-block;
	background-color: rgba(218, 165, 32, 0.1);
	color: var(--accent-color);
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	font-size: 0.8rem;
	margin-bottom: 1rem;
	border: 1px solid rgba(218, 165, 32, 0.3);
}

/* --- TIMELINE (HISTOIRE) --- */
.timeline {
	position: relative;
	padding-left: 2rem;
	border-left: 2px solid var(--border-color);
}

.timeline-item {
	position: relative;
	margin-bottom: 1.6rem;
}

.timeline-item::before {
	content: '';
	position: absolute;
	left: calc(-2rem - 6px);
	top: 10px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--accent-color);
	box-shadow: 0 0 8px var(--accent-color);
}

.timeline-date {
	font-weight: bold;
	color: var(--accent-color);
	margin-bottom: 0.2rem;
}

/* --- WIP --- */
.wip {
	display: flex;
	margin-left: 50%;
    transform: translateX(-50%);
	width: calc(1091px * 0.4);
	height: calc(1500px * 0.4);
	background: url(/assets/WIP.jpg) no-repeat center center/cover;
	position: relative;
	top: 0;
}

/* --- DIALOG ---*/
.backdrop {
	backdrop-filter: blur( 2px );
	background-color: #99999966;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 120%;
	z-index: 200;
	display: none;
}

.dialog {
	display: none;
	position: fixed;
	z-index: 300;
	max-width: 1200px;
	width: calc(100% - 4rem);
	height: calc(100vh - 4rem);
	background-color: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	overflow: hidden;
	padding: 0 1.5rem;
	top: 2rem;
	left: 50%;
    transform: translateX(-50%);
}

.dialog .content {
	padding-bottom: 2rem;
    max-height: calc(100% - 7rem);
    overflow-y: auto;
}

.dialog .content p {
    margin-bottom: 1rem;
}

.dialog .content p:last-child {
    margin-bottom: 0;
}

.close {
	position: absolute;
	z-index: 400;
	cursor: pointer;
	top: -1.2rem;
	right: 0.5rem;
}

.close:after {
	display: inline-block;
	font-size: 3rem;
	color: var(--accent-color);
	content: "\00d7";
	cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 820px) {
	header
	{
		padding: 0;
	}
	header h1
	{
		font-size: 1.6rem;
		line-height: normal;
	}
	nav .burger-menu {
		display: flex;
	}
	nav ul
	{
		display: none;
		flex-direction: column;
		align-items: center;
		opacity: 0;
		transition: opacity 0.2s linear 0.2s;
	}
	nav ul.active
	{
		display: flex;
	}
	nav ul.active.visible
	{
		opacity: 1;
	}
	nav ul li
	{
		margin: 0.5rem 0;
	}
	.container {
		margin: 1rem auto;
	}
}