/* ==========================================================================
   mac-emu.net — design system (2026)
   --------------------------------------------------------------------------
   Feuille chargée après app.css : elle pose les jetons, la typographie et les
   composants communs (header, hero, cartes, filtres, panneaux, contenu,
   footer). Les règles héritées restent pour les cas particuliers ; celles-ci
   les surchargent avec le préfixe `body` quand la spécificité l'exige.
   ========================================================================== */

:root,
html:root[data-theme="dark"] {
    /* Surfaces */
    --mk-bg: #4a5686;
    --mk-bg-soft: #515e92;
    --mk-surface: #5866a0;
    --mk-surface-2: #3d4a78;
    --mk-surface-3: #35416c;
    --mk-header: #5e6ca4;

    /* Texte */
    --mk-text: #f5f7ff;
    --mk-muted: #c9d3ed;
    --mk-subtle: #aeb9da;
    --mk-link: #e9efff;

    /* Accents */
    --mk-gold: #ffca48;
    --mk-gold-strong: #ffd76b;
    --mk-gold-ink: #2e3656;
    --mk-pink: #fab2b2;
    --mk-violet: #d5b8f9;
    --mk-teal: #5fbfad;

    /* Traits et formes */
    --mk-border: rgb(255 255 255 / 0.14);
    --mk-border-strong: rgb(255 255 255 / 0.26);
    --mk-radius: 14px;
    --mk-radius-sm: 10px;
    --mk-radius-lg: 20px;
    --mk-shadow: 0 14px 34px rgb(18 25 52 / 0.22);
    --mk-shadow-soft: 0 8px 20px rgb(18 25 52 / 0.14);

    /* Typographie */
    --mk-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mk-font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

    /* Correspondance avec les variables héritées et Pico */
    --emu-gold: var(--mk-gold);
    --emu-heading: #dbe4ff;
    --emu-header-band: var(--mk-header);

    --pico-background-color: var(--mk-bg);
    --pico-color: var(--mk-text);
    --pico-muted-color: var(--mk-muted);
    --pico-muted-border-color: var(--mk-border);
    --pico-border-color: var(--mk-border);
    --pico-card-background-color: var(--mk-surface);
    --pico-card-border-color: var(--mk-border);
    --pico-card-sectioning-background-color: var(--mk-surface-2);
    --pico-primary: var(--mk-link);
    --pico-primary-hover: var(--mk-gold);
    --pico-primary-focus: rgb(255 202 72 / 0.35);
    --pico-primary-background: var(--mk-gold);
    --pico-primary-border: var(--mk-gold);
    --pico-primary-inverse: var(--mk-gold-ink);
    --pico-primary-hover-background: var(--mk-gold-strong);
    --pico-primary-hover-border: var(--mk-gold-strong);
    --pico-form-element-background-color: #f7f8ff;
    --pico-form-element-color: var(--mk-gold-ink);
    --pico-form-element-border-color: transparent;
    --pico-form-element-active-border-color: var(--mk-gold);
    --pico-form-element-focus-color: rgb(255 202 72 / 0.3);
    --pico-form-element-placeholder-color: #6b7495;
    --pico-border-radius: var(--mk-radius-sm);
    --pico-font-family: var(--mk-font-body);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

body {
    font-family: var(--mk-font-body);
    font-size: 1rem;
    line-height: 1.65;
    background: var(--mk-bg);
    color: var(--mk-text);
    -webkit-font-smoothing: antialiased;
}

body h1,
body h2,
body h3,
body h4,
body .brand-name,
body .card-title,
body .panel-title,
body .page-title,
body .side-title,
body .footer-brand {
    font-family: var(--mk-font-display);
    letter-spacing: -0.02em;
}

body h1 {
    font-size: clamp(2rem, 1.55rem + 1.5vw, 2.8rem);
    line-height: 1.12;
    color: var(--mk-text);
}

body h2 {
    font-size: clamp(1.35rem, 1.15rem + 0.55vw, 1.7rem);
    line-height: 1.2;
}

body h3 {
    font-size: 1.15rem;
    line-height: 1.3;
}

body p {
    color: var(--mk-text);
}

body a {
    color: var(--mk-link);
}

body a:hover {
    color: var(--mk-gold);
}

body :focus-visible {
    outline: 3px solid var(--mk-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

body ::selection {
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
}

/* Les textes de contenu gardent une longueur de ligne confortable. */
body .content-body p,
body .content-lead,
body .page > p {
    max-width: 72ch;
}

/* Lien d'évitement : caché au repos, posé en haut à gauche dès le focus. */
body .skip-link {
    position: fixed;
    top: -4rem;
    left: 1rem;
    z-index: 300;
    padding: 0.7rem 1.1rem;
    border-radius: 0 0 10px 10px;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-weight: 700;
    text-decoration: none;
    transition: top 0.15s ease;
}

body .skip-link:focus {
    top: 0;
}

body .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Deux utilitaires héritées de Tailwind, utilisées par les états de
   chargement et de résultat vide de la recherche d'émulateurs. */
body .text-center {
    text-align: center;
}

body .py-8 {
    padding-block: 2rem;
}

/* --------------------------------------------------------------------------
   Structure de page
   -------------------------------------------------------------------------- */

body .page {
    padding-top: 2.25rem;
    padding-bottom: 0;
}

/* Deux colonnes seulement quand la page a une barre latérale : sans elle,
   la moitié droite restait vide et le texte se tassait dans 680 px. */
body .layout {
    display: block;
}

body .layout--with-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem;
    align-items: start;
}

body .layout-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

body .page-title {
    margin: 0 0 0.6rem;
    color: #ffffff;
}

body .page-title + p {
    margin-top: 0;
    color: var(--mk-muted);
    font-size: 1.02rem;
}

/* Introduction d'une page de plateforme : un texte de présentation, pas une
   colonne de 1030 px. */
body .platform-desc {
    max-width: 72ch;
    padding: 1rem 1.15rem;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    background: var(--mk-surface-2);
    color: var(--mk-muted);
    line-height: 1.65;
}

body .platform-desc p {
    max-width: none;
}

body .media-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

body .media-row .grid {
    flex: 1 1 320px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

body .media-row figure img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 10px;
}

body .section-title {
    margin: 2.25rem 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--mk-border);
    font-size: 1.25rem;
    color: var(--mk-text);
}

/* --------------------------------------------------------------------------
   Header et navigation
   -------------------------------------------------------------------------- */

body .site-header {
    background: var(--mk-header);
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
    box-shadow: none;
}

body .site-header .header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 0.8rem 1.25rem;
}

body .brand {
    gap: 0.65rem;
    flex: 0 0 auto;
}

body .brand-mark {
    width: 34px;
    height: 41px;
}

