/* gtpromotabs — pastilles promo + bouton Devis + CTA Contact.
   Base visuelle : `.badge` du thème ; ici uniquement le spécifique (maquette visuel_4). */

/* ---------- A. Rangée des pastilles promo + bouton Devis ---------- */

.gt-promotabs { padding: 6px 0; margin: 0; border-bottom: 1px solid #e3e7eb; }

/* visuel_4 : pastilles équalisées (flex 1, cap 172px), gap 13px, Devis à droite
   via margin-left:auto ; contenu centré, liseré supérieur 2px, radius 6px. */
.gt-promotabs__list {
	display: flex;
	flex-wrap: wrap; /* <992 : wrap maîtrisé, 2 rangées maximum */
	align-items: stretch;
	justify-content: flex-start;
	width: 100%;
	gap: 13px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gt-promotabs__item {
	flex: 1 1 0;
	min-width: 0;
	max-width: 172px;
	margin: 0;
	padding: 0;
}

.gt-promotabs__link {
	/* .badge conservé pour la typo (uppercase 13px) ; centrage + forme forcés ici */
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	height: 40px;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: .3px;
	text-transform: uppercase;
	background: var(--gt-promo-bg, transparent);
	color: var(--gt-promo-color, inherit);
	border: 0;
	border-top: 2px solid var(--gt-promo-color, transparent);
	border-radius: 6px;
	padding: 0 12px;
}

.gt-promotabs__link:hover, .gt-promotabs__link:focus {
	color: var(--gt-promo-color, inherit);
	filter: brightness(.95);
}

/* icône teintée par la couleur du slot : PNG servie comme masque, fond = currentColor */
.gt-promotabs__icon {
	display: inline-block;
	width: 18px;
	height: 18px;
	flex: none;
	background-color: currentColor;
	-webkit-mask-image: var(--gt-icon);
	mask-image: var(--gt-icon);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

/* libellé sur une seule ligne : cap 172px → ellipsis plutôt que 2e ligne */
.gt-promotabs__label {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Bouton Devis : collé au bord droit du conteneur, après les pastilles */
.gt-promotabs__devis {
	flex: 0 0 auto;
	margin: 0 0 0 auto; /* repousse le bouton au bord droit du conteneur */
	padding: 0;
}

.gt-promotabs__devis-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 16px;
	min-width: 150px;
	height: 40px;
	border: 2px solid #b3d3ea;
	border-radius: 6px;
	color: #006bbd;
	background: transparent;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.4;
}

.gt-promotabs__devis-icon {
	display: inline-block;
	width: 18px;
	height: 18px;
	flex: none;
	background-color: currentColor;
	-webkit-mask-image: var(--gt-icon);
	mask-image: var(--gt-icon);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.gt-promotabs__devis-link:hover, .gt-promotabs__devis-link:focus { background: rgba(179, 211, 234, .15); text-decoration: none; }

@media (max-width: 991.98px) {
	.gt-promotabs { padding: 4px 0; }
	/* largeur au contenu : flex 1 1 0 donnerait des pastilles squelettiques en wrap */
	.gt-promotabs__item { flex: 1 1 auto; max-width: none; }
	.gt-promotabs__devis { flex: 1 1 auto; min-width: 150px; max-width: 100%; }
	.gt-promotabs__list { row-gap: 8px; }
}

/* ---------- B. Bouton Contact (rangée haute du header) ---------- */

/* visuel_4 : icône cyan + libellé sur 2 lignes, sans fond ni bordure */
.gt-promocontact {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	margin-right: 30px;
	background: none;
	border: 0;
	color: #022a5e;
	font-weight: 700;
	font-size: .95rem;
	max-width: 130px;
	line-height: 1.1;
	text-align: left;
	text-decoration: none;
}

.gt-promocontact__icon {
	width: 40px;
	height: 40px;
	flex: none;
	object-fit: contain;
	display: block;
}

/* <1600 : libellé masqué → icône seule (marge ramenée à 5px : l'écart de 30px
   n'a de sens qu'avec le libellé pour équilibrer la rangée) */
@media (max-width: 1599.98px) {
	.gt-promocontact__label { display: none; }
	.gt-promocontact { margin-right: 5px; }
}

/* séparateurs verticaux 1px (menu-like : 1px rgb(124,123,123)) entre
   Contactez-nous / Mon compte / Panier dans la rangée haute du header.
   Hauteur fixée (40px) et non `100%` : `100%` se réfère à la hauteur de chaque
   élément, or #user_info et #cart ne font pas forcément la même hauteur → les
   deux traits divergeaient visuellement. */
#user_info.ps_customersignin,
#cart.ps_shoppingcart {
	position: relative;
}
#user_info.ps_customersignin::before,
#cart.ps_shoppingcart::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 1px;
	height: 40px;
	background-color: rgb(124, 123, 123);
	transform: translateY(-50%);
}

/* >=1600 : le thème ajoute `border-right:1px solid #7c7b7b` sur .ps_customersignin,
   soit un 2e trait collé à `#cart::before` (frontière compte|panier doublée et
   donc plus épaisse que contact|compte). On rend cette bordure transparente (et
   non `border-right:0`) pour ne garder que le ::before sans décaler les blocs
   d'un pixel : la bordure continue d'occuper sa place dans la boîte.
   Le padding-right du thème est conservé tel quel. */
@media (min-width: 1600px) {
	#user_info.ps_customersignin { border-right-color: transparent; }
}

/* >=1600 : libellé visible (visuel_4) ; largeur bornée à 130px → le libellé
   passe sur 2 lignes (« Contactez / nous ») */
@media (min-width: 1600px) {
	.gt-promocontact__label {
		display: inline;
		font-weight: 700;
		font-size: .95rem;
		color: #022a5e;
		line-height: 1.1;
	}
}

/* Séparateurs du menu principal (module pm_advancedtopmenu) : le thème les pose
   sur `.a-niveau1::before` — même pseudo que la règle « caret » du thème
   (`.container-navbar .navbar .dropdown .a-niveau1:before{content:"\f107"}`), à
   spécificité égale : selon l'ordre de concaténation des CSS la frontière perd
   son trait (remplacé par le caret ou rien). On ré-affirme le trait avec un
   sélecteur plus spécifique et des métriques identiques au thème (1px,
   calc(100% - 40px), #7c7b7b, right:-10px, centré) → un seul trait par frontière. */
@media (min-width: 1200px) {
	ul.navbar-nav > li.nav-item:not(:last-child) > a.a-niveau1::before {
		content: "";
		display: block;
		position: absolute;
		top: 50%;
		right: -10px;
		width: 1px;
		height: calc(100% - 40px);
		background: #7c7b7b;
		transform: translateY(-50%);
		z-index: 1;
	}
	ul.navbar-nav > li.nav-item:last-child > a.a-niveau1::before {
		content: none;
		display: none;
	}
}

/* >=1200 : on autorise le champ de recherche à se comprimer pour ménager le CTA.
   La colonne recherche garde sa largeur de base Bootstrap col-xl-5 (41,66667 %). */
@media (min-width: 1200px) {
	#search_widget { min-width: 0; flex-shrink: 1; }
	/* On donne aussi un poids croissant ×2 à la colonne CTA/compte/panier. */
	header .row.align-items-center.justify-content-md-between > .col-auto.col-xl {
		flex-grow: 2;
	}
	#search_widget form { width: 100%; }
	#search_widget form .form-control { width: 100%; }
}
