/* Mots fléchés - styles (compatibles prosilver et dérivés) */

.mf-title { margin-top: 0; }
.mf-tabs { margin-bottom: 12px; }
.mf-tabs .badge { margin-left: 4px; }

.mf-small { font-size: 0.9em; opacity: 0.85; }
.mf-ok { color: #1f7a3a; }
.mf-ko { color: #b42318; }
.mf-warn { font-weight: bold; }
.mf-num { text-align: center; }
.mf-rank { width: 40px; text-align: center; }
.mf-me td { font-weight: bold; }

.mf-columns, .mf-play-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.mf-col-main, .mf-board-col { flex: 2 1 420px; min-width: 0; }
.mf-col-side, .mf-side-col { flex: 1 1 240px; min-width: 0; }
.mf-columns .panel, .mf-play-wrap .panel { margin-bottom: 12px; }
.mf-big-button { font-size: 1.2em; padding: 6px 14px; }

.mf-top { margin: 0 0 8px 20px; list-style: decimal; }
.mf-top li { padding: 2px 0; }
.mf-stats { list-style: none; margin: 0; }
.mf-stats li { padding: 2px 0; }

.mf-medal { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; text-align: center; font-weight: bold; color: #fff; }
.mf-medal-1 { background: #d4a017; }
.mf-medal-2 { background: #9aa4ad; }
.mf-medal-3 { background: #b06a33; }

.mf-seasons { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.mf-seasons .mf-active { font-weight: bold; border-color: #105289; }

.mf-podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 12px 0; }
.mf-podium-step { text-align: center; padding: 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.05); min-width: 120px; }
.mf-podium-1 { order: 2; padding-top: 24px; }
.mf-podium-2 { order: 1; }
.mf-podium-3 { order: 3; }

/* --- Grille --- */
.mf-grid-title { margin-bottom: 6px; }
.mf-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mf-chip { display: inline-block; padding: 3px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.06); font-size: 1.05em; }
.mf-chip:empty { display: none; }

.mf-board {
	--mf-cell: 44px;
	--mf-font: 24px;
	--mf-clue-font: 8px;
	display: grid;
	gap: 0;
	width: max-content;
	max-width: 100%;
	border: 2px solid #1d2b38;
	background: #1d2b38;
	user-select: none;
}

.mf-cell {
	width: var(--mf-cell);
	height: var(--mf-cell);
	box-sizing: border-box;
	border: 1px solid #1d2b38;
	position: relative;
	overflow: hidden;
}

.mf-letter { background: #ffffff; }
.mf-letter input {
	width: 100%;
	height: 100%;
	border: 0;
	margin: 0;
	padding: 0;
	background: transparent;
	text-align: center;
	text-transform: uppercase;
	font: bold var(--mf-font)/1 "Trebuchet MS", Arial, sans-serif;
	color: #1d2b38;
	caret-color: transparent;
	outline: none;
	cursor: pointer;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}
.mf-word { background: #e3eefa; }
.mf-current { background: #ffe58a; }
.mf-wrong input { color: #c62828; }
.mf-wrong { background: #fde2e2; }
.mf-hinted input { color: #6a3fb5; }
.mf-done { background: #e8f6ec; }

.mf-clue {
	background: #c9daea;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 1px;
	cursor: pointer;
}
.mf-def {
	display: block;
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font: var(--mf-clue-font)/1.1 Arial, sans-serif;
	color: #13202c;
	overflow: hidden;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.mf-clue-2 .mf-def { font-size: calc(var(--mf-clue-font) * 0.92); line-height: 1; }
.mf-clue-2 .mf-def + .mf-def { border-top: 1px solid #1d2b38; }
.mf-def:hover { background: rgba(255, 255, 255, 0.4); }
.mf-block { background: #3b4a5a; }

.mf-message { min-height: 1.4em; margin: 8px 0; font-weight: bold; font-size: 1.1em; }
.mf-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-submit { font-weight: bold; }

@media (max-width: 700px) {
	.mf-def { line-height: 1; }
	.mf-podium-step { min-width: 80px; }
}

/* --- Info-bulles --- */
.mf-tips [data-mf-tip] { position: relative; }
.mf-tips [data-mf-tip]:hover::after,
.mf-tips [data-mf-tip]:focus-visible::after,
.mf-tips [data-mf-tip].mf-tip-show::after {
	content: attr(data-mf-tip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 240px;
	padding: 6px 9px;
	border-radius: 6px;
	background: #1d2b38;
	color: #fff;
	font: normal 12px/1.35 Arial, sans-serif;
	text-align: center;
	text-transform: none;
	white-space: normal;
	text-shadow: none;
	letter-spacing: normal;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	z-index: 1000;
	pointer-events: none;
}
.mf-tips [data-mf-tip]:hover::before,
.mf-tips [data-mf-tip]:focus-visible::before,
.mf-tips [data-mf-tip].mf-tip-show::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 2px);
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1d2b38;
	border-bottom: 0;
	z-index: 1000;
	pointer-events: none;
}
.mf-tips .mf-tabs [data-mf-tip]::after,
.mf-tips .mf-tabs [data-mf-tip]::before { bottom: auto; top: calc(100% + 8px); }
.mf-tips .mf-tabs [data-mf-tip]::before { top: calc(100% + 2px); border-top-color: transparent; border-bottom: 6px solid #1d2b38; border-top: 0; }
.mf-tips .mf-tabs { overflow: visible; }

.mf-sound-toggle { border: 0; cursor: pointer; font: inherit; color: inherit; }
.mf-sound-toggle.mf-muted { opacity: 0.55; }

/* --- Partage / invitations --- */
.mf-share-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mf-share-btn {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 5px 10px; border-radius: 16px; border: 0;
	color: #fff !important; text-decoration: none !important; font: bold 12px Arial, sans-serif; cursor: pointer;
	background: #607d8b;
}
.mf-share-btn:hover { filter: brightness(1.1); }
.mf-share-email { background: #546e7a; }
.mf-share-whatsapp { background: #25a244; }
.mf-share-facebook { background: #1877f2; }
.mf-share-x { background: #14171a; }
.mf-share-telegram { background: #229ed9; }
.mf-share-copy { background: #6d4c41; }
.mf-share-copy.mf-copied { background: #2e7d32; }
.mf-share-native { background: #105289; }
.mf-invite-pm { margin-top: 8px; }
.mf-invite-pm label { font-weight: bold; display: block; margin-bottom: 4px; }
.mf-invite-row { display: flex; gap: 6px; align-items: flex-start; }
.mf-invite-row textarea { flex: 1 1 auto; min-width: 0; height: 2.6em; resize: vertical; }

/* --- Badges --- */
.mf-badge-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%;
	color: #fff; font-size: 12px; margin: 1px;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
	vertical-align: middle;
}
.mf-badge-icon .icon { font-size: 12px; color: #fff; }
.mf-badge-big { width: 52px; height: 52px; flex: 0 0 52px; }
.mf-badge-big .icon { font-size: 24px; }
.mf-badge-locked { filter: grayscale(1); opacity: 0.35; }
.mf-badges-inline { line-height: 1.6; }
.mf-my-badges { margin: 6px 0 2px; }
.mf-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.mf-badge-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.04); border: 1px solid rgba(0, 0, 0, 0.06); }
.mf-badge-card.mf-owned { background: #eef7ee; border-color: #b9dcb9; }
.mf-badge-body { min-width: 0; flex: 1 1 auto; }
.mf-progress { height: 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.1); margin: 4px 0; }
.mf-progress span { display: block; height: 100%; border-radius: 4px; background: #105289; }

.mf-badge-popup { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.mf-badge-popup-box { max-width: 420px; width: 100%; background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); animation: mf-pop 0.35s ease-out; }
.mf-badge-popup-box h3 { margin-top: 0; }
.mf-badge-popup-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
@keyframes mf-pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.profile-mf-badges { margin-top: 3px; }
