/* ==========================================================================
   hero.css — Hero Player Profile Section & Achievement Cards
   Part of the Romain Recovery theme stylesheet.
   ========================================================================== */

/* ==========================================================================
   5. Hero — CDL Player Profile Section
   ========================================================================== */

.hero-player-section {
	position: relative;
	min-height: 100vh;
	overflow-x: clip;
	overflow-y: visible;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-color: var(--wp--preset--color--dark);
	margin-top: calc(-1 * var(--wp-admin--admin-bar--height, 0px) - 80px) !important;
	padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 80px) !important;
	margin-bottom: 0 !important;
}

/* Main content area: banner + portrait + achievements all together */
.hero-main-content {
	position: static;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 80px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
	margin-top: 0;
	margin-bottom: 0;
}

/*
 * Info banner — FULL WIDTH bordered card.
 * Content flows naturally at full width.
 * The portrait overlays on top (higher z-index) covering the right portion.
 * Exactly like the CDL reference.
 */
.hero-info-banner {
	position: relative;
	z-index: 1;
	background: var(--glass-hero);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--border-hero);
	border-top: 1px solid var(--border-glass-top);
	padding: var(--wp--preset--spacing--50);
	width: 100%;
	box-sizing: border-box;
}

/*
 * Portrait wrapper — absolute, right side.
 * Extends from ABOVE the banner top to below the achievement cards.
 * Higher z-index so it overlays the banner content on the right.
 */
.hero-portrait-wrap {
	position: absolute !important;
	right: 0%;
	top: 0;
	bottom: 0;
	width: 65%;
	z-index: 3;
	pointer-events: none;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
}

.hero-portrait-wrap .wp-block-image {
	margin: 0;
	height: 100%;
}

.hero-portrait-wrap .wp-block-image img {
	object-fit: contain;
	object-position: bottom right;
	width: auto;
	height: 100%;
	max-height: calc(100vh - 20px);
	filter: drop-shadow(0 0 60px var(--accent-20));
}

/* Gamertag / headline inside banner */
.hero-gamertag {
	font-family: var(--wp--preset--font-family--space-grotesk);
	text-transform: uppercase;
	max-width: 55%;
}

/* Role + location line inside banner */
.hero-role {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--contrast);
}

.hero-location {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
}

/* Achievement cards row — IN FRONT of the portrait */
.hero-achievements-row {
	position: relative;
	z-index: 5;
	margin-top: var(--wp--preset--spacing--70) !important;
	margin-bottom: 0 !important;
	align-items: stretch;
}

.hero-achievements-row > .wp-block-column {
	display: flex;
	flex-direction: column;
}

/* Achievement cards — CDL style (left-aligned, label + title, no radius) */
.achievement-card {
	flex: 1;
	background: var(--glass-hero);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--border-hero);
	border-top: 1px solid var(--border-glass-top);
	border-radius: 0;
	padding: var(--wp--preset--spacing--40);
	text-align: left;
	transition: border-color 0.3s ease;
}

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

.achievement-card .achievement-label {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent-mid);
	margin-bottom: 6px;
}

.achievement-card .achievement-desc {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-weight: 700;
	font-size: clamp(1rem, 1.5vw, 1.35rem);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--contrast);
	line-height: 1.3;
}

/* ==========================================================================
   Hero CTA Group + Trust Strip
   ========================================================================== */

.hero-cta-group {
	margin-top: 1.5rem;
}

.hero-cta-group .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.hero-cta-group .wp-block-button.is-style-outline .wp-block-button__link {
	background: #ffffff !important;
}

/* Desktop defaults for mobile-only elements */
.hero-cta-icon {
	display: none;
}

.hero-cta-label {
	display: inline;
}

/* ==========================================================================
   Mobile Hero — ≤768px
   Portrait covers full viewport, text overlays with gradient,
   achievement cards become checklist, CTA restyled as bottom bar.
   ========================================================================== */

