/* ==========================================================================
   YP Destinations — en-tête (templates/header.php)
   Tout est préfixé .yp-… : rien ne touche le reste du site.
   Valeurs mesurées sur ypchef.com : menu Poppins 500 14 px capitales, bouton Arial 700,
   or #C8AD7F, filets #DEE2E6.
   Spécificité volontairement > aux règles globales d'Elementor (.elementor-kit-134 a, a:hover) et de Neve (button).
   ========================================================================== */

.yp-hdr,
.yp-panel {
	--yp-white: #ffffff;
	--yp-black: #000000;
	--yp-gold: #c8ad7f;
	--yp-line: #dee2e6;
	--yp-poppins: "Poppins", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	font-family: var(--yp-poppins);
	font-weight: 400;
	line-height: 1.6;
	color: var(--yp-black);
}
.yp-hdr *,
.yp-panel * {
	box-sizing: border-box;
}

/* --- bloc logo / bouton / hamburger ------------------------------------- */
.yp-hdr {
	background: var(--yp-white);
	position: relative;
	z-index: 5;
}
.yp-hdr-in {
	max-width: 1500px;
	margin: 0 auto;
	padding: 6px 28px 0;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}
.yp-hdr .yp-hdr-in > a.yp-hdr-btn {
	grid-column: 1;
	justify-self: start;
	display: none; /* ordinateur : le bouton est dans la ligne du menu */
}
.yp-hdr-in > .yp-logo {
	grid-column: 2;
	justify-self: center;
	display: block;
	width: 120px;
	line-height: 0;
	text-decoration: none;
}
.yp-logo img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0;
}
.yp-logo-text {
	font-family: var(--yp-poppins);
	font-weight: 600;
	font-size: 22px;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--yp-black);
}
.yp-hdr .yp-hdr-in > .yp-hdr-right {
	grid-column: 3;
	justify-self: end;
	display: none; /* ordinateur : ni drapeaux ni hamburger, ils sont dans le menu */
	align-items: center;
	gap: 14px;
}
.yp-hdr .yp-hdr-right button.yp-burger {
	display: grid;
}
/* Drapeau de l'autre langue, à côté du hamburger sur mobile. */
.yp-hdr a.yp-lang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 26px;
	max-width: 40px; /* garde-fou : rien ne peut pousser le hamburger hors de l'écran */
	height: 34px;
	padding: 0 2px;
	overflow: hidden;
	white-space: nowrap;
	text-decoration: none;
	line-height: 1;
	font-size: 0; /* neutralise un éventuel texte parasite */
}
.yp-hdr a.yp-lang img,
.yp-hdr a.yp-lang svg.yp-flag {
	display: block;
	width: 24px;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none; /* pas de cadre : le drapeau se suffit à lui-même */
}
.yp-hdr a.yp-lang svg.yp-flag {
	aspect-ratio: 3 / 2;
}
.yp-hdr .yp-hdr-right button.yp-burger {
	flex: 0 0 auto;
}
.yp-hdr a.yp-lang .yp-lang-code {
	font-family: var(--yp-poppins);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.5px;
	color: var(--yp-black);
}

/* --- menu ordinateur : sous le logo, centré, bouton à droite ------------ */
.yp-nav-wrap {
	max-width: 1500px;
	margin: 0 auto;
	padding: 10px 28px 14px;
}
ul.yp-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.yp-nav li {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.yp-nav > li {
	position: relative;
}
ul.yp-nav > li > a {
	display: block;
	padding: 2px 14px;
	font-family: var(--yp-poppins);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.6;
	text-transform: uppercase;
	letter-spacing: normal;
	color: var(--yp-black);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s;
}
ul.yp-nav > li > a:hover,
ul.yp-nav > li > a:focus,
ul.yp-nav > li.current-menu-item > a,
ul.yp-nav > li.current-menu-ancestor > a,
ul.yp-nav > li.current-menu-parent > a {
	color: var(--yp-gold);
	text-decoration: none;
}
/* chevron des entrées à sous-menu (« Mes Prestations ») */
ul.yp-nav > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	margin: 0 0 3px 8px;
}
ul.yp-nav ul.yp-sub {
	position: absolute;
	top: 100%;
	left: 0;
	right: auto;
	min-width: 240px;
	background: var(--yp-white);
	list-style: none;
	margin: 0;
	padding: 8px 0;
	border: 1px solid var(--yp-line);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	display: none;
	opacity: 1;
	visibility: visible;
	z-index: 10;
}
ul.yp-nav > li:hover > ul.yp-sub,
ul.yp-nav > li:focus-within > ul.yp-sub {
	display: block;
}
ul.yp-nav ul.yp-sub a {
	display: block;
	padding: 9px 18px;
	font-family: var(--yp-poppins);
	font-weight: 400;
	font-size: 13.5px;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--yp-black);
	text-decoration: none;
	white-space: nowrap;
}
ul.yp-nav ul.yp-sub a:hover,
ul.yp-nav ul.yp-sub a:focus,
ul.yp-nav ul.yp-sub li.current-menu-item > a {
	color: var(--yp-gold);
}
/* même sécurité que pour le panneau mobile (voir plus bas) */
ul.yp-nav > li > a,
ul.yp-nav ul.yp-sub a {
	-webkit-text-fill-color: currentColor;
}
/* drapeaux du sélecteur de langue Polylang */
ul.yp-nav img,
ul.yp-panel-menu img {
	display: inline-block;
	width: 16px;
	height: 11px;
	vertical-align: middle;
	margin: 0;
}
ul.yp-nav > li.yp-navcta {
	margin-left: 12px;
}
/* le bouton du site (Arial 700 blanc sur or), en 14 px pour tenir dans la ligne du menu */
ul.yp-nav > li.yp-navcta > a.yp-btn {
	padding: 6px 12px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 14px;
	color: var(--yp-white);
}
ul.yp-nav > li.yp-navcta > a.yp-btn:hover,
ul.yp-nav > li.yp-navcta > a.yp-btn:focus {
	color: var(--yp-gold);
}

