/* ==========================================================================
   RHT Header — Red Hot Talents
   Header maison (HTML/CSS/JS), sans extension. Chargé par mu-plugins/rht-header.php
   ========================================================================== */

:root {
	--rht-red: #f0493e;
	--rht-white: #fff;
	--rht-max: 1360px;
	--rht-gutter: 40px;
	--rht-top: 0px;
	--rht-ease: cubic-bezier(.7, 0, .3, 1);
}

body.admin-bar { --rht-top: 32px; }
@media (max-width: 782px) { body.admin-bar { --rht-top: 46px; } }

/* ---------- Header ---------- */

.rht-header {
	position: fixed;
	top: var(--rht-top);
	left: 0;
	right: 0;
	z-index: 1000;
	pointer-events: none; /* seule la barre capte les clics */
	transform: translateY(0);
	transition: transform .45s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}

.rht-header.is-hidden {
	transform: translateY(calc(-100% - var(--rht-top) - 10px));
}

.rht-header *,
.rht-header *::before,
.rht-header *::after,
.rht-menu *,
.rht-menu *::before,
.rht-menu *::after {
	box-sizing: border-box;
}

.rht-header__bar {
	pointer-events: auto;
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	width: calc(100% - 2 * var(--rht-gutter));
	max-width: var(--rht-max);
	margin: 0 auto;
	padding: 15px 30px 12px 35px;
	border: 1px solid rgba(18, 18, 18, .08);
	border-top: 0;
	border-radius: 0 0 45px 45px;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	isolation: isolate;
}

/* voile sombre (identique à l'original : noir 14 %) */
.rht-header__bar::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: #000;
	opacity: .14;
	transition: opacity .35s ease;
	pointer-events: none;
}

/* Au-dessus d'un fond clair (détecté en JS), le même header prend un voile
   plus soutenu pour que le menu blanc reste lisible. */
.rht-header.is-on-light .rht-header__bar::before { opacity: .55; }

/* ---------- Logo ---------- */

.rht-header__logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	width: 145px;
	line-height: 0;
}

.rht-header__logo img {
	display: block;
	width: 94px;
	height: auto;
	max-width: none;
}

/* ---------- Navigation ---------- */

.rht-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.rht-header__nav ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rht-header__nav li { margin: 0; padding: 0; }

.rht-header .rht-header__nav a {
	position: relative;
	display: flex;
	align-items: center;
	padding: 10px 20px;
	font-family: "Kanit", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: var(--rht-white);
}

/* soulignement au survol (comme « hover-pointer-underline ») */
.rht-header .rht-header__nav a::after {
	content: "";
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 6px;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .35s ease;
}

.rht-header .rht-header__nav a:hover::after,
.rht-header .rht-header__nav a:focus-visible::after,
.rht-header .rht-header__nav a[aria-current="page"]::after {
	transform: scaleX(1);
	transform-origin: left center;
}

.rht-header .rht-header__nav a:hover,
.rht-header .rht-header__nav a:focus { color: var(--rht-white); }

/* ---------- Boutons ---------- */

.rht-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.rht-header .rht-btn-tel {
	display: inline-flex;
	align-items: center;
	height: 45px;
	padding: 0 24px;
	border: 2px solid var(--rht-red);
	border-radius: 60px;
	background: transparent;
	font-family: "Instrument Sans", sans-serif;
	font-size: 17px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	color: var(--rht-red);
	transition: background-color .3s ease, color .3s ease;
}

.rht-header .rht-btn-tel:hover,
.rht-header .rht-btn-tel:focus-visible {
	background: var(--rht-red);
	color: var(--rht-white);
}

.rht-header .rht-btn-cta {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--rht-white);
}

.rht-btn-cta__label {
	display: inline-flex;
	align-items: center;
	height: 45px;
	padding: 5px 15px;
	border-radius: 50px;
	background: var(--rht-red);
	font-family: "Instrument Sans", sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--rht-white);
}

.rht-btn-cta__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 45px;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	background: var(--rht-red);
	color: var(--rht-white);
	transition: margin .5s ease, opacity .5s ease, transform .5s ease;
}

.rht-btn-cta__icon svg { width: 15px; height: 15px; display: block; }

/* flèche d'entrée (cachée) et de sortie (visible) : elles s'échangent au survol */
.rht-btn-cta__icon--in {
	margin-right: -45px;
	opacity: 0;
	transform: scale(.5);
}

.rht-btn-cta__icon--out { margin-left: 1px; }

.rht-header .rht-btn-cta:hover .rht-btn-cta__icon--in,
.rht-header .rht-btn-cta:focus-visible .rht-btn-cta__icon--in {
	margin-right: 1px;
	opacity: 1;
	transform: scale(1);
}