body .brand-name {
    font-size: 1.3rem;
    font-weight: 700;
}

body .brand-dot {
    color: var(--mk-gold);
}

body .brand-slogan {
    color: #d4ddf4;
    font-size: 0.7rem;
}

body .main-nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-left: auto;
    flex-wrap: nowrap;
}

body .main-nav > a,
body .main-nav summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.72rem;
    border-radius: 8px;
    color: #eef2ff;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body .main-nav > a:hover,
body .main-nav summary:hover {
    background: rgb(255 255 255 / 0.1);
    color: var(--mk-gold);
    text-decoration: none;
}

body .main-nav > a.active,
body .main-nav .is-active > summary {
    color: var(--mk-gold);
    background: transparent;
}

/* `app.css` pose encore un soulignement en `inset box-shadow` sur le lien
   actif ; sa spécificité l'emporte, donc on l'annule ici explicitement. */
body .site-header .main-nav > a.active,
body .site-header .main-nav .is-active > summary {
    box-shadow: none;
}

/* Repère de la rubrique courante : un trait doré de 2 px sous le libellé,
   à l'aplomb du texte. L'ancien `inset box-shadow` suivait les coins
   arrondis de la pastille et dessinait un « U » qui se lisait mal. */
body .main-nav > a.active::before,
body .main-nav .is-active > summary::before {
    content: "";
    position: absolute;
    left: 0.72rem;
    right: 0.72rem;
    bottom: 0.32rem;
    height: 2px;
    border-radius: 1px;
    background: var(--mk-gold);
}

body .nav-group {
    position: relative;
}

/* Pico pose une marge basse sur le `details` (20 px) et une seconde sur le
   `summary` d'un `details[open]`. La première décalait le libellé du groupe
   de 10 px vers le haut dans une barre alignée au centre ; la seconde faisait
   grandir le menu de 20 px à l'ouverture, ce qui poussait la page vers le bas
   au survol. Les deux sont annulées ici. */
body .main-nav details.nav-group {
    margin: 0;
    padding: 0;
}

body .main-nav details.nav-group > summary {
    margin: 0;
}

body .nav-group summary {
    list-style: none;
}

body .nav-group summary::-webkit-details-marker {
    display: none;
}

body .nav-group summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

body .nav-group[open] summary::after {
    transform: rotate(225deg);
}

body .nav-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    z-index: 170;
    width: max-content;
    max-width: min(440px, calc(100vw - 2rem));
    padding: 0.75rem;
    background: var(--mk-surface);
    border: 1px solid var(--mk-border);
    border-radius: 14px;
    box-shadow: var(--mk-shadow);
}

/* Le panneau s'ouvre à 0,55 rem sous le libellé : ce pont invisible évite que
   le pointeur ne quitte le groupe en traversant l'écart, ce qui refermerait
   le panneau au moment même où l'on va cliquer. */
body .nav-panel::before {
    content: "";
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.6rem;
}

body .nav-panel--fams {
    width: 340px;
}

body .nav-panel--list {
    width: 360px;
}

body .nav-panel-title {
    margin: 0 0 0.45rem;
    padding: 0 0.55rem;
    color: var(--mk-subtle);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

body .nav-panel-foot {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.55rem 0.1rem;
    border-top: 1px solid var(--mk-border);
    color: var(--mk-subtle);
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Les familles de machines : une colonne, le picto devant, le nombre de
   machines derrière. Deux colonnes faisaient passer « Console de salon » sur
   deux lignes et « Téléphone mobile / Autres » sur trois : les noms sont des
   données, pas des libellés qu'on peut raccourcir. */
body .nav-fams {
    display: block;
}

body .nav-panel a.nav-fam {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 9px;
    color: var(--mk-text);
    font-size: 0.92rem;
    line-height: 1.25;
    text-decoration: none;
}

body .nav-panel a.nav-fam .cat-icon {
    width: 22px;
    height: 22px;
    opacity: 0.75;
}

body .nav-panel a.nav-fam:hover {
    background: var(--mk-surface-2);
    color: var(--mk-gold);
    text-decoration: none;
}

body .nav-panel a.nav-fam:hover .cat-icon {
    opacity: 1;
}

body .nav-fam-name {
    font-weight: 500;
}

body .nav-fam-count {
    margin-left: auto;
    color: var(--mk-subtle);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

/* Les listes de logiciels et de jeux : un libellé, un compteur, une ligne
   d'explication — ce que contient la rubrique, pas seulement son nom. */
body .nav-panel a.nav-item {
    display: block;
    padding: 0.5rem 0.55rem;
    border-radius: 9px;
    color: var(--mk-text);
    text-decoration: none;
}

body .nav-panel a.nav-item:hover {
    background: var(--mk-surface-2);
    color: var(--mk-text);
    text-decoration: none;
}

body .nav-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

body .nav-item-label {
    font-size: 0.94rem;
    font-weight: 600;
}

body .nav-panel a.nav-item:hover .nav-item-label {
    color: var(--mk-gold);
}

body .nav-item-count {
    color: var(--mk-gold);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

body .nav-item-hint {
    display: block;
    margin-top: 0.1rem;
    color: var(--mk-subtle);
    font-size: 0.79rem;
    line-height: 1.35;
}

body .header-tools {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
    margin-left: 0.15rem;
}

body .header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    color: #eef2ff;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body .header-icon:hover {
    background: rgb(255 255 255 / 0.1);
    color: var(--mk-gold);
}

body .nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #eef2ff;
    cursor: pointer;
}

body .nav-toggle:hover {
    background: rgb(255 255 255 / 0.1);
}

body .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 3px 0;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

body .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

body .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero de la page d'accueil
   -------------------------------------------------------------------------- */

body .hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
    padding: clamp(1.75rem, 1.35rem + 1.7vw, 2.6rem);
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius-lg);
    background:
        radial-gradient(100% 120% at 90% 0%, rgb(255 255 255 / 0.08), transparent 55%),
        linear-gradient(135deg, #5b699f 0%, #4b5789 100%);
    box-shadow: var(--mk-shadow);
}

body .hero::before {
    opacity: 0.5;
}

body .hero > * {
    position: relative;
    z-index: 1;
}

body .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: clamp(1.5rem, 1rem + 2vw, 3rem);
    align-items: center;
}

body .hero-copy {
    max-width: 640px;
}

