/* =========================================================
   SEFEE — Carte interactive « Nos implantations »
   Section navy, carte vectorielle (jsVectorMap) + liste de sites.
   ========================================================= */

.sefee-implant {
	position: relative;
	background: var(--sefee-navy);
	color: #fff;
	padding: 86px 0;
	overflow: hidden;
}
/* Coller la section navy au footer : supprime le padding des wrappers Elementor
   (colonne « populated » + section) qui laissait une bande blanche sous la carte. */
.sefee-main .elementor-top-section:has( .elementor-widget-sefee_map_implantations ) { padding-top: 0; padding-bottom: 0; }
.sefee-main .elementor-top-section:has( .elementor-widget-sefee_map_implantations ) .elementor-widget-wrap.elementor-element-populated { padding: 0; }
/* Découpe diagonale en haut (cut moderne, autonome) */
.sefee-implant::before {
	content: ""; position: absolute; left: -1px; right: -1px; top: 0;
	height: clamp(28px, 4vw, 62px); transform: translateY(-99%);
	background: var(--sefee-navy);
	clip-path: polygon(0 100%, 100% 0, 100% 100%);
	z-index: 2; pointer-events: none;
}
/* Trame technique discrète */
.sefee-implant::after {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
	background-image:
		repeating-linear-gradient(115deg, transparent 0 38px, rgba(255,255,255,.05) 38px 39px),
		radial-gradient(circle at 90% 12%, rgba(255,255,255,.10), transparent 26%);
}
.sefee-implant__inner {
	position: relative; z-index: 2;
	max-width: 1440px; margin: 0 auto; padding: 0 28px;
}
/* Le bloc d'intro reste lisible même si la section est large */
.sefee-implant .sefee-lead { max-width: 70ch; }
.sefee-implant h2 { color: #fff; }

/* En-tête + méta */
.sefee-implant__meta {
	display: inline-flex; gap: 18px; margin-top: 8px;
	font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.65);
}
.sefee-implant__meta b { color: var(--sefee-cyan); font-family: var(--sefee-font-display); font-size: 1rem; }

/* Onglets France / Monde */
.sefee-implant__tabs {
	display: inline-flex; gap: 6px; margin: 24px 0 28px;
	background: rgba(255,255,255,.06); padding: 6px; border-radius: 10px;
}
.sefee-implant__tab {
	border: 0; background: transparent; color: rgba(255,255,255,.72);
	font: inherit; font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
	padding: .7em 1.35em; border-radius: 7px; cursor: pointer;
	display: inline-flex; align-items: center; gap: .55em; transition: background .2s ease, color .2s ease;
}
.sefee-implant__tab:hover { color: #fff; }
.sefee-implant__tab.is-active { background: var(--sefee-cyan); color: var(--sefee-navy); }
.sefee-implant__tab .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .8; }

/* Carte pleine largeur + panneau de sites en surimpression */
.sefee-mapwrap { position: relative; }
.sefee-map {
	position: relative; height: 620px; width: 100%;
	border-radius: 14px; background: rgba(255,255,255,.03);
	border: 1px solid rgba(255,255,255,.10); overflow: hidden;
}
#sefee-map { width: 100%; height: 100%; }

/* Panneau des sites posé sur la carte (verre dépoli) */
.sefee-map__panel {
	position: absolute; top: 16px; left: 16px; z-index: 5;
	box-sizing: border-box;
	width: 360px; max-width: calc(100% - 32px); max-height: calc(100% - 32px);
	display: flex; flex-direction: column;
	background: rgba(0,42,82,.82);
	backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
	border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
	box-shadow: 0 18px 44px rgba(0,0,0,.42); padding: 10px;
}
.sefee-map__list {
	list-style: none; margin: 0; padding: 2px;
	display: flex; flex-direction: column; gap: 9px;
	overflow: auto; min-height: 0;
}
.sefee-map__list::-webkit-scrollbar { width: 8px; }
.sefee-map__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }

.sefee-map__site {
	display: block; width: 100%; text-align: left; cursor: pointer;
	background: rgba(255,255,255,.05); color: #fff; font: inherit;
	border: 1px solid rgba(255,255,255,.10); border-left: 3px solid transparent;
	border-radius: 9px; padding: 11px 13px;
	transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.sefee-map__site:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.4); transform: translateX(2px); }
