/* PAGES PAR THÈME (/quiz/). Le socle est ui.css ; ici seulement la colonne
   large, les lignes de thèmes et la carte de question. Une arête gauche. */
.app.qp { max-width: 760px; padding-bottom: 40px; gap: 0; --muted: color-mix(in srgb, var(--ink) 86%, var(--room)); }
.qp .topbar { margin-bottom: 26px; }
.qp .top-link { font-size: 14px; font-weight: 800; color: var(--muted); text-decoration: none; }
.qp .top-link:hover, .qp a:hover { color: var(--ink); }
.qp .crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; text-transform: none; letter-spacing: 0; font-size: 14px; }
.qp .crumb a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.qp .crumb i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.qp .sep { opacity: .5; }
.qp h1.title { font-size: clamp(36px, 11.5vw, 60px); line-height: 1.05; overflow-wrap: anywhere; }
.qp .count { margin-top: 18px; font-weight: 800; font-size: clamp(18px, 5vw, 24px); line-height: 1.1; color: var(--ink); }
.qp .count b { animation: pop-in .5s var(--press-up) both; display: inline-block; margin: 0 .08em .07em 0; font-family: var(--display); font-weight: 800; font-size: clamp(56px, 17vw, 104px); line-height: .95; letter-spacing: -0.04em; }
.qp .intro { margin: 16px 0 26px; color: var(--ink); font-size: 16px; line-height: 1.55; max-width: 62ch; }
.qp h2 { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 4.6vw, 26px); letter-spacing: -0.03em; line-height: 1.15; }

