/* ============================================================
   Cards.css – Composants : cartes personnages, scénarios,
               timeline, badges, boutons, narrative, impacts
   ============================================================ */

/* ── Section header (page accueil) ──────────────────────────── */
.section-header {
	text-align: center;
	margin-bottom: 0.5rem;
}
.section-title {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 0.5rem;
}
.section-subtitle {
	font-size: 0.95rem;
	color: var(--text-muted);
	max-width: 600px;
	margin-inline: auto;
	line-height: 1.6;
}

/* ── Grille personnages ─────────────────────────────────────── */
/* Grille des personnages */
.character-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

/* Input radio caché */
.choice-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* Carte de base */
.character-card {
	display: block;
	position: relative;
	padding: 1.25rem;
	border-radius: 1rem;
	border: 2px solid #e2e8f0;
	background: #ffffff;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
	cursor: pointer;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		border-color 0.15s ease;
}

/* Effet hover */
.character-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

/* Etat sélectionné via le radio */
.choice-input:checked + .character-card {
	border-color: #0ea5e9;
	box-shadow:
		0 0 0 4px rgba(14, 165, 233, 0.18),
		0 18px 40px rgba(15, 23, 42, 0.15);
}
/* Haut de la carte : avatar + texte */
.character-card__top {
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* Avatar rond avec dégradé clair */
.character-avatar {
	width: 72px;
	height: 72px;
	border-radius: 999px;
	flex-shrink: 0;
	background: radial-gradient(circle at 30% 20%, #ffffff, #e0f2fe);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.3rem;
	color: #1f2937;
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}

/* Nom */
.character-name {
	font-size: 1.2rem;
	font-weight: 800;
	color: #0f172a;
}

/* Texte descriptif */
.character-meta {
	margin-top: 0.25rem;
	font-size: 0.9rem;
	color: #64748b;
	line-height: 1.6;
}

/* Bouton "Suivre ..." */
.btn-follow {
	display: flex;
	justify-content: center;
	margin-top: 1rem;
	width: 100%;
	border: none;
	border-radius: 0.75rem;
	padding: 0.7rem 1rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: #ffffff;
	background: #0ea5e9;
	cursor: pointer;
	transition:
		opacity 0.15s ease,
		transform 0.1s ease;
}

.btn-follow:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.btn-follow:active {
	transform: translateY(0);
}

/* Grille des scénarios */
.scenario-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}
/* Carte scénario */
.scenario-card {
	display: block;
	position: relative;
	padding: 1.1rem 1.2rem 1.3rem;
	border-radius: 1rem;
	border: 2px solid #e2e8f0;
	background: #ffffff;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
	cursor: pointer;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		border-color 0.15s ease,
		background 0.15s ease;
}

/* Hover */
.scenario-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}
/* Nom du scénario */
.scenario-name {
	font-size: 1.05rem;
	font-weight: 800;
	color: #0f172a;
	margin-bottom: 0.4rem;
}

/* Description */
.scenario-desc {
	font-size: 0.9rem;
	color: #6b7280;
	line-height: 1.6;
	min-height: 3.5rem; /* garde la même hauteur même si le texte varie */
}
/* Ligne contenant Monde / Suisse */
.temp-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0.9rem 0 0.8rem;
}

/* Petit bloc avec valeur de température */
.temp-box {
	background: #f9fafb;
	border-radius: 0.9rem;
	padding: 0.6rem 0.7rem;
	text-align: center;
	border: 1px solid #e5e7eb;
	font-size: 0.8rem;
	color: #6b7280;
}

.temp-box strong {
	display: block;
	font-size: 1.2rem;
	font-weight: 800;
	color: #0f172a;
	margin-top: 0.15rem;
}
.scenario-code {
	margin-top: 0.4rem;
	font-size: 0.8rem;
	color: #9ca3af;
}
/* radio animation selection */
.choice-input:checked + .scenario-card {
	border-color: #0ea5e9;
	box-shadow:
		0 0 0 4px rgba(14, 165, 233, 0.18),
		0 16px 38px rgba(15, 23, 42, 0.15);
}
/* ── Timeline (sidebar page parcours) ──────────────────────── */
.timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	position: relative;
}

.timeline::before {
	content: "";
	position: absolute;
	left: 17px;
	top: 16px;
	bottom: 16px;
	width: 2px;
	background: var(--border);
	z-index: 0;
}

.timeline-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem;
	border-radius: 0.5rem;
	position: relative;
	cursor: pointer;
	transition: background 0.15s;
	z-index: 1;
	text-decoration: none;
	color: inherit;
}

.timeline-item:hover {
	background: #f8fafc;
}
.timeline-item.active {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
}

.timeline-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid var(--border);
	background: var(--card-bg);
	flex-shrink: 0;
	margin-top: 0.35rem;
}

.timeline-item.done .timeline-dot {
	background: var(--optimiste);
	border-color: var(--optimiste);
}
.timeline-item.active .timeline-dot {
	background: #3b82f6;
	border-color: #3b82f6;
}

.timeline-item .stage-name {
	font-weight: 600;
	font-size: 0.9rem;
}
.timeline-item .stage-meta {
	font-size: 0.8rem;
	color: var(--text-muted);
}

/* ── Badge "En cours" ───────────────────────────────────────── */
.badge-en-cours {
	margin-left: auto;
	background: #3b82f6;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 600;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	white-space: nowrap;
	align-self: center;
}

/* ── Badge RCP ──────────────────────────────────────────────── */
.rcp-badge {
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
}
.rcp-badge.rcp-26 {
	background: var(--optimiste);
}
.rcp-badge.rcp-45 {
	background: var(--median);
}
.rcp-badge.rcp-70,
.rcp-badge.rcp-85 {
	background: var(--pessimiste);
}

/* ── Image narrative ────────────────────────────────────────── */
.story-image {
	width: 100%;
	aspect-ratio: 16 / 5;
	object-fit: cover;
	border-radius: var(--radius);
	margin-block: 1rem;
}

/* ── Texte narratif ─────────────────────────────────────────── */
.narrative {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	font-size: 0.95rem;
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.narrative p {
	line-height: 1.8;
}
.narrative hr {
	border: none;
	border-top: 1px solid var(--border);
	margin-block: 0.25rem;
}

/* ── Impacts climatiques ────────────────────────────────────── */
.impacts-title {
	font-weight: 600;
	margin-block: 1.5rem 0.75rem;
	font-size: 1rem;
}

.impacts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
}

.impact-card {
	background: var(--card-bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.75rem 1rem;
	font-size: 0.85rem;
	box-shadow: var(--shadow);
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.impact-card .impact-name {
	font-weight: 600;
	display: block;
	margin-bottom: 0.15rem;
}
.impact-card .impact-desc {
	color: var(--text-muted);
	line-height: 1.5;
}

/* ── Boutons généraux ───────────────────────────────────────── */
.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1.5rem;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 0.5rem;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.95rem;
	transition: background 0.15s;
	text-decoration: none;
}
.btn-primary:hover {
	background: #0284c7;
	text-decoration: none;
}

.btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 1.25rem;
	border: 1px solid var(--border);
	border-radius: 0.5rem;
	background: transparent;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--text);
	transition: background 0.15s;
	text-decoration: none;
}
.btn-secondary:hover {
	background: #f8fafc;
	text-decoration: none;
}

/* ── Icônes température (onglets scénarios) ─────────────────── */
.temp-globe {
	color: var(--accent);
}
.temp-swiss {
	color: var(--pessimiste);
}

.temp-icon {
	display: inline-flex;
	align-items: center;
	gap: 0.15rem;
	font-weight: 600;
}
