/* Alimentaly - carte des partenaires ([alimentaly_partners_map]), 09/11/2026.
   Couleurs : variables globales Astra (Verde, Rosso, Inchiostro, Testo, Crema, Verde scuro, Verde action, Linea). */

.al-pmap {
	--pm-green: var(--ast-global-color-0, #009245);
	--pm-red: var(--ast-global-color-1, #CE2834);
	--pm-ink: var(--ast-global-color-2, #1E2320);
	--pm-text: var(--ast-global-color-3, #4D524E);
	--pm-cream: var(--ast-global-color-4, #F6F3EC);
	--pm-dark: var(--ast-global-color-6, #005C2E);
	--pm-action: var(--ast-global-color-7, #007A3D);
	--pm-line: var(--ast-global-color-8, #E3DFD5);
	--pm-muted: #5F645F;
	display: flex;
	flex-direction: column;
	gap: 28px;
	color: var(--pm-text);
	text-align: left;
}
.al-pmap *,
.al-pmap *::before,
.al-pmap *::after { box-sizing: border-box; }
.al-pmap [hidden] { display: none !important; }

.al-pmap__head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.al-pmap__title { margin: 0; color: var(--pm-ink); }
.al-pmap__intro { margin: 0; font-size: 1.0625rem; line-height: 1.6; }

/* Commandes */
.al-pmap__controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.al-pmap__seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--pm-cream); border-radius: 999px; }
.al-pmap button.al-pmap__seg-btn {
	min-height: 40px; padding: 0 22px; border: 0; border-radius: 999px;
	background: transparent; color: var(--pm-ink);
	font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; cursor: pointer;
}
.al-pmap button.al-pmap__seg-btn[aria-pressed="true"] { background: var(--pm-ink); color: #fff; }
.al-pmap__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.al-pmap button.al-pmap__chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
	border: 1.5px solid var(--pm-line); border-radius: 999px; background: #fff; color: var(--pm-ink);
	font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; cursor: pointer;
}
.al-pmap button.al-pmap__chip[aria-pressed="true"] { background: #E1ECDF; border-color: var(--pm-action); color: var(--pm-dark); }
.al-pmap__count { opacity: 0.7; }
.al-pmap button.al-pmap__seg-btn:focus-visible,
.al-pmap button.al-pmap__chip:focus-visible,
.al-pmap button:focus-visible,
.al-pmap a:focus-visible { outline: 3px solid var(--pm-action); outline-offset: 2px; }

/* Points (forme + couleur : les types restent distincts sans la couleur) */
.al-pmap__dot {
	display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 999px;
	background: var(--pm-green); border: 2px solid #fff;
}
.al-pmap__dot--hq { background: var(--pm-red); }
.al-pmap__dot--supplier { background: var(--pm-green); }
.al-pmap__dot--distributor { background: var(--pm-ink); }
.al-pmap__dot--ecu { background: #fff; border: 3px solid var(--pm-dark); }
.al-pmap__dot--ecuhq { background: var(--pm-dark); }
.al-pmap__dot--customer { background: #fff; border: 3px solid var(--pm-red); }
.al-pmap__chip .al-pmap__dot,
.al-pmap__legend .al-pmap__dot,
.al-pmap__item .al-pmap__dot { border-color: transparent; box-shadow: none; }
.al-pmap__chip .al-pmap__dot--ecu,
.al-pmap__legend .al-pmap__dot--ecu,
.al-pmap__item .al-pmap__dot--ecu { border-color: var(--pm-dark); }
.al-pmap__chip .al-pmap__dot--customer,
.al-pmap__legend .al-pmap__dot--customer,
.al-pmap__item .al-pmap__dot--customer { border-color: var(--pm-red); }

/* Carte + fiche */
.al-pmap__body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.al-pmap__mapcol { flex: 999 1 560px; min-width: 0; }
.al-pmap__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.al-pmap__panel { min-width: 0; }
.al-pmap__map {
	position: relative; width: 100%; margin: 0 auto; overflow: hidden;
	border: 1px solid var(--pm-line); border-radius: 16px; background: #fff;
}
.al-pmap__map--europe { aspect-ratio: 760 / 640; }
.al-pmap__map--italy { aspect-ratio: 560 / 660; max-width: 645px; }
.al-pmap__map img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
.al-pmap__note { margin: 10px 0 0; font-size: 0.75rem; color: var(--pm-muted); }

.al-pmap button.al-pmap__marker {
	position: absolute; z-index: 2; transform: translate(-50%, -50%);
	display: flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px;
	background: transparent; cursor: pointer;
}
.al-pmap__marker .al-pmap__dot { width: 15px; height: 15px; box-shadow: 0 2px 6px rgba(30, 35, 32, 0.35); transition: transform 0.15s ease; }
.al-pmap__marker[data-type="hq"] { z-index: 3; }
.al-pmap__marker[data-type="hq"] .al-pmap__dot,
.al-pmap__marker[data-type="ecuhq"] .al-pmap__dot { width: 20px; height: 20px; border-width: 3px; }
.al-pmap__marker:hover .al-pmap__dot { transform: scale(1.25); }
.al-pmap__marker.is-active { z-index: 5; }
.al-pmap__marker.is-active .al-pmap__dot { transform: scale(1.45); outline: 4px solid rgba(0, 146, 69, 0.35); outline-offset: 2px; }

.al-pmap button.al-pmap__cluster {
	position: absolute; z-index: 4; transform: translate(-50%, -50%);
	display: flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 56px; height: 56px; padding: 0 14px;
	border: 3px solid #fff; border-radius: 999px; background: var(--pm-green); color: #fff;
	font: inherit; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(30, 35, 32, 0.25);
}
.al-pmap button.al-pmap__cluster:hover { background: var(--pm-action); }
.al-pmap__cluster-n { font-size: 1.25rem; font-weight: 800; }
.al-pmap__cluster-l { font-size: 0.8125rem; font-weight: 700; }

.al-pmap button.al-pmap__back {
	position: absolute; z-index: 6; left: 12px; top: 12px;
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--pm-line); border-radius: 999px; background: #fff; color: var(--pm-ink);
	font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; cursor: pointer;
}

.al-pmap__panel { background: var(--pm-cream); border-radius: 16px; padding: 28px; }
.al-pmap__panel p { margin: 0; line-height: 1.6; }
.al-pmap__intro-panel { display: flex; flex-direction: column; gap: 14px; }
.al-pmap__panel-title { margin: 0; color: var(--pm-ink); font-size: 1.5rem; line-height: 1.2; }
.al-pmap__legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.al-pmap__legend li { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--pm-ink); font-size: 0.875rem; }

.al-pmap__card { display: flex; flex-direction: column; gap: 14px; }
.al-pmap__card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.al-pmap__tag {
	display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px;
	background: var(--pm-action); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.al-pmap__tag--hq { background: var(--pm-red); }
.al-pmap__tag--distributor { background: var(--pm-ink); }
.al-pmap__tag--ecu { background: var(--pm-dark); }
.al-pmap__tag--customer { background: var(--pm-red); }
.al-pmap button.al-pmap__close {
	display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 999px; background: transparent; color: var(--pm-ink); cursor: pointer;
}
.al-pmap button.al-pmap__close:hover { background: rgba(30, 35, 32, 0.06); }
.al-pmap__card-id { display: flex; align-items: center; gap: 14px; }
.al-pmap__logo {
	flex: none; width: 72px; height: 72px; padding: 8px; border-radius: 12px; background: #fff;
	display: flex; align-items: center; justify-content: center;
}
.al-pmap__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.al-pmap__name { margin: 0; color: var(--pm-ink); font-size: 1.5rem; line-height: 1.15; }
.al-pmap__name:focus { outline: none; }
.al-pmap__name:focus-visible { outline: 3px solid var(--pm-action); outline-offset: 4px; }
.al-pmap__addr { display: flex; flex-direction: column; color: var(--pm-ink); font-size: 0.9375rem; }
.al-pmap__addr strong { font-weight: 600; }
.al-pmap__desc, .al-pmap__phone { font-size: 0.9375rem; }
.al-pmap a.al-pmap__web {
	align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
	border-radius: 999px; background: var(--pm-action); color: #fff; font-weight: 600; font-size: 0.9375rem;
	text-decoration: none; overflow-wrap: anywhere;
}
.al-pmap a.al-pmap__web:hover { background: var(--pm-dark); color: #fff; }

/* Liste */
.al-pmap__list { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; border-top: 1px solid var(--pm-line); }
.al-pmap__list-title { margin: 0; color: var(--pm-ink); font-size: 1.375rem; }
.al-pmap__groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.al-pmap__group { display: flex; flex-direction: column; gap: 4px; }
.al-pmap__country { margin: 0 0 4px; color: var(--pm-action); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.al-pmap__group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.al-pmap__group li { margin: 0; }
.al-pmap button.al-pmap__item {
	display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 10px;
	border: 0; border-radius: 10px; background: transparent; color: var(--pm-ink);
	font: inherit; font-size: 0.9375rem; text-align: left; cursor: pointer;
}
.al-pmap button.al-pmap__item:hover { background: var(--pm-cream); }
.al-pmap button.al-pmap__item.is-active { background: #E1ECDF; }
.al-pmap button.al-pmap__item:disabled { cursor: default; }
.al-pmap__item-txt { display: flex; flex-direction: column; }
.al-pmap__item-name { font-weight: 600; }
.al-pmap__item-city { font-size: 0.8125rem; color: var(--pm-muted); }
.al-pmap a.al-pmap__item-web { display: none; }
.al-pmap:not(.is-ready) a.al-pmap__item-web { display: inline-block; margin: 0 0 8px 34px; font-size: 0.8125rem; color: var(--pm-action); }

@media (max-width: 544px) {
	.al-pmap { gap: 22px; }
	.al-pmap__controls { flex-direction: column; align-items: stretch; }
	.al-pmap__seg { align-self: flex-start; }
	.al-pmap__panel { padding: 22px; }
	.al-pmap button.al-pmap__cluster { min-width: 48px; height: 48px; padding: 0 10px; }
	.al-pmap__cluster-n { font-size: 1.0625rem; }
	.al-pmap button.al-pmap__back { left: 8px; top: 8px; min-height: 40px; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.al-pmap__marker .al-pmap__dot { transition: none; }
}

/* Section pleine page (layout="section") : memes marges que les sections Spectra de la page (contenu 1240 px). */
.al-pmap.al-pmap--section,
.ast-page-builder-template .entry-content[data-ast-blocks-layout] > .al-pmap.al-pmap--section { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 40px 96px; }
@media (max-width: 921px) { .al-pmap.al-pmap--section { padding: 0 32px 72px; } }
@media (max-width: 544px) { .al-pmap.al-pmap--section { padding: 0 20px 56px; } }

/* Les enfants occupent toute la largeur (Astra centre certains blocs avec des marges automatiques). */
.al-pmap > *, .al-pmap__body > * { margin-left: 0; margin-right: 0; }
.al-pmap > * { width: 100%; }
.al-pmap > .al-pmap__head { max-width: 760px; }
.al-pmap__intro { max-width: 760px; }
/* Pays avec beaucoup de partenaires (Italie) : toute la largeur, liste sur plusieurs colonnes. */
.al-pmap__group:has(li:nth-child(7)) { grid-column: 1 / -1; }
.al-pmap__group:has(li:nth-child(7)) ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; }
/* Les boutons du theme sont en majuscules : la liste, le retour et la pastille Italie restent en casse normale. */
.al-pmap button.al-pmap__item, .al-pmap button.al-pmap__back, .al-pmap button.al-pmap__cluster { text-transform: none; letter-spacing: normal; }
@media (max-width: 544px) { .al-pmap__cluster-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* Etiquette de type et bouton du site : texte centre, y compris sur deux lignes (11/2026). */
.al-pmap .al-pmap__tag { min-height: 28px; padding: 6px 14px; line-height: 1.25; border-radius: 14px; text-align: center; }
.al-pmap a.al-pmap__web { justify-content: center; padding: 10px 22px; line-height: 1.3; border-radius: 22px; text-align: center; }


/* Logo ECU sous la legende (ajout 10/11/2026). L'image a des marges transparentes en haut et en bas : le cadrage les retire. */
.al-pmap__ecu { display: none; margin: 0; padding: 0 12px; text-align: center; }
/* Visible seulement pour ECU : fiche d'un membre ECU ou du siege ECU ouverte, ou filtre "ECU members" actif. */
.al-pmap[data-sel="ecu"] .al-pmap__ecu,
.al-pmap[data-sel="ecuhq"] .al-pmap__ecu,
.al-pmap[data-filter="ecu"] .al-pmap__ecu { display: block; animation: al-pmap-fade 0.25s ease; }
@keyframes al-pmap-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .al-pmap__ecu { animation: none !important; } }
.al-pmap__ecu-img { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 1448 / 878; object-fit: cover; margin: 0 auto; border-radius: 0; box-shadow: none; }
@media (max-width: 921px) { .al-pmap__ecu-img { max-width: 280px; } }
