
html.cz-scene { --trait-papier: #E2D5BE; scroll-behavior: smooth; }

html.cz-scene .page-layout { display: block; min-height: 0; height: 0; padding: 0; margin: 0; }

html.cz-scene .unified-sidebar .us-search-row { display: none; }
.us-fav-btn.active { outline: 2px solid var(--magenta); }


#ecran {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100dvh; min-height: 480px;
  color: var(--creme);
}
#scene {
  --accent: 338;
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 110%, hsla(var(--accent), 70%, 45%, 0.32), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% -10%, #3B1868 0%, var(--nuit-fond) 60%);
}
.projo {
  position: absolute; top: -20%; width: 46%; height: 140%; transform-origin: 50% 0;
  background: conic-gradient(from 180deg at 50% 0%, transparent 168deg, hsla(var(--accent), 85%, 70%, 0.09) 180deg, transparent 192deg);
  animation: balayer 14s ease-in-out infinite alternate; mix-blend-mode: screen;
}
.projo-1 { left: -8%; }
.projo-2 { left: 27%; animation-duration: 18s; animation-delay: -6s; }
.projo-3 { left: 62%; animation-duration: 16s; animation-delay: -3s; }
@keyframes balayer { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.note { position: absolute; bottom: -10%; font-weight: 800; font-size: 34px; color: hsla(var(--accent), 80%, 75%, 0.18); animation: monter 22s linear infinite; }
.n1 { left: 8%; } .n2 { left: 31%; animation-delay: -7s; font-size: 26px; }
.n3 { left: 54%; animation-delay: -14s; } .n4 { left: 76%; animation-delay: -4s; font-size: 40px; }
.n5 { left: 92%; animation-delay: -18s; font-size: 22px; }
@keyframes monter { from { transform: translateY(0) rotate(-10deg); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(-110vh) rotate(16deg); opacity: 0; } }

#ecran::before, #ecran::after { content: ""; position: absolute; left: 0; right: 0; z-index: 40; pointer-events: none; }
#ecran::before { top: 0; height: calc(var(--barre-h) + 110px); background: linear-gradient(to bottom, rgba(26, 10, 48, 0.96) 40%, rgba(26, 10, 48, 0)); }
#ecran::after { bottom: 0; height: 130px; background: linear-gradient(to top, rgba(26, 10, 48, 0.96) 45%, rgba(26, 10, 48, 0)); }


.haut {
  position: absolute; top: calc(var(--barre-h) + 12px); left: 20px; right: 20px; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
}

.recherche {
  display: inline-flex; align-items: center; gap: 8px; width: 240px; padding: 8px 14px; border-radius: 999px;
  background: var(--creme); border: 2px solid var(--creme); box-shadow: 3px 3px 0 var(--cyan); cursor: text;
}
.recherche:focus-within { border-color: var(--jaune); }
.recherche-icone { font-size: 14px; }
.recherche input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--nuit);
}
.recherche input::placeholder { color: var(--gris); font-weight: 600; }
.barre {
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(246, 239, 226, 0.08); border: 1px solid rgba(246, 239, 226, 0.18);
}
.barre-titre { padding: 0 6px 0 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--encre-douce); }
.barre button, .de, #effacer-filtres { font: inherit; cursor: pointer; }
.barre button {
  border: 0; border-radius: 999px; padding: 7px 13px; background: transparent;
  font-size: 14px; font-weight: 700; color: var(--creme); white-space: nowrap;
  transition: background .2s, color .2s;
}
.barre button:hover { background: rgba(246, 239, 226, 0.12); }
.barre button[aria-pressed="true"] { background: var(--creme); color: var(--nuit); box-shadow: 3px 3px 0 var(--magenta); }
.modes button[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--cyan); }
.de { border: 0; border-radius: 999px; padding: 9px 15px; background: var(--jaune); color: var(--nuit); font-size: 14px; font-weight: 800; box-shadow: 3px 3px 0 var(--magenta); }
.de:hover { transform: translate(-1px, -1px); }
.compte-carte { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--encre-douce); }
.compte-carte b { color: var(--creme); }
#effacer-filtres { border: 1px solid var(--jaune); background: transparent; color: var(--jaune); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; }
#effacer-filtres[hidden] { display: none; }


.reglages { display: contents; }
.reglages-tete, #ouvrir-reglages, .reglages-voile { display: none; }
.rond {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(246, 239, 226, 0.22);
  background: rgba(246, 239, 226, 0.1); color: var(--creme); font: inherit; font-size: 18px; font-weight: 800; cursor: pointer;
}