.sefee-map__site:focus-visible { outline: 2px solid var(--sefee-cyan); outline-offset: 2px; }
.sefee-map__site.is-active {
	border-left-color: var(--sefee-cyan); background: rgba(255,255,255,.12);
	box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.sefee-map__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sefee-map__name { font-family: var(--sefee-font-display); font-size: 1.02rem; font-weight: 700; line-height: 1.1; }
.sefee-badge {
	font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
	padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}
.sefee-badge--hq { background: var(--sefee-cyan); color: var(--sefee-navy); }
.sefee-badge--intl { background: rgba(255,255,255,.16); color: #fff; }
.sefee-map__role { color: rgba(255,255,255,.78); font-size: .83rem; margin-top: 4px; line-height: 1.35; }
.sefee-map__region {
	display: inline-flex; align-items: center; gap: 7px; margin-top: 7px;
	color: var(--sefee-cyan); font-size: .72rem; letter-spacing: .04em; font-weight: 700;
}
.sefee-map__region::before { content: ""; flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--sefee-cyan); box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

/* Le texte des fiches doit toujours revenir à la ligne (jamais déborder) */
.sefee-map__panel, .sefee-map__list, .sefee-map__site { box-sizing: border-box; }
.sefee-map__site { max-width: 100%; }
.sefee-map__name { overflow-wrap: anywhere; }
.sefee-map__role { display: block; }
.sefee-map__role, .sefee-map__region,
.sefee-map__row, .sefee-map__row span, .sefee-map__row a {
	white-space: normal; overflow-wrap: anywhere; word-break: break-word; min-width: 0;
}
.sefee-map__row { align-items: flex-start; }
.sefee-map__row > span, .sefee-map__row > a { flex: 1 1 auto; }

/* Détails (révélés sur le site actif) */
.sefee-map__more {
	display: block;
	max-height: 0; overflow: hidden; opacity: 0; margin-top: 0;
	transition: max-height .4s ease, opacity .3s ease, margin-top .3s ease;
}
.sefee-map__site.is-active .sefee-map__more { max-height: 340px; opacity: 1; margin-top: 14px; }
.sefee-map__rows { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 13px; }
.sefee-map__row { display: flex; gap: 10px; font-size: .86rem; color: rgba(255,255,255,.85); line-height: 1.4; }
.sefee-map__row .ico { flex: 0 0 16px; margin-top: 3px; color: var(--sefee-cyan); }
.sefee-map__row a { color: #fff; }
.sefee-map__row a:hover { color: var(--sefee-cyan); text-decoration: none; }
.sefee-map__dir {
	display: inline-flex; align-items: center; gap: 7px; margin-top: 13px;
	font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
	color: var(--sefee-cyan);
}
.sefee-map__dir:hover { text-decoration: none; color: #fff; }
.sefee-map__dir svg { width: 14px; height: 14px; }

/* Filtre de vue (France masque l'international) */
.sefee-implant.is-view-france .sefee-map__site[data-intl="1"] { display: none; }

/* ---------- jsVectorMap : habillage SEFEE ---------- */
.sefee-map .jvm-zoom-btn {
	display: flex; align-items: center; justify-content: center;
	background: rgba(0,42,82,.85); border: 1px solid rgba(255,255,255,.22); color: #fff;
	border-radius: 6px; width: 30px; height: 30px; padding: 0;
	line-height: 1; font-size: 18px; font-weight: 700;
	left: auto !important; right: 14px !important; /* bat le style inline de la lib */
}
.sefee-map .jvm-zoom-btn:hover { background: var(--sefee-blue); }
.sefee-map .jvm-zoomin { top: 14px !important; }
.sefee-map .jvm-zoomout { top: 52px !important; }
.jvm-tooltip {
	background: var(--sefee-navy-2); color: #fff; border: 1px solid var(--sefee-cyan);
	border-radius: 6px; padding: 6px 11px; font-family: var(--sefee-font-body);
	font-weight: 700; font-size: .8rem; box-shadow: 0 10px 26px rgba(0,0,0,.4);
	pointer-events: none; z-index: 9999;
}

/* Marqueurs : pouls + état actif */
@keyframes sefee-mk-pulse {
	0%, 100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
	50%      { filter: drop-shadow(0 0 5px rgba(255,255,255,.85)); }
}
.sefee-map .jvm-marker { cursor: pointer; transition: fill .2s ease; animation: sefee-mk-pulse 2.6s ease-in-out infinite; }
.sefee-map .jvm-marker.is-active {
	fill: var(--sefee-cyan) !important; stroke: #fff !important;
	r: 9px; filter: drop-shadow(0 0 8px rgba(255,255,255,.95)); animation: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.sefee-map { height: 440px; }
	.sefee-map__panel {
		position: static; width: auto; max-height: none; margin-top: 14px;
		backdrop-filter: none; -webkit-backdrop-filter: none;
		box-shadow: none; background: rgba(255,255,255,.04);
	}
	.sefee-map__list { overflow: visible; }
}
@media (max-width: 480px) {
	.sefee-implant { padding: 60px 0; }
	.sefee-implant__tabs { width: 100%; justify-content: center; }
}

/* ---------- Préférences de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
	.sefee-map .jvm-marker { animation: none; }
	.sefee-map__more, .sefee-map__site { transition: none; }
}

/* =========================================================
   « Amphenol dans le monde » — choroplèthe (page Groupe Amphenol)
   Intensité = nombre de sociétés du Groupe par pays.
   ========================================================= */
.aph-world {
	position: relative;
	background: var(--sefee-navy);
	color: #fff;
	padding: 86px 0;
	overflow: hidden;
}
.aph-world::after {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
	background-image:
		repeating-linear-gradient(115deg, transparent 0 38px, rgba(255,255,255,.05) 38px 39px),
		radial-gradient(circle at 88% 8%, rgba(0,92,185,.45), transparent 30%);
}
.aph-world__inner {
	position: relative; z-index: 2;
	max-width: 1440px; margin: 0 auto; padding: 0 28px;
}
.aph-world h2 { color: #fff; }
.aph-world .sefee-lead { max-width: 72ch; color: rgba(255,255,255,.82); }
.aph-world .sefee-eyebrow { color: var(--sefee-cyan); }

.aph-world__meta {
	display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 18px 0 26px;
}
.aph-world__meta div { display: flex; flex-direction: column; }
.aph-world__meta b {
	font-family: var(--sefee-font-display); font-size: 2.1rem; line-height: 1; color: #fff;
}
.aph-world__meta span {
	font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-top: 4px;
}

/* Classement à gauche, carte à droite (côte à côte, sans recouvrement) */
.aph-mapwrap {
	display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: stretch;
}
.aph-map {
	position: relative; grid-column: 2; grid-row: 1; height: 600px; width: 100%;
	border-radius: 14px; background: rgba(255,255,255,.03);
	border: 1px solid rgba(255,255,255,.10); overflow: hidden;
}
#amphenol-map { width: 100%; height: 100%; }

/* Régions : transition douce + surbrillance pilotée depuis le classement */
.aph-map .jvm-region { transition: fill-opacity .2s ease, stroke .2s ease; }
.aph-map .jvm-region.is-spot { stroke: #fff !important; stroke-width: 1.1px !important; fill-opacity: 1 !important; }

/* Boutons de zoom (on bat le style inline gauche de la lib) */
.aph-map .jvm-zoom-btn {
	display: flex; align-items: center; justify-content: center;
	background: rgba(0,42,82,.85); border: 1px solid rgba(255,255,255,.22); color: #fff;
	border-radius: 6px; width: 30px; height: 30px; padding: 0; line-height: 1; font-size: 18px; font-weight: 700;
	left: auto !important; right: 14px !important;
}
.aph-map .jvm-zoom-btn:hover { background: var(--sefee-blue); }
.aph-map .jvm-zoomin { top: 14px !important; }
.aph-map .jvm-zoomout { top: 52px !important; }

/* Panneau classement, en colonne à gauche de la carte */
.aph-rank {
	grid-column: 1; grid-row: 1; box-sizing: border-box; height: 600px;
	display: flex; flex-direction: column;
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
	padding: 16px 14px 10px;
}
.aph-rank__title {
	font-family: var(--sefee-font-display); font-size: .82rem; font-weight: 700;
	letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.72); margin: 0 0 10px;
}
.aph-rank__list { list-style: none; margin: 0; padding: 2px 4px 6px 2px; overflow: auto; min-height: 0; }
.aph-rank__list::-webkit-scrollbar { width: 8px; }
.aph-rank__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
.aph-rank__row {
	display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
	padding: 6px 8px; border-radius: 7px; cursor: default;
	transition: background .2s ease;
}
.aph-rank__row:hover, .aph-rank__row.is-active { background: rgba(255,255,255,.10); }
.aph-rank__name { font-size: .86rem; font-weight: 600; color: #fff; }
.aph-rank__n {
	font-family: var(--sefee-font-display); font-size: .95rem; font-weight: 700;
	color: var(--sefee-cyan); justify-self: end;
}
.aph-rank__bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.aph-rank__bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #4a8ddb, #c2e2ff); }

/* Légende des paliers */
.aph-legend {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px;
	font-size: .76rem; color: rgba(255,255,255,.7);
}
.aph-legend .lab { letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.55); }
.aph-legend span { display: inline-flex; align-items: center; gap: 7px; }
.aph-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* Note de source */
.aph-world__source { margin-top: 14px; font-size: .72rem; color: rgba(255,255,255,.45); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.aph-mapwrap { grid-template-columns: 1fr; }
	.aph-map { grid-column: auto; grid-row: auto; height: 440px; }
	.aph-rank { grid-column: auto; grid-row: auto; height: auto; max-height: 380px; }
}
@media (max-width: 480px) {
	.aph-world { padding: 60px 0; }
	.aph-world__meta b { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
	.aph-map .jvm-region, .aph-rank__row { transition: none; }
}