body .hero-eyebrow {
    margin: 0 0 0.7rem;
    color: var(--mk-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

body .hero h1 {
    margin: 0 0 0.7rem;
    color: #ffffff;
    font-size: clamp(1.95rem, 1.5rem + 2.1vw, 2.85rem);
    line-height: 1.04;
}

body .hero-sub {
    max-width: 56ch;
    margin: 0 0 1.15rem;
    color: #d8e0f5;
    font-size: 1.03rem;
    line-height: 1.6;
}

body .hero-search {
    display: flex;
    gap: 0.5rem;
    max-width: 580px;
    margin-top: 0;
}

body .hero-search input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 0.85rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: #f7f8ff;
    color: var(--mk-gold-ink);
    font-size: 0.98rem;
}

body .hero-search button {
    min-height: 52px;
    padding: 0.85rem 1.4rem;
    border: 0;
    border-radius: 999px;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

body .hero-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

body .hero-links-label {
    margin-right: 0.2rem;
    color: var(--mk-subtle);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body .hero-links a {
    padding: 0.26rem 0.6rem;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.08);
    color: #edf1ff;
    font-size: 0.8rem;
    text-decoration: none;
}

body .hero-links a:hover {
    border-color: var(--mk-gold);
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
}

body .hero-feature {
    padding: 1.35rem;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.04));
    box-shadow: 0 8px 24px rgb(18 25 52 / 0.16);
}

body .hero-feature-eyebrow {
    margin: 0 0 0.85rem;
    color: var(--mk-gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body .hero-feature-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

body .hero-feature-head img {
    width: 54px;
    height: 54px;
    padding: 0.35rem;
    border-radius: 12px;
    background: rgb(255 255 255 / 0.92);
    object-fit: contain;
}

body .hero-feature-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: none;
    border-radius: 12px;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-family: var(--mk-font-display);
    font-size: 1.6rem;
    font-weight: 700;
}

body .hero-feature-title {
    margin: 0;
    font-family: var(--mk-font-display);
    font-size: 1.2rem;
    line-height: 1.2;
}

body .hero-feature-title a {
    color: #ffffff;
    text-decoration: none;
}

body .hero-feature-title a:hover {
    color: var(--mk-gold);
}

body .hero-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.3rem 0 0;
    color: #d8e0f5;
    font-size: 0.76rem;
}

body .hero-feature-summary {
    margin: 0.9rem 0 1rem;
    color: #d8e0f5;
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body .hero-feature-link {
    color: var(--mk-gold);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

body .hero-feature-link:hover {
    text-decoration: underline;
}

/* La sélection éditoriale : deux fiches compactes sous la « une » du hero.
   Même carte, même drapeau ; elles n'ont pas besoin du résumé. */
body .hero-feature-rows {
    margin-top: 0.85rem;
}

body .hero-feature-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgb(255 255 255 / 0.12);
    color: inherit;
    text-decoration: none;
}

body .hero-feature-row img,
body .hero-feature-row-fallback {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: rgb(255 255 255 / 0.92);
    object-fit: contain;
}

body .hero-feature-row img {
    padding: 0.25rem;
}

body .hero-feature-row-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mk-gold-ink);
    font-family: var(--mk-font-display);
    font-weight: 700;
}

body .hero-feature-row-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