.filtres-actifs[hidden] { display: none; }
.filtre-pastille {
  display: inline-flex; align-items: center; gap: 6px; max-width: 280px;
  font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer;
  border: 0; border-radius: 999px; padding: 7px 12px; background: var(--jaune); color: var(--nuit);
  box-shadow: 3px 3px 0 var(--magenta);
}
.filtre-noms { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.filtre-nb { display: none; }
.filtre-x { font-weight: 900; }


.bas {
  position: absolute; left: 20px; right: 20px; bottom: 14px; z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.legende { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; pointer-events: auto; }
.legende[hidden] { display: none; }
.legende-titre { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--encre-douce); margin-right: 4px; }
.legende-puce {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--creme);
  border: 2px solid hsl(var(--hue), 70%, 58%); background: hsla(var(--hue), 55%, 22%, 0.9);
}
.legende-puce i { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--hue), 75%, 58%); }
.legende-puce small { font-size: 11px; color: var(--encre-douce); }
.legende-puce:hover { background: hsl(var(--hue), 60%, 34%); }
.descendre { pointer-events: auto; font-size: 13px; font-weight: 700; color: var(--encre-douce); text-decoration: none; }
.descendre span { display: inline-block; animation: rebond 1.8s ease-in-out infinite; }
.descendre:hover { color: var(--jaune); }
@keyframes rebond { 50% { transform: translateY(4px); } }

