/* =========================================================
   Portail de jeux — thème « classeur de cartes holo »
   Violet nuit, stickers jaunes et roses, menthe pour le « en ligne ».
   Élément signature : les cartes de jeux holographiques (inclinaison + reflet).
   ========================================================= */
@import url('/fonts/fonts.css');   /* polices hébergées sur le site (RGPD) : scripts/build-fonts.py */

:root {
  --night: #170F2E;        /* fond */
  --deep: #22184A;         /* surfaces */
  --deep-2: #1B1240;       /* surfaces alternées */
  --line: #3B2E6E;         /* bordures */
  --line-2: #5A4A9C;       /* bordures fortes */
  --text: #F5F0FF;
  --muted: #B9AEDB;        /* 8:1 sur le fond */
  --yellow: #FFD447;       /* sticker jaune : action principale */
  --pink: #FF5FA2;         /* sticker rose : à la une, défis */
  --mint: #49F2C2;         /* en ligne, bêta */
  --sky: #6CB8FF;          /* multijoueur */
  --danger: #FF7A7A;
  --display: 'Dela Gothic One', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --r: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--night);
  background-image: radial-gradient(rgba(185, 174, 219, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  font: 17px/1.55 var(--body);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 48px 24px 56px; }
main.narrow { max-width: 780px; }

h1, h2, h3, .disp, .brand-name { font-family: var(--display); font-weight: 400; line-height: 1.05; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 .35em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 1.4em 0 .5em; }
h3 { font-size: 1.3rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.3rem; line-height: 1.45; color: var(--text); max-width: 40ch; }

a { color: var(--yellow); text-underline-offset: 3px; }
a:hover { color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt0 { margin-top: 0 !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--night); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px max(24px, calc((100% - 1240px) / 2 + 24px));
  background: rgba(23, 15, 46, .92); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-name { font-size: 1.35rem; }
.brand:hover { color: var(--yellow); }
.nav > nav { flex: 1 1 auto; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 2px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]:not(.pill) { box-shadow: inset 0 -3px 0 var(--pink); }
.nav-links .push { margin-left: auto; }
.online { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.online[hidden] { display: none; }
a.online { text-decoration: none; }
a.online:hover { color: var(--ink); }
.pill { background: var(--yellow); color: var(--night) !important; padding: 9px 18px !important; border-radius: 999px; box-shadow: 0 3px 0 #B8901C; }
.pill:hover { transform: translateY(-1px); }
.lang-select { width: auto; padding: 5px 8px; font-size: .85rem; background: var(--deep); border-color: var(--line); color: var(--muted); border-radius: 999px; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav { padding: 10px 16px; }
  .nav-toggle { display: inline-flex; margin-left: auto; min-height: 44px; background: var(--deep); color: var(--text); border-color: var(--line); box-shadow: none; font-weight: 700; }
  .nav > nav { flex-basis: 100%; display: none; }
  .nav.open > nav { display: block; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 12px; padding: 10px 0 6px; }
  .nav-links .push { margin-left: 0; }
}
.ban-notice { background: rgba(255, 122, 122, .14); border-bottom: 2px solid var(--danger); padding: 12px 24px; }

/* ---------- Bandeau d'activité ---------- */
.ticker-wrap { overflow: hidden; background: var(--yellow); color: var(--night); border-bottom: 2px solid var(--night); }
.ticker-wrap[hidden] { display: none; }
.ticker { display: flex; width: max-content; gap: 56px; padding: 10px 0; animation: ticker 40s linear infinite; }
.ticker-wrap:hover .ticker, .ticker-wrap:focus-within .ticker { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }
.live { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); animation: pulse 1.8s ease-out infinite; flex: 0 0 auto; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(73, 242, 194, .55); } 100% { box-shadow: 0 0 0 10px rgba(73, 242, 194, 0); } }

/* ---------- Pied de page ---------- */
.footer {
  display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap;
  padding: 26px 16px 36px; border-top: 2px solid var(--line); margin-top: 40px; font-size: .92rem;
}
.footer a, .footer button.link { color: var(--muted); text-decoration: none; font-weight: 700; }
.footer a:hover, .footer button.link:hover { color: var(--text); }
button.link { background: none; border: none; padding: 0; font: inherit; cursor: pointer; box-shadow: none; }
button.link:hover { background: none; transform: none; }

/* ---------- Boutons ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px;
  padding: 0 22px; border-radius: 999px; border: 2px solid var(--yellow);
  background: var(--yellow); color: var(--night); font: 700 1rem var(--body); cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 0 #B8901C; transition: transform .15s ease;
}
button:hover, .btn:hover { transform: translateY(-2px); color: var(--night); }
.btn-big { min-height: 56px; padding: 0 30px; font-size: 1.1rem; }
button.ghost, .btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
button.ghost:hover, .btn.ghost:hover { border-color: var(--yellow); color: var(--text); }
button.danger { background: transparent; border-color: var(--danger); color: var(--danger); box-shadow: none; }
.btn.dark { background: var(--night); color: var(--yellow); border-color: var(--night); box-shadow: none; }
.btn.dark:hover { color: var(--yellow); }
.btn.outline-dark { background: transparent; color: var(--night); border-color: var(--night); box-shadow: none; }
button:disabled { opacity: .5; cursor: default; transform: none; }
.row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Formulaires ---------- */
.panel { max-width: 460px; margin: 0 auto; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 28px; }
.panel.wide { max-width: 660px; }
.panel + .panel { margin-top: 20px; }
label { display: block; font-size: .92rem; color: var(--muted); margin: 16px 0 6px; font-weight: 700; }
input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--night); color: var(--text); font: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--yellow); outline: none; }
textarea { resize: vertical; }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-weight: 400; }
label.check input { width: auto; margin-top: 5px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tabs button { flex: 1; background: transparent; color: var(--muted); border-color: var(--line); box-shadow: none; }
.tabs button.active { color: var(--night); background: var(--pink); border-color: var(--pink); }
.tabs-inline { max-width: 720px; margin: 16px 0 20px; }

/* ---------- Stickers et badges ---------- */
.badge, .sticker {
  display: inline-block; padding: 4px 11px; border-radius: 10px; font-size: .8rem; font-weight: 700;
  background: var(--yellow); color: var(--night); border: 2px solid var(--night); box-shadow: 0 3px 0 rgba(8, 4, 24, .45);
}
.badge { margin-top: 10px; }
.badge + .badge { margin-left: 6px; }
.badge-beta { background: var(--mint); }
.badge-alpha { background: var(--pink); }
.badge-multi { background: var(--sky); }
.badge-draft { background: var(--muted); }
.sticker { position: absolute; z-index: 2; }
.sticker.tl { top: 12px; left: 12px; transform: rotate(-6deg); }
.sticker.tr { top: 12px; right: 12px; transform: rotate(5deg); }

/* ---------- Cartes holo (l'élément signature) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 226px; gap: 22px; margin-top: 28px; }
.bento .card.large { grid-column: span 2; grid-row: span 2; }
.bento .card.wide { grid-column: span 2; }
.bento .card.tall { grid-row: span 2; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 280px; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; grid-auto-rows: 270px; } .bento .card.large, .bento .card.wide, .bento .card.tall { grid-column: auto; grid-row: auto; } }

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--deep); border: 2px solid var(--line); border-radius: var(--r);
  color: var(--text); text-decoration: none; min-height: 0;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s ease, box-shadow .35s ease;
  animation: deal .7s cubic-bezier(.2, .8, .2, 1) both;
}
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 95, 162, .55) 35%, rgba(255, 212, 71, .55) 45%, rgba(73, 242, 194, .55) 55%, rgba(108, 184, 255, .55) 65%, transparent 80%);
  background-size: 250% 250%; transition: opacity .3s ease;
}
.card:hover, .card:focus-visible {
  transform: perspective(900px) rotateX(5deg) rotateY(-7deg) translateY(-8px);
  border-color: var(--yellow); box-shadow: 0 22px 40px rgba(8, 4, 24, .55); color: var(--text);
}
.card:nth-child(even):hover, .card:nth-child(even):focus-visible { transform: perspective(900px) rotateX(5deg) rotateY(7deg) translateY(-8px); }
.card:hover::after, .card:focus-visible::after { opacity: .55; animation: sheen 2.2s linear infinite; }
@keyframes sheen { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes deal { from { opacity: 0; transform: translateY(60px) rotate(-8deg) scale(.92); } to { opacity: 1; transform: none; } }
.card-art { position: relative; flex: 1 1 auto; min-height: 120px; display: flex; align-items: center; justify-content: center; background: var(--deep-2); border-bottom: 2px solid var(--line); overflow: hidden; }
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.grid .card-art { flex: 0 0 auto; aspect-ratio: 16 / 9; }
.card-body { padding: 14px 18px 16px; }
.card-body h3 { font-size: 1.25rem; margin: 0; }
.card-body p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-rating { color: var(--yellow); font-size: .9rem; white-space: nowrap; }

.card-body p.card-hook { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.bento .card.small .card-hook, .bento .card.wide .card-hook, .bento .card.tall .card-hook { -webkit-line-clamp: 1; }
.card-body p.card-spec { margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--g-muted, var(--muted)); display: flex; flex-wrap: wrap; gap: 2px 10px; opacity: .9; line-height: 1.35; }
.card-spec .spec-bit { white-space: nowrap; }

/* ---------- Habillage par jeu (colonne games.skin) ----------
   Variables posées par js/catalog.js : --g-bg, --g-surface, --g-ink, --g-muted, --g-accent, --g-accent2, --g-font, --g-font-body.
   data-frame : holo (défaut portail), tarot, felt, neon, pixel, paper. */
.frame-orn { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.frame-orn i { position: absolute; font-style: normal; font-size: 13px; line-height: 1; color: var(--g-accent, var(--yellow)); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.frame-orn .tl { top: 9px; left: 10px; } .frame-orn .tr { top: 9px; right: 10px; }
.frame-orn .bl { bottom: 9px; left: 10px; } .frame-orn .br { bottom: 9px; right: 10px; }

.card[data-frame]:not([data-frame="holo"]) { background: var(--g-surface, var(--deep)); border-color: var(--g-accent, var(--line)); color: var(--g-ink, var(--text)); }
.card[data-frame]:not([data-frame="holo"]) .card-art { background: var(--g-bg, var(--deep-2)); border-bottom-color: color-mix(in srgb, var(--g-accent, var(--line)) 70%, transparent); }
.card[data-frame]:not([data-frame="holo"]) h3 { font-family: var(--g-font, var(--display)); color: var(--g-accent, var(--text)); }
.card[data-frame]:not([data-frame="holo"]) .card-body p { color: var(--g-muted, var(--muted)); }
.card[data-frame]:not([data-frame="holo"]) .card-body p.card-hook { font-family: var(--g-font-body, var(--body)); }
.card[data-frame]:not([data-frame="holo"]):hover, .card[data-frame]:not([data-frame="holo"]):focus-visible { color: var(--g-ink, var(--text)); border-color: var(--g-accent2, var(--yellow)); }

/* Tarot : double filet doré, titres gravés, reflet d'or */
.card[data-frame="tarot"] { border-radius: 12px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--g-accent) 14%, var(--g-surface)) 0%, var(--g-surface) 60%); }
.card[data-frame="tarot"]::before { content: ''; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--g-accent) 55%, transparent); border-radius: 8px; pointer-events: none; z-index: 3; }
.card[data-frame="tarot"] h3 { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; background: linear-gradient(180deg, #fff0b8, var(--g-accent) 55%, color-mix(in srgb, var(--g-accent) 60%, #000)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card[data-frame="tarot"]::after { mix-blend-mode: screen; background: linear-gradient(115deg, transparent 25%, rgba(255, 226, 150, .45) 42%, color-mix(in srgb, var(--g-accent2) 40%, transparent) 55%, transparent 72%); background-size: 250% 250%; }
.card[data-frame="tarot"]:hover, .card[data-frame="tarot"]:focus-visible { box-shadow: 0 22px 40px rgba(0, 0, 0, .6), 0 0 28px color-mix(in srgb, var(--g-accent) 35%, transparent); border-color: var(--g-accent); }

/* Tapis : bois verni, feutrine verte, couture dorée, couleurs de cartes aux coins */
.card[data-frame="felt"] { border-width: 3px; border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--g-surface) 70%, #a8682f) 0%, var(--g-surface) 100%); }
.card[data-frame="felt"] .card-art { background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--g-bg) 55%, #2a7d57), var(--g-bg)); }
.card[data-frame="felt"]::before { content: ''; position: absolute; inset: 7px; border: 1.5px dashed color-mix(in srgb, var(--g-accent) 45%, transparent); border-radius: 9px; pointer-events: none; z-index: 3; }
.card[data-frame="felt"] h3 { font-weight: 700; letter-spacing: .03em; }
.card[data-frame="felt"] .frame-orn .tr, .card[data-frame="felt"] .frame-orn .bl { color: var(--g-accent2); }
.card[data-frame="felt"]::after { mix-blend-mode: soft-light; background: linear-gradient(115deg, transparent 25%, rgba(255, 200, 110, .7) 45%, transparent 65%); background-size: 250% 250%; }
.card[data-frame="felt"]:hover, .card[data-frame="felt"]:focus-visible { border-color: var(--g-accent); box-shadow: 0 22px 40px rgba(0, 0, 0, .6), 0 0 26px rgba(255, 190, 90, .3); }

/* Néon (arcade, sci-fi) */
.card[data-frame="neon"] { border-radius: 10px; box-shadow: 0 0 0 1px var(--g-accent), 0 0 18px color-mix(in srgb, var(--g-accent) 45%, transparent); }
.card[data-frame="neon"] h3 { text-shadow: 0 0 8px var(--g-accent), 0 0 18px var(--g-accent); color: var(--g-ink, #fff); }
.card[data-frame="neon"]:hover, .card[data-frame="neon"]:focus-visible { box-shadow: 0 0 0 2px var(--g-accent2), 0 0 32px var(--g-accent2); }

/* Pixel (rétro) */
.card[data-frame="pixel"] { border-radius: 0; border-width: 4px; box-shadow: 6px 6px 0 var(--g-accent2, #000); image-rendering: pixelated; }
.card[data-frame="pixel"] h3 { font-size: 1rem; line-height: 1.3; }
.card[data-frame="pixel"]::after { display: none; }
.card[data-frame="pixel"]:hover, .card[data-frame="pixel"]:focus-visible { box-shadow: 10px 10px 0 var(--g-accent2, #000); }

/* Papier (cosy, casse-tête) */
.card[data-frame="paper"] { border-radius: 6px; border-width: 1px; box-shadow: 0 2px 0 rgba(0, 0, 0, .15), 0 12px 24px rgba(0, 0, 0, .35); }
.card[data-frame="paper"]::after { display: none; }

/* « À la une » : le cadre de la carte prend le style du jeu */
.hero[data-frame]:not([data-frame="holo"]) .hero-card { border-color: var(--g-accent); background: var(--g-bg); box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 50px color-mix(in srgb, var(--g-accent) 30%, transparent), 12px 12px 0 color-mix(in srgb, var(--g-accent2) 70%, transparent); }
.hero[data-frame="tarot"] .hero-card { border-radius: 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, .65), 0 0 60px color-mix(in srgb, var(--g-accent) 40%, transparent); }
.hero[data-frame="tarot"] .hero-card::before, .hero[data-frame="felt"] .hero-card::before { content: ''; position: absolute; inset: 7px; border: 1px solid color-mix(in srgb, var(--g-accent) 55%, transparent); border-radius: 11px; pointer-events: none; z-index: 3; }
.hero[data-frame="felt"] .hero-card::before { border-style: dashed; }
.hero[data-frame="felt"] .hero-card { border-width: 4px; box-shadow: 0 30px 60px rgba(0, 0, 0, .65), 0 0 50px rgba(255, 190, 90, .25); }
.hero[data-frame="felt"] .hero-card .frame-orn .tr, .hero[data-frame="felt"] .hero-card .frame-orn .bl { color: var(--g-accent2); }
.hero-card .frame-orn i { font-size: 16px; }
.hero[data-frame]:not([data-frame="holo"]) h1 { font-family: var(--g-font, var(--display)); font-weight: 700; letter-spacing: .02em; background: linear-gradient(180deg, #fff3c4, var(--g-accent) 60%, color-mix(in srgb, var(--g-accent) 55%, #000)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero[data-frame]:not([data-frame="holo"]) .hook { font-family: var(--g-font-body, var(--body)); }
.hero[data-frame="tarot"] h1 { text-transform: uppercase; font-size: clamp(2.6rem, 6vw, 4.8rem); }

/* ---------- Recherche, tri et filtres du classeur ---------- */
.catalog-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.catalog-bar[hidden], .filters[hidden] { display: none; }
.catalog-bar label { margin: 0; }
.catalog-bar .search { flex: 1 1 240px; }
.catalog-bar .search input {
  min-height: 44px; border-radius: 999px; padding: 0 18px 0 42px; background: var(--deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='7.5' cy='7.5' r='5.5' fill='none' stroke='%23B9AEDB' stroke-width='2'/%3E%3Cpath d='M12 12l4.5 4.5' stroke='%23B9AEDB' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px center;
}
.catalog-bar .sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.catalog-bar select { width: auto; min-height: 44px; border-radius: 999px; padding: 0 14px; background: var(--deep); }
#filters-toggle .count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--night); color: var(--pink); font-size: .8rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; margin-top: 14px; padding: 18px 20px; border: 2px solid var(--line); border-radius: var(--r); background: var(--deep-2); }
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters legend { padding: 0; margin-bottom: 8px; color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.filters .chips { margin-top: 0; gap: 8px; }
.chip.chip-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.chip.chip-sm[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); }
.filters .reset { grid-column: 1 / -1; justify-self: start; color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
.bento.flat .card.large, .bento.flat .card.wide, .bento.flat .card.tall { grid-column: auto; grid-row: auto; }
@media (max-width: 560px) { .catalog-bar .sort { flex: 1 1 auto; } .catalog-bar select { flex: 1; } }

/* Fiche du jeu (page de jeu) */
.spec-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 20px; margin: 0 0 20px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 14px; background: var(--deep-2); }
.spec-sheet dt { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.spec-sheet dd { margin: 2px 0 0; font-size: .95rem; }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero-art { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.hero-card {
  position: relative; width: min(300px, 80vw); aspect-ratio: 300 / 440; border-radius: 22px; overflow: hidden;
  background: var(--deep); border: 3px solid var(--yellow); box-shadow: 0 30px 60px rgba(8, 4, 24, .6), 12px 12px 0 var(--pink);
  animation: deal .9s cubic-bezier(.2, .8, .2, 1) both, bob 6s ease-in-out 1s infinite;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes bob { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(-3deg) translateY(-8px); } }
.mascot { position: absolute; left: 0; bottom: 6px; animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.tag-pink { background: var(--pink); color: var(--night); font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: .88rem; }
.tag-mint { border: 2px solid var(--mint); color: var(--mint); font-weight: 700; padding: 4px 12px; border-radius: 999px; font-size: .88rem; }
.hero h1 { font-size: clamp(3rem, 7vw, 5.8rem); line-height: .95; margin: 0; }
.hero .hook { margin: 20px 0 0; font-size: 1.35rem; line-height: 1.45; max-width: 30ch; }
.hero .desc { margin: 12px 0 0; color: var(--muted); max-width: 46ch; }
.hero .actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.stars-static { color: var(--yellow); letter-spacing: 2px; }
.section { margin-top: 88px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 48ch; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.chip { min-height: 44px; padding: 0 18px; background: var(--deep); color: var(--text); border-color: var(--line); box-shadow: none; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--night); }
.empty { margin-top: 24px; padding: 28px; border: 2px dashed var(--line); border-radius: var(--r); color: var(--muted); text-align: center; }
.duo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; }
.challenge { background: var(--pink); color: var(--night); border-radius: 26px; padding: 32px; border: 3px solid var(--night); box-shadow: 10px 10px 0 var(--yellow); }
.challenge h2 { margin: 0; font-size: 2.2rem; }
.challenge p { font-weight: 700; margin: 10px 0 0; }
.challenge a:not(.btn) { color: var(--night); }
.challenge-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.countdown { display: flex; gap: 8px; }
.countdown div { background: var(--night); color: var(--yellow); border-radius: 12px; padding: 10px 0; width: 64px; text-align: center; }
.countdown strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .75rem; color: var(--muted); }
.podium { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.podium li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.podium .avatar { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--night); display: flex; align-items: center; justify-content: center; font: 400 1.4rem var(--display); }
.podium .step { width: 100%; background: var(--night); color: var(--yellow); border-radius: 12px 12px 4px 4px; padding-top: 10px; font: 400 1.3rem var(--display); }
.podium a { color: var(--night); font-weight: 700; }
.crew { background: var(--deep); border: 2px solid var(--line); border-radius: 26px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.crew h2 { margin: 0; font-size: 1.8rem; }
.crew-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crew-status { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-weight: 700; font-size: .88rem; }
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.bubbles li { display: flex; gap: 12px; align-items: flex-start; animation: deal .5s ease both; }
.bubbles .avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; color: var(--night); display: flex; align-items: center; justify-content: center; font: 400 1rem var(--display); }
.bubbles li:nth-child(odd) .avatar { transform: rotate(-6deg); }
.bubbles li:nth-child(even) .avatar { transform: rotate(5deg); }
.bubbles .bubble { background: var(--night); border: 2px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 9px 14px; min-width: 0; overflow-wrap: anywhere; }
.bubbles strong { color: var(--yellow); font-size: .88rem; }
.bubbles p { margin: 2px 0 0; font-size: .95rem; line-height: 1.4; }
.log { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 30px; }
.log article { position: relative; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 22px; }
.log article .sticker { top: -14px; right: 18px; transform: rotate(4deg); }
.log h3 { margin: 6px 0 8px; }
.log p { margin: 0; }
.cta { margin-top: 88px; background: var(--yellow); color: var(--night); border-radius: 30px; padding: 44px 40px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; border: 3px solid var(--night); box-shadow: 10px 10px 0 var(--mint); }
.cta[hidden] { display: none; }
.cta h2 { margin: 0; font-size: 2.3rem; }
.cta p { margin: 12px 0 0; max-width: 60ch; }
@media (max-width: 860px) { .hero, .duo { grid-template-columns: 1fr; } .hero { gap: 24px; } .mascot { display: none; } }

/* ---------- Page de jeu ---------- */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; max-width: 1400px; }
.play-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.play-head h1 { margin: 0; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; }
.game-meta { display: flex; gap: 10px; align-items: center; margin: 0; font-size: .92rem; }
.game-meta .badge { margin-top: 0; }
.play-frame { display: block; width: 100%; height: clamp(480px, 78vh, 900px); border: 3px solid var(--line-2); border-radius: var(--r); background: #000; }
.stage-notice { border: 2px solid var(--mint); background: rgba(73, 242, 194, .1); padding: 10px 14px; border-radius: 14px; font-size: .94rem; margin: 0 0 14px; }
.stage-notice.stage-alpha { border-color: var(--pink); background: rgba(255, 95, 162, .1); }
.play-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; margin-top: 12px; }
.play-side { display: flex; flex-direction: column; min-height: 0; }
.similar { margin-top: 16px; }
@media (max-width: 960px) { .play { grid-template-columns: 1fr; } }
.rating { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .94rem; }
.rating-avg strong { font-family: var(--display); font-weight: 400; font-size: 1.3rem; color: var(--yellow); }
.stars { display: inline-flex; }
.star { background: none; border: none; box-shadow: none; padding: 0 2px; min-height: 44px; font-size: 1.5rem; line-height: 1; color: var(--line-2); }
.star:hover, .star.on, .stars:hover .star { color: var(--yellow); background: none; transform: none; }
.stars .star:hover ~ .star { color: var(--line-2); }
.versions { list-style: none; padding: 0; margin: 0; }
.versions li { padding: 10px 0; border-bottom: 2px solid var(--line); }
.versions li p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.versions .badge { margin-top: 0; }

/* ---------- Tableaux ---------- */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 2px solid var(--line); vertical-align: top; }
th { color: var(--muted); }
th.num, td.num { text-align: right; }
.leaderboard tr.me td { color: var(--yellow); font-weight: 700; }
.table-wrap { overflow-x: auto; }
td.actions { white-space: nowrap; }
td.actions button { min-height: 36px; padding: 0 12px; font-size: .82rem; margin: 2px; box-shadow: none; }
td.pre { max-width: 420px; }

/* ---------- Chat ---------- */
.chat-toggle summary { list-style: none; cursor: pointer; }
.chat-toggle summary::-webkit-details-marker { display: none; }
.chat-toggle summary h3 { display: inline-block; margin: 0 0 12px; }
.chat-toggle summary h3::after { content: ' ▾'; color: var(--muted); font-size: .75em; }
.chat-toggle:not([open]) summary h3::after { content: ' ▸'; }
.chat { display: flex; flex-direction: column; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); height: 540px; }
.chat-list { list-style: none; margin: 0; padding: 12px 14px; overflow-y: auto; flex: 1; }
.chat-msg { padding: 5px 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; overflow-wrap: anywhere; }
.chat-msg strong { color: var(--yellow); }
.chat-time { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.chat-text { flex: 1 1 100%; }
.chat-report { background: none; border: none; box-shadow: none; color: var(--muted); padding: 0 4px; min-height: 0; font-size: .85rem; margin-left: auto; opacity: 0; }
.chat-msg:hover .chat-report, .chat-report:focus-visible { opacity: 1; }
.chat-report:hover { background: none; color: var(--danger); transform: none; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 2px solid var(--line); }
.chat-login { padding: 14px; margin: 0; border-top: 2px solid var(--line); color: var(--muted); }
@media (max-width: 960px) { .chat { height: 380px; } }
@media (hover: none) { .chat-report { opacity: 1; } }

/* ---------- Textes longs ---------- */
.prose { max-width: 800px; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { font-size: 1.6rem; }
.prose table { margin: 8px 0 20px; font-size: .9rem; }
.center { text-align: center; padding-top: 80px; }

/* ---------- Consentement, dialogues, notifications ---------- */
.consent-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; background: var(--deep); border: 2px solid var(--yellow); border-radius: var(--r); padding: 16px 20px; }
.consent-banner p { margin: 0; }
.consent-banner .row { justify-content: flex-end; margin-top: 12px; }
.dialog { background: var(--deep); color: var(--text); border: 2px solid var(--line); border-radius: var(--r); padding: 24px; max-width: 480px; width: calc(100% - 32px); }
.dialog::backdrop { background: rgba(10, 6, 24, .7); }
.dialog h2 { margin-top: 0; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; color: var(--text); font-weight: 400; }
.consent-row input { width: auto; margin-top: 5px; }
.consent-row small { color: var(--muted); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--deep); border: 2px solid var(--yellow); padding: 10px 18px; border-radius: 14px; z-index: 100; }
.toast-error { border-color: var(--danger); }

/* ---------- Publicité (masquée tant que ADS_ENABLED = false) ---------- */
.ad-container[hidden] { display: none !important; }
.ad-slot { min-height: 100px; margin: 16px 0; border: 2px dashed var(--line); border-radius: var(--r); position: relative; }
.ad-label { position: absolute; top: 4px; left: 10px; font-size: .72rem; color: var(--muted); }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover, .card:focus-visible, .card:nth-child(even):hover { transform: none; }
}

/* ---------- Compte, profil : stats, historique, amis (migration 006) ---------- */
main.account { max-width: 1040px; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.account-head h1 { margin-bottom: .1em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.compare-toggle { margin: 0; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.panel-grid .panel { max-width: none; margin: 0; }
.panel-grid .panel + .panel { margin-top: 0; }
.nowrap { white-space: nowrap; }

/* Tuiles de totaux : stickers */
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 8px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 18px; position: relative; overflow: hidden; }
.stat-tile:nth-child(1) { border-top: 6px solid var(--yellow); }
.stat-tile:nth-child(2) { border-top: 6px solid var(--mint); }
.stat-tile:nth-child(3) { border-top: 6px solid var(--pink); }
.stat-tile:nth-child(4) { border-top: 6px solid var(--sky); }
.stat-value { font-family: var(--display); font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-weight: 700; font-size: .88rem; }
.stat-sub { color: var(--mint); font-size: .82rem; font-weight: 700; }
@media (max-width: 700px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Cartes de stats par jeu */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.stat-card { background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat-card header { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.stat-card header img { width: 64px; height: 36px; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); flex: none; }
.stat-card h3 { margin: 0; font-size: 1.15rem; }
.stat-card h3 a { color: var(--text); text-decoration: none; }
.stat-card h3 a:hover { color: var(--yellow); }
.stat-card header p { margin: 0; }
.stat-table th, .stat-table td { padding: 6px 4px; border-bottom-width: 1px; font-size: .92rem; }
.stat-table th[scope="row"] { font-weight: 400; }
.stat-table td { font-variant-numeric: tabular-nums; font-weight: 700; }
.stat-table tbody tr:last-child th, .stat-table tbody tr:last-child td { border-bottom: none; }
.spark-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.spark { color: var(--yellow); flex: none; }
.my-stats .stat-cards { grid-template-columns: minmax(0, 420px); }

/* Résultats */
.res { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 2px solid currentColor; white-space: nowrap; }
.res-win, .res-done { color: var(--mint); }
.res-loss { color: var(--pink); }
.res-draw { color: var(--sky); }
.res-abandon { color: var(--muted); border-style: dashed; }
.res-playing { color: var(--yellow); }

/* Historique */
.history-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.history-filter { width: auto; min-width: 200px; }
.history-table td { vertical-align: middle; }

/* Amis */
.friends-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .friends-grid { grid-template-columns: 1fr; } }
.friend-add { background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 20px; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; min-width: 0; }
.friend-section h3 { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.friend-section .count { font-family: var(--body); font-size: .8rem; font-weight: 700; background: var(--pink); color: var(--night); border-radius: 999px; padding: 1px 9px; }
.friend-list, .feed-list { list-style: none; padding: 0; margin: 0; }
.friend-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 2px solid var(--line); }
.friend-list .actions { margin-left: auto; display: flex; gap: 6px; }
.friend-name { font-weight: 700; color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.dot.on { background: var(--mint); box-shadow: 0 0 0 3px rgba(73, 242, 194, .25); }
button.small-btn, .btn.small-btn { min-height: 34px; padding: 0 12px; font-size: .82rem; box-shadow: none; }
.feed { background: var(--deep-2); border: 2px dashed var(--line-2); border-radius: var(--r); padding: 16px 18px; }
.feed h3 { margin-top: 0; }
.feed-list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed-list li > .small { grid-column: 2; }
.feed-icon { color: var(--yellow); }
.friend-actions { align-items: center; }

/* Pastille de demandes d'ami, onglets compacts, invitation */
.pill { position: relative; }
.notif { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: var(--night); font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--night); }
.tabs-small button { min-height: 34px; font-size: .85rem; padding: 0 12px; }
.toast-invite { display: flex; align-items: center; gap: 12px; border-color: var(--mint); }
.stat-cards.compare { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.stat-cards.compare td { white-space: nowrap; }

/* ---------- Avatars des joueurs (galerie /avatars, migration 009) ---------- */
.avatar { overflow: hidden; }
.avatar.has-img { background: var(--deep-2, #22184A); padding: 0; }
.avatar.has-img img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-sm { display: inline-flex; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; vertical-align: middle;
  color: var(--night); font: 400 .8rem var(--display); margin-right: 8px; }
.pill-user { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px !important; }
.nav-avatar { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; font: 400 .85rem var(--display);
  color: var(--night); box-shadow: 0 0 0 2px var(--night); }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .avatar { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; color: var(--night);
  font: 400 1.8rem var(--display); box-shadow: 0 0 0 3px var(--yellow); }
.av-current { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.av-current .avatar { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center; color: var(--night);
  font: 400 1.5rem var(--display); box-shadow: 0 0 0 3px var(--yellow); }
.av-set h4 { margin: 14px 0 6px; font-size: .9rem; color: var(--muted); }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.av-grid button { aspect-ratio: 1; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .05); border: 2px solid transparent; cursor: pointer; }
.av-grid button img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.av-grid button:hover, .av-grid button:focus-visible { border-color: var(--pink); }
.av-grid button[aria-pressed="true"] { border-color: var(--yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 35%, transparent); }
.chat-msg .avatar-sm { width: 22px; height: 22px; font-size: .7rem; margin-right: 6px; }
.panel-wide { grid-column: 1 / -1; }
.av-grid button, .av-grid button:hover { box-shadow: none; transform: none; }

/* ---------- Amis en ligne (en-tête) ---------- */
.fo { position: relative; display: inline-flex; }
.fo[hidden] { display: none; }
.fo-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; font-size: .88rem; background: transparent; color: var(--muted); border: 2px solid var(--line); box-shadow: none; border-radius: 999px; }
.fo-btn .live { display: none; }
.fo-btn.has-online { color: var(--text); border-color: var(--mint); }
.fo-btn.has-online .live { display: inline-block; }
.fo-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; max-width: 80vw; background: var(--deep); border: 2px solid var(--line-2); border-radius: 14px; padding: 12px 14px; box-shadow: 0 16px 32px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 8px; }
.fo-list[hidden] { display: none; }
.fo-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Chat : outils de l'équipe ---------- */
.chat-mod { margin-left: auto; display: inline-flex; gap: 4px; opacity: .25; transition: opacity .15s; }
.chat-msg:hover .chat-mod, .chat-mod:focus-within { opacity: 1; }
@media (hover: none) { .chat-mod { opacity: .8; } }
.chat-mod button { padding: 0 6px; min-height: 0; line-height: 1.6; font-size: .72rem; box-shadow: none; border-width: 1px; }
.chat-msg.is-hidden { opacity: .45; }
.chat-closed { border: 2px dashed var(--line-2); border-radius: 12px; padding: 10px 14px; color: var(--muted); }

/* ---------- Administration ---------- */
.adm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
.adm-bar select, .adm-bar input { width: auto; }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
@media (max-width: 800px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-card { background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.adm-card h3 { margin: 0 0 8px; font-size: 1rem; }
.bars { display: block; width: 100%; height: 150px; }
.bars rect.bar { fill: var(--mint); }
.bars rect.bar.alt { fill: var(--sky); }
.bars rect.hit { fill: transparent; }
.bars rect.hit:hover + rect.bar, .bars g:hover rect.bar { fill: var(--yellow); }
.bars text { fill: var(--muted); font-size: 10px; }
.bars line { stroke: var(--line); }
.chart-cap { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.verdict { white-space: nowrap; font-weight: 700; font-size: .85rem; }
.verdict.up { color: var(--mint); } .verdict.warn { color: var(--yellow); } .verdict.down { color: var(--danger); } .verdict.idle { color: var(--muted); }
.trend.up { color: var(--mint); } .trend.down { color: var(--danger); }
.role-badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line-2); color: var(--muted); margin-left: 6px; }
.role-badge.superadmin { color: var(--night); background: var(--yellow); border-color: var(--yellow); }
.role-badge.admin { color: var(--night); background: var(--pink); border-color: var(--pink); }
.role-badge.moderator { color: var(--night); background: var(--sky); border-color: var(--sky); }
.switch-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.online-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.online-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.switch-row input[type=checkbox] { width: auto; margin: 0; flex: 0 0 auto; transform: scale(1.3); accent-color: var(--mint); }

/* ---------- Favoris (♥) ---------- */
.fav-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: rgba(23, 15, 46, .78); border: 2px solid var(--line-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, color .15s ease; }
.fav-btn:hover { border-color: var(--pink); color: var(--pink); }
.fav-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.fav-btn[aria-pressed="true"] { color: var(--pink); border-color: var(--pink); }
.fav-btn.pop { animation: fav-pop .32s ease; }
@keyframes fav-pop { 40% { transform: scale(1.3); } }
.fav-btn.on-card { position: absolute; right: 10px; bottom: 10px; z-index: 3; }
.fav-btn.on-page { margin-right: auto; align-self: center; }
.chip.chip-fav[aria-pressed="true"], .chip.chip-fav:hover { border-color: var(--pink); }
.fav-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fav-list li { display: flex; align-items: center; gap: 12px; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.fav-list a { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-weight: 700; }
.fav-list img { width: 96px; height: 54px; object-fit: cover; border-radius: 10px; flex: none; }
.fav-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .fav-btn.pop { animation: none; } }

/* ---------- Reprendre (accueil) ---------- */
.resume { margin: 8px 0 28px; }
.resume h2 { font-size: clamp(20px, 4.5vw, 26px); margin: 0 0 12px; }
.resume-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.resume-card { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; background: var(--deep); border: 2px solid var(--line);
  border-radius: var(--r); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.resume-card:hover, .resume-card:focus-visible { border-color: var(--yellow); transform: translateY(-2px); }
.resume-card img { width: 96px; height: 54px; object-fit: cover; border-radius: 10px; flex: none; }
.resume-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.resume-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-text small { color: var(--muted); }
.resume-go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--night); font-size: 14px; flex: none; }
@media (max-width: 560px) { .resume-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .resume-card:hover { transform: none; } }

/* ---------- Défis du jour (dans le bloc Défi de la semaine) ---------- */
.daily { margin-top: 18px; padding-top: 14px; border-top: 2px dashed rgba(23, 15, 46, .25); }
.daily h3 { margin: 0 0 8px; font-size: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.daily h3 small { font-family: var(--body); font-size: 13px; opacity: .75; }
.daily ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.daily li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.daily li a { font-weight: 700; color: inherit; }
.daily li .muted { color: inherit; opacity: .78; font-size: 14px; }

/* Page de jeu : texte pré-rendu par le serveur (moteurs, aperçu), remplacé par la page au chargement */
.seo-pre { max-width: 70ch; }
.seo-pre .hook { font-size: 1.2rem; }

/* ---------- Appli installable : invite ---------- */
.install-banner { position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--deep); border: 2px solid var(--yellow); border-radius: var(--r);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45); animation: install-in .35s ease-out both; }
.install-banner img { border-radius: 12px; flex: none; }
.install-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: .95rem; }
.install-text strong { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.install-text span { color: var(--muted); }
.install-actions { display: flex; gap: 8px; flex: none; }
.install-actions button { min-height: 40px; padding: 0 14px; }
@media (max-width: 520px) { .install-banner { flex-wrap: wrap; } .install-actions { width: 100%; } .install-actions button { flex: 1; } }
@keyframes install-in { from { opacity: 0; transform: translate(-50%, 20px); } }
@media (prefers-reduced-motion: reduce) { .install-banner { animation: none; } }

/* ---------- Pastilles Nouveau / Mis à jour ---------- */
.sticker-new { background: var(--yellow); }
button.sticker-upd { background: var(--mint); color: var(--night); border: 2px solid var(--night); box-shadow: 0 3px 0 rgba(8, 4, 24, .45); cursor: pointer;
  font: 700 .8rem/1.5 var(--body); min-height: 0; padding: 4px 11px; border-radius: 10px; }
button.sticker-upd:hover { background: var(--text); color: var(--night); }
.note-pop { position: fixed; z-index: 95; width: min(320px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  background: var(--deep); border: 2px solid var(--mint); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.note-pop p { margin: 0; font-size: .92rem; max-height: 40vh; overflow: auto; }
.note-pop .btn { align-self: flex-start; margin-top: 4px; }
.resume-upd { color: var(--mint); }

/* ---------- Progression : niveau, XP, succès ---------- */
.lvl-chip { display: inline-block; margin-left: 2px; padding: 1px 7px; border-radius: 8px; background: var(--yellow); color: var(--night);
  font: 700 .72rem/1.5 var(--body); white-space: nowrap; }
.progress-panel { margin: 8px 0 24px; padding: 22px; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); }
.progress-head { display: flex; gap: 20px; align-items: center; }
.lvl-ring { --p: 0; flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--yellow) calc(var(--p) * 1%), var(--line) 0); }
.lvl-ring span { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: var(--deep);
  font: 400 1.9rem/1 var(--display); color: var(--yellow); }
.progress-text { flex: 1; min-width: 0; }
.progress-text h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 8px; }
.progress-text h2 small { font-family: var(--body); font-size: 1rem; color: var(--muted); }
.xp-bar { height: 12px; border-radius: 8px; background: var(--deep-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 6px; }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--yellow)); border-radius: 8px; }
.xp-help summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.xp-help p { margin: 6px 0 0; }
.badge-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; background: var(--deep-2); border: 2px solid var(--line); opacity: .72; }
.badge-tile strong { font-size: .95rem; line-height: 1.2; }
.badge-tile .small { line-height: 1.3; }
.badge-tile.got { opacity: 1; border-color: var(--yellow); background: linear-gradient(160deg, rgba(255, 212, 71, .14), var(--deep-2) 60%); }
.badge-ico { font-size: 1.6rem; line-height: 1; filter: grayscale(1); }
.badge-tile.got .badge-ico { filter: none; }
.badge-ok { margin-top: auto; color: var(--yellow); font-weight: 700; font-size: .82rem; }
.badge-bar { position: relative; margin-top: auto; height: 16px; border-radius: 8px; background: var(--night); overflow: hidden; }
.badge-bar i { position: absolute; inset: 0 auto 0 0; background: var(--line-2); }
.badge-bar em { position: relative; display: block; text-align: center; font: 700 .7rem/16px var(--body); font-style: normal; color: var(--text); }
.badge-grid.compact { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.badge-grid.compact .badge-tile .small { display: none; }
@media (max-width: 520px) { .progress-head { gap: 14px; } .lvl-ring { width: 68px; height: 68px; } .lvl-ring span { width: 54px; height: 54px; font-size: 1.5rem; }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Page du jeu : commandes, défi reçu, fin de partie ---------- */
.controls-box { margin: 0 0 12px; background: var(--deep); border: 2px solid var(--line); border-radius: 14px; padding: 0 16px; }
.controls-box summary { cursor: pointer; padding: 10px 0; font-weight: 700; }
.controls-box ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 2px; }
.controls-box li { font-size: .95rem; }
.dare-notice { margin: 0 0 12px; padding: 10px 16px; border-radius: 14px; background: rgba(255, 95, 162, .14); border: 2px solid var(--pink); font-weight: 700; }
.end-bar { margin: 14px 0 6px; padding: 16px 18px; background: var(--deep); border: 2px solid var(--yellow); border-radius: var(--r); animation: end-in .35s ease-out both; }
.end-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.end-result { margin: 0; font-size: 1.15rem; }
.end-result strong { font-family: var(--display); font-weight: 400; }
.share-box { margin-top: 12px; display: grid; gap: 8px; justify-items: start; }
.share-url { width: 100%; max-width: 520px; }
.share-preview { width: 300px; max-width: 100%; height: auto; border-radius: 10px; border: 2px solid var(--line); }
.end-recos h3 { margin: 16px 0 10px; font-size: 1.1rem; }
.toast-progress { border-color: var(--pink); font-weight: 700; }
.toast-level { border-color: var(--mint); }
@keyframes end-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .end-bar { animation: none; } }
.end-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.end-grid .card-hook, .end-grid .card-spec { display: none; }
.end-grid .card-body { padding: 10px 12px; }
.end-grid h3 { font-size: 1rem; margin: 0; }

/* ---------- Rayons (barre, page d'un rayon) et rangées de l'accueil ---------- */
.shelf-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 28px; }
.shelf-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--deep); color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.shelf-pill:hover { border-color: var(--line-2); color: var(--text); }
.shelf-pill.on { background: var(--yellow); border-color: var(--yellow); color: var(--night); }
.shelf-pill .shelf-n { font-weight: 400; color: var(--muted); }
.shelf-pill.on .shelf-n { color: var(--night); }
.shelf-pill svg { flex: none; }
@media (max-width: 700px) {
  .shelf-bar { flex-wrap: nowrap; overflow-x: auto; margin: -12px -24px 22px; padding: 0 24px 6px; scrollbar-width: none; }
  .shelf-bar::-webkit-scrollbar { display: none; }
  .shelf-bar .shelf-pill:not(:first-child) { flex-direction: column; justify-content: center; gap: 2px; min-width: 78px; min-height: 64px; padding: 6px 10px; font-size: .78rem; }
  .shelf-bar .shelf-pill:not(:first-child) .shelf-n { display: none; }
}
.rows { display: flex; flex-direction: column; gap: 34px; margin: 10px 0 20px; }
.game-row .row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.game-row h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.row-scroll { display: flex; gap: 18px; overflow-x: auto; padding: 4px 4px 10px; margin: 0 -4px; scroll-snap-type: x proximity; }
.row-scroll::-webkit-scrollbar { height: 8px; } .row-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.row-card { flex: 0 0 240px; scroll-snap-align: start; }
.row-card .card-art { flex: 0 0 auto; aspect-ratio: 16 / 9; min-height: 0; }
.row-card .card-body { padding: 10px 14px 12px; }
.row-card h3 { font-size: 1.05rem; margin: 0 0 4px; }
@media (max-width: 700px) { .row-scroll { margin: 0 -24px; padding: 4px 24px 10px; gap: 12px; } .row-card { flex-basis: 170px; } .row-card h3 { font-size: .95rem; } }
.card-tags { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.sticker-upd-s { background: var(--mint); }
.mood-box { padding: 22px; border-radius: 22px; background: var(--yellow); color: var(--night); }
.mood-box h2 { margin: 0 0 12px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--night); }
.mood-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.mood-pill, button.mood-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  background: var(--night); color: var(--yellow); font: 700 .98rem/1 var(--body); text-decoration: none; cursor: pointer; box-shadow: none; }
.mood-pill:hover { background: var(--deep); color: var(--yellow); }
.rayon .crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.rayon-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.rayon-head h1 { margin: 0 0 6px; }
.rayon-head p { margin: 0; max-width: 62ch; }
.rayon-ico { flex: none; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--deep); border: 2px solid var(--line-2); }
.rayon-filters { display: grid; gap: 10px; padding: 16px 18px; margin-bottom: 14px; background: var(--deep); border: 2px solid var(--line); border-radius: var(--r); }
.filter-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-label { width: 100px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rayon-status { margin: 0 0 16px; }
.rayon-others { margin-top: 40px; }
.rayon-others .chips { display: flex; gap: 10px; flex-wrap: wrap; }
.seo-list { padding-left: 20px; }
@media (max-width: 520px) { .rayon-head { gap: 14px; } .rayon-ico { width: 56px; height: 56px; } .filter-label { width: 100%; } }
.filter-line .chips, .rayon-others .chips { margin-top: 0; }
.rayon-status button.link { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
@media (max-width: 700px) { .shelf-bar .shelf-pill:not(:first-child) .shelf-name { white-space: normal; text-align: center; line-height: 1.15; } }
.rayon-filters[hidden] { display: none; }
