/* JMHockey - Marqueur : tableau public des matchs en cours ([jmh_matchs_en_cours]).
   Isole derriere le prefixe .jmh-live pour ne pas entrer en conflit avec le theme. */

.jmh-live {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.jmh-live-carte {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #d3dce2;
	border-left: 4px solid #9c5a0c;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(19, 34, 44, .06);
}
.jmh-live-carte.final { border-left-color: #1e7a46; }

.jmh-live-carte > a {
	color: inherit;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
}

.jmh-live-equipe {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: .95rem;
	color: #13222c;
}
.jmh-live-equipe.domicile { flex-direction: row-reverse; text-align: right; }

.jmh-live-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }

.jmh-live-score {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	font-size: 1.3rem;
	color: #13222c;
	min-width: 3.4em;
	text-align: center;
}

.jmh-live-pastille {
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
}
.jmh-live-pastille.en_direct { background: #fbefdd; color: #9c5a0c; }
.jmh-live-pastille.final { background: #e6f3eb; color: #1e7a46; }

.jmh-live-bascule {
	display: block;
	width: 100%;
	margin: 8px 0 0;
	padding: 6px 0 0;
	border: none;
	border-top: 1px solid #ebeff3;
	background: none;
	color: #9c5a0c;
	font-size: .78rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}
.jmh-live-bascule:hover { text-decoration: underline; }

/* Sommaire "qui a marque et les aides", sous le pointage ------------------- */
.jmh-live-buts {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}
.jmh-live-buts li {
	font-size: .82rem;
	color: #33454f;
	padding: 3px 0;
}
.jmh-live-moment { font-variant-numeric: tabular-nums; color: #5c6e79; }
.jmh-live-aides { color: #5c6e79; }
.jmh-live-equipe-but { color: #5c6e79; font-size: .78rem; }

.jmh-live-avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	object-fit: cover;
	vertical-align: -5px;
	margin-right: 3px;
}
.jmh-live-buteur { display: inline-flex; align-items: center; }

@media (max-width: 480px) {
	.jmh-live-equipe { font-size: .85rem; }
}

/* Journal du match, sur la page de chaque match ([jmh_sommaire] / section SportsPress) */
.jmh-journal { container: jmh-journal / inline-size; margin: 0 0 24px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.jmh-journal .jmh-live-carte { padding: 14px 18px; }
.jmh-journal-entete { display: flex; align-items: center; justify-content: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid #ebeff3; }
.jmh-journal-entete .jmh-live-logo { width: 36px; height: 36px; }
.jmh-journal-entete .jmh-live-score { font-size: 1.6rem; }
.jmh-journal-periode h5 { margin: 12px 0 2px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5c6e79; }
.jmh-journal .jmh-live-buts { margin-top: 2px; }
.jmh-journal .jmh-live-buts li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; padding: 5px 0; border-bottom: 1px dashed #ebeff3; }
.jmh-journal .jmh-live-buts li:last-child { border-bottom: none; }
.jmh-journal .jmh-live-avatar { width: 24px; height: 24px; vertical-align: middle; }
.jmh-journal-logo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.jmh-journal-marque { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .8rem; min-width: 3.2em; text-align: center; padding: 2px 6px; border-radius: 6px; background: #eef2f5; color: #13222c; }
.jmh-journal-punition { color: #5c6e79; }
.jmh-journal-icone { min-width: 3.2em; text-align: center; }
.jmh-journal .jmh-live-moment { margin-left: auto; font-size: .78rem; }

@media (max-width: 480px) {
	.jmh-journal-entete .jmh-live-score { font-size: 1.3rem; }
	.jmh-journal .jmh-live-buts li { font-size: .84rem; }
}
/* But → passes, en arbre :  BUT
                              └──> Passe 1 ──> Passe 2 */
.jmh-journal .jmh-live-buts li.jmh-journal-but { display: block; padding: 8px 0 6px; }
.jmh-journal-ligne-but { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.jmh-journal-ligne-but .jmh-live-buteur { font-size: .98rem; color: #13222c; }
.jmh-journal-etiquette { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a9aa4; margin-right: 2px; }
.jmh-journal-passes {
	display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
	margin: 2px 0 0; padding-left: calc(3.2em + 22px + 12px); /* aligne le coude sous le buteur (pastille + logo + espaces) */
	font-size: .84rem; color: #33454f;
}
.jmh-journal-coude {
	position: relative; width: 22px; height: 14px; flex: none; margin-top: -12px;
	border-left: 2px solid #b9c6cf; border-bottom: 2px solid #b9c6cf; border-bottom-left-radius: 4px;
}
.jmh-journal-coude::after,
.jmh-journal-fleche::after {
	content: ""; position: absolute; right: -2px; bottom: -6px;
	border: 5px solid transparent; border-left: 7px solid #b9c6cf; border-right: 0;
}
.jmh-journal-fleche { position: relative; width: 22px; height: 2px; flex: none; background: #b9c6cf; margin: 0 4px 0 2px; }
.jmh-journal-fleche::after { bottom: -4px; }
.jmh-journal-passe { display: inline-flex; align-items: center; gap: 2px; background: #f3f6f8; border: 1px solid #e3e9ee; border-radius: 999px; padding: 2px 10px 2px 8px; }
.jmh-journal-passe .jmh-live-avatar { width: 20px; height: 20px; }
.jmh-journal-sans-aide { font-style: italic; color: #8a9aa4; }

/* Bloc etroit (cellulaire, ou colonne etroite sur la page d'accueil) : en-tete sur deux lignes, et passes
   sur UNE ligne sous le buteur, plus compactes (sans etiquettes « Passe 1/2 » : la fleche suffit) ;
   elles ne passent a la ligne que si les noms sont trop longs.
   Selon la largeur du BLOC lui-meme (requete de conteneur), pas celle de l'ecran.
   BUT
    └─> Passe 1 ─> Passe 2 */
@container jmh-journal (max-width: 520px) {
	.jmh-journal-entete { flex-wrap: wrap; gap: 8px; }
	.jmh-journal-entete .jmh-live-pastille { order: 9; flex-basis: 100%; text-align: center; background: none; padding: 0; }
	.jmh-journal-entete .jmh-live-equipe { min-width: 0; }
	.jmh-journal-passes { gap: 4px; padding-left: 10px; margin-top: 4px; row-gap: 4px; }
	.jmh-journal-coude { width: 14px; }
	.jmh-journal-fleche { width: 10px; margin: 0 4px 0 0; }
	.jmh-journal-passe { padding: 1px 8px 1px 4px; font-size: .8rem; }
	.jmh-journal-passe .jmh-live-avatar { width: 18px; height: 18px; }
	.jmh-journal-passe .jmh-journal-etiquette { display: none; }
	.jmh-journal-punition .jmh-live-aides { flex-basis: 100%; padding-left: 30px; margin-top: -2px; }
}
/* Totaux de saison style LNH : « Andre Auclair (5) », et ligne des gardiens. */
.jmh-cumul { margin-left: 3px; font-weight: 400; font-size: .86em; color: #5c6e79; font-variant-numeric: tabular-nums; }
.jmh-journal-gardiens .jmh-live-avatar { margin-right: 0; }
.jmh-gardien-saison { margin-left: auto; font-size: .78rem; color: #5c6e79; font-variant-numeric: tabular-nums; }
@container jmh-journal (max-width: 520px) {
	.jmh-gardien-saison { margin-left: 0; flex-basis: 100%; padding-left: 30px; margin-top: -2px; }
}

/* Meme journal, dans le resume deplie du tableau de la page d'accueil */
.jmh-journal-accueil { margin: 4px 0 0; }
.jmh-journal-accueil .jmh-journal-periode h5 { margin-top: 8px; }

/* Match corrige dans Evenements apres la saisie du marqueur */
.jmh-journal-corrige { margin: 10px 0 0; padding: 8px 10px; background: #fbefdd; color: #7a4a0a; border-radius: 6px; font-size: .8rem; }

/* Etoiles de la semaine decernees pour le match (JMH_Etoiles) --------------- */
.jmh-etoiles { margin: 10px 0 2px; padding: 10px 12px; background: linear-gradient(135deg, #fff8e1, #fdf0c4); border: 1px solid #f0d78a; border-radius: 8px; }
.jmh-etoiles h5 { margin: 0 0 8px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a6200; }
.jmh-etoiles h5::before { content: "★ "; color: #e0a800; }
.jmh-etoiles ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.jmh-etoile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jmh-etoile-photo {
	/* Photo ronde cerclee d'or, avec une etoile doree en medaillon. */
	position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; padding: 3px; box-sizing: border-box;
	background: linear-gradient(160deg, #ffe680, #e0a800 55%, #b07d00);
	box-shadow: 0 1px 3px rgba(120, 80, 0, .35);
}
.jmh-etoile-photo img, .jmh-etoile-initiales {
	display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 50%; box-sizing: border-box;
	object-fit: cover; object-position: center 20%; background: #fff;
}
.jmh-etoile-nombre {
	/* Etoile doree avec, au centre, le nombre d'etoiles du joueur dans la saison. */
	position: absolute; right: -12px; bottom: -10px; width: 32px; height: 32px; padding-top: 3px; box-sizing: border-box;
	display: flex; align-items: center; justify-content: center;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffe066'/%3E%3Cstop offset='.6' stop-color='%23e0a800'/%3E%3Cstop offset='1' stop-color='%23b07d00'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='50,4 62.5,36 96,37.5 69.5,58.5 79,92 50,73 21,92 30.5,58.5 4,37.5 37.5,36' fill='url(%23o)' stroke='%23fff8e1' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	color: #fff; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
	text-shadow: 0 0 2px #6b4b00, 0 0 1px #6b4b00; filter: drop-shadow(0 1px 1px rgba(80, 50, 0, .45));
}
.jmh-etoile-initiales { display: flex; align-items: center; justify-content: center; background: #13222c; color: #ffe680; font-weight: 700; font-size: .9rem; }
.jmh-etoile-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jmh-etoile-texte strong { font-size: .95rem; color: #13222c; }
.jmh-etoile-saison { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a6200; }
.jmh-etoile-motif { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: #5c4400; font-style: italic; }
.jmh-etoile-motif .jmh-journal-logo { width: 18px; height: 18px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.jmh-etoile-mini { color: #e0a800; margin-left: 3px; font-size: .95em; text-shadow: 0 0 1px #b07d00; }
/* Dans la carte de la page d'accueil : un peu plus compact */
.jmh-live-carte > .jmh-etoiles { margin-top: 10px; }
.jmh-live-carte > .jmh-etoiles .jmh-etoile-photo { width: 50px; height: 50px; }
.jmh-live-carte > .jmh-etoiles .jmh-etoile-nombre { width: 28px; height: 28px; font-size: 11px; }
.jmh-etoile .jmh-etoile-photo { cursor: zoom-in; }
.jmh-etoile .jmh-etoile-photo:focus-visible { outline: 3px solid #13222c; outline-offset: 2px; }

/* Agrandissement d'une etoile : meme pastille en grand, l'etoile suit */
.jmh-etoile-zoom {
	position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
	padding: 20px; box-sizing: border-box; background: rgba(10, 18, 24, .82); cursor: zoom-out;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.jmh-etoile-zoom-carte {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
	padding: 28px 28px 22px; max-width: min(520px, calc(100vw - 40px)); box-sizing: border-box; border-radius: 14px;
	background: linear-gradient(135deg, #fff8e1, #fdf0c4); border: 1px solid #f0d78a; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
/* En grand : la photo entiere (souvent une carte de joueur), cadre dore, le medaillon dans le coin */
.jmh-etoile-photo.jmh-etoile-photo-grande { width: auto; height: auto; max-width: 100%; padding: 6px; border-radius: 12px; cursor: default; }
.jmh-etoile-photo-grande img { width: auto; height: auto; max-width: 100%; max-height: 58vh; border-radius: 7px; object-fit: contain; }
.jmh-etoile-photo-grande .jmh-etoile-initiales { width: 200px; height: 200px; border-radius: 7px; font-size: 4rem; }
.jmh-etoile-photo-grande .jmh-etoile-nombre { right: -22px; bottom: -20px; width: 72px; height: 72px; padding-top: 7px; font-size: 26px; }
.jmh-etoile-zoom .jmh-etoile-texte { align-items: center; }
.jmh-etoile-zoom .jmh-etoile-texte strong { font-size: 1.3rem; }
.jmh-etoile-zoom .jmh-etoile-saison { font-size: .8rem; }
.jmh-etoile-zoom .jmh-etoile-motif { font-size: .95rem; }
.jmh-etoile-zoom .jmh-etoile-zoom-fermer {
	position: absolute; top: 4px; right: 6px; width: 34px; height: 34px; margin: 0; padding: 0; border: 0 !important; border-radius: 50%;
	background: none !important; box-shadow: none !important; color: #8a6200 !important; font-size: 28px; line-height: 1; cursor: pointer;
}
.jmh-etoile-zoom .jmh-etoile-zoom-fermer:hover { background: rgba(138, 98, 0, .12) !important; }

/* Medaillon sur les photos de joueurs (listes d'equipes, fiche, agrandissement) */
.player-photo.jmh-a-etoiles { position: relative; display: inline-block; }
.player-photo .jmh-etoile-nombre { right: -9px; bottom: -7px; width: 21px; height: 21px; padding-top: 2px; font-size: 9px; }
.jmh-etoile-nombre-fiche { position: absolute; z-index: 2; }
.jmh-lightbox-overlay .jmh-etoile-legende {
	position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
	padding: 8px 16px 8px 8px; border-radius: 999px; background: #fff8e1; color: #5c4400; font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; white-space: nowrap;
}
.jmh-lightbox-overlay .jmh-etoile-legende .jmh-etoile-nombre { position: static; width: 34px; height: 34px; font-size: 13px; }