/* --- bouton CONTACTEZ-MOI : le bouton principal du site ------------------ */
.yp-hdr a.yp-btn,
.yp-panel a.yp-btn {
	display: inline-block;
	white-space: nowrap;
	background: var(--yp-gold);
	color: var(--yp-white);
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.6;
	text-transform: uppercase;
	letter-spacing: normal;
	text-decoration: none;
	padding: 8px 12px;
	border: 1px solid var(--yp-white);
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.yp-hdr a.yp-btn:hover,
.yp-hdr a.yp-btn:focus,
.yp-panel a.yp-btn:hover,
.yp-panel a.yp-btn:focus {
	background: transparent;
	color: var(--yp-gold);
	border-color: var(--yp-gold);
	text-decoration: none;
}

/* --- hamburger et panneau (mobile / tablette) ---------------------------- */
.yp-hdr button.yp-burger,
.yp-hdr button.yp-burger:hover,
.yp-hdr button.yp-burger:focus {
	width: 42px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--yp-black);
	border-radius: 0;
	background: var(--yp-white);
	color: var(--yp-black);
	box-shadow: none;
	display: grid;
	place-items: center;
	cursor: pointer;
}
.yp-burger span {
	display: block;
	width: 16px;
	height: 1.6px;
	background: var(--yp-black);
	box-shadow: 0 -5px 0 var(--yp-black), 0 5px 0 var(--yp-black);
}
.yp-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	height: 100dvh;
	width: min(360px, 88vw);
	background: var(--yp-white);
	z-index: 100001;
	transform: translateX(100%);
	transition: transform 0.3s;
	box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
	overflow-y: auto;
	padding: 26px 30px 40px;
}
.yp-panel.yp-open {
	transform: none;
}
.yp-panel button.yp-close,
.yp-panel button.yp-close:hover,
.yp-panel button.yp-close:focus {
	position: absolute;
	top: 16px;
	right: 18px;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--yp-black);
	border-radius: 0;
	background: var(--yp-white);
	color: var(--yp-black);
	box-shadow: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
}
ul.yp-panel-menu {
	list-style: none;
	margin: 48px 0 0;
	padding: 0;
}
ul.yp-panel-menu li {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.yp-panel-menu > li {
	border-bottom: 1px solid var(--yp-line);
}
ul.yp-panel-menu > li > a {
	display: block;
	padding: 14px 0;
	font-family: var(--yp-poppins);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--yp-black);
	text-decoration: none;
}
ul.yp-panel-menu ul.yp-sub {
	list-style: none;
	margin: 0 0 10px;
	padding: 0 0 0 16px;
	display: block;
	position: static;
	background: transparent;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
}
ul.yp-panel-menu ul.yp-sub li {
	border: 0;
}
ul.yp-panel-menu ul.yp-sub a {
	display: block;
	padding: 8px 0;
	font-family: var(--yp-poppins);
	font-weight: 400;
	font-size: 14px;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--yp-black);
	text-decoration: none;
}
.yp-panel ul.yp-panel-menu a:hover,
.yp-panel ul.yp-panel-menu li.current-menu-item > a,
.yp-panel ul.yp-panel-menu li.current-menu-ancestor > a {
	color: var(--yp-gold);
}

/* Couleur du menu du panneau forcée : sur iOS/Safari, les liens des sous-menus héritaient
   d'une couleur claire du thème et devenaient illisibles. -webkit-text-fill-color couvre
   le cas où seule cette propriété (et non `color`) est héritée sur WebKit. */
