/* Meetles – Accueil vivant
 * Couleurs reprises du site (titres violets, boutons jaunes, teal / framboise du menu).
 * Polices : héritées du thème. Surchargez les variables dans le CSS du thème enfant si besoin.
 */
.mhs {
	--mhs-violet: #6012f5;
	--mhs-ink: #2b2352;
	--mhs-muted: #6b6785;
	--mhs-cloud: #f8f9fc;
	--mhs-card: var(--bb-content-background-color, #ffffff);
	--mhs-line: var(--bb-content-border-color, #e6e3f1);
	--mhs-yellow: #ffd42e;
	--mhs-teal: #1e5a64;
	--mhs-rasp: #b02a4b;
	--mhs-sage: #5f7f4b;
	--mhs-radius: var(--bb-block-radius, 16px);
	--mhs-btn-radius: 6px;
	font-family: inherit;
	color: var(--mhs-ink);
	box-sizing: border-box;
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(40px, 7vw, 88px) 20px;
}
.mhs *, .mhs *::before, .mhs *::after { box-sizing: inherit; }
.mhs-stack > .mhs + .mhs { padding-top: 0; }

/* Titres : une ligne fine + une ligne grasse, comme le reste de la page */
.mhs .mhs-title {
	margin: 0 0 .55em;
	text-align: center;
	color: var(--mhs-violet);
	font-size: clamp(2rem, 4.6vw, 3.5rem);
	line-height: 1.02;
	letter-spacing: -.02em;
}
.mhs-title__light { display: block; font-weight: 400; }
.mhs-title__bold { display: block; font-weight: 800; }

/* Boutons */
.mhs .mhs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 28px;
	border-radius: var(--mhs-btn-radius);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	line-height: 1.2;
	border: 2px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.mhs .mhs-btn--primary { background: var(--mhs-yellow); color: #1c1733; box-shadow: 0 6px 18px rgba(255, 196, 0, .28); }
.mhs .mhs-btn--primary:hover { transform: translateY(-2px); color: #1c1733; }
.mhs .mhs-btn--ghost { background: transparent; color: var(--mhs-violet); border-color: var(--mhs-violet); }
.mhs .mhs-btn--ghost:hover { background: var(--mhs-violet); color: #fff; }
.mhs a:focus-visible { outline: 3px solid var(--mhs-violet); outline-offset: 3px; }

/* CTA du hero */
.mhs.mhs-cta { padding: 12px 20px 24px; text-align: center; }
.mhs-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.mhs .mhs-cta__note { margin: 16px 0 0; color: var(--mhs-muted); font-size: .98rem; }

/* Compteurs : une phrase, pas un tableau de bord */
.mhs.mhs-counters { text-align: center; }
.mhs .mhs-counters__text {
	margin: 0 auto;
	max-width: 30em;
	font-size: clamp(1.3rem, 2.5vw, 2rem);
	line-height: 1.38;
	font-weight: 400;
	color: var(--mhs-ink);
	text-wrap: balance;
}
.mhs .mhs-counters__text--more { margin-top: .6em; font-size: clamp(1.1rem, 1.9vw, 1.45rem); color: var(--mhs-muted); }
.mhs-num {
	font-weight: 800;
	color: var(--mhs-violet);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Prochaines tables */
.mhs .mhs-up__list {
	list-style: none;
	margin: 8px -20px 0;
	padding: 6px 20px 18px;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(80%, 290px);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 20px;
	scrollbar-width: thin;
}
@media (min-width: 1100px) {
	.mhs .mhs-up__list { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
}
.mhs-card { scroll-snap-align: start; margin: 0; }
.mhs .mhs-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--mhs-card);
	border: 1px solid var(--mhs-line);
	border-radius: var(--mhs-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease;
}
.mhs .mhs-card__link:hover { border-color: var(--mhs-violet); }
.mhs-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mhs-cloud); }
.mhs .mhs-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; margin: 0; }
.mhs-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; height: 100%; font-size: 44px; }
.mhs-card__badge {
	position: absolute; left: 12px; top: 12px;
	background: #f5a524; color: #2b1a00;
	font-size: .78rem; font-weight: 700;
	padding: 4px 10px; border-radius: 999px;
}
.mhs-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.mhs-card__date { font-weight: 700; color: var(--mhs-violet); font-size: .95rem; }
.mhs-card__time { font-weight: 400; }
.mhs-card__title { font-weight: 700; font-size: 1.12rem; line-height: 1.25; color: var(--mhs-ink); }
.mhs-card__game { color: var(--mhs-muted); font-size: .95rem; }
.mhs-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; font-size: .9rem; }
.mhs-card__city { display: inline-flex; align-items: center; gap: 4px; color: var(--mhs-muted); }
.mhs-card__places { background: #eef8ea; color: var(--mhs-sage); font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.mhs-card.is-full .mhs-card__places { background: #fbe9ee; color: var(--mhs-rasp); }
.mhs .mhs-up__more { text-align: center; margin: 22px 0 0; }
.mhs-up__empty { text-align: center; }
.mhs-up__empty p { font-size: 1.15rem; margin: 0 0 18px; }

/* Records */
.mhs-rec__grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-template-areas:
		"game game city variety"
		"game game slot slot";
}
.mhs-tile {
	border-radius: var(--mhs-radius);
	padding: 24px 26px;
	background: var(--mhs-card);
	border: 1px solid var(--mhs-line);
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.mhs .mhs-tile__kicker { margin: 0 0 10px; font-size: .95rem; color: var(--mhs-muted); }
.mhs .mhs-tile__big { margin: 0; font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.05; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mhs .mhs-tile__txt { margin: 10px 0 0; line-height: 1.45; }
.mhs-tile--city { grid-area: city; }
.mhs-tile--city .mhs-tile__big { color: var(--mhs-teal); }
.mhs-tile--variety { grid-area: variety; }
.mhs-tile--variety .mhs-tile__big { color: var(--mhs-rasp); }
.mhs-tile--slot { grid-area: slot; }
.mhs-tile--slot .mhs-tile__big { color: var(--mhs-sage); }

/* La tuile vedette : le jeu, posé sur la table */
.mhs-tile--game {
	grid-area: game;
	background: var(--mhs-violet);
	border-color: var(--mhs-violet);
	color: #fff;
	padding: 28px;
}
.mhs .mhs-tile--game .mhs-tile__kicker { color: rgba(255, 255, 255, .78); }
.mhs-game { display: grid; grid-template-columns: minmax(120px, 44%) 1fr; gap: 26px; align-items: center; margin: 6px 0 4px; }
.mhs-game__box {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 10px;
	transform: rotate(-4deg);
	box-shadow: 10px 14px 0 rgba(20, 0, 70, .35);
	background: #fff;
}
.mhs .mhs-game__name { margin: 0; color: #fff; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
.mhs .mhs-game__count { margin: 12px 0 0; font-size: 1.1rem; }
.mhs-game__count strong { color: var(--mhs-yellow); font-size: 1.35em; }
.mhs .mhs-game__facts { margin: 6px 0 0; color: rgba(255, 255, 255, .82); }
.mhs .mhs-game__bgg { display: inline-block; margin-top: 12px; color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: .92rem; }
.mhs .mhs-game__bgg:hover { color: var(--mhs-yellow); }
.mhs .mhs-podium { list-style: none; counter-reset: pod 1; margin: auto 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .22); display: grid; gap: 10px; }
.mhs .mhs-podium li { counter-increment: pod; display: grid; grid-template-columns: 26px 40px 1fr auto; gap: 12px; align-items: center; margin: 0; }
.mhs-podium li::before { content: counter(pod); font-weight: 800; color: var(--mhs-yellow); font-size: 1.1rem; }
.mhs-podium img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: #fff; }
.mhs-podium li:not(:has(img)) { grid-template-columns: 26px 1fr auto; }
.mhs-podium__name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mhs-podium__n { color: rgba(255, 255, 255, .78); font-size: .9rem; white-space: nowrap; }

/* Carte */
.mhs.mhs-mapsec { text-align: center; }
.mhs .mhs-mapsec__intro { margin: 0 auto 22px; max-width: 36em; color: var(--mhs-muted); }
.mhs-map {
	height: clamp(340px, 48vw, 520px);
	border-radius: var(--mhs-radius);
	border: 1px solid var(--mhs-line);
	overflow: hidden;
	background: #eef0f6;
	z-index: 0;
	position: relative;
}
.mhs-map .leaflet-tile-pane { filter: grayscale(1) brightness(1.06) contrast(.88); }
.mhs-map .leaflet-tooltip { font-family: inherit; font-weight: 600; color: var(--mhs-ink); border-radius: 8px; border: 0; box-shadow: 0 4px 14px rgba(43, 35, 82, .18); }

/* Responsive */
@media (max-width: 900px) {
	.mhs-rec__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas:
			"game game"
			"city variety"
			"slot slot";
	}
}
@media (max-width: 560px) {
	.mhs-rec__grid { grid-template-columns: 1fr; grid-template-areas: "game" "city" "variety" "slot"; }
	.mhs-game { grid-template-columns: 1fr; }
	.mhs-game__box, .mhs-holo { max-width: 220px; }
	.mhs-cta__actions .mhs-btn { width: 100%; }
}
/* Carte holographique (jaquette du jeu le plus joué)
 * Variables pilotées par le JS : --mx/--my (position du pointeur, %), --rx/--ry (inclinaison, deg), --o (intensité 0→1).
 */
.mhs-holo {
	--mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --o: 0;
	transform: rotate(-4deg);
	perspective: 700px;
	touch-action: pan-y;
	cursor: pointer;
}
.mhs-holo__card {
	position: relative;
	display: block;
	aspect-ratio: 1;
	border-radius: 10px;
	overflow: hidden;
	isolation: isolate;
	background: #fff;
	transform: rotateY(var(--rx)) rotateX(var(--ry));
	transform-style: preserve-3d;
	will-change: transform;
	box-shadow: 10px 14px 0 rgba(20, 0, 70, .35);
}
.mhs .mhs-holo__img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; max-width: none; }
.mhs-holo__shine,
.mhs-holo__glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
/* Irisation aux couleurs des Meetles + fines lignes de « foil » */
.mhs-holo__shine {
	background-image:
		repeating-linear-gradient(115deg,
			#8a5cff 0%, #2bb3c0 6%, #9be15d 12%, #ffd42e 18%, #ff7a3d 24%, #e8457a 30%, #8a5cff 36%),
		repeating-linear-gradient(45deg,
			rgba(0, 0, 0, .45) 0px, rgba(0, 0, 0, .45) 3px, rgba(255, 255, 255, .10) 4px, rgba(0, 0, 0, .45) 7px);
	background-size: 300% 300%, 100% 100%;
	background-position: var(--mx) var(--my), center;
	background-blend-mode: overlay;
	mix-blend-mode: color-dodge;
	filter: brightness(.9) contrast(1.4) saturate(1.2);
	opacity: calc(var(--o) * .6);
}
/* Reflet de lumière qui suit le pointeur */
.mhs-holo__glare {
	background: radial-gradient(farthest-corner circle at var(--mx) var(--my),
		rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, .22) 22%, rgba(0, 0, 0, .3) 90%);
	mix-blend-mode: overlay;
	opacity: calc(var(--o) * .9);
}

@media (prefers-reduced-motion: reduce) {
	.mhs-holo__card { transform: none; }
	.mhs-holo { --o: .45; --mx: 35%; --my: 30%; }
	.mhs .mhs-btn, .mhs .mhs-card__link { transition: none; }
	.mhs .mhs-btn--primary:hover { transform: none; }
}