body .hero-feature-row-title {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .hero-feature-row:hover .hero-feature-row-title {
    color: var(--mk-gold);
}

body .hero-feature-row-meta {
    color: #d8e0f5;
    font-size: 0.75rem;
}

/* La fiche mise en avant, en tête de sa rubrique. Le filet doré et la
   pastille disent pourquoi elle est là ; le reste reprend la carte. */
body .fiches-en-avant {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
}

body .fiche-en-avant {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid rgb(255 202 72 / 0.42);
    border-left: 3px solid var(--mk-gold);
    border-radius: 12px;
    background: linear-gradient(90deg, rgb(255 202 72 / 0.1), rgb(255 255 255 / 0.03));
}

body .fiche-en-avant-pill {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    margin: 0;
    padding: 0.1rem 0.55rem;
    border: 1px solid rgb(255 202 72 / 0.4);
    border-radius: 999px;
    background: rgb(255 202 72 / 0.14);
    color: var(--mk-gold);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body .fiche-en-avant-logo {
    display: flex;
    width: 84px;
    height: 84px;
    flex: none;
    align-items: center;
    justify-content: center;
}

body .fiche-en-avant-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body .fiche-en-avant-fallback {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-family: var(--mk-font-display);
    font-size: 2rem;
    font-weight: 700;
}

body .fiche-en-avant-body {
    flex: 1;
    min-width: 0;
}

body .fiche-en-avant-kind {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body .fiche-en-avant-title {
    margin: 0 0 0.3rem;
    padding-right: 4.5rem;
    font-size: 1.25rem;
    line-height: 1.25;
}

body .fiche-en-avant-title a {
    color: #ffffff;
    text-decoration: none;
}

body .fiche-en-avant-title a:hover {
    color: var(--mk-gold);
}

body .fiche-en-avant .card-summary {
    -webkit-line-clamp: 2;
}

body .fiche-en-avant-more {
    margin: 0.55rem 0 0;
}

body .fiche-en-avant-more a {
    color: var(--mk-gold);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

body .fiche-en-avant-more a:hover {
    text-decoration: underline;
}

/* L'interpréteur a sa couleur comme les autres rubriques. */
.code-interpreteur {
    color: var(--mk-teal);
}

@media (max-width: 640px) {
    body .fiche-en-avant {
        gap: 0.75rem;
        padding: 1rem;
    }

    body .fiche-en-avant-logo {
        width: 56px;
        height: 56px;
    }

    body .fiche-en-avant-title {
        padding-right: 3.5rem;
        font-size: 1.1rem;
    }
}

/* --------------------------------------------------------------------------
   Cartes (listes, fiches, actualités)
   -------------------------------------------------------------------------- */

body .list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body .grid {
    gap: 1.25rem;
}

body .card {
    overflow: hidden;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius);
    background: var(--mk-surface);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body .card:hover {
    border-color: rgb(255 202 72 / 0.45);
    box-shadow: var(--mk-shadow-soft);
    transform: translateY(-2px);
}

/* `.card-row` suppose un conteneur flex : sans `display`, `flex-direction`
   restait sans effet et la vignette passait au-dessus du texte. */
body .card-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

body .card-thumb {
    width: 150px;
    min-height: 128px;
    flex-shrink: 0;
    background: var(--mk-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body .card-thumb-logo img,
body .card-thumb-jeu img {
    padding: 0.7rem;
    object-fit: contain;
}

/* Une icône carrée n'a pas la hauteur d'un texte : la vignette reste un
   carré centré au lieu de s'étirer sur toute la carte. */
body .card-thumb.card-thumb-logo {
    width: 140px;
    height: 140px;
    min-height: 0;
    align-self: center;
    background: transparent;
}

body .card-body {
    flex: 1;
    min-width: 0;
    padding: 1.1rem 1.25rem;
}

body .card-title {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    line-height: 1.3;
}

body .card-title a {
    color: var(--mk-text);
    text-decoration: none;
}

body .card-title a:hover {
    color: var(--mk-gold);
    text-decoration: none;
}

body .card-summary {
    display: -webkit-box;
    margin: 0.45rem 0 0;
    color: var(--mk-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body .card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.3rem;
    color: var(--mk-muted);
    font-size: 0.76rem;
}

body .card-tags:not(.platform-logos) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.55rem 0 0;
}

/* L'action de la carte iOS : le bouton d'installation, sous le résumé. */
body .card-action {
    margin: 0.7rem 0 0;
}

/* Les logos de plateformes forment une grille de tuiles, pas une rangée de
   pastilles : chaque logo garde sa case, le nom s'affiche au survol. */
body .platform-logos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 0.4rem;
    margin: 0.55rem 0 0;
}

body .platform-logos .tag-logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 36px;
}

body .list-jeux .card-thumb-jaquette {
    width: 120px;
    min-height: 148px;
    background: var(--mk-surface-2);
}

body .list-jeux .card-thumb-jaquette img {
    object-fit: contain;
    padding: 0.4rem;
}

/* --------------------------------------------------------------------------
   Pastilles et étiquettes
   -------------------------------------------------------------------------- */

body .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.5rem;
    border: 1px solid rgb(255 202 72 / 0.28);
    border-radius: 999px;
    background: rgb(255 202 72 / 0.14);
    color: var(--mk-gold);
    font-family: var(--mk-font-body);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
}

body .badge-portage {
    border-color: rgb(213 184 249 / 0.3);
    background: rgb(213 184 249 / 0.14);
    color: var(--mk-violet);
}

body .badge-obtention-source {
    border-color: var(--mk-border);
    background: rgb(255 255 255 / 0.08);
    color: var(--mk-muted);
}

body .badge-obtention-aucun {
    border-color: rgb(250 178 178 / 0.3);
    background: rgb(250 178 178 / 0.12);
    color: var(--mk-pink);
}

/* Logiciel abandonné : ni l'or (la valeur, l'action), ni le rose de
   l'indisponible — le logiciel existe et fonctionne peut-être encore. Gris,
   comme une réserve, pas comme une alerte. */
body .badge-obsolete {
    border-color: var(--mk-border);
    background: rgb(255 255 255 / 0.06);
    color: var(--mk-subtle);
}

body .tag {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.08);
    color: var(--mk-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    text-decoration: none;
}

body .tag:hover {
    border-color: rgb(255 202 72 / 0.4);
    color: var(--mk-gold);
    text-decoration: none;
}

body .tag-logo {
    gap: 0.4rem;
    padding: 0.3rem 0.55rem;
}

body .tag-logo img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   Panneaux de l'accueil
   -------------------------------------------------------------------------- */

body .panel {
    padding: 1.5rem;
    border: 1px solid var(--mk-border);
    border-radius: 16px;
    background: var(--mk-surface-2);
    background-image: none;
    box-shadow: none;
}

body .panel-title {
    margin: 0 0 1.1rem;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
}

body .panel-more {
    margin: 0.9rem 0 0;
    text-align: right;
}

body .panel-more a {
    color: var(--mk-muted);
    font-size: 0.85rem;
    text-decoration: none;
}

body .panel-more a:hover {
    color: var(--mk-gold);
}

body .updates-block,
body .platforms-block {
    margin-bottom: 1.5rem;
}

body .table-scroll {
    border-color: var(--mk-border-strong);
    border-radius: 10px;
}

body .updates-table tbody tr:hover {
    background-color: rgb(255 255 255 / 0.045);
}

body .updates-table .col-name a {
    color: var(--mk-text);
}

body .updates-table .col-name a:hover {
    color: var(--mk-gold);
}

body .updates-table .col-platform,
body .updates-table .name-platform,
body .updates-table .col-date {
    color: var(--mk-muted);
}

body .updates-table .col-date {
    font-variant-numeric: tabular-nums;
}

body .fam-list {
    gap: 1.1rem;
}

body .fam-head {
    border-radius: 10px;
    transition: background-color 0.15s ease;
}

body .fam-head:hover {
    background: rgb(255 255 255 / 0.055);
}

body .plat-tile {
    border: 1px solid var(--mk-border);
    border-radius: 10px;
    background: var(--mk-surface);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

body .plat-tile:hover,
body .plat-tile:focus-visible {
    border-color: rgb(255 202 72 / 0.5);
    background: var(--mk-surface-3);
}

/* Sidebar de l'accueil */
body .side-title {
    margin: 0 0 0.7rem;
    color: var(--mk-text);
    font-size: 1.05rem;
}

/* Sommaire des plateformes : la rubrique courante se marque, les
   sous-familles restent en retrait, reliées par un filet. */
body .side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Pico applique ses propres marges aux liens d'une `nav ul` : le sommaire se
   décalait et respirait comme un menu horizontal. On remet à zéro. */
body .side-nav ul,
body .side-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

body .side-nav a {
    margin: 0;
}

body .side-nav > a {
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    color: var(--mk-muted);
    font-size: 0.92rem;
    line-height: 1.35;
    text-decoration: none;
}

body .side-nav > a:hover {
    background: rgb(255 255 255 / 0.07);
    color: #ffffff;
    text-decoration: none;
}

body .side-nav > a.active {
    background: rgb(255 202 72 / 0.14);
    color: var(--mk-gold);
    font-weight: 600;
}

body .side-nav .side-sub {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.05rem;
    margin: 0.15rem 0 0.5rem 0.7rem;
    padding: 0 0 0 0.7rem;
    border-left: 1px solid var(--mk-border);
}

body .side-nav .side-sub li {
    width: 100%;
}

body .side-nav .side-sub a {
    display: block;
    width: auto;
    padding: 0.28rem 0.5rem;
    border-radius: 6px;
    color: var(--mk-subtle);
    font-size: 0.84rem;
    line-height: 1.4;
    text-decoration: none;
}

body .side-nav .side-sub a:hover,
body .side-nav .side-sub a.active {
    color: var(--mk-gold);
    text-decoration: none;
}

body .side-nav .side-sub a.active {
    background: rgb(255 202 72 / 0.1);
    font-weight: 600;
}

/* Le sommaire des plateformes est long (toutes les familles et leurs
   machines) : collé en haut de l'écran, il laissait ses dernières entrées
   hors d'atteinte, la page continuant de défiler sans lui. Il défile donc
   avec la page, comme le reste de la colonne. */

body .side-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

body .side-item {
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--mk-border);
    border-radius: 10px;
    background: var(--mk-surface);
}

body .side-item-title {
    margin: 0.25rem 0 0;
    font-size: 0.94rem;
    line-height: 1.35;
}

body .side-item-title a {
    color: var(--mk-text);
    text-decoration: none;
}

body .side-item-title a:hover {
    color: var(--mk-gold);
}

body .side-item time {
    color: var(--mk-muted);
    font-size: 0.72rem;
}

body .kind-label {
    color: var(--mk-gold);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body .kind-dossier {
    color: var(--mk-violet);
}

/* --------------------------------------------------------------------------
   Filtres, formulaires, boutons
   -------------------------------------------------------------------------- */

/* Trois familles de recherche, trois formes :
   — `.jeux-filtres` empile recherche et sélecteurs dans une carte ;
   — `.liste-recherche` (news, dossiers, bestofs…) reste une rangée
     « champ + bouton » ;
   — `.search-filters` (émulateurs) est une rangée de contrôles. */
body .jeux-filtres {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.25rem 0 1.15rem;
    padding: 1rem;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    background: var(--mk-surface-2);
}

body .liste-recherche {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 1.25rem 0 1.5rem;
    padding: 1rem;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    background: var(--mk-surface-2);
}

body .liste-recherche input[type="search"] {
    flex: 1 1 16rem;
    margin: 0;
}

body .liste-recherche button {
    flex: 0 0 auto;
    margin: 0;
    border-color: transparent;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-weight: 700;
}

body .liste-recherche button:hover,
body .liste-recherche button:focus-visible {
    background: var(--mk-gold-strong);
    color: var(--mk-gold-ink);
}

body .liste-recherche-effacer {
    margin-left: auto;
    color: var(--mk-muted);
    font-size: 0.82rem;
}

body .liste-recherche-compte {
    margin: -0.9rem 0 1.4rem;
    color: var(--mk-muted);
    font-size: 0.82rem;
}

/* Filtres de la page émulateurs : une rangée compacte, chaque contrôle à la
   largeur d'un champ. */
body .search-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1.4rem;
    padding: 0;
    border: 0;
    background: none;
}

body .search-filters .filter-dropdown {
    flex: 1 1 260px;
}

body .search-filters select {
    flex: 1 1 200px;
    min-width: 0;
    margin: 0;
}

body .filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: var(--mk-radius-sm);
    background: #f7f8ff;
    color: var(--mk-gold-ink);
    font-size: 0.92rem;
    font-weight: 400;
    text-align: left;
}

body .filter-btn::after {
    content: "";
    width: 7px;
    height: 7px;
    flex: none;
    margin-top: -3px;
    border-right: 1.6px solid #33406e;
    border-bottom: 1.6px solid #33406e;
    transform: rotate(45deg);
}

body .filter-btn:hover {
    background: #ffffff;
    color: var(--mk-gold-ink);
}

body .filter-panel {
    border: 1px solid var(--mk-border-strong);
    border-radius: 12px;
    background: var(--mk-surface);
    box-shadow: var(--mk-shadow);
}

body .search-filters .filter-panel {
    left: 0;
    right: 0;
    min-width: 0;
}

body .filter-search {
    min-height: 38px;
    margin: 0 0 0.35rem;
}

body .filter-option {
    color: var(--mk-muted);
}

body .filter-option.active {
    background: var(--mk-surface-2);
    color: var(--mk-gold);
}

body .filter-group-title {
    color: var(--mk-text);
}

body .search-bar {
    margin-bottom: 0.7rem;
}

body .jeux-filtres-recherche {
    display: flex;
    gap: 0.5rem;
}

body .jeux-filtres-recherche input {
    flex: 1;
    min-width: 0;
}

body .jeux-filtres-choix {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

body .jeux-filtres-case,
body .filter-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--mk-muted);
    font-size: 0.82rem;
}

/* Pico neutralise la case (`appearance: none`) ; `width: auto` la réduisait
   alors à une barre blanche. On la dessine ici, dorée une fois cochée. */
body .jeux-filtres-case input[type="checkbox"],
body .filter-check input[type="checkbox"] {
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: 1.15rem;
    height: 1.15rem;
    min-height: 0;
    flex: none;
    margin: 0;
    border: 1.5px solid rgb(255 255 255 / 0.45);
    border-radius: 5px;
    background: rgb(255 255 255 / 0.06);
    cursor: pointer;
}

body .jeux-filtres-case input[type="checkbox"]:checked,
body .filter-check input[type="checkbox"]:checked {
    border-color: var(--mk-gold);
    background: var(--mk-gold);
}

body .jeux-filtres-case input[type="checkbox"]:checked::before,
body .filter-check input[type="checkbox"]:checked::before {
    content: "";
    width: 0.62rem;
    height: 0.32rem;
    margin-top: -0.12rem;
    border-left: 2px solid var(--mk-gold-ink);
    border-bottom: 2px solid var(--mk-gold-ink);
    transform: rotate(-45deg);
}

body .jeux-filtres-case input[type="checkbox"]:focus-visible,
body .filter-check input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--mk-gold);
    outline-offset: 2px;
}

