/* Carte des mobilisations — s'appuie sur les variables du thème Grève féministe (avec valeurs de repli). */
.gfm-page-inner, .gfm, .gfm-dialog {
	--gfm-violet: var(--violet, #9600ff);
	--gfm-violet-dark: var(--violet-dark, #7300c4);
	--gfm-yellow: var(--yellow, #ffe500);
	--gfm-ink: var(--ink, #1e1630);
	--gfm-muted: var(--muted, #5b536b);
	--gfm-tint: var(--tint, #f5efff);
	--gfm-line: var(--line, #e4dbf3);
	--gfm-radius: var(--radius, 14px);
	--gfm-radius-lg: var(--radius-lg, 22px);
}

/* --- En-tête de page ---------------------------------------------------- */
.gfm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; padding-block: .5rem 1.5rem; }
.gfm-head .page-title { margin-bottom: .25rem; }
.gfm-intro { max-width: 60ch; color: var(--gfm-muted); }
.gfm-intro > :last-child { margin-bottom: 0; }
.gfm-cta-inline { margin: 0 0 1rem; }

/* --- Recherche et filtres ----------------------------------------------- */
.gfm-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; margin-bottom: 1.25rem; }
.gfm-search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gfm-search__input {
	flex: 1 1 260px; min-width: 0; font: inherit; color: var(--gfm-ink);
	padding: .75rem 1.15rem; border: 2px solid var(--gfm-line); border-radius: 999px; background: #fff;
}
.gfm-search__input:focus { outline: none; border-color: var(--gfm-violet); }
.gfm-search__btn {
	flex: none; width: 3rem; height: 3rem; display: grid; place-items: center; border: 0; border-radius: 50%;
	background: var(--gfm-violet); color: #fff; cursor: pointer;
}
.gfm-search__btn:hover { background: var(--gfm-violet-dark); }
.gfm-search svg, .gfm-chip svg { width: 1.2rem; height: 1.2rem; }

/* position: relative : les éléments masqués en position absolue (cases, textes pour lecteurs d'écran)
   restent contenus dans la zone défilante au lieu d'élargir la page sur mobile. */
.gfm-filters { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gfm-type, .gfm-date { position: relative; }
.gfm-types { display: contents; border: 0; margin: 0; padding: 0; }
.gfm-chip {
	display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
	padding: .45rem .95rem; border: 2px solid var(--gfm-line); border-radius: 999px; background: #fff;
	font-family: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2; color: var(--gfm-ink);
	transition: border-color .15s, background-color .15s;
}
.gfm-chip:hover { border-color: var(--gfm-violet); }
.gfm-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gfm-type:has(input:checked) { border-color: var(--gfm-violet); background: var(--gfm-tint); }
.gfm-type:has(input:focus-visible) { outline: 3px solid var(--gfm-violet); outline-offset: 2px; }
.gfm-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c); }
.gfm-locate { font-family: inherit; }
.gfm-locate[aria-busy="true"] { opacity: .6; cursor: progress; }
.gfm-date select {
	appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 1rem center, right .7rem center; background-size: .3rem .3rem; background-repeat: no-repeat;
	font-family: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2; color: var(--gfm-ink); cursor: pointer;
	padding: .5rem 2rem .5rem .95rem; border: 2px solid var(--gfm-line); border-radius: 999px; background: #fff;
}

/* --- Liste + carte ------------------------------------------------------ */
.gfm-app {
	width: min(100% - 2 * var(--gutter, 1.25rem), var(--wrap, 1200px)); /* aligné sur le reste du site */ margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
	display: grid; grid-template-columns: minmax(340px, 420px) 1fr;
	height: clamp(520px, calc(100svh - 140px), 900px);
	border: 1px solid var(--gfm-line); border-radius: var(--gfm-radius-lg); overflow: hidden; background: #fff;
}
.gfm-panel { overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1rem 1.5rem; border-right: 1px solid var(--gfm-line); }
.gfm-map-wrap, .gfm-map { position: relative; height: 100%; min-height: 300px; background: var(--gfm-tint); }
.gfm-no-map .gfm-map-wrap { display: none; }
.gfm-no-map .gfm-app { grid-template-columns: 1fr; height: auto; }

.gfm-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; margin-bottom: .75rem; }
.gfm-summary p { margin: 0; font-weight: 600; }
.gfm-reset { border: 0; background: none; padding: 0; font: inherit; font-size: .9rem; color: var(--gfm-violet); text-decoration: underline; cursor: pointer; }

.gfm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.gfm-card {
	position: relative; padding: 1rem 1.1rem 1rem 1.25rem; border: 1px solid var(--gfm-line); border-radius: var(--gfm-radius);
	background: #fff; transition: border-color .15s, box-shadow .15s;
}
.gfm-card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.gfm-card.is-selected { border-color: var(--gfm-violet); box-shadow: 0 0 0 2px var(--gfm-violet); }
.gfm-card__top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.gfm-badge { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c); filter: brightness(.85); }
.gfm-dist { font-size: .8125rem; font-weight: 600; color: var(--gfm-muted); }
.gfm-past { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--gfm-tint); color: var(--gfm-muted); }
.gfm-card.is-past { background: #fbfaff; }
.gfm-card.is-past::before { opacity: .4; }
.gfm-card.is-past .gfm-card__when { color: var(--gfm-muted); }
.gfm-card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0 0 .3rem; color: var(--gfm-ink); }
.gfm-card__when { margin: 0; font-weight: 600; color: var(--gfm-violet-dark); }
.gfm-card__where { margin: .15rem 0 0; font-size: .9375rem; color: var(--gfm-muted); }
.gfm-approx { font-style: italic; }
.gfm-card__desc {
	margin: .5rem 0 0; font-size: .9375rem; white-space: pre-line;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gfm-card.is-selected .gfm-card__desc { -webkit-line-clamp: unset; }
.gfm-card__actions { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .65rem; }
.gfm-link {
	border: 0; background: none; padding: .2rem 0; cursor: pointer;
	font-family: inherit; font-weight: 600; font-size: .9rem; line-height: 1.3; color: var(--gfm-violet); text-decoration: underline; text-underline-offset: .18em;
}
.gfm-link:hover { color: var(--gfm-violet-dark); }
.gfm-more-wrap { text-align: center; margin: 1rem 0 0; }

/* Carte */
.gfm .maplibregl-popup-content { font-family: var(--font-body, system-ui, sans-serif); border-radius: 12px; padding: .8rem 2rem .8rem .9rem; font-family: inherit; box-shadow: 0 8px 24px rgb(30 22 48 / .18); }
.gfm .maplibregl-popup-close-button { font-size: 1.25rem; width: 2rem; height: 2rem; }
.gfm-popup { display: grid; gap: .1rem; font-size: .875rem; color: var(--gfm-ink); }
.gfm-popup strong { font-size: .95rem; line-height: 1.3; }
.gfm-popup .gfm-link { justify-self: start; margin-top: .3rem; }
.gfm-me { width: 18px; height: 18px; border-radius: 50%; background: var(--gfm-ink); border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(30 22 48 / .2); }

/* Mobile : carte en haut, liste en dessous (la liste suit la zone visible de la carte). */
@media (max-width: 899px) {
	.gfm-app { display: flex; flex-direction: column; height: auto; border: 0; border-radius: 0; width: 100%; overflow: visible; }
	.gfm-map-wrap {
		order: -1; height: 45svh; min-height: 260px; max-height: 480px;
		margin: 0 var(--gutter, 1rem) 1rem; border-radius: var(--gfm-radius); overflow: hidden; scroll-margin-top: 1rem;
	}
	.gfm-panel { border: 0; padding: 0 var(--gutter, 1rem) 1rem; overflow: visible; }
	.gfm-head .gfm-cta { width: 100%; }
	.gfm-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter, 1rem)); padding: 2px var(--gutter, 1rem) 6px; scrollbar-width: none; }
	.gfm-filters::-webkit-scrollbar { display: none; }
	.gfm-chip, .gfm-date { flex: none; }
}

