/* ==========================================================================
   Fiches détaillées ([id]) : Écuries, Pilotes, Circuits
   ========================================================================== */

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	font-size: 0.88rem;
	color: var(--text-muted);
	margin-bottom: 1.25rem;
}

.detail-banner {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, color-mix(in srgb, var(--team-color, var(--f1-red)) 20%, var(--bg-surface)) 0%, var(--bg-surface) 75%);
	border: 1px solid var(--border-color);
	border-left: 6px solid var(--team-color, var(--f1-red));
	border-radius: var(--radius-lg);
	padding: 1.85rem;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.75rem;
	animation: fadeSlideUp 0.45s ease both;
}

.detail-banner::after {
	content: "";
	position: absolute;
	top: -30%;
	right: -5%;
	width: 170px;
	height: 160%;
	background: linear-gradient(180deg, color-mix(in srgb, var(--team-color, var(--f1-red)) 18%, transparent), transparent);
	transform: skewX(-18deg);
	pointer-events: none;
}

/* Duel interne coéquipiers & Jauge de note */
.duel-bars {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin-bottom: 2rem;
}

.duel-bar-row {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 1rem 1.25rem;
}

.duel-bar-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
	font-weight: 700;
}

.meter-track {
	height: 10px;
	background-color: var(--bg-elevated);
	border-radius: 999px;
	overflow: hidden;
}

.meter-fill {
	height: 100%;
	width: var(--pct, 0%);
	background: linear-gradient(90deg, var(--team-color, var(--f1-red)), color-mix(in srgb, var(--team-color, var(--f1-red)) 65%, #ffffff));
	border-radius: 999px;
}

.wins-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.driver-hero-photo {
	width: 170px;
	height: 205px;
	object-fit: cover;
	object-position: top center;
	border-radius: 12px;
	border: 3px solid var(--team-color, var(--f1-red));
	flex-shrink: 0;
}

.circuit-hero-map {
	width: 260px;
	max-width: 100%;
	padding: 0.75rem;
	background-color: #f1f5f9;
	border-radius: 10px;
	border: 1px solid var(--border-color);
	object-fit: contain;
	flex-shrink: 0;
}

.detail-specs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-bottom: 2rem;
}

.spec-item {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 1rem;
}

.spec-label {
	display: block;
	font-size: 0.8rem;
	text-transform: uppercase;
	color: var(--text-muted);
}

.spec-value {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--text-primary);
}

.quote-box {
	background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
	border: 1px solid var(--border-color);
	border-left: 5px solid var(--team-color, var(--f1-red));
	border-radius: var(--radius-md);
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.75rem;
	font-size: 1.1rem;
	font-style: italic;
	color: var(--text-primary);
}

.quote-box footer {
	margin-top: 0.45rem;
	font-style: normal;
	font-size: 0.85rem;
	color: var(--text-muted);
}

.story-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.15rem;
	margin-bottom: 2rem;
}

.story-card {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 1.35rem;
}

.story-card h2,
.story-card h3 {
	margin-top: 0;
	margin-bottom: 0.55rem;
	font-size: 1.1rem;
	color: var(--text-primary);
}

.story-card p {
	margin: 0;
}

.history-box {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-left: 4px solid var(--f1-red);
	border-radius: var(--radius-md);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.article-points {
	margin-bottom: 1.5rem;
}

.article-points ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
	color: var(--text-muted);
}

.article-body p:last-child {
	margin-bottom: 0;
}

.comments-list {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin-bottom: 2rem;
}

.comment-card {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 1rem 1.25rem;
}

.comment-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.45rem;
}

.comment-header small {
	margin-left: auto;
	color: var(--text-muted);
}

.comment-card p {
	margin: 0;
}

@media (max-width: 900px) {
	.detail-specs {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.detail-banner {
		padding: 1.25rem;
		flex-direction: column;
		align-items: flex-start;
	}

	.detail-specs,
	.story-grid {
		grid-template-columns: 1fr;
	}
}