body .jeux-filtres-effacer {
    margin-left: auto;
    color: var(--mk-gold);
    font-size: 0.8rem;
}

body .jeux-compte,
body .result-count {
    margin: 0 0 0.9rem;
    color: var(--mk-muted);
    font-size: 0.82rem;
}

body input:not([type="checkbox"]):not([type="radio"]),
body select,
body textarea {
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--mk-radius-sm);
    background: #f7f8ff;
    color: var(--mk-gold-ink);
    font-family: var(--mk-font-body);
    font-size: 0.92rem;
}

body input::placeholder,
body textarea::placeholder {
    color: #6b7495;
}

body select {
    min-width: 10rem;
}

body input:focus,
body select:focus,
body textarea:focus {
    border-color: var(--mk-gold);
    box-shadow: 0 0 0 3px rgb(255 202 72 / 0.3);
    outline: none;
}

body button,
body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 0.95rem;
    border: 1px solid transparent;
    border-radius: var(--mk-radius-sm);
    font-family: var(--mk-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body .btn {
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
}

body .btn:hover {
    background: var(--mk-gold-strong);
    color: var(--mk-gold-ink);
    text-decoration: none;
}

body .btn-block {
    width: 100%;
}

body .jeux-filtres button {
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-weight: 700;
}

body .search-bar input {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}

body .filter-btn,
body .filter-select {
    min-height: 44px;
}

body .filter-group-title {
    width: 100%;
    justify-content: flex-start;
    background: transparent;
    color: var(--mk-text);
    font-size: 0.8rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Contenu des fiches
   -------------------------------------------------------------------------- */

body .content {
    max-width: 820px;
    margin-inline: auto;
}

/* Un titre d'article n'a pas à crier : sur une fiche, la taille maximale de
   la page laissait les titres longs tenir sur trois lignes. */
body .content > .page-title,
body .content > .sheet-head .page-title {
    font-size: clamp(1.7rem, 1.35rem + 1.2vw, 2.15rem);
    line-height: 1.15;
}

/* En-tête de fiche : le logo à gauche, le texte et les actions à droite. */
body .sheet-head {
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    margin-bottom: 1.6rem;
}

/* Pico colore le `header` d'un `article` et le déborde par des marges
   négatives : dans une fiche, cela coupait une bande au milieu de la carte. */
body .content > .sheet-head {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body .sheet-logo {
    width: 112px;
    height: 112px;
    flex: none;
    border-radius: 18px;
    object-fit: contain;
    background: rgb(255 255 255 / 0.12);
    padding: 0.4rem;
}

body .sheet-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-family: var(--mk-font-display);
    font-size: 2.4rem;
    font-weight: 700;
}

body .sheet-head-body {
    min-width: 0;
}

body .sheet-head-body .page-title {
    margin-bottom: 0.4rem;
}

body .sheet-summary {
    margin: 0.5rem 0 0;
    max-width: 62ch;
    color: var(--mk-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

body .sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

body .btn-ghost {
    background: rgb(255 255 255 / 0.08);
    border: 1px solid var(--mk-border-strong);
    color: var(--mk-text);
}

body .btn-ghost:hover {
    background: rgb(255 255 255 / 0.14);
    border-color: var(--mk-gold);
    color: var(--mk-gold);
}

@media (max-width: 640px) {
    body .sheet-head {
        flex-direction: column;
        gap: 1rem;
    }

    body .sheet-logo {
        width: 84px;
        height: 84px;
        border-radius: 14px;
    }
}

body .content-logo {
    max-width: 140px;
    margin: 0 0 1rem;
    border-radius: 12px;
}

body .game-cover {
    float: none;
    display: block;
    width: min(180px, 40%);
    margin: 0 0 1.25rem;
    border-radius: 12px;
    box-shadow: var(--mk-shadow-soft);
}

body .content-lead {
    color: var(--mk-muted);
    font-size: 1.08rem;
    line-height: 1.6;
}

body .content-body {
    color: var(--mk-text);
    font-size: 1rem;
    line-height: 1.7;
}

body .content-body h2 {
    margin-top: 2.2rem;
    margin-bottom: 0.7rem;
}

body .content-body h3 {
    margin-top: 1.6rem;
}

body .content-body a {
    color: var(--mk-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

body .content-body a:hover {
    color: var(--mk-gold-strong);
}

body .content-body img {
    border-radius: 10px;
}

body .content-body blockquote {
    margin: 1.4rem 0;
    padding: 0.8rem 1rem;
    border-left: 3px solid var(--mk-gold);
    border-radius: 0 8px 8px 0;
    background: rgb(255 255 255 / 0.045);
    color: var(--mk-muted);
}

body .content-body code {
    padding: 0.12rem 0.35rem;
    border-radius: 5px;
    background: rgb(255 255 255 / 0.1);
    color: #f2f5ff;
}

body .content-body pre {
    padding: 1rem;
    border: 1px solid var(--mk-border);
    border-radius: 10px;
    background: var(--mk-surface-3);
    overflow-x: auto;
}

body .content-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

body .content-body th,
body .content-body td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--mk-border);
    text-align: left;
}

body .content-body th {
    color: var(--mk-gold);
    font-weight: 600;
}

body .specs {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.4rem 1.4rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    background: var(--mk-surface-2);
}

body .specs dt {
    color: var(--mk-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body .specs dd {
    margin: 0;
}

body .links {
    padding-left: 1.15rem;
}

body .links li {
    margin-bottom: 0.45rem;
}

body .notice {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--mk-border);
    border-radius: 10px;
    background: rgb(255 255 255 / 0.05);
    color: var(--mk-muted);
    font-size: 0.86rem;
}

/* Logiciel abandonné : le trait de gauche porte l'avertissement, le gras
   résume, le reste explique. Le visiteur doit pouvoir décider en deux
   secondes s'il descend ou s'il passe. */
body .notice-obsolete {
    margin-top: 1rem;
    border-left: 3px solid rgb(250 178 178 / 0.6);
}

body .notice-obsolete strong {
    display: block;
    color: var(--mk-text);
}

/* Bandeau iOS (partials/ios-hint) : même facture qu'un avis, mais avec une
   action. `hidden` garde le bloc invisible tant que le script n'a pas
   reconnu l'appareil. */
body .ios-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    margin: 0 0 1.4rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    background: rgb(255 255 255 / 0.05);
}

body .ios-hint[hidden] {
    display: none;
}

body .ios-hint-body {
    flex: 1 1 240px;
}

body .ios-hint-title {
    margin: 0 0 0.15rem;
    color: var(--mk-text);
    font-size: 0.95rem;
    font-weight: 600;
}

body .ios-hint-text {
    margin: 0;
    color: var(--mk-muted);
    font-size: 0.85rem;
}

body .ios-hint .btn {
    flex: none;
}

body .ios-hint-close {
    flex: none;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mk-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

body .ios-hint-close:hover {
    color: var(--mk-text);
    background: none;
}

/* Le retour à la fiche reste un lien discret, pas un encadré. */
body .reactions-page > .link-note {
    margin: 0 0 1.1rem;
    font-size: 0.85rem;
}

body .reactions-page > .link-note a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--mk-muted);
    text-decoration: none;
}

body .reactions-page > .link-note a:hover {
    color: var(--mk-gold);
}

body .version-entry {
    border-color: var(--mk-border);
}

body .edit-button {
    color: var(--mk-muted);
    border-color: var(--mk-border);
}

body .edit-button:hover {
    border-color: var(--mk-gold);
    color: var(--mk-gold);
}

body .play-on-mac {
    border: 1px solid var(--mk-border);
    border-top: 3px solid var(--mk-gold);
    border-radius: 14px;
    background: var(--mk-surface-2);
    box-shadow: none;
}

body .play-step-num {
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
}

body .play-item {
    border-color: var(--mk-border);
    background: var(--mk-surface);
}

body .play-item:hover {
    border-color: rgb(255 202 72 / 0.45);
}

body .reactions-cta {
    border-color: var(--mk-border);
    background: var(--mk-surface-2);
    border-radius: 14px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

body .pagination-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 1.75rem;
}

body .pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0;
}

body .pagination a,
body .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--mk-border);
    border-radius: 8px;
    background: var(--mk-surface);
    color: var(--mk-text);
    font-size: 0.82rem;
    text-decoration: none;
}