/* LA CARTE DE QUESTION */
.qcard { background: var(--face); border: 2px solid var(--c); border-radius: 22px; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 45%, #000); }
.qcard .qn { font-weight: 800; font-size: 14px; color: var(--face-sub); font-variant-numeric: tabular-nums; }
.qcard .qq { font-weight: 700; font-size: clamp(20px, 5.6vw, 28px); line-height: 1.3; }
.qcard .qrow { display: flex; gap: 10px; align-items: stretch; }
.qcard .qrow .input { flex: 1; min-width: 0; }
.qcard .qrow .btn { width: auto; min-width: 118px; font-size: 15px; }
.qverdict { position: relative; z-index: 9100; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--vb); }
.qverdict b { font-weight: 800; font-size: 17px; color: var(--vt); }
.qverdict span { font-size: 15px; color: var(--ink); }
.qfact { position: relative; z-index: 9100; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--face) 65%, #000); font-size: 15px; line-height: 1.5; color: var(--face-ink); }
.qfact small { display: block; font-weight: 800; font-size: 14px; margin-bottom: 3px; color: var(--face-sub); }
.qscore { font-family: var(--display); font-weight: 800; font-size: clamp(52px, 17vw, 96px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.qscore span.l { display: block; font-family: var(--sans); font-weight: 700; font-size: 18px; letter-spacing: 0; color: var(--face-sub); margin-top: 10px; }

/* L'APP */
.getapp { margin-top: 38px; }
.getapp p { margin: 8px 0 16px; color: var(--ink); font-size: 15.5px; line-height: 1.5; max-width: 52ch; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badges img { height: 46px; width: auto; display: block; }

/* LES LIGNES DE THÈMES : un point de la couleur de la catégorie, pas de pastille */
.more { margin-top: 44px; }
.more .all { display: inline-block; margin-top: 14px; font-weight: 800; font-size: 14.5px; color: var(--accent); text-decoration: none; }
.tlines { display: flex; flex-direction: column; margin-top: 10px; }
.tline { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid #ffffff1a; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; min-height: 48px; }
.tline i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.tline span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tline small { color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tline:hover span { text-decoration: underline; text-underline-offset: 3px; }
/* TOUS LES THÈMES : les cartes de thème du jeu (face pleine, tranche), trois à
   tirer en haut, puis les catégories. Le sol prend la couleur de celle qu'on lit. */
.idx .intro { margin-bottom: 22px; }
.tcard { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 68px; padding: 12px 14px; border-radius: 16px; background: var(--c); color: #fff; border: 2px solid color-mix(in srgb, var(--c) 72%, #fff); box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000); font-weight: 800; font-size: 16px; line-height: 1.2; text-decoration: none; overflow-wrap: anywhere; transition: transform .34s var(--press-up), box-shadow .34s var(--press-up); }
.qp a.tcard:hover { color: #fff; }
.tcard small { font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tcard:active { transition-duration: .07s; transition-timing-function: var(--press-down); transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 70%, #000); }
@media (hover: hover) { .tcard:hover { transform: translateY(-3px); } .tcard:hover:active { transform: translateY(4px); } }
.picks { display: grid; gap: 14px; }
/* La première donne est en CSS (posée dès la première image) ; les suivantes au ressort, en JS. */
.slot { display: grid; animation: first-deal .6s var(--press-up) backwards, sway 5.4s ease-in-out infinite; }
.slot:nth-child(2) { animation-delay: .11s, -1.9s; }
.slot:nth-child(3) { animation-delay: .22s, -3.7s; }
.slot.live { animation: sway 5.4s ease-in-out infinite; animation-delay: var(--ph, 0s); }
@keyframes first-deal { from { opacity: 0; transform: translateY(120px) rotate(-9deg) scale(.85); } 35% { opacity: 1; } to { opacity: 1; transform: none; } }
.tcard .shine { position: absolute; top: -40px; bottom: -40px; left: 0; width: 46px; background: #ffffff59; pointer-events: none; transform: translateX(-160px) rotate(18deg); }
#redraw svg { width: 24px; height: 24px; flex: none; }
#redraw .btn { flex-direction: row; gap: 12px; }
.idx:not(.searching) .tgrid.wait { opacity: 0; }
.tcard.big { min-height: 92px; padding: 18px 20px; border-radius: 22px; font-family: var(--display); font-size: clamp(22px, 6vw, 28px); letter-spacing: -0.03em; justify-content: center; align-items: center; text-align: center; }
.tcard.big small { font-size: 16px; }
#redraw .btn { margin-top: 22px; }
#find .input { width: 100%; margin-top: 44px; }
#find p { margin-top: 14px; font-weight: 700; }
.idx .mega { margin-top: 48px; }
.idx .mega h2 { font-size: clamp(28px, 7.6vw, 44px); margin-bottom: 18px; }
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.idx .more-in { margin-top: 20px; }
.idx [hidden] { display: none !important; }
.js .idx:not(.searching) .mega:not(.open) .tcard:nth-child(n+9) { display: none; }
.searching .more-in { display: none; }
@media (min-width: 700px) {
  .app.qp.idx { max-width: 1080px; }
  .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .tcard.big { min-height: 168px; font-size: clamp(20px, 2.5vw, 28px); }
  .tgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
  #redraw .btn, .idx .more-in { width: auto; min-width: 240px; }
  #find .input { max-width: 420px; }
  .js .idx:not(.searching) .mega:not(.open) .tcard:nth-child(n+9) { display: flex; }
  .js .idx:not(.searching) .mega:not(.open) .tcard:nth-child(n+13) { display: none; }
}

.qfoot { margin-top: 52px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; font-weight: 700; }
.qfoot a { color: var(--muted); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .qp * { animation: none !important; } }

.qp .nw { white-space: nowrap; }
.qcard [aria-live] { display: flex; flex-direction: column; gap: 14px; }
.qcard [aria-live]:empty { display: none; }
.qlist { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.qlist .qcard { display: flex; }
.stage { position: relative; z-index: 0; }
.js .qlist .qcard:not(.cur) { display: none; }
.qcard > .qnext { width: 100%; position: relative; z-index: 9100; }
.qscore:focus { outline: none; }
.qcard .qres:empty { display: none; }
.qcard .qres { display: flex; flex-direction: column; gap: 14px; }
#fin:not(:empty) { margin-top: 18px; }
.qp a:focus-visible, .qp button:focus-visible, .qp input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Pages à petits textes : les confettis du sol passent en retrait. */
.mote { opacity: .45; }