#world { position: absolute; inset: 0; z-index: 1; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
#world.dragging { cursor: grabbing; }
#plateaux { position: absolute; inset: 0; pointer-events: none; }
#vide { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 0 20px; text-align: center; }
#vide p { margin: 0; font-size: 20px; font-weight: 700; color: var(--encre-douce); }
.vide-axes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vide-axes button { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid rgba(246, 239, 226, .3); background: transparent; color: var(--creme); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.vide-axes button:hover { border-color: var(--creme); }
.vide-axes small { font-size: 12px; color: var(--jaune); }
#vide[hidden] { display: none; }


.ilot {
  position: absolute; top: 0; left: 0; will-change: transform;
  border-radius: 26px;
  background:
    repeating-linear-gradient(135deg, hsla(var(--hue), 70%, 60%, 0.06) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, hsl(var(--hue), 52%, 30%), hsl(calc(var(--hue) + 18), 50%, 19%));
  border: 3px solid hsl(var(--hue), 70%, 58%);
  box-shadow: 0 0 0 6px hsla(var(--hue), 70%, 55%, 0.14), 0 30px 80px rgba(0, 0, 0, 0.45);
}
.ilot-arrive { animation: arrive .55s .55s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes arrive { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
.ilot-tete { position: absolute; left: 22px; right: 22px; top: 14px; }
.ilot-compte { display: inline-block; padding: 2px 9px; border-radius: 999px; background: hsl(var(--hue), 75%, 60%); color: var(--nuit-fond); font-size: 12px; font-weight: 800; }
.ilot-tete h2 { margin: 5px 0 2px; padding: 0; border: 0; background: none; font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-tete p { margin: 0; font-size: 13px; font-weight: 600; color: hsl(var(--hue), 60%, 86%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.game-card {
  position: absolute; top: 0; left: 0; width: var(--card-w, 160px); display: block; z-index: 2;
  color: inherit; text-decoration: none; will-change: transform;
  -webkit-user-drag: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.game-card * { -webkit-user-drag: none; }
.card-figure {
  --papier: hsl(calc(var(--hue) + var(--nuance, 0)), 70%, 95%);
  --encre-motif: hsla(calc(var(--hue) + var(--nuance, 0)), 60%, 50%, 0.13);
  position: relative; width: 100%; aspect-ratio: 1 / 1; margin: 0;
  display: flex; flex-direction: column; gap: 5px; padding: 8px 9px;
  border: 2.5px solid var(--nuit); border-radius: 14px; overflow: hidden;
  background: var(--papier);
  box-shadow: 5px 5px 0 hsl(var(--hue), 70%, 52%);
  transition: transform 0.25s cubic-bezier(.3, 1.4, .5, 1), box-shadow 0.4s;
}

.game-card[data-motif="0"] .card-figure { background: radial-gradient(var(--encre-motif) 1.5px, transparent 1.6px) 0 0 / 11px 11px, var(--papier); }
.game-card[data-motif="1"] .card-figure { background: repeating-linear-gradient(135deg, var(--encre-motif) 0 3px, transparent 3px 12px), var(--papier); }
.game-card[data-motif="2"] .card-figure { background: linear-gradient(var(--encre-motif) 1px, transparent 1px) 0 0 / 14px 14px, linear-gradient(90deg, var(--encre-motif) 1px, transparent 1px) 0 0 / 14px 14px, var(--papier); }
.game-card[data-motif="3"] .card-figure { background: radial-gradient(circle at 100% 100%, var(--encre-motif) 0 38%, transparent 38.5%), radial-gradient(circle at 100% 100%, transparent 0 52%, var(--encre-motif) 52.5% 56%, transparent 56.5%), var(--papier); }
.game-card[data-motif="4"] .card-figure { background: repeating-radial-gradient(circle at 0 100%, transparent 0 9px, var(--encre-motif) 9px 11px), var(--papier); }

.card-figure canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 36%; opacity: 0.3; pointer-events: none; }
.card-haut { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 4px; }

.card-format {
  position: relative; padding: 2px 8px 2px 9px;
  background: #fff; color: var(--nuit); border: 1.5px dashed hsl(var(--hue), 55%, 50%); border-radius: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.card-rang { padding: 2px 6px; border-radius: 999px; background: var(--jaune); color: var(--nuit); font-size: 10px; font-weight: 800; }
.card-rang[hidden] { display: none; }
.card-title {
  position: relative; font-weight: 800; font-size: 15px; line-height: 1.14; letter-spacing: -0.01em; color: var(--nuit);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card-emoji { position: absolute; right: 7px; bottom: 6px; font-size: calc(var(--card-w, 140px) * 0.17); line-height: 1; filter: drop-shadow(1px 1px 0 rgba(46, 17, 83, .25)); }
.card-cap { margin-top: 8px; }
.card-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: hsl(var(--hue), 80%, 84%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tag i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--hue), 75%, 60%); }
#world:not(.moving) a.game-card:hover { z-index: 3; }
#world:not(.moving) a.game-card:hover .card-figure { transform: translate(-3px, -3px) scale(1.05); box-shadow: 8px 8px 0 hsl(var(--hue), 70%, 52%); }
.game-card.elu .card-figure { animation: elu 0.9s ease-out 2; }
@keyframes elu { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.14); box-shadow: 12px 12px 0 var(--jaune); } }


.feuille { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: rgba(10, 4, 20, 0.55); }
.feuille[hidden] { display: none; }
.feuille-boite { width: min(640px, calc(100vw - 32px)); max-height: 80vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 0 22px 22px; color: var(--nuit); }
.feuille-tete { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 18px 0 10px; background: #fff; }
.feuille-tete strong { font-size: 20px; }
.feuille-fermer { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--nuit); background: #fff; font-size: 20px; cursor: pointer; }
.feuille-corps h3 { margin: 14px 0 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris); }
.feuille-puces { display: flex; flex-wrap: wrap; gap: 6px; }


.site-index {
  padding: 48px max(18px, calc(50% - 380px)) 64px;
  background: var(--creme); color: var(--nuit); font-size: 16px; line-height: 1.65;
  border-top: 8px solid transparent; border-image: var(--bandes) 1;
}
.site-index h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
.site-index h2 { font-size: 26px; font-weight: 800; margin: 44px 0 10px; display: inline-block; padding-bottom: 6px; background: var(--bandes) left bottom / 100% 4px no-repeat; }
.site-index h3 { font-size: 18px; font-weight: 800; margin: 24px 0 4px; }
.site-index p, .site-index li { margin: 0 0 10px; }
.site-index ul { padding-left: 20px; }
.site-index a { color: var(--nuit); font-weight: 700; text-decoration-color: var(--magenta); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.site-index a:hover { color: var(--magenta); }
.chapo { font-size: 18px; color: var(--gris); }

.cat-group { margin: 18px 0 0; }
.cat-group > summary { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; cursor: pointer; list-style: none; }
.cat-group > summary::-webkit-details-marker { display: none; }
.cat-group > summary::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--magenta); box-shadow: 3px 3px 0 var(--nuit); flex: none; }
.cat-emoji:empty { display: none; }
.cat-count, .cat-subcount { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris); }
.cat-group li { color: var(--gris); }
.cat-intro { color: var(--gris); }
.formats { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0; }
.formats dt { font-weight: 800; }
.formats dt small { display: block; font-size: 12px; font-weight: 700; color: var(--magenta); }
.formats dd { margin: 0; color: var(--gris); }
.angles { list-style: none; padding: 0 !important; }
.angles li { padding-left: 18px; position: relative; }
.angles li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.list-top { display: inline-block; margin: 0 0 28px; padding: 8px 16px; border: 2px solid var(--nuit); border-radius: 999px; box-shadow: 3px 3px 0 var(--jaune); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none !important; }


@media (max-width: 1024px) {
  
  .haut {
    top: var(--barre-h); left: 0; right: 0; flex-wrap: nowrap; gap: 8px; padding: 8px 12px;
    background: var(--nuit-fond); border-bottom: 1px solid rgba(246, 239, 226, 0.14);
  }
  .compte-carte { display: none; }
  .recherche { flex: 1; width: auto; min-width: 0; padding: 7px 12px; }
  .recherche input { font-size: 16px; }   
  #ouvrir-reglages { display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .de { flex: none; width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 2px 2px 0 var(--magenta); }
  .de-texte { display: none; }
  .filtre-pastille { padding: 0 10px; height: 40px; box-shadow: 2px 2px 0 var(--magenta); }
  .filtre-noms { display: none; }
  .filtre-nb { display: inline; }
  #ecran::before { height: calc(var(--barre-h) + 70px); }

  
  .reglages {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 700;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    background: var(--nuit-fond); border-top: 1px solid rgba(246, 239, 226, 0.18); border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .9, .3, 1);
  }
  .reglages.ouvert { transform: none; }
  
  .haut:has(.reglages.ouvert) { z-index: 800; }
  .reglages-voile { display: block; position: fixed; inset: 0; z-index: 690; background: rgba(10, 4, 20, 0.55); }
  .reglages-voile[hidden] { display: none; }
  .reglages-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--creme); font-size: 16px; }
  .reglages-sous { margin: 16px 0 10px; }
  .reglages-fermer { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(246, 239, 226, 0.1); color: var(--creme); font-size: 22px; cursor: pointer; }
  .reglages .barre { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0; border: 0; background: none; border-radius: 0; }
  .reglages .barre-titre { display: none; }
  .reglages .barre button { padding: 12px 14px; font-size: 15px; text-align: left; border-radius: 12px; background: rgba(246, 239, 226, 0.08); }
  .reglages .barre button[aria-pressed="true"] { background: var(--creme); color: var(--nuit); }

  
  .ilot { border-radius: 14px; border-width: 2px; box-shadow: 0 0 0 3px hsla(var(--hue), 70%, 55%, 0.14), 0 14px 40px rgba(0, 0, 0, 0.4); }
  .ilot-tete { left: 8px; right: 8px; top: 7px; display: flex; align-items: center; gap: 6px; }
  .ilot-tete h2 { order: 1; margin: 0; font-size: 14px; }
  .ilot-compte { order: 2; padding: 1px 6px; font-size: 10px; }
  .ilot-tete p { display: none; }
  .card-figure { padding: 4px 5px; gap: 0; border-width: 1.5px; border-radius: 8px; box-shadow: 2px 2px 0 hsl(var(--hue), 70%, 52%); }
  .card-haut, .card-cap, .card-figure canvas { display: none; }
  .card-title { font-size: 9px; line-height: 1.12; -webkit-line-clamp: 4; letter-spacing: 0; hyphens: auto; }
  .card-emoji { right: 3px; bottom: 2px; font-size: 12px; }

  
  .bas {
    left: 0; right: 0; bottom: 0; padding: 6px 0 8px; gap: 4px;
    background: var(--nuit-fond); border-top: 1px solid rgba(246, 239, 226, 0.14);
  }
  .legende {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: 100%; gap: 5px;
    padding: 0 12px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .legende::-webkit-scrollbar { display: none; }
  .legende-titre { display: none; }
  .legende-puce { white-space: nowrap; font-size: 12px; padding: 4px 9px; gap: 5px; }
  .legende-puce small { display: none; }
  .descendre { font-size: 12px; }
  .formats { grid-template-columns: 1fr; gap: 2px; }
  .formats dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .projo, .note, .descendre span, .ilot-arrive { animation: none; }
  .note { display: none; }
}



.game-card.joue .card-figure::after {
  content: "✓ joué"; position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 999px; background: var(--cyan); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}


@media (min-width: 700px) and (max-width: 1024px) {
  .card-title { font-size: 12px; }
  .card-emoji { font-size: 16px; }
  .ilot-tete h2 { font-size: 17px; }
}