body .pagination a:hover {
    border-color: var(--mk-gold);
    color: var(--mk-gold);
    text-decoration: none;
}

body .pagination .active {
    border-color: var(--mk-gold);
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-weight: 700;
}

body .pagination .active span {
    border-color: transparent;
    background: transparent;
    color: inherit;
}

body .pagination-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

body .pagination-gap {
    border-color: transparent;
    background: transparent;
}

body .pagination-summary {
    margin: 0;
    color: var(--mk-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

body .site-footer {
    background: var(--mk-bg);
    border-top-color: var(--mk-border);
    margin-top: 0;
}

body .footer-brand {
    color: var(--mk-text);
    font-size: 1rem;
}

body .footer-col-title {
    color: var(--mk-gold);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

body .footer-col a {
    color: var(--mk-muted);
    font-size: 0.86rem;
}

body .footer-col a:hover {
    color: var(--mk-gold);
    text-decoration: none;
}

body .footer-copy {
    color: var(--mk-subtle);
}

body .lang-current,
body .lang-list a {
    color: var(--mk-muted);
}

/* Sélecteur de langue : une petite pastille, la langue courante en or. */
body .site-footer .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--mk-border);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.05);
}

body .site-footer .lang-current {
    color: var(--mk-gold);
    font-weight: 700;
}

