/* Tapis Vert — le site autour des jeux : accueil et pages de jeu (générés par outils/portail.py).
   Accueil : bleu nuit avec des halos de couleur. Page d'un jeu (body.game) : les couleurs de sa vignette.
   Les tables de jeu gardent leurs propres feuilles (css/style.css + css/neo.css). */
:root {
  --bg: #0a0a0f; --surf: #16161f; --surf-2: #21212d; --line: #2c2c3a; --txt: #ffffff; --mut: #a4a4b8;
  --green: #22d36b; --green-2: #0fae55; --yellow: #ffd23f; --pink: #ff4f8b; --violet: #7c5cff; --blue: #2aa8ff; --orange: #ff7a2f;
  --display: Fredoka, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif; --body: Nunito, ui-rounded, system-ui, sans-serif;
  --rail: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--txt); font: 500 16px/1.5 var(--body); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; } ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 12px; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- En-tête : de grosses pastilles ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 72px; padding: 0 16px 0 10px; background: rgba(10, 10, 15, .92); backdrop-filter: blur(10px); }
.logo-pill { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 8px; border-radius: 26px; background: linear-gradient(180deg, #34e67f, var(--green-2)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); }
.logo-pill i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--green-2); font: 700 24px/1 var(--display); font-style: normal; }
.logo-pill b { font: 700 25px/1 var(--display); letter-spacing: -.01em; color: #06260f; }
.search { display: flex; align-items: center; gap: 10px; height: 52px; width: 300px; padding: 0 20px; border-radius: 26px; background: var(--surf-2); color: var(--mut); font: 600 17px var(--display); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 26px; background: var(--surf-2); font: 600 16.5px var(--display); white-space: nowrap; }
.pill.yellow { background: var(--yellow); color: #2b1f00; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }
.pill.round { width: 52px; padding: 0; justify-content: center; }
.top .sp { flex: 1; }
.burger { display: none; }

/* ---------- Colonne d'icônes ---------- */
.rail { position: fixed; left: 0; top: 72px; bottom: 0; width: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 6px; z-index: 20; }
.rail a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #d9d9e6; }
.rail a.on { background: var(--green); color: #06260f; }
.rail a:hover { background: var(--surf-2); }
.rail svg.ic { width: 24px; height: 24px; }

main { padding: 6px 22px 40px calc(var(--rail) + 6px); max-width: 1440px; }

/* ---------- Bandeau de promesses ---------- */
.promises { display: flex; gap: 34px; padding: 8px 4px 18px; flex-wrap: wrap; }
.promises li { display: flex; align-items: center; gap: 12px; font: 600 15px/1.25 var(--body); color: #e4e4ee; }
.blob { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), inset 0 3px 0 rgba(255, 255, 255, .35); transform: rotate(-6deg); }
.blob.g { background: linear-gradient(180deg, #4dff9a, #12b45a); } .blob.y { background: linear-gradient(180deg, #ffe680, #ffab0f); transform: rotate(5deg); } .blob.v { background: linear-gradient(180deg, #a58bff, #6a3dff); }

/* ---------- Titres de rangée ---------- */
.row-head { display: flex; align-items: center; gap: 12px; margin: 22px 4px 12px; }
.row-head h2 { font: 600 24px/1.1 var(--display); letter-spacing: -.005em; }
.row-head p { font-size: 14.5px; color: var(--mut); }
.row-head .blob { width: 36px; height: 36px; border-radius: 12px; }
.row-head .more { margin-left: auto; font: 600 14.5px var(--display); color: var(--mut); }
h1.sr { font: 600 15px var(--body); color: var(--mut); margin: 0 4px; }

/* ---------- Vignettes ---------- */
.tile { display: block; min-width: 0; }
.tile .th { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--surf-2); transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover .th { transform: translateY(-3px) scale(1.012); box-shadow: 0 0 0 3px #fff, 0 16px 30px rgba(0, 0, 0, .6); }
.tile .th img { width: 100%; height: 100%; object-fit: cover; }
.tile .nm { display: block; margin-top: 7px; font: 600 15px/1.25 var(--body); color: #dcdce8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .nm small { font: 500 13.5px var(--body); color: var(--mut); margin-left: 6px; }
.badge { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 12px 0 10px; border-radius: 0 0 14px 0; font: 700 12.5px/1 var(--display); letter-spacing: .03em; color: #fff; background: var(--pink); }
.badge.top { background: var(--orange); } .badge.new { background: var(--violet); } .badge.day { background: var(--yellow); color: #2b1f00; }
.chip { position: absolute; right: 8px; top: 8px; height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 14px; font: 700 13.5px/1 var(--display); color: #fff; background: rgba(10, 10, 15, .82); backdrop-filter: blur(4px); }
.chip.ok { background: var(--green); color: #06260f; }
.play { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px 0 16px; border-radius: 23px; font: 700 18px/1 var(--display); color: #06260f; background: linear-gradient(180deg, #4dff9a, var(--green)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), 0 8px 18px rgba(0, 0, 0, .4); }
.play svg { width: 16px; height: 16px; fill: currentColor; }

/* « Les jeux du moment » : une grande vignette (moitié gauche), puis à droite deux moyennes au-dessus de trois petites */
.feature { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 14px; }
.feature .tile { grid-column: span 2; }
.feature .mid { grid-column: span 3; }
.feature .wides { grid-column: span 12; display: grid; grid-template-columns: repeat(var(--k, 4), 1fr); gap: 14px; }
.feature .wides .tile { grid-column: auto; }   /* troisième rangée : les jeux restants, côte à côte */
.feature .big { grid-column: span 6; grid-row: span 2; }
.feature .big .th { aspect-ratio: auto; height: calc(100% - 30px); border-radius: 20px; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grid5.n6 { grid-template-columns: repeat(6, 1fr); gap: 14px 12px; }
.grid6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 12px; }
.grid6.n7 { grid-template-columns: repeat(7, 1fr); gap: 14px 10px; }
.grid6.n8 { grid-template-columns: repeat(4, 1fr); gap: 14px 12px; }    /* 8 : la rangée « Joués en Afrique » (Gbaka, Ludo, Awalé et ses modes) : deux rangées de quatre */
.grid5.n8 { grid-template-columns: repeat(4, 1fr); gap: 14px 12px; }      /* 8 défis du jour : deux rangées de quatre */
.grid6.n10, .grid6.n5 { grid-template-columns: repeat(5, 1fr); gap: 14px 12px; }    /* 10 modes : deux rangées de cinq ; 5 : la rangée « Jeux d'Afrique » */
.grid6 .th { border-radius: 14px; } .grid6 .nm { font-size: 14px; }

/* Modes : chaque mode a sa scène (images/vignettes/modes/) ; le bas de l'image, où se trouve son titre, passe sous un fondu de la couleur du mode, et le nom du mode s'écrit dessus en gros */
.mode .th img { transform: scale(1.1); transform-origin: 50% 0; }
.mode .th::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56%; background: linear-gradient(to bottom, transparent 0, var(--o, #14143a) 62%); pointer-events: none; }
.mode .lbl { position: absolute; z-index: 1; left: 0; right: 0; bottom: 8px; text-align: center; font: 400 27px/1 "Titan One", var(--display); color: #fff; -webkit-text-stroke: 7px var(--o, #14143a); paint-order: stroke fill; text-shadow: 0 4px 0 var(--o, #14143a); letter-spacing: .5px; }
/* Le nom du mode tient toujours sur une ligne : sa taille suit la largeur de la tuile */
@supports (font-size: 1cqw) { .mode .th { container-type: inline-size; } .mode .lbl { font-size: clamp(12px, 12.4cqw, 30px); white-space: nowrap; -webkit-text-stroke-width: .26em; letter-spacing: .02em; } }

/* Reprendre */
.resume { display: flex; align-items: center; gap: 16px; padding: 10px 18px 10px 10px; margin: 0 0 4px; border-radius: 20px; background: var(--surf); max-width: 640px; }
.resume img { width: 136px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.resume div { flex: 1; min-width: 0; }
.resume small { display: block; font: 600 13px var(--body); color: var(--green); }
.resume b { display: block; font: 600 18px/1.2 var(--display); }
.resume span.i { font-size: 14px; color: var(--mut); }
.resume .bar { height: 6px; border-radius: 3px; background: var(--surf-2); margin-top: 6px; overflow: hidden; } .resume .bar i { display: block; width: 38%; height: 100%; background: var(--green); border-radius: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 23px; font: 700 16.5px/1 var(--display); background: var(--green); color: #06260f; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); white-space: nowrap; }
.btn.ghost { background: var(--surf-2); color: #fff; box-shadow: none; }

/* Série de jours */
.streak { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255, 210, 63, .14); color: var(--yellow); font: 600 14.5px var(--display); }

/* ---------- Bloc de texte ---------- */
.about { margin-top: 34px; padding: 30px 34px 32px; border-radius: 24px; background: var(--surf); display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; }
.about h2 { font: 600 26px/1.15 var(--display); margin-bottom: 10px; }
.about p { color: #c9c9d8; font-size: 16.5px; line-height: 1.6; max-width: 36em; } .about p + p { margin-top: 10px; }
.about h3 { font: 600 18px var(--display); margin-bottom: 10px; }
.rules li a { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font: 600 16px var(--body); }
.rules li a span { color: var(--mut); font-weight: 500; font-size: 14.5px; margin-left: auto; text-align: right; }
.rules img { width: 64px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cats a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--surf-2); font: 600 15px var(--display); }

/* ---------- Pied de page ---------- */
.foot { margin-top: 40px; padding: 30px 26px 40px calc(var(--rail) + 10px); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; font-size: 15px; }
.foot h3 { font: 600 15px var(--display); color: #fff; margin-bottom: 8px; }
.foot nav a { display: block; padding: 3px 0; color: var(--mut); }
.foot p { color: var(--mut); margin-top: 12px; max-width: 22em; }
.langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.langs a { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 19px; background: var(--surf-2); font: 600 14.5px var(--display); }
.langs a.on { background: #fff; color: #0a0a0f; }

/* ---------- Page d'un jeu ---------- */
.gp { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 18px; align-items: start; }
.player { border-radius: 22px; overflow: hidden; background: var(--surf); }
.player iframe { display: block; width: 100%; aspect-ratio: 16 / 9.4; border: 0; background: #123; }
.pbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pbar img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.pbar b { font: 600 19px/1.1 var(--display); display: block; } .pbar small { color: var(--mut); font-size: 13.5px; }
.pbar .sp { flex: 1; }
.pbar .pill { height: 42px; padding: 0 14px; font-size: 15px; background: var(--surf-2); } .pbar .pill.round { width: 42px; padding: 0; }
.side { display: grid; gap: 12px; }
.side .tile .nm { display: none; }
.info { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.card { padding: 26px 28px 28px; border-radius: 22px; background: var(--surf); }
.card h1 { font: 600 30px/1.1 var(--display); }
.card h2 { font: 600 22px/1.15 var(--display); margin: 22px 0 8px; }
.card h2:first-child { margin-top: 0; }
.card p, .card li { color: #c9c9d8; font-size: 16.5px; line-height: 1.6; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.meta span { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 16px; background: var(--surf-2); font: 600 14px var(--display); color: #e4e4ee; }
.meta span.star { background: rgba(255, 210, 63, .14); color: var(--yellow); }
.steps { counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: var(--green); color: #06260f; font: 700 17px var(--display); }
.steps b, .tips b { color: #fff; }
.tips li { position: relative; padding-left: 20px; } .tips li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--yellow); transform: rotate(45deg); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font: 600 16.5px var(--display); color: #fff; }
.faq summary::after { content: "+"; display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 9px; background: var(--surf-2); font: 600 18px/1 var(--display); }
.faq details[open] summary::after { content: "–"; background: var(--green); color: #06260f; }
.faq p { margin-top: 6px; font-size: 15.5px; }
.mhero { display: none; }

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
  .top { height: 60px; padding: 0 10px; gap: 8px; }
  .logo-pill { height: 44px; padding: 0 16px 0 6px; gap: 8px; } .logo-pill i { width: 32px; height: 32px; font-size: 20px; } .logo-pill b { font-size: 21px; }
  .search, .top .pill:not(.round) { display: none; }
  .pill.round { width: 44px; height: 44px; }
  .burger { display: inline-flex; }
  .rail { position: static; flex-direction: row; width: auto; padding: 4px 10px 8px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .rail a { width: auto; height: 40px; padding: 0 14px; gap: 8px; display: inline-flex; border-radius: 20px; background: var(--surf-2); font: 600 14.5px var(--display); white-space: nowrap; flex: none; }
  .rail a span { display: inline; } .rail svg.ic { width: 19px; height: 19px; }
  main { padding: 2px 12px 30px; }
  .promises { display: none; }
  .row-head { margin: 20px 2px 10px; gap: 10px; } .row-head h2 { font-size: 21px; } .row-head p { display: none; }
  .feature { grid-template-columns: repeat(6, 1fr); gap: 12px 10px; }
  .feature .tile:not(.big):not(.mid) .nm small { display: none; }   /* petites vignettes : le nom seul */
  .feature .wides { grid-column: span 6; grid-template-columns: 1fr 1fr; gap: 12px 10px; } .feature .wides .wide:last-child:nth-child(odd) { grid-column: span 2; }
  .feature .big { grid-column: span 6; grid-row: auto; } .feature .big .th { height: auto; aspect-ratio: 16 / 9; border-radius: 18px; }
  .grid5 { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .grid6 { grid-template-columns: 1fr 1fr 1fr; gap: 12px 8px; } .grid6 .nm { font-size: 13px; } .mode .lbl { font-size: 17px; -webkit-text-stroke-width: 5px; bottom: 6px; } @supports (font-size: 1cqw) { .mode .lbl { font-size: clamp(12px, 12.4cqw, 30px); -webkit-text-stroke-width: .26em; } }
  .chip { height: 24px; font-size: 12px; padding: 0 9px; right: 6px; top: 6px; }
  .tile .th { border-radius: 13px; } .tile .nm { font-size: 14px; margin-top: 5px; }
  .play { height: 42px; font-size: 17px; }
  .resume { gap: 12px; padding: 8px 12px 8px 8px; } .resume img { width: 96px; } .resume b { font-size: 16px; } .resume span.i { display: none; } .resume .btn { height: 40px; padding: 0 16px; font-size: 15px; }
  .about { grid-template-columns: 1fr; gap: 26px; padding: 22px 18px 24px; margin-top: 26px; border-radius: 20px; } .about h2 { font-size: 22px; }
  .rules li a span { display: none; }
  .foot { grid-template-columns: 1fr 1fr; padding: 24px 14px 34px; gap: 22px 16px; margin-top: 30px; } .foot > div:first-child { grid-column: span 2; }
  .gp { grid-template-columns: 1fr; } .player { display: none; }
  .mhero { display: block; position: relative; border-radius: 20px; overflow: hidden; background: var(--surf); }
  .mhero > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .mhero .in { padding: 14px 14px 16px; display: grid; gap: 12px; }
  .mhero .btn { height: 56px; font-size: 21px; border-radius: 28px; gap: 10px; } .mhero .btn svg { width: 18px; height: 18px; fill: currentColor; }
  .mhero .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .mhero .acts .btn { height: 44px; font-size: 15px; }
  .side { grid-template-columns: 1fr 1fr; gap: 10px; } .side-h { display: flex !important; }
  .info { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .card { padding: 20px 18px 22px; border-radius: 20px; } .card h1 { font-size: 25px; } .card h2 { font-size: 20px; }
}
@media (min-width: 861px) { .rail a span { display: none; } .side-h { display: none; } }
@media (prefers-reduced-motion: reduce) { .tile .th { transition: none; } }

/* =====================================================================
   V3 — plus de noir plat.
   Accueil : bleu nuit avec des halos de couleur. Page d'un jeu : les couleurs de sa vignette.
   ===================================================================== */
:root {
  --bg: #0f1240; --surf: rgba(255, 255, 255, .075); --surf-2: rgba(255, 255, 255, .13); --line: rgba(255, 255, 255, .15); --mut: #b6bbe8;
}
body {
  background:
    radial-gradient(1000px 620px at 8% 0%, rgba(140, 92, 255, .62), transparent 64%),
    radial-gradient(900px 600px at 96% 4%, rgba(34, 211, 107, .34), transparent 62%),
    radial-gradient(900px 700px at 100% 52%, rgba(255, 79, 139, .26), transparent 64%),
    radial-gradient(900px 700px at 0% 62%, rgba(42, 168, 255, .30), transparent 64%),
    radial-gradient(1200px 760px at 50% 104%, rgba(124, 92, 255, .42), transparent 64%),
    linear-gradient(180deg, #191d5c 0%, #10134a 42%, #0b0e38 100%);
  background-repeat: no-repeat; background-color: #0b0e38; min-height: 100vh;
}
.top { background: rgba(18, 21, 74, .78); }
.chip { background: rgba(15, 18, 64, .86); }
.langs a.on { color: #10134a; }
.tile:hover .th { box-shadow: 0 0 0 3px #fff, 0 16px 30px rgba(4, 6, 40, .6); }
.about, .resume { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.about p { color: #d5d8f5; }

/* ---------- Page d'un jeu : thème tiré de la vignette ---------- */
body.game {
  --c1: #1cc472; --c2: #0d9d5b; --c3: #077646; --c4: #055c38;          /* du clair au profond */
  --ink: #14213a; --ink-2: #44506b; --tint: #e6f9ee; --tint-ink: #0a7d48; --deep: rgba(var(--sh), .42);
  --surf: #ffffff; --surf-2: var(--deep); --line: #e3e8f2; --mut: #d6ffe8; --green: #19c46c;
  --sh: 0, 60, 35; --top: rgba(12, 150, 86, .82); --a1: #34e67f; --a2: #0fae55; --i1: #36e58f; --i2: #12b565; --i3: #0a9457; --glow: rgba(214, 255, 190, .46);   /* ombre (r, v, b), bandeau, pastilles, fond des images des règles, halo */
  background:
    radial-gradient(1000px 560px at 50% -10%, var(--glow), transparent 66%),
    repeating-conic-gradient(from 4deg at 50% -4%, rgba(255, 255, 255, .05) 0deg 6deg, rgba(255, 255, 255, 0) 6deg 17deg),
    linear-gradient(180deg, var(--c1) 0%, var(--c2) 26%, var(--c3) 62%, var(--c4) 100%);
  background-size: 100% 900px, 100% 900px, 100% 100%; background-repeat: no-repeat; background-color: var(--c4);
}
/* Une palette par jeu, dans les couleurs de sa vignette (les mêmes que sa table : css/neo.css) */
body.game.g-spider {
  --c1: #7f63f7; --c2: #5d3be6; --c3: #4023bd; --c4: #2a1289; --sh: 24, 8, 96; --top: rgba(86, 54, 222, .84); --a1: #a58bff; --a2: #6a3dff;
  --i1: #9a82ff; --i2: #6a48f0; --i3: #4425c4; --glow: rgba(220, 208, 255, .46); --tint: #efeaff; --tint-ink: #4a22c9; --mut: #e6deff; --green: #7a5cf5; --pop: #4a22c9;
}
body.game.g-freecell {
  --c1: #ff8a47; --c2: #f65c4c; --c3: #dc3a70; --c4: #9f1c5f; --sh: 112, 16, 52; --top: rgba(232, 86, 62, .86); --a1: #ff9a5e; --a2: #ef4776;
  --i1: #ffb45e; --i2: #ff7d3f; --i3: #ef4776; --glow: rgba(255, 236, 190, .46); --tint: #ffedf0; --tint-ink: #b3204f; --mut: #ffe9dc; --green: #ef4776; --pop: #b3204f;
}
body.game.g-pyramide {
  --c1: #2fd0d2; --c2: #14a9bd; --c3: #0c84a0; --c4: #086481; --sh: 4, 62, 84; --top: rgba(12, 150, 172, .86); --a1: #5fe6e0; --a2: #0fa3b8;
  --i1: #7ff0e2; --i2: #25c9cf; --i3: #0d9db6; --glow: rgba(214, 255, 250, .46); --tint: #e3f8fb; --tint-ink: #0a7189; --mut: #dcfbff; --green: #14b3c4; --pop: #0a7189;
}
body.game.g-tripeaks {
  --c1: #f486d4; --c2: #de5cc4; --c3: #b93bae; --c4: #86248f; --sh: 84, 12, 92; --top: rgba(200, 62, 180, .86); --a1: #ffa6e6; --a2: #c23bb0;
  --i1: #ffc9ee; --i2: #f884d6; --i3: #d24cbf; --glow: rgba(255, 236, 250, .46); --tint: #fdeafa; --tint-ink: #96228c; --mut: #ffe6fa; --green: #d24cbf; --pop: #96228c;
}
body.game.g-golf {
  --c1: #74cc32; --c2: #4fb12a; --c3: #358f27; --c4: #1f6d24; --sh: 14, 70, 20; --top: rgba(63, 156, 39, .86); --a1: #a9e85a; --a2: #3f9c27;
  --i1: #c3f060; --i2: #7fd033; --i3: #45a628; --glow: rgba(246, 255, 196, .46); --tint: #ecf9df; --tint-ink: #256f1f; --mut: #eaffd6; --green: #45a628; --pop: #256f1f;
}
body.game.g-mahjong {
  --c1: #f25a3c; --c2: #dc3530; --c3: #b31e2d; --c4: #7f1126; --sh: 96, 10, 20; --top: rgba(216, 54, 44, .86); --a1: #ff8f5e; --a2: #e03131;
  --i1: #ff9a62; --i2: #ee4b3a; --i3: #c0202e; --glow: rgba(255, 226, 180, .46); --tint: #ffeeea; --tint-ink: #b3221f; --mut: #ffe6dc; --green: #e8453c; --pop: #b3221f;
}
body.game.g-sudoku {
  --c1: #33b5f1; --c2: #1d91e2; --c3: #1869c6; --c4: #134b9c; --sh: 8, 44, 110; --top: rgba(28, 140, 224, .86); --a1: #5ccaff; --a2: #1b8fe0;
  --i1: #62d2ff; --i2: #2a9cec; --i3: #1767c4; --glow: rgba(200, 240, 255, .46); --tint: #e6f4ff; --tint-ink: #0f5cb0; --mut: #dcf0ff; --green: #1b8fe0; --pop: #0f5cb0;
}
/* Démineur : jardin ensoleillé le jour ; le soir, js/site.js ajoute .soir (jardin zen au coucher du soleil), comme la table du jeu */
body.game.g-demineur {
  --c1: #8fd14a; --c2: #62b633; --c3: #3f932c; --c4: #2a6e27; --sh: 22, 74, 20; --top: rgba(70, 150, 46, .88); --a1: #b6ec6a; --a2: #4aa531;
  --i1: #c9f27a; --i2: #86d046; --i3: #4ea72f; --glow: rgba(255, 246, 190, .5); --tint: #eef9e1; --tint-ink: #2c6f22; --mut: #efffd9; --green: #4ea72f; --pop: #2c6f22;
}
body.game.g-demineur.soir {
  --c1: #f7a985; --c2: #e8846c; --c3: #c4635a; --c4: #8a4250; --sh: 96, 40, 46; --top: rgba(200, 104, 88, .88); --a1: #ffc9a3; --a2: #d9705e;
  --i1: #ffd9b8; --i2: #f2a487; --i3: #d77663; --glow: rgba(255, 226, 190, .5); --tint: #fff1e8; --tint-ink: #9a4a3c; --mut: #fff0e4; --green: #d77663; --pop: #9a4a3c;
}
/* 2048 : pays des bonbons (pêche et rose, bonbons gélifiés) */
body.game.g-2048 {
  --c1: #ffb0c4; --c2: #ff8fab; --c3: #e8628a; --c4: #b8406a; --sh: 150, 40, 80; --top: rgba(232, 98, 138, .9); --a1: #ffc2d4; --a2: #ec6d95;
  --i1: #ffd0de; --i2: #ff9fba; --i3: #e8628a; --glow: rgba(255, 236, 200, .5); --tint: #fff0f4; --tint-ink: #a2304f; --mut: #fff0f5; --green: #e8628a; --pop: #a2304f;
}
/* Mot du jour : lagon (turquoise et sable, galets de verre poli) */
body.game.g-mot {
  --c1: #5fd6e0; --c2: #25b4c4; --c3: #1690a6; --c4: #0e6a82; --sh: 6, 70, 92; --top: rgba(22, 150, 172, .9); --a1: #8ff0f5; --a2: #18a8b8;
  --i1: #a6f3f7; --i2: #4fd0dc; --i3: #1aa0b2; --glow: rgba(255, 244, 210, .5); --tint: #e6f8fa; --tint-ink: #0e5f7a; --mut: #e2fbfd; --green: #1aa0b2; --pop: #0e5f7a;
}
/* Nonogramme : mosaïque au soleil (terre cuite du plateau, bleu cobalt des carreaux, crème) */
body.game.g-nono {
  --c1: #f6b57c; --c2: #e58f58; --c3: #cb6b3e; --c4: #96472b; --sh: 104, 44, 16; --top: rgba(207, 122, 72, .9); --a1: #6f9bff; --a2: #2449c4;
  --i1: #ffe9c9; --i2: #f9c996; --i3: #e59a62; --glow: rgba(255, 240, 205, .5); --tint: #fff3e3; --tint-ink: #9a4520; --mut: #fff1e2; --green: #2f58d6; --pop: #1d3f9a;
}
body.game.g-nono .btn { color: #fff; }
/* Awalé : marché de nuit (ébène, or des lampions, wax turquoise et magenta) */
body.game.g-awale {
  --c1: #f4c46a; --c2: #e8a33d; --c3: #b8621c; --c4: #5c2c10; --sh: 60, 30, 10; --top: rgba(38, 20, 10, .92); --a1: #ffd77a; --a2: #e8a33d;
  --i1: #ffe6b0; --i2: #f4c46a; --i3: #e08a2c; --glow: rgba(255, 220, 150, .5); --tint: #fff4e2; --tint-ink: #8a3f12; --mut: #ffe9c4; --green: #1fb5ae; --pop: #b0410f;
}
body.game.g-awale .btn { color: #fff; }
body.game .top { background: var(--top); }
body.game .logo-pill { background: #fff; box-shadow: inset 0 -4px 0 rgba(var(--sh), .14), 0 3px 0 rgba(var(--sh), .35); }
body.game .logo-pill i { background: linear-gradient(180deg, var(--a1), var(--a2)); color: #fff; }
body.game .logo-pill b { color: var(--pop); }
body.game .search { color: var(--mut); }
body.game .rail a { color: var(--mut); } body.game .rail a.on { background: #fff; color: var(--pop); box-shadow: 0 3px 0 rgba(var(--sh), .35); }
body.game .rail a:hover { background: var(--deep); }
body.game a:focus-visible { outline-color: #fff; }

body.game .player { background: rgba(var(--sh), .55); border-radius: 26px; box-shadow: 0 0 0 5px #fff, 0 22px 44px rgba(var(--sh), .38); margin: 5px; }
body.game .pbar small { color: var(--mut); }
body.game .pbar .pill { background: rgba(255, 255, 255, .16); }
body.game .pbar .pill.cta { background: linear-gradient(180deg, #ffe873, #ffb800); color: #3b2600; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14); }
body.game .side-h h2, body.game .row-head h2 { text-shadow: 0 2px 0 rgba(var(--sh), .35); }
body.game .side .tile .th { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 10px 20px rgba(var(--sh), .3); border-radius: 18px; }
body.game .side .tile .nm { display: block; color: #fff; font: 600 16px var(--display); margin-top: 8px; }

body.game .card { color: var(--ink); box-shadow: 0 6px 0 rgba(var(--sh), .28), 0 18px 36px rgba(var(--sh), .22); border-radius: 26px; }
body.game .card h1 { font-size: 34px; color: var(--ink); }
body.game .card h2 { color: var(--ink); font-size: 23px; margin-top: 26px; }
body.game .card p, body.game .card li { color: var(--ink-2); }
body.game .steps b, body.game .tips b { color: var(--ink); }
body.game .meta span { background: var(--tint); color: var(--tint-ink); }
body.game .meta span.star { background: #fff1b8; color: #7a5200; }
body.game .lead { display: grid; grid-template-columns: 1fr 190px; gap: 22px; align-items: center; }
body.game .lead .fan { position: relative; height: 150px; }
body.game .lead .fan img { position: absolute; left: 50%; top: 8px; width: 92px; border-radius: 9px; box-shadow: 0 2px 0 #c3cee4, 0 8px 14px rgba(20, 33, 58, .25); transform-origin: 50% 130%; }
body.game .lead .fan img:nth-child(1) { transform: translateX(-50%) rotate(-22deg); } body.game .lead .fan img:nth-child(2) { transform: translateX(-50%) rotate(0deg); } body.game .lead .fan img:nth-child(3) { transform: translateX(-50%) rotate(22deg); }

/* Les règles : une image par étape */
body.game .steps { grid-template-columns: 1fr 1fr; gap: 14px; }
body.game .steps li { grid-template-columns: 1fr; gap: 0; padding: 0; border-radius: 20px; background: var(--tint); overflow: hidden; position: relative; }
body.game .steps li::before { position: absolute; left: 12px; top: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(180deg, #ffe873, #ffb800); color: #3b2600; box-shadow: 0 3px 0 #bd7b00; }
body.game .steps li p { padding: 12px 16px 16px; font-size: 15.5px; line-height: 1.5; }
.ill { position: relative; height: 148px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(90% 120% at 50% 20%, var(--i1), var(--i2) 60%, var(--i3)); }
.ill img { width: 66px; border-radius: 7px; box-shadow: 0 2px 0 #c3cee4, 0 6px 10px rgba(var(--sh), .4); }
.ill .col { position: relative; width: 66px; height: 124px; } .ill .col img { position: absolute; left: 0; top: 0; } .ill .col img + img { top: 27px; } .ill .col img + img + img { top: 54px; }
.ill .col.b img + img { top: 11px; } .ill .col.b img + img + img { top: 22px; }
.ill .row { display: flex; } .ill .row img + img { margin-left: -38px; }
.ill .slot { width: 66px; height: 96px; border-radius: 7px; border: 2.5px solid rgba(255, 255, 255, .3); box-shadow: inset 0 3px 9px rgba(0, 0, 0, .3); background: rgba(var(--sh), .26); }
.ill .arr { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--pop); box-shadow: 0 3px 0 rgba(var(--sh), .5); flex: none; }
.ill .arr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ill .ok { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--pop); box-shadow: 0 3px 0 rgba(var(--sh), .5); }
/* Pyramide : « 9 + 4 = 13 » et une carte recouverte par deux autres */
.ill .sign { color: #fff; font: 700 30px var(--display); text-shadow: 0 2px 0 rgba(var(--sh), .5); }
.ill .b13 { display: grid; place-items: center; height: 36px; padding: 0 13px; border-radius: 99px; background: #fff; color: var(--pop); font: 700 19px var(--display); box-shadow: 0 3px 0 rgba(var(--sh), .5); white-space: nowrap; }
.ill .pyr { position: relative; width: 140px; height: 128px; } .ill .pyr > img { position: absolute; left: 37px; top: 0; filter: brightness(.86); } .ill .pyr div { position: absolute; left: 0; top: 32px; display: flex; gap: 8px; }
.ill .ok svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }

body.game .tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
body.game .tips li { padding: 46px 14px 14px; border-radius: 18px; background: #fff6d6; color: #5b4300; font-size: 15px; line-height: 1.45; font-weight: 700; }
body.game .tips li::before { left: 14px; top: 14px; width: 24px; height: 24px; border-radius: 8px; transform: none; background: linear-gradient(180deg, #ffe873, #ffb800) ; box-shadow: 0 2px 0 #bd7b00; }
body.game .tips li::after { content: "★"; position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; display: grid; place-items: center; color: #7a4d00; font-size: 14px; }

body.game .faq details { border-color: var(--line); }
body.game .faq summary { color: var(--ink); }
body.game .faq summary::after { background: var(--tint); color: var(--tint-ink); }
body.game .faq details[open] summary::after { background: var(--green); color: #fff; }

body.game .mhero { background: rgba(var(--sh), .55); box-shadow: 0 0 0 4px #fff, 0 16px 30px rgba(var(--sh), .35); margin: 4px; border-radius: 24px; }
body.game .btn { background: linear-gradient(180deg, #ffe873, #ffb800); color: #3b2600; box-shadow: 0 4px 0 #bd7b00; }
body.game .btn.ghost { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
body.game .foot { border-top: 0; background: rgba(var(--sh), .34); margin-top: 46px; }
body.game .foot nav a, body.game .foot p { color: var(--mut); }
body.game .langs a { background: rgba(255, 255, 255, .14); } body.game .langs a.on { background: #fff; color: var(--pop); }

@media (max-width: 860px) {
  body.game .rail a { background: var(--deep); color: #fff; } body.game .rail a.on { background: #fff; color: var(--pop); }
  body.game .pill.round { background: var(--deep); }
  body.game .lead { grid-template-columns: 1fr; } body.game .lead .fan, body.game .lead .deco { display: none; }
  body.game .steps { grid-template-columns: 1fr; }
  body.game .tips { grid-template-columns: 1fr; } body.game .tips li { padding: 14px 14px 14px 50px; }
  body.game .card h1 { font-size: 27px; }
  body.game .side .tile .nm { font-size: 14.5px; }
}

/* v3, corrections après la première capture */
body.game .player iframe { aspect-ratio: 16 / 9.75; }
.col2 { display: grid; gap: 18px; }
body.game .steps li::before { top: 153px; left: 14px; }
body.game .steps li p { padding-top: 26px; }
.ill { height: 170px; gap: 12px; }
.ill img { width: 58px; }
.ill .col { width: 58px; height: 134px; } .ill .col img + img { top: 25px; } .ill .col img + img + img { top: 50px; }
.ill .col.b { height: 106px; }
.ill .row img + img { margin-left: -30px; }
.ill .slot { width: 58px; height: 84px; }
.ill .cells { display: flex; gap: 7px; }
.ill .cells img, .ill .cells .slot { width: 46px; } .ill .cells .slot { height: 67px; }
/* Mahjong : une tuile (face dessinée sur porcelaine) ; Sudoku : un morceau de grille */
.mt { flex: none; width: 60px; border-radius: 9px; background: linear-gradient(180deg, #fffef8, #f3eedf); box-shadow: 0 4px 0 #dcd3bb, 0 7px 0 #bdb293, 0 12px 14px rgba(var(--sh), .4); overflow: hidden; }
.ill .mt img, .deco .mt img { display: block; width: 100%; height: auto; border-radius: 0; box-shadow: none; }
.ill .trio { display: flex; gap: 3px; } .ill .mt.off { filter: brightness(.6) saturate(.5); } .ill .mt.free { outline: 3px solid #ffd43b; outline-offset: -1px; }
.sg { display: grid; grid-template-columns: repeat(3, 36px); gap: 2px; padding: 4px; border-radius: 12px; background: #1c2a4a; box-shadow: 0 8px 14px rgba(var(--sh), .4); }
.sg span { display: grid; place-items: center; height: 36px; border-radius: 4px; background: #fff; color: #1c2a4a; font: 700 20px/1 var(--display); }
.sg.r9 { grid-template-columns: repeat(9, 23px); } .sg.r9 span { height: 30px; font-size: 16px; }
.sg .new { background: #fff3bf; color: var(--pop); } .sg .bad { background: #ffe3e3; color: #e03131; } .sg .sel { background: #fff3bf; }
.sg .nt { grid-template-columns: repeat(3, 1fr); padding: 3px; } .sg .nt i { font: 700 10px/1 var(--display); font-style: normal; color: #52607d; }
body.game .lead .deco { display: flex; align-items: center; justify-content: center; height: 150px; }
.deco .mt { width: 72px; margin: 0 -5px; } .deco .mt:nth-child(1) { transform: rotate(-12deg) translateY(8px); } .deco .mt:nth-child(2) { z-index: 1; } .deco .mt:nth-child(3) { transform: rotate(12deg) translateY(8px); }
.deco .sg { transform: rotate(-6deg); }
/* Morceaux de plateau du 2048 (outils/portail.py, k2grid) */
.k2 { display: grid; grid-template-columns: repeat(var(--w), 40px); gap: 5px; padding: 6px; border-radius: 12px; background: linear-gradient(180deg, #f7c98c, #e9a65d); box-shadow: 0 5px 0 #b8702f, 0 8px 14px rgba(var(--sh), .3); }
.k2 i { height: 40px; border-radius: 9px; background: linear-gradient(180deg, #ffd7e4, #ffc1d6); }
.k2 i.kt { display: grid; place-items: center; background: linear-gradient(180deg, var(--l), var(--c) 55%, var(--d)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), inset 0 2px 0 rgba(255,255,255,.55), 0 2px 0 var(--d); }
.k2 i.kt b { color: #fff; font: 700 17px/1 var(--display); text-shadow: 0 1px 0 var(--d); }
.k2 i.kt[data-v="1024"] b, .k2 i.kt[data-v="2048"] b { font-size: 11.5px; }
.k2 i.nw { box-shadow: 0 0 0 3px #fff3c4, 0 0 12px 5px rgba(255,205,80,.85); }
.k2 [data-v="2"] { --l: #b8f5cf; --c: #4fcf83; --d: #21894a; } .k2 [data-v="4"] { --l: #fff3a6; --c: #ffd23f; --d: #c08f00; } .k2 [data-v="8"] { --l: #ffd2a1; --c: #ff9636; --d: #c25a00; }
.k2 [data-v="16"] { --l: #ffb1c0; --c: #ff4d6d; --d: #b8173a; } .k2 [data-v="1024"] { --l: #d8c8ff; --c: #8b5cf6; --d: #4c25a8; } .k2 [data-v="2048"] { --l: #ffe8a8; --c: #f2a93b; --d: #9c5a06; }
.deco .k2 { transform: rotate(-5deg); }
.steps .k2 { grid-template-columns: repeat(var(--w), 30px); gap: 4px; padding: 5px; } .steps .k2 i { height: 30px; border-radius: 7px; } .steps .k2 i.kt b { font-size: 14px; } .steps .k2 i.kt[data-v="1024"] b, .steps .k2 i.kt[data-v="2048"] b { font-size: 9.5px; }
/* Morceaux de plateau du Nonogramme (outils/portail.py, ngrid et npic) : les vrais carreaux du jeu dans leur cadre de terre cuite */
.ng { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 5px; border: 13px solid transparent; border-image: url(../images/nono/plateau.webp) 170 fill / 13px; padding: 3px;
  filter: drop-shadow(0 3px 0 #8a4524) drop-shadow(0 8px 10px rgba(var(--sh), .35)); }
.ng .nc { display: flex; justify-content: flex-end; gap: 1px; } .ng .nl { display: flex; }
.ng .nc b { display: grid; place-items: center; width: 24px; height: 24px; background: url(../images/nono/bleu.webp) center/108% no-repeat; color: #fff; font: 600 14px/1 var(--display); text-shadow: 0 1px 0 rgba(8, 22, 90, .7); }
.ng .nc.done b { background-image: url(../images/nono/terre.webp); color: rgba(122, 58, 22, .8); text-shadow: 0 1px 0 rgba(255, 225, 195, .6); }
.ng .nl i { position: relative; width: 28px; height: 28px; background: url(../images/nono/creme.webp) center/104% no-repeat; }
.ng .nl i.f { background-image: url(../images/nono/bleu.webp); }
.ng .nl i.nw { filter: drop-shadow(0 0 4px rgba(255, 205, 60, 1)) brightness(1.08); z-index: 1; }
.ng .nl i.x { background: none; }
.ng .nl i.x::before { content: ""; position: absolute; inset: 9%; border-radius: 20%; background: rgba(120, 82, 40, .2); box-shadow: inset 0 2px 4px rgba(70, 40, 10, .5), inset 0 -1px 0 rgba(255, 245, 220, .5); }
.ng .nl i.x::after { content: ""; position: absolute; inset: 27%; background: linear-gradient(45deg, transparent 42%, #b8683c 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, #b8683c 42% 58%, transparent 58%); }
.ng.pic { grid-template-columns: repeat(var(--n), 11px); gap: 0; align-items: stretch; }
.ng.pic i { height: 11px; background-color: var(--c); background-image: url(../images/nono/creme-m.webp); background-size: 104%; background-position: center; background-blend-mode: multiply;
  -webkit-mask: url(../images/nono/creme-m.webp) center/104% no-repeat; mask: url(../images/nono/creme-m.webp) center/104% no-repeat; }
.deco .ng.pic { transform: rotate(-5deg); grid-template-columns: repeat(var(--n), 12px); } .deco .ng.pic i { height: 12px; }
.steps .ng .nl i { width: 24px; height: 24px; } .steps .ng .nc b { width: 21px; height: 21px; font-size: 12.5px; } .steps .ng { border-width: 11px; border-image-width: 11px; }
.steps .ng.pic { grid-template-columns: repeat(var(--n), 10px); } .steps .ng.pic i { width: auto; height: 10px; }
/* Rangées de galets du Mot du jour (outils/portail.py, mtrows) */
.mtw { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; background: linear-gradient(180deg, #fff3dc, #e6cc9e); box-shadow: 0 3px 0 #c9a873; }
.mtr { display: flex; gap: 4px; }
.mtr i { width: 26px; height: 26px; border-radius: 46%; display: grid; place-items: center; font: 700 14px var(--display, Fredoka), sans-serif; font-style: normal; color: #0e4f7a;
  background: radial-gradient(circle at 40% 35%, #f5e8cf, #e8d5b2); box-shadow: inset 0 2px 4px rgba(150,110,50,.3); }
.mtr i.t { background: radial-gradient(circle at 35% 30%, #fff, #e7f6f9 70%); box-shadow: 0 2px 0 #b6d8de; }
.mtr i.g { background: radial-gradient(circle at 35% 30%, #fff, #e7f6f9 70%); color: rgba(19,169,181,.6); box-shadow: 0 2px 0 #b6d8de, 0 0 0 2px #2fd3d6; }
.mtr i.o, .mtr i.m, .mtr i.n { color: #fff; }
.mtr i.o { background: radial-gradient(circle at 35% 28%, #b8fbff 0 10%, #3fe0e0 38%, #13a9b5); box-shadow: 0 2px 0 #0c7f8c; }
.mtr i.m { background: radial-gradient(circle at 35% 28%, #ffd3bf 0 10%, #ff8a5c 40%, #e85a2a); box-shadow: 0 2px 0 #b8421a; }
.mtr i.n { background: radial-gradient(circle at 35% 28%, #efe6d6, #c9bba3); color: #7b6b52; box-shadow: 0 2px 0 #a8977a; }
.deco .mtr i { width: 30px; height: 30px; font-size: 16px; }
.steps .mtr i { width: 22px; height: 22px; font-size: 12px; } .steps .mtw { padding: 4px; gap: 3px; } .steps .mtr { gap: 3px; }
/* Morceaux de grille du Démineur (outils/portail.py, dgrid) */
.dg { display: grid; grid-template-columns: repeat(var(--w), 34px); padding: 5px; border-radius: 12px; background: linear-gradient(180deg, #8a5a33, #6f4626); box-shadow: 0 5px 0 #4e301a, 0 8px 14px rgba(var(--sh), .35); }
.dg i { position: relative; display: grid; place-items: center; height: 34px; font: 700 20px/1 var(--display); font-style: normal; }
.dg i.g { background: #8fd44e; box-shadow: inset 0 -3px 0 #4f9a2c, inset 0 2px 0 rgba(255,255,255,.28); } .dg i.g.a { background: #7cc441; }
.dg i.o { background: #f6e3b4; } .dg i.o.a { background: #efd59c; }
.dg svg { width: 62%; height: 70%; }
.dg .n1 { color: #2f7de1; } .dg .n2 { color: #2e9b3c; } .dg .n3 { color: #e5473d; } .dg .n4 { color: #7a4fd6; }
.dg .pr { box-shadow: inset 0 0 0 3px #ffcf4a; z-index: 1; }
.dg .hint { z-index: 2; box-shadow: 0 0 0 3px #fff3c4, 0 0 12px 5px rgba(255,205,80,.85); }
.dg .hint::after { content: ''; position: absolute; inset: 24%; border-radius: 50%; background: radial-gradient(circle, #fffbe6 0 30%, rgba(255,236,160,0) 70%); }
.dg .mn { width: 60%; height: 60%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6a6a76, #2b2b33 60%); }
.deco .dg { transform: rotate(-5deg); }
.steps .dg { grid-template-columns: repeat(var(--w), 26px); } .steps .dg i { height: 26px; font-size: 16px; }
.ill .dots { color: #fff; font: 700 26px/1 var(--display); letter-spacing: 2px; margin: 0 -4px; }
body.game .daily { background: linear-gradient(165deg, #fffbe6, #ffe9a6); }
body.game .daily h2 { color: #5b3d00; } body.game .daily p { color: #6b5210; font-size: 15.5px; }
.week { display: flex; gap: 8px; margin: 16px 0; }
.week span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .75); color: #9a7a20; font: 700 15px var(--display); }
.week span.ok { background: linear-gradient(180deg, #34e67f, #0fae55); color: #fff; box-shadow: 0 3px 0 #0a7d48; }
.week span.now { background: #fff; color: #5b3d00; box-shadow: 0 0 0 3px #ffb800; }
body.game .daily .btn { width: 100%; height: 52px; font-size: 18px; border-radius: 26px; }
body.game .daily small { display: block; margin-top: 12px; text-align: center; color: #8a6a10; font: 700 14px var(--body); }
.mrow { display: flex; align-items: center; gap: 14px; padding: 11px 12px; margin-top: 8px; border-radius: 16px; background: var(--tint); }
.mrow b { display: block; font: 600 17px/1.2 var(--display); color: var(--ink); } .mrow small { display: block; font-size: 14px; color: var(--ink-2); }
.mi { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; flex: none; color: #fff; font: 700 21px var(--display); background: linear-gradient(180deg, var(--a1), var(--a2)); box-shadow: 0 3px 0 var(--pop); }
.mi.v { background: linear-gradient(180deg, #a58bff, #6a3dff); box-shadow: 0 3px 0 #4a22c9; } .mi.y { background: linear-gradient(180deg, #ffe873, #ffb800); box-shadow: 0 3px 0 #bd7b00; color: #5b3d00; }
@media (max-width: 860px) { .week { justify-content: space-between; gap: 4px; } .col2 { gap: 12px; } }
body.game .card h2:first-child { margin-top: 0; }

/* =====================================================================
   Le site réel : recherche, menus, ancres, états
   ===================================================================== */
:root { --pop: #1b1f66; }
body.game { --pop: #0a7d48; }
html { scroll-behavior: smooth; }
section[id], div[id].row-head { scroll-margin-top: 88px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button.pill { border: 0; }

/* Recherche */
.search { position: relative; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font: inherit; }
.search input::placeholder { color: var(--mut); opacity: 1; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.results { position: absolute; left: 0; top: 60px; width: 380px; max-width: calc(100vw - 20px); padding: 8px; border-radius: 20px; background: var(--pop); box-shadow: 0 18px 40px rgba(4, 6, 40, .55), inset 0 0 0 1px rgba(255, 255, 255, .14); display: none; gap: 2px; z-index: 40; }
.results.on { display: grid; }
.results a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 14px; font: 600 16.5px/1.2 var(--display); color: #fff; }
.results a:hover, .results a.hl { background: rgba(255, 255, 255, .14); }
.results img { width: 76px; aspect-ratio: 16 / 9; border-radius: 9px; object-fit: cover; flex: none; }
.results small { display: block; margin-top: 2px; font: 600 13.5px var(--body); color: var(--mut); }
.results p { padding: 10px 10px 12px; color: var(--mut); font: 600 15px var(--body); }
body.game .results small, body.game .results p { color: var(--mut); }

/* Menus déroulants (langue, menu du téléphone) */
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; user-select: none; }
.dd summary::-webkit-details-marker { display: none; }
.dd[open] summary { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.dd .menu { position: absolute; right: 0; top: 60px; min-width: 210px; padding: 8px; border-radius: 20px; background: var(--pop); box-shadow: 0 18px 40px rgba(4, 6, 40, .55), inset 0 0 0 1px rgba(255, 255, 255, .14); display: grid; gap: 2px; z-index: 40; }
.dd .menu a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 13px; font: 600 16.5px var(--display); color: #fff; white-space: nowrap; }
.dd .menu a:hover { background: rgba(255, 255, 255, .14); }
.dd .menu a[aria-current] { background: #fff; color: #10134a; }
body.game .dd .menu a[aria-current] { color: var(--pop); }
.dd .menu hr { border: 0; height: 1px; margin: 6px 8px; background: rgba(255, 255, 255, .18); }
.dd .menu small { padding: 6px 14px 2px; font: 700 12.5px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
body.game .dd .menu small { color: var(--mut); }
.dd.burger { display: none; }

/* Accueil : états remplis par js/site.js */
.resume { color: inherit; }
.resume .bar { display: none; }
.tile.done .th { box-shadow: 0 0 0 3px var(--green); }
.streak[hidden] { display: none; }
.grid6.cards6 .th img { transform: scale(1.75); transform-origin: 50% 8%; }
.row-head h2 a { color: inherit; }
.rules li:last-child a { border-bottom: 0; }

/* Page d'un jeu */
.player { position: relative; }
.player iframe { min-height: 520px; }
.player:fullscreen { border-radius: 0; margin: 0; box-shadow: none; display: flex; flex-direction: column; }
.player:fullscreen iframe { flex: 1; aspect-ratio: auto; }
.player:fullscreen .pbar { display: none; }
.pbar button.pill { cursor: pointer; }
.mrow { color: inherit; } a.mrow:hover, a.mrow.on { box-shadow: 0 0 0 3px var(--green); }
a.mrow.on::after { content: ''; flex: none; margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat; }
.crumbs { display: flex; gap: 8px; margin: 2px 6px 10px; font: 700 14px var(--body); color: var(--mut); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; } .crumbs span { opacity: .7; }
.card .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; height: 46px; padding: 0 20px; border-radius: 23px; background: var(--tint); color: var(--tint-ink); font: 700 16px var(--display); }
.card .more:hover { box-shadow: 0 0 0 3px var(--green); }
body.game .daily .done { display: block; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .8); color: var(--pop); font: 700 15px var(--body); text-align: center; }
.mhero .acts:has(> :only-child), .mhero .acts.one { grid-template-columns: 1fr; }

@media (max-width: 1180px) and (min-width: 861px) {
  .gp { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(5, 1fr); }
  .side-h { display: flex !important; }
}
@media (max-width: 860px) {
  .dd.lang { display: none; }
  .dd.burger { display: block; }
  .dd .menu { top: 52px; }
  .top.searching .logo-pill, .top.searching .sp, .top.searching .burger { display: none; }
  .top.searching .search { display: flex; flex: 1; width: auto; height: 44px; padding: 0 16px; }
  .top.searching .results { top: 50px; width: calc(100vw - 20px); }
  section[id], div[id].row-head { scroll-margin-top: 120px; }
  .crumbs { margin: 4px 4px 10px; }
}
@media (max-width: 860px) {
  /* Défis du jour : une rangée qu'on fait glisser, pas de vignette orpheline */
  .grid5 { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 12px; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .grid5::-webkit-scrollbar { display: none; }
  .grid5 .tile { flex: 0 0 62%; scroll-snap-align: start; }
  .grid6.n7, .grid6.n8, .grid6.n10, .grid6.n5 { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 12px; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .grid6.n7::-webkit-scrollbar, .grid6.n8::-webkit-scrollbar, .grid6.n10::-webkit-scrollbar, .grid6.n5::-webkit-scrollbar { display: none; }
  .grid6.n7 .tile, .grid6.n8 .tile, .grid6.n10 .tile, .grid6.n5 .tile { flex: 0 0 31%; scroll-snap-align: start; }
}

/* Awalé : morceaux du vrai plateau dans les pages (outils/portail.py, awgrid) : creux d'ébène, perles de verre, bois incrusté du plateau */
.aw { display: inline-flex; flex-direction: column; gap: 7px; padding: 11px 13px; border-radius: 22px; background: #2a170c url(../images/awale/plateau.webp) 50% 50% / 260% auto; box-shadow: inset 0 0 0 3px #1a0d06, 0 4px 0 #120804, 0 10px 18px rgba(30, 14, 4, .35); }
.aw .awr { display: flex; gap: 8px; }
.awp { position: relative; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #2b1a10 0, #160c06 62%, #0c0603 100%); box-shadow: inset 0 5px 8px rgba(0, 0, 0, .75), inset 0 -2px 2px rgba(255, 210, 160, .16), 0 0 0 2px rgba(232, 163, 61, .45); font-style: normal; }
.awp img { position: absolute; width: 19px; height: 19px; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .6)); }
.awp img:nth-child(1) { left: 9px; top: 11px; } .awp img:nth-child(2) { left: 24px; top: 9px; } .awp img:nth-child(3) { left: 12px; top: 24px; }
.awp img:nth-child(4) { left: 26px; top: 23px; } .awp img:nth-child(5) { left: 17px; top: 16px; } .awp img:nth-child(6) { left: 19px; top: 29px; }
.awp.n1 img:nth-child(1) { left: 16px; top: 16px; } .awp.n2 img:nth-child(1) { left: 9px; top: 16px; } .awp.n2 img:nth-child(2) { left: 24px; top: 16px; }
.awp b { position: absolute; right: -6px; top: -7px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center; font: 600 12.5px/1 var(--display); color: #2a1606; background: radial-gradient(circle at 40% 30%, #fff1c9, #ffd77a 55%, #e8a33d); box-shadow: 0 2px 0 #7a4410, 0 0 0 1.5px #1a0f08; }
.awp.play { box-shadow: inset 0 5px 8px rgba(0, 0, 0, .75), 0 0 0 3px #ffd77a, 0 0 16px 4px rgba(255, 200, 90, .65); }
.awp.last { box-shadow: inset 0 5px 8px rgba(0, 0, 0, .75), 0 0 0 3px #22c7c2, 0 0 16px 4px rgba(34, 199, 194, .55); }
.awp.cap { box-shadow: inset 0 5px 8px rgba(0, 0, 0, .75), 0 0 0 3px #ff5a8c, 0 0 16px 5px rgba(255, 90, 140, .6); }
.aw.store { padding: 11px 16px; }
.aws { position: relative; display: grid; grid-template-columns: repeat(2, 19px); gap: 1px 3px; padding: 10px 12px; border-radius: 30px; background: radial-gradient(ellipse at 50% 35%, #2b1a10 0, #160c06 70%); box-shadow: inset 0 5px 8px rgba(0, 0, 0, .75), 0 0 0 2px rgba(232, 163, 61, .5); }
.aws img { width: 19px; height: 19px; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .6)); }
.aws b { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); min-width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; font: 400 17px/1 "Titan One", var(--display); color: #06201f; background: radial-gradient(circle at 40% 30%, #fff7e0, #22c7c2 60%, #118a86); box-shadow: 0 2px 0 #0b4f4c, 0 0 0 1.5px #1a0f08; }
.steps .aw { zoom: .8; } .steps .aw.sm { zoom: .48; } .ill:has(.aw.sm) { gap: 6px; }   /* zoom : perles, creux et pastilles réduits ensemble ; avant → après tient dans une demi-carte */
.deco .aw { transform: rotate(-4deg); }
/* Couronnes : jardin royal (vert buis, or des couronnes, crème) */
body.game.g-couronnes {
  --c1: #8fd36a; --c2: #4fa63e; --c3: #2f7d3a; --c4: #1d5a26; --sh: 20, 70, 30; --top: rgba(47, 125, 58, .9); --a1: #ffd864; --a2: #e0a419;
  --i1: #e2f5c9; --i2: #b6e28a; --i3: #6cbf4a; --glow: rgba(255, 244, 205, .5); --tint: #f1f9e6; --tint-ink: #1f5a26; --mut: #eef8e2; --green: #2f7d3a; --pop: #1d5a26;
}
body.game.g-couronnes .btn { color: #fff; }
/* Morceaux de plateau de Couronnes (outils/portail.py, crgrid) : les vrais parterres du jeu, bordés de buis, couronnes d'or */
.crg { display: grid; grid-template-columns: repeat(var(--w), 30px); padding: 6px; border-radius: 12px; background: url(../images/couronnes/jardin/gravier.webp) center/140px; box-shadow: inset 0 0 0 4px #3f8a2c, inset 0 0 0 6px #2b6a22, 0 4px 0 #8a7650, 0 8px 12px rgba(var(--sh), .3); }
.crg i { position: relative; height: 30px; background: center/92% no-repeat; }
.crg .z0 { background-image: url(../images/couronnes/jardin/z0.webp); } .crg .z1 { background-image: url(../images/couronnes/jardin/z1.webp); } .crg .z2 { background-image: url(../images/couronnes/jardin/z2.webp); }
.crg .z3 { background-image: url(../images/couronnes/jardin/z3.webp); } .crg .z4 { background-image: url(../images/couronnes/jardin/z4.webp); } .crg .z5 { background-image: url(../images/couronnes/jardin/z5.webp); }
.crg .z6 { background-image: url(../images/couronnes/jardin/z6.webp); } .crg .z7 { background-image: url(../images/couronnes/jardin/z7.webp); } .crg .z8 { background-image: url(../images/couronnes/jardin/z8.webp); }
.crg .z9 { background-image: url(../images/couronnes/jardin/z9.webp); }
.crg i.t { border-top: 3px solid #2b6a22; } .crg i.b { border-bottom: 3px solid #2b6a22; } .crg i.l { border-left: 3px solid #2b6a22; } .crg i.r { border-right: 3px solid #2b6a22; }
.crg b { position: absolute; inset: 4%; background: url(../images/couronnes/couronne.webp) center/contain no-repeat; filter: drop-shadow(0 2px 0 rgba(90, 50, 0, .5)); }
.crg b.r { filter: drop-shadow(0 0 3px #ff2d55) drop-shadow(0 0 1px #ff2d55); }
.crg i.hl { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #ffc21a; z-index: 1; }
.crg s { position: absolute; inset: 30%; background: linear-gradient(45deg, transparent 40%, #8a5a2a 40% 60%, transparent 60%), linear-gradient(-45deg, transparent 40%, #8a5a2a 40% 60%, transparent 60%); }
.deco .crg { transform: rotate(-5deg); grid-template-columns: repeat(var(--w), 38px); } .deco .crg i { height: 38px; }
.steps .crg { grid-template-columns: repeat(var(--w), 27px); } .steps .crg i { height: 27px; }
/* Sudoku Killer : pays du chocolat (chocolat au lait, rose framboise, or de la boîte) */
body.game.g-killer {
  --c1: #f2a3c0; --c2: #d9709a; --c3: #a3486a; --c4: #6e2c45; --sh: 90, 30, 40; --top: rgba(122, 58, 30, .92); --a1: #ffd864; --a2: #e0a419;
  --i1: #ffe1ec; --i2: #f7b6cf; --i3: #e2789f; --glow: rgba(255, 236, 214, .5); --tint: #fff1f5; --tint-ink: #7a3a1e; --mut: #ffeef4; --green: #c8466f; --pop: #7a3a1e;
}
body.game.g-killer .btn { color: #fff; }
/* Sudoku Killer : morceaux de la boîte de chocolats (outils/portail.py, kgrid) */
.kg { --kgap: 3px; --ks: 34px; display: grid; grid-template-columns: repeat(var(--w), var(--ks)); gap: var(--kgap); padding: 6px; border-radius: 10px; background: #2b140a; box-shadow: 0 0 0 4px #e0a93a, 0 0 0 6px #8a5a16, 0 8px 14px rgba(var(--sh), .35); }
.kg i { position: relative; height: var(--ks); border-radius: 6px; display: grid; place-items: center; font: 700 19px/1 var(--display); font-style: normal; color: #fff6e6; text-shadow: 0 1px 0 #3a1a08; background: linear-gradient(145deg, #9a6038, #6b3a1d 55%, #52290f); box-shadow: inset 1px 1px 0 rgba(255, 214, 170, .3), inset -1px -2px 0 rgba(0, 0, 0, .35); }
.kg i.jb { height: calc(var(--ks) + var(--kgap)); margin-bottom: calc(-1 * var(--kgap)); }
.kg i.f1 { background: linear-gradient(145deg, #6a3a20, #42200f 55%, #2c1307); } .kg i.f2 { background: linear-gradient(145deg, #cf9a5e, #a26a34 55%, #83501f); }
.kg i.f3 { background: linear-gradient(145deg, #fff6e6, #f0dcb8 55%, #dcc092); color: #5a2a12; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); } .kg i.f4 { background: linear-gradient(145deg, #f6bcd0, #de87a8 55%, #c4648a); text-shadow: 0 1px 0 #8e3a5c; }
.kg u { position: absolute; left: 2px; top: 1px; z-index: 1; font: 900 9px/1.25 var(--display); text-decoration: none; text-shadow: none; color: #4a2412; background: #fff1d6; border-radius: 3px; padding: 0 2px; }
.kg i.new { color: #ffc9de; background: linear-gradient(145deg, #c58c4a, #8b5a26 55%, #6e4318); box-shadow: inset 0 0 0 2px #ffd34d, 0 0 8px rgba(255, 210, 80, .7); }
.kg i.bad { color: #ff9cbc; background: repeating-linear-gradient(45deg, rgba(255, 60, 100, .42) 0 4px, transparent 4px 9px), linear-gradient(145deg, #9a6038, #52290f); }
.kg i.sel { background: linear-gradient(145deg, #d29a5c, #a46a34 55%, #83501f); box-shadow: inset 0 0 0 2px #ffe08a, 0 0 10px rgba(255, 214, 90, .9); }
.deco .kg { --ks: 40px; transform: rotate(-5deg); } .deco .kg i { font-size: 22px; }
.steps .kg { --kgap: 2px; --ks: 28px; padding: 5px; } .steps .kg i { font-size: 16px; } .steps .kg u { font-size: 8px; }
/* Soleil & Lune : palais des nuages (bleu de nuit, or du soleil, crème du marbre) */
body.game.g-sl {
  --c1: #9fb4ee; --c2: #6f86d6; --c3: #3d52a8; --c4: #1b2a63; --sh: 20, 30, 80; --top: rgba(27, 42, 99, .92); --a1: #ffd864; --a2: #e0a419;
  --i1: #e6ecff; --i2: #c3d0fa; --i3: #8ea3ea; --glow: rgba(255, 244, 214, .5); --tint: #f3f6ff; --tint-ink: #1b2a63; --mut: #eef2ff; --green: #2d6be0; --pop: #1b2a63;
}
body.game.g-sl .btn { color: #fff; }
/* Soleil & Lune : morceaux du plateau de marbre et d'or (outils/portail.py, slgrid) */
.slg { --ss: 34px; display: grid; gap: 3px; padding: 6px; border-radius: 10px; background: radial-gradient(ellipse at 30% 20%, #fbf6ec, #e2d5bf); box-shadow: 0 0 0 4px #e0a93a, 0 0 0 6px #8a5a16, 0 8px 14px rgba(var(--sh), .35); justify-items: start; }
.slr { display: grid; grid-template-columns: repeat(var(--w), var(--ss)); gap: 3px; }
.slg i { position: relative; height: var(--ss); border-radius: 6px; display: grid; place-items: center; background: linear-gradient(150deg, #fffaf1, #f1e7d6 55%, #e2d3b8); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .9), inset -1px -2px 0 rgba(150, 120, 70, .35), 0 2px 0 #b9a27a; }
.slg i img { width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(60, 35, 5, .4)); }
.slg i.g { background: linear-gradient(150deg, #f6e7c4, #e8d09c 55%, #d7b878); box-shadow: inset 0 0 0 2px #d3a239, 0 2px 0 #a48242; }
.slg i.new { box-shadow: inset 0 0 0 2px #ffd34d, 0 0 9px rgba(255, 210, 80, .9), 0 2px 0 #b9a27a; }
.slg i.bad { background: repeating-linear-gradient(45deg, rgba(230, 40, 70, .32) 0 4px, transparent 4px 9px), linear-gradient(150deg, #fff1ef, #e6c1bb); }
.deco .slg { --ss: 42px; transform: rotate(-5deg); }
.steps .slg { --ss: 27px; padding: 5px; }

/* Ludo « Durbar » : fête de Kano (indigo des cavaliers, ocre des murs, or des pièces) */
body.game.g-ludo {
  --c1: #6f7fe0; --c2: #4352b8; --c3: #2c3790; --c4: #1b2260; --sh: 16, 20, 70; --top: rgba(28, 36, 100, .92); --a1: #ffd864; --a2: #e0a419;
  --i1: #f6e2bd; --i2: #e9be7c; --i3: #c98a44; --glow: rgba(255, 226, 160, .5); --tint: #f2f0ff; --tint-ink: #26307a; --mut: #e8eaff; --green: #e0a419; --pop: #26307a;
}
body.game.g-ludo .btn { color: #fff; }
/* Petits chevaux « Manège » : Belle Époque (turquoise du manège, crème, or) */
body.game.g-petits-chevaux {
  --c1: #7fdcd4; --c2: #2fb0aa; --c3: #1f8a8a; --c4: #146262; --sh: 10, 70, 70; --top: rgba(24, 120, 120, .92); --a1: #ffd864; --a2: #e0a419;
  --i1: #fff3dc; --i2: #ffd9a8; --i3: #f0a868; --glow: rgba(255, 236, 200, .5); --tint: #e9f8f6; --tint-ink: #135c5c; --mut: #e6faf8; --green: #1f8a8a; --pop: #135c5c;
}
body.game.g-petits-chevaux .btn { color: #fff; }
/* Parchís « Patio andaluz » : cobalt des azulejos, terre cuite, oranges */
body.game.g-parchis {
  --c1: #7aa6f0; --c2: #3a72d6; --c3: #1d4b9a; --c4: #13336e; --sh: 14, 36, 90; --top: rgba(24, 62, 140, .92); --a1: #ffc65a; --a2: #f08a1c;
  --i1: #fff3e0; --i2: #f7d2a6; --i3: #d98a52; --glow: rgba(255, 220, 170, .5); --tint: #eef3ff; --tint-ink: #1d4b9a; --mut: #e8efff; --green: #f08a1c; --pop: #1d4b9a;
}
body.game.g-parchis .btn { color: #fff; }
/* Pöppel « Chalet des Dolomites » : vert sapin, bois de mélèze, géraniums */
body.game.g-poppel {
  --c1: #7fc48d; --c2: #4f9a5e; --c3: #2e6b3f; --c4: #1d4a2a; --sh: 20, 52, 30; --top: rgba(34, 84, 50, .92); --a1: #ffcf5a; --a2: #d8322e;
  --i1: #fff6e6; --i2: #f2d7a8; --i3: #c98a4e; --glow: rgba(255, 230, 170, .5); --tint: #eef7ef; --tint-ink: #2e6b3f; --mut: #e9f4ea; --green: #d8322e; --pop: #2e6b3f;
}
body.game.g-poppel .btn { color: #fff; }
/* Petites scènes du Ludo et des Petits chevaux (outils/portail.py, ldill) : cases crème, vrais pions du jeu, dé d'ivoire */
.ldd { display: inline-grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 40px; height: 40px; padding: 6px; border-radius: 10px; flex: none;
  background: linear-gradient(160deg, #fffdf6, #efe2c4); box-shadow: inset 0 -3px 0 rgba(120, 90, 40, .25), 0 3px 0 rgba(var(--sh), .45); }
.ldd i { width: 7px; height: 7px; border-radius: 50%; place-self: center; background: #3a2414; }
.ldr { display: flex; gap: 3px; align-items: flex-end; }
.ldc { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #fff7e6; box-shadow: inset 0 0 0 2px rgba(150, 100, 40, .3), 0 2px 0 rgba(var(--sh), .35); }
.ldc.red { background: #e0453c; box-shadow: inset 0 0 0 2px rgba(110, 20, 10, .35), 0 2px 0 rgba(var(--sh), .35); }
.ldc.ctr { background: radial-gradient(circle, #ffe08a, #e0a419); }
.ldc b { width: 6px; height: 6px; border-radius: 50%; background: rgba(150, 100, 40, .45); }
.ldc s { width: 16px; height: 3px; border-radius: 2px; background: #c0392b; transform: rotate(45deg); box-shadow: 0 0 0 0 #c0392b; }
.ldc s::after { content: ""; display: block; width: 16px; height: 3px; border-radius: 2px; background: #c0392b; transform: rotate(90deg); }
.ldc em { font: 700 15px var(--display); font-style: normal; color: #fff; }
.ill img.ldp, .deco img.ldp { position: absolute; bottom: 9px; left: 50%; width: auto; height: 46px; transform: translateX(-50%); border-radius: 0; box-shadow: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
.ill img.ldp.gh { opacity: .3; }
.lds { position: relative; display: block; width: 44px; height: 44px; border-radius: 10px; background: #e0453c; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 3px 0 rgba(var(--sh), .4); flex: none; }
.lds.blue { background: #3567cf; }
.lds img.ldp { bottom: 8px; }
.steps .ill:has(.ldr) { gap: 7px; }
.deco .ldfan { position: relative; display: block; width: 150px; height: 120px; }
.deco .ldfan img.ldp { height: 96px; bottom: 6px; } .deco .ldfan img.ldp:nth-child(1) { left: 22%; } .deco .ldfan img.ldp:nth-child(2) { left: 50%; z-index: 1; height: 110px; } .deco .ldfan img.ldp:nth-child(3) { left: 78%; }
.deco .ldd { transform: rotate(-12deg) translateY(30px); margin-left: -16px; z-index: 2; }

/* Rangée « Jeux d'Afrique » : la ligne sous chaque tuile dit de quel jeu il s'agit, elle peut passer sur deux lignes au lieu d'être coupée */
.grid6.africa .nm { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* ---------- Profil du joueur (js/profil.js) : bouton rond de la barre du haut et fenêtre « Mon profil » ----------
   La fenêtre garde les couleurs de l'accueil sur toutes les pages (un profil pour tout le site) : elle ne lit pas les variables des pages de jeu. */
.pf-btn { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; padding: 0; border: 0; flex: none; background: var(--surf-2); color: #fff; }
.pf-btn.has { background: linear-gradient(180deg, #ffe680, #ffab0f); box-shadow: 0 0 0 3px rgba(255, 255, 255, .16); }
.pf-btn img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.pf-btn.has::after, .pf-btn.new::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 15px; height: 15px; border-radius: 50%; background: #22d36b; border: 3px solid #1a1e63; }
.pf-btn.new::after { background: #ffd23f; }
body.game .pf-btn:not(.has) { background: var(--deep); }
html.pf-on { overflow: hidden; }
.pf-veil { position: fixed; inset: 0; z-index: 90; background: rgba(6, 8, 40, .72); display: grid; place-items: center; padding: 16px; font: 500 16px/1.5 Nunito, ui-rounded, system-ui, sans-serif; }
.pf-veil[hidden] { display: none; }
.pf { --pfd: Fredoka, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif; --pfb: Nunito, ui-rounded, system-ui, sans-serif; --pfm: #b6bbe8;
  display: flex; flex-direction: column; width: min(1010px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); border-radius: 34px; color: #fff; overflow: hidden;
  background: radial-gradient(700px 380px at 0% 0%, rgba(140, 92, 255, .55), transparent 66%), radial-gradient(620px 360px at 100% 0%, rgba(34, 211, 107, .26), transparent 64%), linear-gradient(180deg, #262b84 0%, #181c62 100%);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16), 0 40px 90px rgba(2, 3, 30, .7); animation: pf-in .18s ease-out; }
@keyframes pf-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.pf button { font: inherit; color: inherit; cursor: pointer; }
.pf svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pf-blob { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: #fff; flex: none; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), inset 0 3px 0 rgba(255, 255, 255, .35); transform: rotate(-6deg); }
.pf-blob.v { background: linear-gradient(180deg, #a58bff, #6a3dff); } .pf-blob.y { background: linear-gradient(180deg, #ffe680, #ffab0f); transform: rotate(5deg); } .pf-blob.g { background: linear-gradient(180deg, #4dff9a, #12b45a); }
.pf-blob.p { background: linear-gradient(180deg, #ff8fb6, #f0286f); transform: rotate(5deg); } .pf-blob.b { background: linear-gradient(180deg, #7fd0ff, #1583e6); } .pf-blob.o { background: linear-gradient(180deg, #ffb26b, #f2620f); }
.pf-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px 26px; flex: none; }
.pf-head h2 { font: 600 27px/1.1 var(--pfd); color: #fff; text-shadow: none; margin: 0; }
.pf-head p { font: 600 14.5px var(--pfb); color: var(--pfm); margin-left: 4px; }
.pf-head .x { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .13); display: grid; place-items: center; flex: none; }
.pf-head .x:hover { background: rgba(255, 255, 255, .22); }
.pf-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
.pf-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 26px; padding: 14px 26px 22px; }
.pf-me { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 18px 18px; border-radius: 26px; background: rgba(255, 255, 255, .075); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
.pf-ava { position: relative; width: 188px; height: 188px; margin-top: 8px; border-radius: 50%; padding: 6px; border: 0; background: conic-gradient(from 210deg, #34e67f, #ffd23f, #ff7a2f, #ff4f8b, #7c5cff, #34e67f); box-shadow: 0 14px 30px rgba(4, 6, 40, .55); flex: none; }
.pf-ava .im { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px #1b1f66; background: linear-gradient(180deg, #7c6cf0, #4a3bc4); }
.pf-ava .im img { width: 100%; height: 100%; object-fit: cover; }
.pf-ava .im svg.ic { width: 46%; height: 46%; stroke-width: 1.7; opacity: .9; }
.pf-ava .pen { position: absolute; right: 0; bottom: 4px; width: 46px; height: 46px; border-radius: 50%; border: 4px solid #20246f; display: grid; place-items: center; background: #ffd23f; color: #2b1f00; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }
.pf-name { display: flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 18px; padding: 4px 10px 4px 14px; border-radius: 16px; border: 0; background: rgba(255, 255, 255, .1); font: 700 28px/1.2 var(--pfd) !important; }
.pf-name b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-name.ph b { color: var(--pfm); font-weight: 600; }
.pf-name svg.ic { width: 19px; height: 19px; color: var(--pfm); }
.pf-name:hover { background: rgba(255, 255, 255, .17); }
input.pf-input { width: 100%; max-width: 230px; margin-top: 18px; padding: 4px 12px; border-radius: 16px; border: 0; outline: 3px solid #ffd23f; background: #fff; color: #14183f; font: 700 28px/1.2 var(--pfd); text-align: center; }
.pf-since { margin-top: 6px; font: 600 13.5px var(--pfb); color: var(--pfm); }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 22px 0 0; padding: 0; list-style: none; }
.pf-stats li { padding: 10px 4px 9px; border-radius: 16px; background: rgba(10, 12, 60, .5); text-align: center; min-width: 0; }
.pf-stats b { display: block; font: 700 25px/1.05 var(--pfd); }
.pf-stats span { display: block; font: 700 11.5px/1.2 var(--pfb); color: var(--pfm); text-transform: uppercase; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; }
.pf-stats li:nth-child(1) b { color: #7fd0ff; } .pf-stats li:nth-child(2) b { color: #5df09a; } .pf-stats li:nth-child(3) b { color: #ffd23f; }
.pf-local { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; font: 600 12.5px/1.3 var(--pfb); color: #c9cdf3; text-align: left; }
.pf-local svg.ic { width: 18px; height: 18px; color: #22d36b; }
.pf-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 10px; }
.pf-h h3 { font: 600 19px/1.1 var(--pfd); color: #fff; margin: 0; }
.pf-h span { font: 600 13.5px var(--pfb); color: var(--pfm); }
.pf-sec + .pf-sec { margin-top: 18px; }
.pf-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px 10px; max-height: 246px; margin: -9px; padding: 9px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
.pf-a { position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: none; min-width: 0; }
.pf-a img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 14px rgba(4, 6, 40, .45); }
.pf-a:hover img { transform: scale(1.05); } .pf-a img { transition: transform .12s; }
.pf-a.on { box-shadow: 0 0 0 4px #1b1f66, 0 0 0 8px #ffd23f; }
.pf-a.on::after { content: "✓"; position: absolute; right: -4px; top: -4px; width: 26px; height: 26px; border-radius: 50%; background: #22d36b; color: #06260f; font: 700 15px/26px var(--pfd); text-align: center; border: 3px solid #1b1f66; }
.pf-a.lock img { filter: saturate(.55) brightness(.6); } .pf-a.lock:hover img { transform: none; }
.pf-a i { position: absolute; right: -3px; bottom: -3px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ffe680, #ffab0f); color: #4a3200; border: 3px solid #1b1f66; }
.pf-a i svg.ic { width: 14px; height: 14px; stroke-width: 2.8; }
.pf-a.photo:not(.set) { display: grid; place-items: center; align-content: center; gap: 2px; border: 2.5px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); font: 700 11.5px/1.1 var(--pfd); text-align: center; }
.pf-a.photo:not(.set):hover { background: rgba(255, 255, 255, .16); }
.pf-a.photo svg.ic { width: 26px; height: 26px; color: #ffd23f; }
.pf-a.photo.set i svg.ic { color: inherit; width: 15px; height: 15px; stroke-width: 2.4; }
.pf-badges { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-badges li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 18px; background: rgba(255, 255, 255, .075); text-align: center; font: 700 12px/1.2 var(--pfb); min-width: 0; }
.pf-badges .pf-blob { width: 46px; height: 46px; border-radius: 16px; }
.pf-badges .pf-blob svg.ic { width: 25px; height: 25px; }
.pf-badges li.off { color: #9aa0d6; } .pf-badges li.off .pf-blob { background: rgba(255, 255, 255, .12); box-shadow: none; color: #9aa0d6; transform: rotate(-6deg); }
.pf-badges li.fresh::after { content: ""; position: absolute; right: 8px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 3px rgba(255, 210, 63, .3); }
.pf-fav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-fav a { position: relative; display: block; border-radius: 14px; overflow: hidden; }
.pf-fav img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .15s; }
.pf-fav a:hover img { transform: scale(1.05); }
.pf-fav b { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 10px; background: rgba(15, 18, 64, .86); font: 700 11.5px/1.5 var(--pfd); color: #fff; }
.pf-none { padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .075); font: 600 14.5px var(--pfb); color: #c9cdf3; }
.pf-cta { display: flex; align-items: center; gap: 16px; margin: 0 26px 14px; padding: 14px 16px 14px 18px; border-radius: 24px; background: linear-gradient(100deg, rgba(34, 211, 107, .30), rgba(124, 92, 255, .38) 60%, rgba(255, 79, 139, .30)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .2); }
.pf-cta .pf-blob { width: 50px; height: 50px; border-radius: 17px; }
.pf-cta .pf-blob svg.ic { width: 27px; height: 27px; }
.pf-cta h3 { font: 700 20px/1.15 var(--pfd); color: #fff; margin: 0; }
.pf-cta ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.pf-cta ul li { padding: 3px 10px; border-radius: 12px; background: rgba(10, 12, 60, .5); font: 700 12.5px/1.5 var(--pfb); }
.pf-cta ul li::before { content: "＋ "; color: #ffd23f; }
.pf-soon { margin-left: auto; flex: none; display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 22px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); font: 600 16px var(--pfd); white-space: nowrap; }
.pf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; padding: 0 26px 18px; font: 600 13px var(--pfb); color: var(--pfm); text-align: center; }
.pf-erase { border: 0; background: none; padding: 2px 4px; font: 700 13px var(--pfb) !important; color: #dfe2ff !important; text-decoration: underline; text-underline-offset: 3px; }
.pf-erase.armed { color: #ff9db8 !important; }
.pf-toast { position: fixed; left: 50%; bottom: 26px; z-index: 95; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 9px 18px 9px 10px; border: 0; border-radius: 26px; background: #262b84; color: #fff; font: 600 15.5px Fredoka, ui-rounded, system-ui, sans-serif; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .2), 0 16px 36px rgba(2, 3, 30, .6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.pf-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pf-toast .pf-blob { width: 34px; height: 34px; border-radius: 12px; } .pf-toast svg.ic { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pf-toast:not(.bdg) { padding-left: 18px; } .pf-toast:not(.bdg) .pf-blob { display: none; }
@media (max-width: 860px) {
  .pf-btn { width: 44px; height: 44px; } .pf-btn img { width: 38px; height: 38px; }
  .pf-veil { padding: 0; place-items: end stretch; }
  .pf { border-radius: 28px 28px 0 0; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
  .pf-head { padding: 16px 14px 4px 16px; } .pf-head h2 { font-size: 23px; } .pf-head p { display: none; }
  .pf-body { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 10px 14px 16px; }
  .pf-me { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; text-align: left; align-items: center; justify-items: start; padding: 14px; }
  .pf-ava { width: 112px; height: 112px; padding: 5px; margin: 0; grid-row: 1 / 3; } .pf-ava .pen { width: 38px; height: 38px; right: -4px; bottom: 0; }
  .pf-name { margin-top: 0; font-size: 24px !important; align-self: end; } input.pf-input { margin-top: 0; font-size: 22px; align-self: end; text-align: left; } .pf-since { align-self: start; margin-left: 4px; }
  .pf-stats, .pf-local { grid-column: 1 / 3; } .pf-stats { margin-top: 14px; } .pf-local { margin-top: 0; padding-top: 12px; }
  .pf-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; max-height: none; overflow: visible; }
  .pf-a.photo:not(.set) { font-size: 10px; } .pf-a.photo svg.ic { width: 22px; height: 22px; }
  .pf-badges { grid-template-columns: repeat(3, 1fr); }
  .pf-fav { grid-template-columns: repeat(2, 1fr); }
  .pf-cta { flex-direction: column; align-items: stretch; margin: 0 14px 12px; gap: 12px; position: relative; padding: 14px; }
  .pf-cta .pf-blob { position: absolute; right: 14px; top: 12px; width: 42px; height: 42px; }
  .pf-cta h3 { padding-right: 50px; } .pf-soon { margin: 0; justify-content: center; }
  .pf-foot { padding: 0 14px 22px; }
}
@media (min-width: 861px) and (max-height: 830px) {   /* écrans d'ordinateur peu hauts : tout reste visible sans défiler */
  .pf-head { padding-top: 14px; } .pf-body { padding: 10px 26px 16px; } .pf-me { padding: 14px 18px 14px; }
  .pf-ava { width: 150px; height: 150px; margin-top: 4px; } .pf-name, input.pf-input { margin-top: 12px; } .pf-stats { margin-top: 14px; }
  .pf-sec + .pf-sec { margin-top: 12px; } .pf-grid { max-height: 222px; } .pf-badges li { padding: 9px 4px 8px; gap: 6px; }
  .pf-cta { padding: 10px 16px 10px 18px; margin-bottom: 10px; } .pf-foot { padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .pf { animation: none; } .pf-toast, .pf-a img, .pf-fav img { transition: none; } }
/* Parchís : badge de bonus (+20, +10) et deuxième pion d'une barrière (outils/portail.py, ldill) */
.ldb { display: grid; place-items: center; padding: 0 9px; height: 30px; border-radius: 15px; background: linear-gradient(#ffc65a, #f08a1c); color: #fff; font: 700 15px var(--display); box-shadow: 0 2px 0 rgba(var(--sh), .4); flex: none; }
.ill img.ldp.two { margin-left: 7px; margin-bottom: 3px; }


/* Gbaka (17 nov. 2026) : petites scènes de la page du jeu (outils/portail.py, gbill) — vrais gbakas et passagers du jeu */
.gbl { position: relative; display: block; height: 34px; border-radius: 8px; flex: none;
  background: repeating-linear-gradient(90deg, transparent 0 32px, rgba(255, 250, 240, .7) 32px 34px), #c4602f url(../images/gbaka/laterite.webp) center / 68px;
  box-shadow: 0 0 0 3px #e8e2d8, 0 0 0 5px #c9302c, 0 3px 6px rgba(var(--sh), .35); }
.ill img.gbv, .deco img.gbv { position: absolute; top: 50%; width: auto; height: 60px; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); border-radius: 0; box-shadow: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.gbx { width: 22px; height: 22px; flex: none; position: relative; }
.gbx::before, .gbx::after { content: ""; position: absolute; left: 2px; top: 9px; width: 18px; height: 4px; border-radius: 2px; background: #c0392b; transform: rotate(45deg); }
.gbx::after { transform: rotate(-45deg); }
.gbk { position: relative; display: block; width: 44px; height: 84px; flex: none; border: 2px solid rgba(255, 255, 255, .85); border-top: 0; border-radius: 0 0 8px 8px;
  background: #4d4540 url(../images/gbaka/bitume.webp) center / 80px; box-shadow: 0 3px 6px rgba(var(--sh), .35); }
.gbk img.gbv { top: 42%; height: 56px; }
.gbs { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; gap: 2px; padding: 2px 4px; border-radius: 99px; background: rgba(40, 18, 6, .8); }
.gbs i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.gbs i.on { background: var(--c); }
.ill img.gbp, .deco img.gbp { width: auto; height: 58px; border-radius: 0; box-shadow: none; flex: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.deco .gbfan { position: relative; display: block; width: 160px; height: 130px; }
.deco .gbfan img { position: absolute; width: auto; border-radius: 0; box-shadow: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); }
.deco .gbfan img:nth-child(1) { height: 124px; left: 18px; top: 2px; transform: rotate(-14deg); }
.deco .gbfan img:nth-child(2) { height: 96px; left: 70px; top: 18px; transform: rotate(10deg); }
.deco .gbfan img:nth-child(3) { height: 70px; left: 112px; top: 58px; }
/* Pelote : coin tricot (framboise, bois miel, crème des coussins, turquoise des aiguilles) */
body.game.g-pl {
  --c1: #f6b3c0; --c2: #e0708a; --c3: #b8344f; --c4: #6a1c2e; --sh: 90, 30, 30; --top: rgba(106, 28, 46, .92); --a1: #ffd864; --a2: #e0a419;
  --i1: #fff0e6; --i2: #f8d6c8; --i3: #eaa79a; --glow: rgba(255, 236, 214, .5); --tint: #fff6ef; --tint-ink: #6a1c2e; --mut: #fff0ea; --green: #2a9d8f; --pop: #6a1c2e;
}
body.game.g-pl .btn { color: #fff; }
/* Pelote : morceaux du plateau (outils/portail.py, plgrid) : coussins, fil de laine, boutons en bois, aiguilles */
.plg { --ss: 34px; position: relative; display: grid; grid-template-columns: repeat(var(--n), var(--ss)); padding: 7px; border-radius: 12px; background: repeating-linear-gradient(92deg, rgba(120, 60, 10, .18) 0 2px, transparent 2px 9px), linear-gradient(135deg, #ffd27a, #d98d2c 35%, #f2b452 60%, #b8681c); box-shadow: 0 4px 0 #8a4612, 0 4px 0 2px #4a2008, 0 0 0 2px #6b3010, 0 10px 16px rgba(var(--sh), .35); justify-items: start; }
.plg i { width: var(--ss); height: var(--ss); background: url(../images/pl/coussin-creme.webp) center/100% 100%; }
.plg i.v { background-image: url(../images/pl/coussin-rose.webp); }
.plg i.x { background-image: repeating-linear-gradient(45deg, rgba(230, 40, 70, .38) 0 4px, transparent 4px 9px), url(../images/pl/coussin-creme.webp); background-size: auto, 100% 100%; box-shadow: inset 0 0 0 2px rgba(220, 40, 60, .85); border-radius: 18%; }
.plg svg { position: absolute; left: 7px; top: 7px; width: calc(var(--ss) * var(--n)); height: calc(var(--ss) * var(--m)); overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.plg .y1 { stroke: #8e0f24; stroke-width: .3; }
.plg .y2 { stroke: #e0283f; stroke-width: .22; }
.plg .n1 { stroke: #1d6f66; stroke-width: .17; }
.plg .n2 { stroke: #3cc0b0; stroke-width: .09; }
.plg b { position: absolute; left: calc(7px + var(--ss) * (var(--c) + .17)); top: calc(7px + var(--ss) * (var(--r) + .17)); width: calc(var(--ss) * .66); height: calc(var(--ss) * .66); display: grid; place-items: center; border-radius: 50%; background: url(../images/pl/bouton.webp) center/100% 100%; font: 700 calc(var(--ss) * .36) Fredoka, sans-serif; color: #5a2a0c; filter: drop-shadow(0 1px 1px rgba(70, 30, 5, .45)); }
.plg b.d { box-shadow: 0 0 0 2px #ffd36a, 0 0 7px rgba(255, 210, 100, .9); }
.deco .plg { --ss: 44px; transform: rotate(-5deg); }
.steps .plg { --ss: 28px; padding: 5px; }
.steps .plg svg { left: 5px; top: 5px; }
.steps .plg b { left: calc(5px + var(--ss) * (var(--c) + .17)); top: calc(5px + var(--ss) * (var(--r) + .17)); }
/* Kakuro : salle des coffres art déco (émeraude, laiton, ivoire) */
body.game.g-kk {
  --c1: #8fd6b6; --c2: #3fa57d; --c3: #13805a; --c4: #0b4a37; --sh: 10, 50, 35; --top: rgba(11, 74, 55, .92); --a1: #ffd864; --a2: #e0a419;
  --i1: #e6f6ee; --i2: #bfe6d3; --i3: #7fcaa8; --glow: rgba(255, 236, 190, .5); --tint: #f2faf6; --tint-ink: #0b4a37; --mut: #eef8f3; --green: #13805a; --pop: #0b4a37;
}
body.game.g-kk .btn { color: #fff; }
/* Kakuro : morceaux de la façade du coffre (outils/portail.py, kkgrid) */
.kkg { --ss: 34px; display: grid; grid-template-columns: repeat(var(--n), var(--ss)); gap: 3px; padding: 7px; border-radius: 10px; background: linear-gradient(160deg, #2aa57a, #0f6a4c 40%, #0b5640 70%, #127456); box-shadow: 0 0 0 3px #c9962f, 0 4px 0 3px #6b4210, 0 10px 16px rgba(var(--sh), .35); justify-items: start; }
.kkg i { position: relative; width: var(--ss); height: var(--ss); border-radius: 6px; display: grid; place-items: center; font: 600 calc(var(--ss) * .58) Fredoka, sans-serif; font-style: normal; color: #0d4a37; overflow: hidden; }
.kkg i.n { background: linear-gradient(150deg, #0e4a38, #062a1f); box-shadow: inset 0 0 0 1px rgba(226, 186, 98, .35); }
.kkg i.c::before { content: ""; position: absolute; left: 0; top: 0; width: 141.4%; height: 1.5px; background: linear-gradient(90deg, #b98a2c, #ffe08a, #b98a2c); transform-origin: 0 0; transform: rotate(45deg); }
.kkg i s, .kkg i u { position: absolute; font: 700 calc(var(--ss) * .3) Fredoka, sans-serif; color: #ffd97a; text-decoration: none; line-height: 1; }
.kkg i s { right: 8%; top: 8%; } .kkg i u { left: 8%; bottom: 7%; }
.kkg i.w { background: linear-gradient(170deg, #fffdf4, #f6e9c8 60%, #e9d4a4); box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(150, 110, 40, .35); }
.kkg i.gd { background: linear-gradient(170deg, #fffbe6, #f8e7a8 55%, #efd27a); }
.kkg i.rn { background: linear-gradient(170deg, #fff6d2, #fbe39a 60%, #eecb6c); }
.kkg i.sl { box-shadow: inset 0 0 0 2.5px #e2a12b, 0 0 9px rgba(255, 200, 80, .9); }
.kkg i.bd { background: linear-gradient(170deg, #ffe9e6, #f6cfc6); color: #c9283d; }
.deco .kkg { --ss: 46px; transform: rotate(-5deg); }
.steps .kkg { --ss: 30px; padding: 5px; }
