/**
 * En-tête et navigation mobile (RN_Nav_Mobile), 17/10/2026.
 * -----------------------------------------------------------------------------
 * Jusqu'à 1 024 px : ligne 1 (menu, logo, compte, panier) collée en haut de
 * l'écran ; ligne 2 (recherche) qui défile avec la page et revient par la
 * loupe de la ligne 1. Au-delà, rien ne change : l'en-tête d'ordinateur
 * reste celui du modèle Elementor.
 */

.rn-mh,
.rn-mm { display: none; }

.rn-mh,
.rn-mm {
	--mh-encre: #1A1D3E;
	--mh-encre-2: #3A4059;
	--mh-doux: #5B6178;
	--mh-trait: #ECEDF2;
	--mh-trait-2: #DADDE5;
	--mh-fond: #F7F5F2;
	--mh-orange: #D74512;
	--mh-orange-h: #FF7B4D;
	--mh-orange-fonce: #C63F10;
	--mh-orange-50: #FFF1EE;
	--mh-orange-txt: #9A3412;
	--mh-focus: #1A1D3E;
	--mh-h1: 64px;
}

/* Barre d'administration : fixe à partir de 601 px, 46 puis 32 px. */
body { --rn-mh-ab: 0px; }
@media (min-width: 601px) and (max-width: 782px) { body.admin-bar { --rn-mh-ab: 46px; } }
@media (min-width: 783px) { body.admin-bar { --rn-mh-ab: 32px; } }

.rn-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Le thème pose overflow-x: hidden sur html et body : body devient un
   conteneur de défilement qui ne défile jamais et la ligne 1 ne resterait pas
   collée. overflow-x: clip coupe pareil le débordement horizontal, sans cet
   effet (même correction que la galerie des fiches produits). */
@supports (overflow: clip) {
	@media (max-width: 1024px) {
		html:has(.rn-mh),
		html:has(.rn-mh) > body { overflow-x: clip !important; overflow-y: visible !important; }
	}
}