body .site-footer .lang-list a {
    padding: 0 0.35rem;
    text-decoration: none;
}

body .lang-list a:hover {
    color: var(--mk-gold);
}

/* --------------------------------------------------------------------------
   Grands écrans et adaptations
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    body .header-inner {
        gap: 0.75rem;
    }

    body .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.1rem;
        margin: 0;
        padding: 0.65rem 1.25rem 0.9rem;
        border-bottom: 1px solid var(--mk-border);
        background: var(--mk-surface);
        box-shadow: var(--mk-shadow);
        /* Un tiroir plus haut que l'écran doit pouvoir défiler : les familles
           de machines ouvertes dépassent la hauteur d'un téléphone. */
        max-height: calc(100dvh - 8rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 150;
    }

    body .main-nav.is-open {
        display: flex;
    }

    body .main-nav > a,
    body .main-nav summary {
        padding: 0.6rem 0.7rem;
        font-size: 0.98rem;
        border-radius: 8px;
    }

    /* Dans le tiroir, l'onglet courant se marque par un fond, pas par un
       soulignement qui traversait toute la largeur. */
    body .main-nav > a.active,
    body .main-nav .is-active > summary {
        background: rgb(255 202 72 / 0.14);
        box-shadow: none;
        color: var(--mk-gold);
    }

    /* Dans le tiroir, l'état courant est déjà porté par le fond de la ligne :
       le trait doré ferait doublon. */
    body .main-nav > a.active::before,
    body .main-nav .is-active > summary::before {
        content: none;
    }

    body .main-nav > a + a,
    body .main-nav > a + .nav-group,
    body .main-nav .nav-group + .nav-group,
    body .main-nav .nav-group + a {
        border-top: 1px solid rgb(255 255 255 / 0.06);
    }

    body .nav-group {
        position: static;
    }

    /* Dans le tiroir, le panneau se déplie sur place, en retrait : il perd son
       fond, sa ombre et son pont invisible. */
    body .nav-panel,
    body .nav-panel--fams,
    body .nav-panel--list {
        position: static;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0 0 0.35rem 0.9rem;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body .nav-panel::before {
        display: none;
    }

    body .nav-panel-title {
        padding-left: 0.55rem;
    }

    body .nav-panel-foot {
        border-top: 0;
    }

    body .header-tools {
        margin-left: auto;
    }

    body .nav-toggle {
        display: inline-flex;
        flex-direction: column;
    }
}

/* Le hero passe sur une colonne avant le reste : à 950 px, deux colonnes
   écrasaient la recherche et la carte « À la une ». */
@media (max-width: 1000px) {
    body .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
    }

    body .hero-feature {
        max-width: 540px;
    }
}