/* --- Formulaire (fenêtre modale) ---------------------------------------- */
.gfm-modal-open { overflow: hidden; }
.gfm-dialog {
	width: min(100% - 2rem, 760px); max-height: calc(100dvh - 3rem); padding: 0; border: 0;
	border-radius: var(--gfm-radius-lg); background: #fff; color: var(--gfm-ink); overscroll-behavior: contain;
}
.gfm-dialog::backdrop { background: rgb(30 22 48 / .65); }
.gfm-dialog__inner { position: relative; padding: clamp(1.5rem, 4vw, 2.5rem); }
.gfm-dialog__bar {
	position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	margin: calc(-1 * clamp(1.5rem, 4vw, 2.5rem)) calc(-1 * clamp(1.5rem, 4vw, 2.5rem)) 1rem;
	padding: .9rem clamp(1.5rem, 4vw, 2.5rem); background: #fff; border-bottom: 1px solid var(--gfm-line);
}
.gfm-dialog__close {
	flex: none;
	width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 0; border-radius: 50%;
	background: var(--gfm-tint); color: var(--gfm-violet-dark); cursor: pointer;
}
.gfm-dialog__close svg { width: 1.4rem; height: 1.4rem; }
.gfm-dialog__close:hover { background: var(--gfm-violet); color: #fff; }
.gfm-dialog__title { font-family: var(--font-display, inherit); font-weight: 400; color: var(--gfm-violet); font-size: clamp(1.3rem, 3.5vw, 1.9rem); line-height: 1.15; margin: 0; }
.gfm-note { padding: .75rem 1rem; border-radius: var(--gfm-radius); background: var(--gfm-tint); font-size: .9375rem; }
@media (max-width: 599px) {
	.gfm-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
}

.gfm-form fieldset { border: 0; margin: 1.75rem 0 0; padding: 0; min-width: 0; }
.gfm-form legend { font-family: var(--font-display, inherit); color: var(--gfm-violet); font-size: 1.25rem; line-height: 1.2; padding: 0; }
.gfm-hint, .gfm-required-note, .gfm-count, .gfm-legal { font-size: .875rem; color: var(--gfm-muted); margin: .25rem 0 0; }
.gfm-count { text-align: right; }
.gfm-field { margin-top: 1rem; position: relative; }
.gfm-row { display: grid; gap: 0 1rem; }
@media (min-width: 600px) { .gfm-row { grid-template-columns: 1fr 1fr; } .gfm-row:has(.gfm-field--cp) { grid-template-columns: 9rem 1fr; } }
.gfm-field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.gfm-field label [aria-hidden] { color: var(--gfm-violet); }
.gfm-opt { font-weight: 400; color: var(--gfm-muted); }
.gfm-field input, .gfm-field select, .gfm-field textarea {
	width: 100%; font: inherit; color: var(--gfm-ink); background: #fff;
	padding: .7rem .9rem; border: 2px solid var(--gfm-line); border-radius: 12px;
}
.gfm-field textarea { resize: vertical; min-height: 6rem; }
.gfm-field :is(input, select, textarea):focus { outline: none; border-color: var(--gfm-violet); box-shadow: 0 0 0 3px rgb(150 0 255 / .15); }
.gfm-field [aria-invalid="true"] { border-color: #c4002f; }
.gfm-error { color: #b0002a; font-size: .875rem; font-weight: 600; margin: .3rem 0 0; }
.gfm-form__error { margin-top: 1rem; padding: .75rem 1rem; border-radius: 12px; background: #fff0f3; color: #8f0022; font-weight: 600; }
.gfm-ac__list {
	position: absolute; z-index: 5; left: 0; right: 0; margin: 4px 0 0; padding: .3rem; list-style: none;
	background: #fff; border: 1px solid var(--gfm-line); border-radius: 12px; box-shadow: 0 12px 28px rgb(30 22 48 / .16);
}
.gfm-ac__list li { padding: .55rem .75rem; border-radius: 8px; cursor: pointer; }
.gfm-ac__list li:hover, .gfm-ac__list li[aria-selected="true"] { background: var(--gfm-tint); color: var(--gfm-violet-dark); }
.gfm-turnstile { margin-top: 1.5rem; min-height: 65px; }
.gfm-legal { margin-top: .75rem; }
.gfm-submit { margin-top: .5rem; }
.gfm-done { padding-top: 1rem; }
.gfm-done:focus { outline: none; }
.gfm-done__msg { font-size: 1.15rem; font-weight: 600; padding: 1rem 1.25rem; border-radius: var(--gfm-radius); background: var(--gfm-tint); color: var(--gfm-violet-dark); }
.gfm-done__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn--ghost { background: transparent !important; color: var(--gfm-violet) !important; box-shadow: inset 0 0 0 2px var(--gfm-violet); }