@media (max-width: 1024px) {

	/* Les deux lignes deviennent des enfants de body pour la mise en page :
	   la première peut ainsi rester collée pendant tout le défilement. */
	.rn-mh { display: contents; }

	/* L'en-tête du modèle cède la place, sur ces largeurs seulement. */
	.rn-mh ~ .elementor-location-header { display: none !important; }

	:root:has(.rn-mh) { --rn-mh-colle: calc(var(--rn-mh-ab, 0px) + 64px); }

	/* Barre d'actions du catalogue : sous l'en-tête collé, pas dessous. */
	body :is(.rn-catalogue, .rn-fiche, .rn-filtres):is(.rn-catalogue, .rn-fiche, .rn-filtres) .rn-barre { top: var(--rn-mh-colle, 0px); }

	/* -------------------------------------------------------------------
	 * Ligne 1
	 * ---------------------------------------------------------------- */
	.rn-mh-l1 {
		position: sticky;
		top: var(--rn-mh-ab, 0px);
		z-index: 1000;
		display: flex;
		align-items: center;
		gap: 4px;
		min-height: var(--mh-h1);
		margin: 0;
		padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
		background: #fff;
		border-bottom: 1px solid transparent;
		color: var(--mh-encre);
		font-family: inherit;
		transition: box-shadow 160ms ease, border-color 160ms ease;
	}

	.rn-mh-l1.is-colle {
		border-bottom-color: var(--mh-trait);
		box-shadow: 0 6px 16px -10px rgba(26, 29, 62, .28);
	}

	/* Le thème habille tous les boutons (fond corail, marges) : on repart de zéro. */
	.rn-mh .rn-mh-btn,
	.rn-mm .rn-mm-btn,
	.rn-mm button.rn-mm-ligne {
		min-height: 0 !important;
		margin: 0 !important;
		border: 0 !important;
		border-radius: 12px !important;
		background: transparent !important;
		box-shadow: none !important;
		color: var(--mh-encre) !important;
		text-transform: none !important;
		letter-spacing: 0 !important;
		line-height: 1.2 !important;
		transform: none !important;
	}

	.rn-mm button.rn-mm-ligne { border-radius: 0 !important; line-height: 1.35 !important; }

	.rn-mh .rn-mh-btn:hover,
	.rn-mh .rn-mh-btn:active,
	.rn-mm .rn-mm-btn:hover,
	.rn-mm button.rn-mm-ligne:hover,
	.rn-mm button.rn-mm-ligne:active { background: var(--mh-fond) !important; }

	.rn-mh-btn {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		gap: 6px;
		min-width: 44px;
		height: 44px;
		margin: 0;
		padding: 0 10px;
		border: 0;
		border-radius: 12px;
		background: transparent;
		box-shadow: none;
		color: var(--mh-encre) !important;
		font: inherit;
		font-size: 15px;
		font-weight: 600;
		line-height: 1;
		text-decoration: none !important;
		text-transform: none;
		letter-spacing: 0;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.rn-mh-btn:hover,
	.rn-mh-btn:active { background: var(--mh-fond); color: var(--mh-encre) !important; }

	.rn-mh-btn[hidden] { display: none; }

	.rn-mh-ico { display: block; flex: none; width: 24px; height: 24px; }

	.rn-mh-menu { padding: 0 12px 0 10px; }

	.rn-mh-logo {
		display: inline-flex;
		align-items: center;
		flex: none;
		height: 52px;
		margin-left: 2px;
		padding: 0 4px;
		border-radius: 10px;
		text-decoration: none !important;
	}

	.rn-mh-logo img,
	.rn-mh-logo .rn-mh-logo-img { display: block; width: auto !important; height: 46px !important; max-width: 120px; object-fit: contain; }
	.rn-mh-logo-txt { color: var(--mh-encre); font-size: 18px; font-weight: 700; }

	.rn-mh-espace { flex: 1 1 auto; }

	.rn-mh-compte .rn-mh-point {
		position: absolute;
		right: 9px;
		bottom: 9px;
		width: 10px;
		height: 10px;
		border: 2px solid #fff;
		border-radius: 50%;
		background: #0E7C4A;
	}

	.rn-mh-nb {
		position: absolute;
		top: 3px;
		right: 1px;
		min-width: 20px;
		height: 20px;
		padding: 0 5px;
		border: 2px solid #fff;
		border-radius: 999px;
		background: var(--mh-orange-fonce);
		color: #fff;
		font-size: 12px;
		font-weight: 700;
		line-height: 16px;
		text-align: center;
	}

	.rn-mh-nb.is-vide { display: none; }

	/* -------------------------------------------------------------------
	 * Ligne 2 : la recherche du thème
	 * ---------------------------------------------------------------- */
	.rn-mh-l2 {
		position: relative;
		z-index: 999;
		display: block;
		height: 64px;
		margin: 0;
		background: #fff;
	}

	.rn-mh-l2-in {
		padding: 4px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
		background: #fff;
	}

	/* Revenue par la loupe : flotte sous la ligne 1, sa place reste réservée. */
	.rn-mh-l2.is-flottant .rn-mh-l2-in {
		position: fixed;
		top: calc(var(--rn-mh-ab, 0px) + var(--mh-h1));
		left: 0;
		right: 0;
		z-index: 1001;
		padding-top: 8px;
		border-bottom: 1px solid var(--mh-trait);
		box-shadow: 0 10px 20px -12px rgba(26, 29, 62, .3);
		animation: rn-mh-glisse 160ms ease-out;
	}

	@keyframes rn-mh-glisse { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

	.rn-mh-l2 .product-search { position: relative; margin: 0; padding: 0; width: 100%; max-width: none; }

	.rn-mh-l2 .nikstore-search-box { display: flex !important; align-items: stretch; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }

	.rn-mh-l2 .category-wrapper { display: none !important; }

	.rn-mh-l2 .search-wrapper {
		position: relative;
		display: flex !important;
		align-items: stretch;
		flex: 1 1 auto;
		width: 100%;
		margin: 0;
		padding: 0;
		border: 0;
		background: none;
	}

	.rn-mh-l2 .search-wrapper input.search {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
		height: 48px;
		margin: 0;
		padding: 0 14px;
		border: 1.5px solid var(--mh-trait-2) !important;
		border-right: 0 !important;
		border-radius: 12px 0 0 12px !important;
		background: #fff !important;
		box-shadow: none !important;
		color: var(--mh-encre) !important;
		font-family: inherit;
		font-size: 16px !important; /* 16 px : pas de zoom automatique sur iPhone */
		line-height: 1.2;
		outline: none;
	}

	.rn-mh-l2 .search-wrapper input.search::placeholder { color: #6B7089; opacity: 1; }

	.rn-mh-l2 .search-wrapper input.search:focus { border-color: var(--mh-encre) !important; }

	.rn-mh-l2 .search-wrapper:focus-within { outline: 3px solid var(--mh-focus); outline-offset: 2px; border-radius: 14px; }

	.rn-mh-l2 .nikstore-ajax-search-btn {
		position: static !important;
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 52px;
		height: 48px;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 12px 12px 0 !important;
		background: var(--mh-orange) !important;
		box-shadow: none !important;
		color: #fff !important;
		font-size: 20px;
		line-height: 1;
		transform: none !important;
		cursor: pointer;
	}

	.rn-mh-l2 .nikstore-ajax-search-btn:hover { background: var(--mh-orange-h) !important; color: #fff !important; }
	.rn-mh-l2 .nikstore-ajax-search-btn:focus-visible { outline: 3px solid var(--mh-focus) !important; outline-offset: 2px; }
	.rn-mh-l2 .nikstore-ajax-search-btn i,
	.rn-mh-l2 .nikstore-ajax-search-btn i::before { color: #fff !important; }
	.rn-mh-l2 .nikstore-ajax-search-btn .rn-mh-ico { display: block !important; width: 22px !important; height: 22px !important; color: #fff !important; stroke: #fff !important; fill: none !important; opacity: 1 !important; visibility: visible !important; position: static !important; inset: auto !important; transform: none !important; margin: 0 !important; animation: none !important; }
	.rn-mh-l2 .nikstore-ajax-search-btn i { display: none !important; }
	.rn-mh-l2 .nikstore-ajax-search-btn > span:not(.rn-sr-only) { display: none !important; }

	/* Indicateur de chargement du thème : dans le champ, à gauche du bouton. */
	.rn-mh-l2 .search-wrapper > svg { display: none !important; }
	.rn-mh-l2 .search-wrapper.loading > svg {
		position: absolute;
		top: 14px;
		right: 66px;
		display: block !important;
		width: 20px;
		height: 20px;
		fill: var(--mh-doux);
		animation: rn-mh-tourne 1s linear infinite;
	}
	@keyframes rn-mh-tourne { to { transform: rotate(360deg); } }

	/* Suggestions : panneau pleine largeur sous le champ, défilement propre. */
	.rn-mh-l2 .search-results {
		position: absolute !important;
		top: calc(100% + 8px) !important;
		left: 0 !important;
		right: 0 !important;
		z-index: 1002;
		width: auto !important;
		max-height: min(70vh, calc(var(--rn-mh-vvh, 100vh) - 190px));
		margin: 0 !important;
		overflow-y: auto;
		overscroll-behavior: contain;
		border-radius: 14px;
		background: #fff;
		box-shadow: 0 18px 40px -16px rgba(26, 29, 62, .35), 0 0 0 1px var(--mh-trait);
	}

	.rn-mh-l2 .search-results:not(.active) { display: none !important; }

	/* -------------------------------------------------------------------
	 * Panneau du menu
	 * ---------------------------------------------------------------- */
	.rn-mm {
		position: fixed;
		inset: 0;
		z-index: 100002;
		display: flex;
		flex-direction: column;
		height: 100vh;
		height: 100dvh;
		background: #fff;
		color: var(--mh-encre);
		font-family: inherit;
		opacity: 0;
		transform: translateY(8px);
		transition: opacity 160ms ease, transform 180ms ease;
	}

	.rn-mm[hidden] { display: none; }
	.rn-mm.is-ouvert { opacity: 1; transform: none; }

	html.rn-mm-ouvert,
	html.rn-mm-ouvert body { overflow: hidden !important; }

	.rn-mm-tete {
		flex: none;
		display: flex;
		align-items: center;
		gap: 6px;
		min-height: 64px;
		padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
		border-bottom: 1px solid var(--mh-trait);
		background: #fff;
	}

	.rn-mm-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		gap: 4px;
		min-width: 44px;
		height: 44px;
		margin: 0;
		padding: 0 10px;
		border: 0;
		border-radius: 12px;
		background: transparent;
		box-shadow: none;
		color: var(--mh-encre);
		font: inherit;
		font-size: 15px;
		font-weight: 600;
		text-transform: none;
		letter-spacing: 0;
		cursor: pointer;
	}

	.rn-mm-btn:hover { background: var(--mh-fond); color: var(--mh-encre); }
	.rn-mm-btn[hidden] { display: none; }
	.rn-mm-retour { padding-left: 4px; }

	.rn-mm-titre {
		flex: 1 1 auto;
		min-width: 0;
		margin: 0 !important;
		padding: 0 8px;
		overflow: hidden;
		color: var(--mh-encre);
		font-family: inherit;
		font-size: 18px !important;
		font-weight: 600;
		line-height: 1.25;
		text-overflow: ellipsis;
		white-space: nowrap;
		letter-spacing: 0;
		text-transform: none;
	}

	/* Le titre reçoit le focus à chaque niveau (repère pour les lecteurs
	   d'écran) ; il n'est pas cliquable, il ne s'encadre donc pas. */
	.rn-mm .rn-mm-titre:focus,
	.rn-mm .rn-mm-titre:focus-visible { outline: none !important; box-shadow: none !important; }

	.rn-mm-ecrans { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }

	.rn-mm-ecran {
		position: absolute;
		inset: 0;
		display: flex;
		flex-direction: column;
		background: #fff;
	}

	.rn-mm-ecran[hidden] { display: none; }

	.rn-mm-ecran.is-entree { animation: rn-mm-entree 180ms ease-out; }
	.rn-mm-ecran.is-retour { animation: rn-mm-retour 180ms ease-out; }

	@keyframes rn-mm-entree { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
	@keyframes rn-mm-retour { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

	.rn-mm-defile {
		flex: 1 1 auto;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		padding-bottom: calc(24px + env(safe-area-inset-bottom));
	}

	/* Tablette : une colonne de lecture confortable, centrée. */
	.rn-mm-defile { padding-left: max(0px, calc((100% - 680px) / 2)); padding-right: max(0px, calc((100% - 680px) / 2)); }

	.rn-mm-section { margin: 0; padding: 4px 0 8px; }

	.rn-mm-intertitre {
		margin: 0 !important;
		padding: 18px max(20px, env(safe-area-inset-left)) 6px;
		color: var(--mh-doux) !important;
		font-family: inherit;
		font-size: 14px !important;
		font-weight: 600 !important;
		line-height: 1.3;
		letter-spacing: 0;
		text-transform: none !important;
	}

	.rn-mm-liste { margin: 0 !important; padding: 0 !important; list-style: none !important; }
	.rn-mm-liste > li { margin: 0; padding: 0; border-bottom: 1px solid var(--mh-trait); list-style: none; }
	.rn-mm-liste > li:empty { display: none; }

	.rn-mm-ligne {
		display: flex;
		align-items: center;
		gap: 12px;
		width: 100%;
		min-height: 54px;
		margin: 0;
		padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		color: var(--mh-encre) !important;
		font-family: inherit;
		font-size: 16px;
		font-weight: 500;
		line-height: 1.35;
		text-align: left;
		text-decoration: none !important;
		text-transform: none;
		letter-spacing: 0;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.rn-mm-ligne:hover,
	.rn-mm-ligne:active { background: var(--mh-fond); color: var(--mh-encre) !important; }

	.rn-mm-ligne:focus-visible,
	.rn-mh-btn:focus-visible,
	.rn-mm-btn:focus-visible,
	.rn-mh-logo:focus-visible,
	.rn-mm-appel:focus-visible,
	.rn-mm-reseaux a:focus-visible { outline: 3px solid var(--mh-focus) !important; outline-offset: -3px; }

	.rn-mh-btn:focus-visible,
	.rn-mm-btn:focus-visible,
	.rn-mh-logo:focus-visible { outline-offset: 0; }

	.rn-mm-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
	.rn-mm-lib { overflow-wrap: anywhere; }
	.rn-mm-note { color: var(--mh-doux); font-size: 14px; font-weight: 400; }

	.rn-mm-ligne .rn-mh-ico--chevron { width: 20px; height: 20px; margin-left: auto; color: #8A90A6; }
	.rn-mm-ligne--lien .rn-mh-ico--compte { width: 22px; height: 22px; color: var(--mh-doux); }

	.rn-mm-ligne--univers { min-height: 66px; font-size: 17px; font-weight: 600; }

	/* « Voir toutes les pièces » : l'accès à la catégorie parente. */
	.rn-mm-ligne--tout {
		color: var(--mh-orange-txt) !important;
		font-weight: 600;
		background: #FFF8F5;
	}

	.rn-mm-ligne--tout:hover { background: var(--mh-orange-50); color: var(--mh-orange-txt) !important; }
	.rn-mm-ligne--tout .rn-mh-ico { width: 20px; height: 20px; color: var(--mh-orange-fonce); }
	.rn-mm-ligne--tout .rn-mm-note { color: var(--mh-doux); font-weight: 400; }

	/* Page en cours : fond teinté, texte appuyé. */
	.rn-mm-ligne[aria-current="page"] { background: var(--mh-orange-50); color: var(--mh-orange-txt) !important; font-weight: 600; }

	.rn-mm-ligne.is-charge { cursor: progress; }
	.rn-mm-ligne.is-charge .rn-mh-ico--chevron { animation: rn-mm-pulse 900ms ease-in-out infinite; }
	@keyframes rn-mm-pulse { 50% { opacity: .3; } }

	.rn-mm-erreur { margin: 12px 20px; padding: 12px 14px; border-radius: 12px; background: #FDECEA; color: #B42318; font-size: 15px; }

	/* Accès pratiques : plus discrets, dans un encart teinté. */
	.rn-mm-section--pratique { margin: 12px 16px 0; padding: 0 0 4px; border-radius: 16px; background: var(--mh-fond); }
	.rn-mm-section--pratique .rn-mm-intertitre { padding: 14px 16px 4px; }
	.rn-mm-liste--discret > li { border-bottom-color: #EAE6E0; }
	.rn-mm-liste--discret > li:last-child { border-bottom: 0; }
	.rn-mm-liste--discret .rn-mm-ligne { min-height: 48px; padding: 10px 16px; color: var(--mh-encre-2) !important; font-size: 15.5px; }
	.rn-mm-liste--discret .rn-mm-ligne:hover { background: #EFEBE5; }

	.rn-mm-pied { padding: 16px; }

	.rn-mm-appel {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		min-height: 52px;
		padding: 0 16px;
		border: 1.5px solid var(--mh-trait-2);
		border-radius: 14px;
		color: var(--mh-encre) !important;
		font-size: 15.5px;
		text-decoration: none !important;
	}

	.rn-mm-appel:hover { border-color: var(--mh-encre); background: var(--mh-fond); }
	.rn-mm-appel .rn-mh-ico { width: 20px; height: 20px; color: var(--mh-orange-fonce); }

	.rn-mm-reseaux { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin: 12px 0 0 !important; padding: 0 !important; list-style: none !important; }
	.rn-mm-reseaux li { margin: 0; list-style: none; }
	.rn-mm-reseaux a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--mh-doux) !important; font-size: 15px; text-decoration: underline !important; text-underline-offset: 3px; }
	.rn-mm-reseaux a:hover { color: var(--mh-encre) !important; }

}

/* Très petits écrans : le libellé « Menu » s'efface, l'icône reste. */
@media (max-width: 359px) {
	.rn-mh-menu .rn-mh-btn-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
	.rn-mh-menu { padding: 0 10px; }
	.rn-mh-logo img, .rn-mh-logo .rn-mh-logo-img { height: 40px !important; }
}

/* Téléphone à l'horizontale : en-tête plus bas pour laisser voir la page. */
@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
	.rn-mh, .rn-mm { --mh-h1: 54px; }
	:root:has(.rn-mh) { --rn-mh-colle: calc(var(--rn-mh-ab, 0px) + 54px); }
	.rn-mh-logo { height: 46px; }
	.rn-mh-logo img, .rn-mh-logo .rn-mh-logo-img { height: 40px !important; }
	.rn-mh-l2 { height: 60px; }
	.rn-mm-tete { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
	.rn-mm, .rn-mh-l1 { transition: none !important; }
	.rn-mm { transform: none !important; }
	.rn-mm-ecran.is-entree, .rn-mm-ecran.is-retour, .rn-mh-l2.is-flottant .rn-mh-l2-in { animation: none !important; }
	.rn-mm-ligne.is-charge .rn-mh-ico--chevron { animation: none; }
}