@media (max-width: 900px) {
    body .layout--with-side {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    body .layout-side {
        order: 0;
    }

    body .hero {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    body .header-inner {
        padding: 0.65rem 1rem;
    }

    body .brand-mark {
        width: 28px;
        height: 34px;
    }

    body .brand-name {
        font-size: 1.15rem;
    }

    body .brand-slogan {
        display: none;
    }

    body .hero {
        padding: 1.6rem 1.15rem;
        border-radius: 16px;
    }

    body .hero h1 {
        font-size: clamp(1.85rem, 1.3rem + 3vw, 2.6rem);
    }

    body .hero-search {
        flex-wrap: wrap;
    }

    body .hero-search input,
    body .hero-search button {
        flex: 1 1 100%;
        width: 100%;
    }

    /* Sur téléphone, la vignette reste à gauche du texte : une liste
       d'émulateurs en colonnes empilait un carré de 180 px avant chaque
       titre. Seules les jaquettes de jeux gardent leur cadre. */
    body .card-thumb {
        width: 84px;
        height: 84px;
        min-height: 0;
        margin: 0.9rem 0 0.9rem 0.9rem;
        align-self: flex-start;
        border-radius: 12px;
        flex: none;
    }

    body .card-thumb img,
    body .list-jeux .card-thumb-jaquette img {
        object-fit: contain;
    }

    body .card-thumb.card-thumb-logo {
        width: 84px;
        height: 84px;
        align-self: flex-start;
    }

    body .list-jeux .card-thumb-jaquette {
        width: 90px;
        height: 116px;
        min-height: 0;
        margin: 0.9rem 0 0.9rem 0.9rem;
        align-self: flex-start;
        border-radius: 10px;
    }

    /* Colonne de texte étroite (390 px de large) : les pastilles et le titre
       se resserrent pour ne pas empiler trois étiquettes par carte. */
    body .card-title {
        font-size: 1.05rem;
    }

    body .card-meta {
        gap: 0.25rem;
        font-size: 0.72rem;
    }

    body .card-tags {
        gap: 0.25rem;
    }

    body .tag {
        padding: 0.12rem 0.45rem;
        font-size: 0.7rem;
    }

    body .badge {
        padding: 0.1rem 0.4rem;
        font-size: 0.66rem;
    }

    body .card-body {
        padding: 0.9rem;
    }

    body .liste-recherche input[type="search"],
    body .liste-recherche button {
        flex: 1 1 100%;
        width: 100%;
    }

    body .liste-recherche-effacer {
        margin-left: 0;
    }

    /* Tableau des mises à jour : sur un écran de 390 px, des lignes de 110 px
       font défiler trois titres seulement. On resserre les cellules et les
       pastilles plutôt que de masquer une information. */
    body .updates-table td {
        padding: 0.45rem 0.35rem;
    }

    body .updates-table .col-name a {
        font-size: 0.95rem;
    }

    body .updates-table .col-name .badge {
        margin-left: 0.25rem;
    }

    body .updates-table .col-date {
        font-size: 0.8rem;
        padding-left: 0.2rem;
    }

    body .updates-table .name-platform {
        margin-top: 0.1rem;
        font-size: 0.75rem;
    }

    body .jeux-filtres-choix select {
        flex: 1 1 100%;
        min-width: 0;
    }

    body .jeux-filtres-effacer {
        margin-left: 0;
    }

    body .page {
        padding-top: 1.5rem;
    }

    body .panel {
        padding: 1.15rem;
    }

    body .specs {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    body .specs dd {
        margin-bottom: 0.55rem;
    }
}

/* --------------------------------------------------------------------------
   Chronologie
   --------------------------------------------------------------------------
   Une seule mécanique pour la page complète et les frises contextuelles des
   fiches : une liste, un rail vertical, une pastille colorée par type. La
   variante compacte resserre les espacements sans changer la structure. */

body .chronologie {
    max-width: 900px;
}

body .timeline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1.35rem 0 0.5rem;
}

body .timeline-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--mk-border);
    border-radius: 999px;
    background: var(--mk-surface-2);
    color: var(--mk-text);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body .timeline-filter:hover {
    border-color: var(--mk-border-strong);
    background: var(--mk-surface-3);
    color: var(--mk-gold);
}

body .timeline-filter.is-active {
    border-color: var(--mk-gold);
    background: rgb(255 202 72 / 0.14);
    color: var(--mk-gold);
}

body .timeline-filter-count {
    color: var(--mk-subtle);
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
}

body .timeline-filter.is-active .timeline-filter-count {
    color: var(--mk-gold);
}

body .timeline-filter--machine { --timeline-color: var(--mk-gold); }
body .timeline-filter--jeu { --timeline-color: var(--mk-pink); }
body .timeline-filter--emulation { --timeline-color: var(--mk-teal); }
body .timeline-filter--industrie { --timeline-color: var(--mk-violet); }
body .timeline-filter--apple { --timeline-color: #9cc4ff; }

body .timeline-swatch {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--timeline-color, var(--mk-gold));
    flex: none;
}

body .timeline-decades {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin: 0.75rem 0 0.5rem;
    font-size: 0.85rem;
}

body .timeline-decades a {
    color: var(--mk-muted);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

body .timeline-decades a:hover {
    color: var(--mk-gold);
    text-decoration: underline;
}

body .timeline-decade {
    scroll-margin-top: 7.5rem;
}

body .timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Le rail : un trait continu, plus discret que les pastilles. */
body .timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0.55rem;
    bottom: 0.55rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(
        to bottom,
        rgb(255 255 255 / 0.06),
        var(--mk-border-strong) 8%,
        var(--mk-border-strong) 92%,
        rgb(255 255 255 / 0.06)
    );
}

body .timeline-item {
    --timeline-color: var(--mk-gold);
    position: relative;
    padding: 0 0 1.2rem 2rem;
}

body .timeline-item--machine { --timeline-color: var(--mk-gold); }
body .timeline-item--jeu { --timeline-color: var(--mk-pink); }
body .timeline-item--emulation { --timeline-color: var(--mk-teal); }
body .timeline-item--industrie { --timeline-color: var(--mk-violet); }
body .timeline-item--apple { --timeline-color: #9cc4ff; }

body .timeline-dot {
    position: absolute;
    left: 1px;
    top: 0.45rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--timeline-color);
    box-shadow: 0 0 0 3px var(--mk-bg);
}

body .timeline-item--major .timeline-dot {
    width: 16px;
    height: 16px;
    left: 0;
    box-shadow: 0 0 0 3px var(--mk-bg), 0 0 12px var(--timeline-color);
}

body .timeline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    margin: 0;
    color: var(--mk-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

body .timeline-meta time {
    color: var(--timeline-color);
    font-family: var(--mk-font-display);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body .timeline-place {
    color: var(--mk-subtle);
}

body .timeline-kind {
    padding: 0.05rem 0.5rem;
    border: 1px solid color-mix(in srgb, var(--timeline-color) 45%, transparent);
    border-radius: 999px;
    color: var(--timeline-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body .timeline-here {
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--mk-gold);
    color: var(--mk-gold-ink);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body .timeline-title {
    margin: 0.18rem 0 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

body .timeline-title a {
    color: var(--mk-text);
    text-decoration: none;
}

body .timeline-title a:hover {
    color: var(--mk-gold);
    text-decoration: underline;
}

body .timeline-sub {
    margin: 0.12rem 0 0;
    color: var(--mk-muted);
    font-size: 0.85rem;
}

body .timeline-desc {
    margin: 0.35rem 0 0;
    color: var(--mk-muted);
    font-size: 0.9rem;
}

/* L'entrée de la page courante : un fond doré très léger, pas un cadre qui
   concurrence les cartes du site. */
body .timeline-item.is-current .timeline-body {
    padding: 0.65rem 0.85rem;
    margin: -0.1rem 0 0 -0.45rem;
    border: 1px solid rgb(255 202 72 / 0.38);
    border-radius: var(--mk-radius-sm);
    background: rgb(255 202 72 / 0.08);
}

body .timeline--compact .timeline-item {
    padding-bottom: 0.95rem;
}

body .timeline--compact .timeline-title {
    font-size: 0.98rem;
}

body .timeline--compact .timeline-desc {
    font-size: 0.85rem;
}

body .timeline-panel {
    margin: 2rem 0;
}

body .timeline-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

body .timeline-panel .panel-title {
    margin: 0;
}

body .timeline-panel-link {
    color: var(--mk-muted);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

body .timeline-panel-link:hover {
    color: var(--mk-gold);
    text-decoration: underline;
}

body .timeline-panel-intro {
    margin: 0.35rem 0 1rem;
    color: var(--mk-muted);
    font-size: 0.9rem;
}

body .timeline-empty {
    margin: 2rem 0;
    color: var(--mk-muted);
}

body .timeline-note {
    margin: 2.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--mk-border);
    color: var(--mk-subtle);
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    body .chronologie {
        max-width: none;
    }

    body .timeline-filter {
        padding: 0.3rem 0.65rem;
        font-size: 0.8rem;
    }

    body .timeline-item {
        padding-left: 1.6rem;
    }

    body .timeline::before {
        left: 6px;
    }

    body .timeline-dot {
        left: 0;
        width: 13px;
        height: 13px;
    }

    body .timeline-item--major .timeline-dot {
        width: 15px;
        height: 15px;
    }

    body .timeline-meta {
        font-size: 0.72rem;
    }

    body .timeline-title {
        font-size: 1rem;
    }

    body .timeline-item.is-current .timeline-body {
        padding: 0.55rem 0.7rem;
        margin-left: -0.35rem;
    }

    body .timeline-panel-head {
        display: block;
    }

    body .timeline-panel-link {
        display: inline-block;
        margin-top: 0.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .card,
    body .plat-tile,
    body .nav-toggle span,
    body .timeline-filter {
        transition: none;
    }
}