.rht-header .rht-btn-cta:hover .rht-btn-cta__icon--out,
.rht-header .rht-btn-cta:focus-visible .rht-btn-cta__icon--out {
	margin-left: -45px;
	opacity: 0;
	transform: scale(.5);
}

/* ---------- Burger (mobile / tablette) ---------- */

.rht-header .rht-header__burger {
	display: none;
	position: relative;
	flex: 0 0 auto;
	width: 43px;
	height: 43px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 30px;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	color: var(--rht-white);
}

.rht-header__burger span {
	position: absolute;
	right: 4px;
	height: 2px;
	background: currentColor;
	transition: width .3s ease;
}

.rht-header__burger span:nth-child(1) { top: 13px; width: 10px; }
.rht-header__burger span:nth-child(2) { top: 20px; width: 20px; }
.rht-header__burger span:nth-child(3) { top: 27px; width: 30px; }

.rht-header__burger:hover span,
.rht-header__burger:focus-visible span { width: 30px; }

/* ---------- Focus clavier ---------- */

.rht-header a:focus-visible,
.rht-header button:focus-visible,
.rht-menu a:focus-visible,
.rht-menu button:focus-visible {
	outline: 2px solid var(--rht-white);
	outline-offset: 3px;
}

/* ---------- Espace réservé (desktop : l'ancien header occupait le flux) ---------- */

.rht-header-spacer { height: 84px; }

/* ---------- Laptop ---------- */

@media (max-width: 1366px) {
	.rht-header__bar { padding: 20px 30px; }
	.rht-header__logo { width: 120px; }
	.rht-header-spacer { height: 96px; }
	.rht-header .rht-header__nav a { padding: 10px 12px; }
	.rht-header .rht-header__nav a::after { left: 12px; right: 12px; }
}

/* ---------- Tablette & mobile ---------- */

@media (max-width: 1200px) {
	.rht-header { padding: 10px; }
	.rht-header.is-hidden { transform: translateY(calc(-100% - var(--rht-top) - 10px)); }

	.rht-header__bar {
		width: 100%;
		max-width: none;
		min-height: 72px;
		padding: 8px 18px 8px 22px;
		border: 0;
		border-radius: 30px;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.rht-header__bar::before,
	.rht-header.is-on-light .rht-header__bar::before { opacity: .49; }

	.rht-header__nav,
	.rht-header__actions { display: none; }

	.rht-header .rht-header__burger { display: block; }

	.rht-header-spacer { display: none; }
}

/* ==========================================================================
   Menu mobile plein écran
   ========================================================================== */

.rht-menu {
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background-color: #fff;
	background-position: center;
	background-size: cover;
	transform: translateY(-100%);
	visibility: hidden;
	transition: transform .8s var(--rht-ease), visibility 0s linear .8s;
}

.rht-menu.is-open {
	transform: translateY(0);
	visibility: visible;
	transition: transform .8s var(--rht-ease), visibility 0s linear 0s;
}

.rht-menu .rht-menu__close {
	position: absolute;
	top: calc(10px + var(--rht-top));
	right: 10px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
	cursor: pointer;
}

.rht-menu__close::before,
.rht-menu__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2px;
	margin: -1px 0 0 -10px;
	background: var(--rht-red);
	border-radius: 2px;
}

.rht-menu__close::before { transform: rotate(45deg); }
.rht-menu__close::after { transform: rotate(-45deg); }

.rht-menu__inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	max-width: 480px;
	min-height: 100%;
	margin: 0 auto;
	padding: calc(10px + var(--rht-top)) 30px 40px;
}

.rht-menu .rht-menu__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 120px;
	line-height: 0;
}

.rht-menu__logo img { display: block; width: 130px; height: auto; max-width: none; }

.rht-menu__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.rht-menu .rht-card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100px;
	padding: 10px;
	overflow: hidden;
	border-radius: 30px;
	background-color: #333;
	background-position: center;
	background-size: cover;
	text-decoration: none;
	isolation: isolate;
}

.rht-card--top { background-position: center top; }

.rht-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: #000;
	opacity: .5;
	transition: opacity .3s ease;
}

.rht-menu .rht-card:hover::before,
.rht-menu .rht-card:focus-visible::before { opacity: .35; }

.rht-card span {
	font-family: "Kanit", sans-serif;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	color: #fff;
}

/* entrée en cascade des cartes */
.rht-menu .rht-card {
	opacity: 0;
	transform: translateY(-12px);
	transition: opacity .4s ease, transform .4s ease;
}

.rht-menu.is-open .rht-card {
	opacity: 1;
	transform: none;
	transition-delay: calc(.35s + var(--i, 0) * .07s);
}

/* verrouillage du défilement quand le menu est ouvert */
html.rht-menu-open,
html.rht-menu-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.rht-header,
	.rht-menu,
	.rht-menu .rht-card,
	.rht-btn-cta__icon { transition: none !important; }
}