@media (max-width: 768px) {

	/* ── Hero section → exact viewport height on mobile ──────────── */
	.hero-player-section {
		margin-top: 0 !important;
		padding-top: 0 !important;
		min-height: 100vh;
		min-height: 100dvh;
	}

	/* ── Dark gradient overlay for text readability ──────────────────── */
	.hero-player-section::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
		pointer-events: none;
		background: linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.65) 0%,
			rgba(0, 0, 0, 0.3) 30%,
			rgba(0, 0, 0, 0.05) 50%,
			rgba(0, 0, 0, 0.3) 70%,
			rgba(0, 0, 0, 0.8) 90%,
			rgba(0, 0, 0, 0.9) 100%
		);
	}

	/* ── Portrait → anchored bottom-right on mobile ────────────────── */
	.hero-portrait-wrap {
		position: absolute !important;
		top: 0;
		right: -17px;
		bottom: 0;
		left: auto;
		width: 100% !important;
		z-index: 0;
		display: flex !important;
		align-items: flex-end;
		justify-content: flex-end;
		pointer-events: none;
	}

	.hero-portrait-wrap .wp-block-image {
		width: auto;
		height: 100%;
		margin: 0;
	}

	.hero-portrait-wrap .wp-block-image img {
		object-fit: contain;
		object-position: bottom right;
		width: auto;
		height: 100%;
		max-height: 100%;
		filter: none;
	}

	/* ── Main content above gradient ─────────────────────────────────── */
	.hero-main-content {
		position: relative;
		z-index: 2;
		justify-content: flex-start;
		align-items: center;
		text-align: center;
		min-height: 100vh;
		min-height: 100dvh;
		padding-top: var(--wp--preset--spacing--30);
		padding-bottom: var(--wp--preset--spacing--40);
	}

	/* ── Info banner → transparent overlay, s’étire pour pousser CTA vers le bas ─ */
	.hero-info-banner {
		position: static;
		background: transparent;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		border: none;
		border-top: none;
		padding: var(--wp--preset--spacing--30) 0;
		text-align: center;
		display: flex;
		flex-direction: column;
		flex: 1;
	}

	.hero-info-banner::before {
		display: none;
	}

	/* ── Gamertag / H1 ───────────────────────────────────────────────── */
	.hero-gamertag {
		max-width: 100%;
		color: #FFFFFF !important;
		text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
	}

	/* ── Role + location line ────────────────────────────────────────── */
	.hero-role-line {
		flex-direction: column !important;		align-items: center !important;
		justify-content: center !important;		gap: 0.25rem !important;
	}

	.hero-role,
	.hero-location {
		color: #FFFFFF !important;
		text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
	}

	/* ── Achievement cards → checklist ───────────────────────────────── */
	.hero-achievements-row {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		margin-top: auto !important;
		margin-bottom: 0 !important;
		gap: 0;
	}

	.hero-achievements-row > .wp-block-column {
		flex-basis: 100% !important;
		width: 100%;
	}

	.achievement-card {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 0.5rem;
		background: transparent;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		border: none;
		border-top: none;
		padding: 0.35rem 0;
	}

	.achievement-card::before {
		display: none;
	}

	.achievement-card:hover {
		border-color: transparent;
	}

	.achievement-card .achievement-label {
		display: none;
	}

	.achievement-card .achievement-desc {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		color: #FFFFFF !important;
		text-transform: none;
		font-weight: 500;
		font-size: 0.95rem;
		letter-spacing: 0;
		text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
	}

	.achievement-card .achievement-desc::before {
		content: "";
		display: inline-flex;
		flex-shrink: 0;
		width: 22px;
		height: 22px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231AFFA3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
		background-size: contain;
		background-repeat: no-repeat;
	}

	/* ── CTA group → poussé en bas de la banner, juste au-dessus des achievements */
	.hero-cta-group {
		position: relative;
		margin-top: auto;
		margin-bottom: 0;
		background: transparent;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		border: none;
		border-radius: 0;
		padding: 0.5rem 0;
		z-index: 2;
	}

	.hero-cta-group .wp-block-buttons {
		flex-wrap: nowrap;
		gap: 0.5rem;
		align-items: stretch;
	}

	/* Primary "Réserver une séance" button */
	.hero-cta-group .wp-block-button.is-style-fill {
		flex: 1;
	}

	.hero-cta-group .wp-block-button.is-style-fill .wp-block-button__link {
		width: 100%;
		height: 50px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 10px;
		font-size: 0.95rem;
		font-weight: 700;
	}

	/* Secondary "Me contacter" → icon-only square button */
	.hero-cta-group .wp-block-button.hero-cta-contact {
		flex: 0 0 auto;
		order: -1;
	}

	.hero-cta-group .wp-block-button.hero-cta-contact .wp-block-button__link {
		width: 50px;
		height: 50px;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		border-radius: 10px;
		background: rgba(255, 255, 255, 0.08) !important;
		border: 1px solid rgba(255, 255, 255, 0.12) !important;
		color: #FFFFFF !important;
	}

	.hero-cta-group .wp-block-button.hero-cta-contact .wp-block-button__link:hover {
		background: rgba(255, 255, 255, 0.18) !important;
	}

	.hero-cta-icon {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.hero-cta-icon svg {
		width: 22px;
		height: 22px;
	}

	.hero-cta-label {
		display: none;
	}
}