.yp-panel ul.yp-panel-menu a,
.yp-panel ul.yp-panel-menu ul.yp-sub a {
	color: var(--yp-black) !important;
	-webkit-text-fill-color: var(--yp-black) !important;
	opacity: 1 !important;
	visibility: visible !important;
}
.yp-panel ul.yp-panel-menu a:hover,
.yp-panel ul.yp-panel-menu a:focus,
.yp-panel ul.yp-panel-menu li.current-menu-item > a,
.yp-panel ul.yp-panel-menu li.current-menu-ancestor > a {
	color: var(--yp-gold) !important;
	-webkit-text-fill-color: var(--yp-gold) !important;
}
/* Le bouton du panneau garde son texte blanc sur fond or. */
.yp-panel a.yp-panel-btn {
	color: var(--yp-white) !important;
	-webkit-text-fill-color: var(--yp-white) !important;
}
.yp-panel a.yp-panel-btn:hover,
.yp-panel a.yp-panel-btn:focus {
	color: var(--yp-gold) !important;
	-webkit-text-fill-color: var(--yp-gold) !important;
}
/* Sous-menu : fond explicite et léger filet, pour qu'il se distingue du niveau principal. */
.yp-panel ul.yp-panel-menu ul.yp-sub {
	background: var(--yp-white) !important;
	border-left: 1px solid var(--yp-line);
	margin-left: 2px;
	padding-left: 14px;
}
.yp-panel a.yp-panel-btn {
	margin-top: 24px;
}
.yp-veil {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 100000;
	display: none;
}
.yp-veil.yp-open {
	display: block;
}

/* --- en-tête collant : se cache en descendant, revient en remontant (toutes tailles) --- */
/* Neve met overflow:hidden sur .wrapper hors pages Elementor, ce qui neutralise position:sticky. */
html body.yp-header > .wrapper {
	overflow: visible;
}
body.yp-header header.header {
	position: sticky;
	top: 0;
	z-index: 900;
	transition: transform 0.25s ease;
}
body.yp-header.admin-bar header.header {
	top: 32px;
}
body.yp-header header.header.yp-hide {
	transform: translateY(-100%);
}
.yp-hdr {
	box-shadow: 0 1px 0 var(--yp-line);
}

/* Bouton « Retour en haut » du thème Neve : masqué sur les pages destination
   (le sticky du menu rend le retour en haut inutile ; le bouton WhatsApp reste seul en bas à droite).
   Réglage global du thème inchangé : le bouton reste présent sur le reste du site. */
body.yp-destination-page #scroll-to-top {
	display: none !important;
}

/* --- ≤ 1100 px (tablette en paysage) : menu plus serré pour rester sur une ligne --- */
@media (max-width: 1100px) {
	ul.yp-nav > li > a {
		padding: 2px 8px;
		font-size: 13px;
	}
	ul.yp-nav > li.yp-navcta {
		margin-left: 6px;
	}
	ul.yp-nav > li.yp-navcta > a.yp-btn {
		font-size: 13px;
		padding: 5px 10px;
	}
}

@media (max-width: 960px) {
	.yp-nav-wrap {
		padding-left: 12px;
		padding-right: 12px;
	}
	ul.yp-nav > li > a {
		padding: 2px 6px;
		font-size: 12.5px;
	}
}

/* --- ≤ 900 px : bouton / logo 110 px / hamburger ------------------------- */
@media (max-width: 900px) {
	.yp-nav-wrap {
		display: none;
	}
	.yp-hdr-in {
		gap: 10px;
		padding: 10px 16px;
	}
	.yp-hdr .yp-hdr-in > a.yp-hdr-btn {
		display: inline-block;
		padding: 6px 9px;
		font-size: 12px;
	}
	.yp-hdr-in > .yp-logo {
		width: 110px;
	}
	.yp-hdr .yp-hdr-in > .yp-hdr-right {
		display: flex;
	}
}
@media (max-width: 782px) {
	body.yp-header.admin-bar header.header {
		top: 46px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.yp-panel,
	body.yp-header header.header,
	.yp-hdr a.yp-btn,
	ul.yp-nav > li > a {
		transition: none;
	}
}


/* --- badge reCAPTCHA -----------------------------------------------------
   Le formulaire WPForms charge reCAPTCHA, dont le badge flottant se plaçait
   derrière le bouton WhatsApp. On le masque sur nos pages : Google l'autorise
   à condition d'afficher la mention légale, que la page porte sous le formulaire. */
body.yp-destination-page .grecaptcha-badge {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Entrées de langue ajoutées au menu par Polylang.
   Elles font double emploi avec notre drapeau, à droite du logo, et ce sont des
   images de 16 px : exactement le défaut de pixellisation corrigé en passant au
   SVG. On les masque sur nos pages seulement, cette feuille n'étant chargée que
   là. Le menu de Yohann n'est pas modifié : les entrées restent en place, et
   réapparaissent si l'extension est désactivée. */
.yp-hdr ul.yp-nav > li.lang-item,
.yp-panel ul.yp-panel-menu > li.lang-item {
	display: none;
}
