/* Ludothèque Maison 102 — page de téléchargement des jeux.
   S'adapte au thème : texte dans la police du site, noms des jeux en Big Shoulders (OFL). */

@font-face { font-family: "M102Display"; src: url("fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }

.m102l {
	--ink: #141a3a;
	--paper: #ffffff;
	--shelf: #eef1f8;
	--line: #d9deeb;
	--soft: #5b6385;
	max-width: 1100px;
	margin: 0 auto;
	color: var(--ink);
}
.m102l *, .m102l *::before, .m102l *::after { box-sizing: border-box; }

/* Mode d'emploi : 3 étapes (vraie séquence) */
.m102l-howto { background: var(--ink); color: #fff; border-radius: 18px; padding: 22px 24px 18px; margin: 0 0 28px; }
.m102l-howto h2 { margin: 0 0 14px; font-family: "M102Display", "Arial Narrow", Impact, sans-serif; font-weight: 900; font-size: 30px; line-height: 1.05; color: #fff; }
.m102l-howto ol { list-style: none; counter-reset: m102l; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; }
.m102l-howto li { counter-increment: m102l; position: relative; padding-left: 46px; line-height: 1.45; font-size: 16px; color: #d7dcf3; }
.m102l-howto li b { color: #fff; }
.m102l-howto li::before { content: counter(m102l); position: absolute; left: 0; top: -4px; width: 34px; height: 34px; border-radius: 9px;
	display: grid; place-items: center; background: #ffcb3d; color: #2b1600; font: 900 22px/1 "M102Display", Impact, sans-serif; }
.m102l-other { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 15px; color: #d7dcf3; }

/* Étagère de jeux */
.m102l-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.m102l-game { --m102l-c: #1d3a8f; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.m102l-top { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--m102l-c); color: #fff;
	background-image: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .18)); }
.m102l-icon { width: 64px; height: 64px; border-radius: 14px; flex: none; object-fit: cover; background: rgba(255, 255, 255, .2);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.m102l-initial { display: grid; place-items: center; font: 900 38px/1 "M102Display", Impact, sans-serif; color: #fff; }
.m102l-top h3 { margin: 0; font-family: "M102Display", "Arial Narrow", Impact, sans-serif; font-weight: 900; font-size: 38px; line-height: 1; color: #fff; letter-spacing: .01em; }
.m102l-meta { display: block; margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .85); }

.m102l-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 14px; }
.m102l-desc { margin: 0 0 16px; font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 60ch; }
.m102l-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }

/* Le bouton principal : bien visible */
.m102l a.m102l-dl { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; text-decoration: none;
	background: var(--m102l-c); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); transition: filter .15s, transform .08s; }
.m102l a.m102l-dl:hover { filter: brightness(1.12); color: #fff; }
.m102l a.m102l-dl:active { transform: translateY(2px); }
.m102l-dl svg { width: 30px; height: 30px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.m102l-dl span { display: flex; flex-direction: column; font-weight: 700; font-size: 19px; line-height: 1.2; }
.m102l-dl small { font-weight: 400; font-size: 14px; opacity: .85; }
.m102l a.m102l-play { display: block; text-align: center; padding: 11px 16px; border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 16px;
	color: var(--ink); border: 2px solid var(--line); }
.m102l a.m102l-play:hover { border-color: var(--m102l-c); color: var(--ink); }

/* Les sources : en tout petit */
.m102l a.m102l-src { align-self: flex-end; margin-top: 12px; font-size: 11px; color: var(--soft); text-decoration: underline; text-underline-offset: 2px; }

.m102l a:focus-visible { outline: 3px solid #ffcb3d; outline-offset: 2px; }
.m102l-empty { text-align: center; color: var(--soft); padding: 30px; background: var(--shelf); border-radius: 18px; }

/* iPhone / iPad : on ne peut pas installer d'APK, on met le navigateur en avant */
.m102l-ios .m102l-actions { flex-direction: column-reverse; }
.m102l-ios a.m102l-play { background: var(--m102l-c); color: #fff; border-color: transparent; padding: 14px 16px; font-size: 18px; }
.m102l-ios a.m102l-dl { background: transparent; color: var(--soft); box-shadow: none; border: 2px solid var(--line); padding: 10px 16px; }
.m102l-ios a.m102l-dl small { display: none; }

@media (max-width: 760px) {
	.m102l-howto { padding: 18px; }
	.m102l-howto ol { grid-template-columns: 1fr; gap: 12px; }
	.m102l-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .m102l a { transition: none; } }
