/* Thème TableeZ : navy + jaune, alvéoles de ruche, police ronde */
body {
  font-family: 'Plus Jakarta Sans', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(251, 183, 36, .13), transparent 62%),
    radial-gradient(800px 500px at 100% 0%, rgba(74, 120, 224, .20), transparent 60%),
    #0F172A !important;
  background-attachment: fixed;
}
body::before {   /* alvéoles discrètes */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23FBB724' stroke-width='2'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23FBB724' stroke-width='2'/%3E%3C/svg%3E");
}
button { transition: transform .12s ease, filter .12s ease, box-shadow .12s ease; }
button:not(:disabled):hover { filter: brightness(1.08); }
button:not(:disabled):active { transform: scale(.97); }
/* cartes de jeux (écran animateur) */
.g-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; line-height: 1.15; text-align: center; border: 1px solid rgba(255,255,255,.06); }
.g-pick:hover { transform: translateY(-2px); }
/* panneaux */
.rounded-3xl.border { box-shadow: 0 18px 50px -20px rgba(0,0,0,.55); }
input[type=number], input[type=text] { outline: none; }
input:focus { box-shadow: 0 0 0 3px rgba(251, 183, 36, .35); border-color: #FBB724 !important; }

/* ===== Tuiles de jeux façon App Store ===== */
.g-pick { background: rgba(255,255,255,.035) !important; box-shadow: none !important; border: 1px solid rgba(255,255,255,.07) !important; border-radius: 20px !important; padding: 14px 6px 10px !important; gap: 8px !important; min-height: 128px !important; position: relative; font-weight: 800; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.g-pick:hover { transform: translateY(-3px); background: rgba(255,255,255,.07) !important; }
.g-pick:active { transform: scale(.97); }
.g-pick.ring-2 { background: rgba(251,183,36,.10) !important; border-color: rgba(251,183,36,.75) !important; box-shadow: 0 0 0 1px rgba(251,183,36,.35), 0 10px 30px -12px rgba(251,183,36,.55) !important; }
.g-pick.ring-2::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: #FBB724; color: #0b1730; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.app-ico { position: relative; width: 68px; height: 68px; border-radius: 16px; background: linear-gradient(135deg, var(--g1, #6366f1), var(--g2, #8b5cf6)); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 8px 18px -6px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.22), inset 0 -10px 16px rgba(0,0,0,.18); }
.app-ico::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 52%; background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0)); border-radius: 16px 16px 60% 60% / 16px 16px 24px 24px; pointer-events: none; }
.app-emoji { position: relative; font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.app-name { font-size: 13px; line-height: 1.1; color: #fff; }
.app-tag { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.5); letter-spacing: .03em; margin-top: -4px; }
.app-new { position: absolute; top: 4px; left: -20px; width: 66px; transform: rotate(-38deg); background: #FBB724; color: #0b1730; font-style: normal; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-align: center; padding: 1px 0; }
.g-pick[data-g="age"]      { --g1: #ff9a8b; --g2: #ff4d7d; }
.g-pick[data-g="qz"]       { --g1: #fdc830; --g2: #f37335; }
.g-pick[data-g="ww"]       { --g1: #6b2fa0; --g2: #1b1464; }
.g-pick[data-g="uc"]       { --g1: #2c5364; --g2: #0f2027; }
.g-pick[data-g="timeline"] { --g1: #4facfe; --g2: #00c6fb; }
.g-pick[data-g="price"]    { --g1: #43e97b; --g2: #12b886; }
.g-pick[data-g="poll"]     { --g1: #b388f5; --g2: #f78fb3; }
.g-pick[data-g="myth"]     { --g1: #ff7a18; --g2: #e11d74; }
.g-pick[data-g="draw"]     { --g1: #fa709a; --g2: #fcc419; }
.g-pick[data-g="who"]      { --g1: #667eea; --g2: #764ba2; }

/* Icônes dessinées (SVG) à la place des emojis */
.app-ico { background: none !important; box-shadow: none !important; overflow: visible !important; width: 72px; height: 72px; border-radius: 17px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); }
.app-ico::before { display: none !important; }
.app-ico img { width: 100%; height: 100%; display: block; }
.g-pick:hover .app-ico { filter: drop-shadow(0 12px 14px rgba(0,0,0,.5)) brightness(1.06); }
.app-new { top: -6px !important; right: -9px; left: auto !important; width: auto !important; transform: none !important; padding: 2px 6px !important; border-radius: 8px; font-size: 9px !important; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* ===== Style jeu mobile (Duolingo / Royal Match) : cartes "boutons" épaisses ===== */
.g-pick { background: linear-gradient(180deg, #22346c, #1a2a5a) !important; border: 2px solid #34498a !important; border-bottom: 6px solid #0F172A !important; border-radius: 22px !important; padding: 12px 6px 10px !important; min-height: 138px !important; transition: transform .1s ease, border-bottom-width .1s ease, background .15s ease; }
.g-pick:hover { transform: translateY(-2px); background: linear-gradient(180deg, #2a3f80, #1f3068) !important; }
.g-pick:active { transform: translateY(3px) !important; border-bottom-width: 3px !important; }
.g-pick.ring-2 { background: linear-gradient(180deg, #2f4690, #223674) !important; border-color: #FBB724 !important; border-bottom-color: #b98a00 !important; box-shadow: 0 0 0 2px rgba(251,183,36,.25), 0 12px 28px -10px rgba(251,183,36,.5) !important; }
.g-pick.ring-2::after { top: -9px; right: -7px; width: 24px; height: 24px; font-size: 14px; border: 2px solid #0F172A; box-shadow: 0 2px 0 #0F172A; }
.app-ico { width: 80px; height: 80px; border-radius: 0; filter: none !important; }
.g-pick:hover .app-ico { filter: brightness(1.07) !important; }
.app-name { font-size: 14px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.app-new { top: -8px !important; right: -10px; background: #ff4757 !important; color: #fff !important; border: 2px solid #0F172A; box-shadow: 0 2px 0 #0F172A !important; font-size: 9px !important; }

/* ===== FX : animations ===== */
@keyframes fx-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.fx-in { animation: fx-in .35s cubic-bezier(.2,.8,.3,1) both; }
@keyframes fx-pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
.chip-pop { animation: fx-pop .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
#podium-list > div, #total-list > div, #mob-rank > div { animation: fx-rise .5s cubic-bezier(.2,.8,.3,1) both; }
#podium-list > div:nth-child(1), #total-list > div:nth-child(1), #mob-rank > div:nth-child(2) { animation-delay: .05s; }
#podium-list > div:nth-child(2), #total-list > div:nth-child(2), #mob-rank > div:nth-child(3) { animation-delay: .18s; }
#podium-list > div:nth-child(3), #total-list > div:nth-child(3), #mob-rank > div:nth-child(4) { animation-delay: .31s; }
#podium-list > div:nth-child(n+4), #total-list > div:nth-child(n+4), #mob-rank > div:nth-child(n+5) { animation-delay: .42s; }
#podium-list > div:first-child { box-shadow: 0 0 0 2px #fbbf24, 0 0 28px rgba(251,191,36,.35); }
@keyframes fx-bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.fx-bump { animation: fx-bump .4s ease-out; }
@keyframes fx-urgent { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.fx-urgent { animation: fx-urgent .5s ease-in-out infinite; color: #ef4444 !important; }
.fx-toggles { position: fixed; left: 10px; bottom: 10px; z-index: 60; display: flex; gap: 6px; }
.fx-btn { width: 38px; height: 38px; border-radius: 12px; background: rgba(15,23,42,.85); border: 1px solid #334155; font-size: 18px; cursor: pointer; }
.fx-btn[aria-pressed="false"] { opacity: .45; }
/* ===== Polish global : fluidité et « jus » ===== */
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
button, a, input, select, [role="button"], .g-pick { touch-action: manipulation; }          /* supprime le délai de 300 ms et le zoom au double tap */
button, .g-pick, .tile, [data-pick] { transition: transform .18s cubic-bezier(.2,.9,.3,1.3), box-shadow .18s ease, filter .18s ease, background-color .18s ease, opacity .18s ease; }
button:not(:disabled):active, .g-pick:active { transform: scale(.95); transition-duration: .06s; }       /* l'appui s'enfonce, le relâchement rebondit */
@media (hover: hover) {
  button:not(:disabled):hover { filter: brightness(1.08); }
  .g-pick:hover { transform: translateY(-3px) scale(1.03); }
  .g-pick:active { transform: scale(.96); }
}
input:focus, textarea:focus, select:focus { outline: none; box-shadow: 0 0 0 3px rgba(129,140,248,.45); transition: box-shadow .15s ease; }
/* apparition échelonnée des boutons de réponse / tuiles de joueurs */
@keyframes fx-stag { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }
.fx-stag { animation: fx-stag .38s cubic-bezier(.2,.9,.3,1.15) both; animation-delay: calc(var(--i, 0) * 45ms); }
/* retours immédiats : tremblement (faux) et éclat de couleur (juste) */
@keyframes fx-shake { 0%,100% { transform: none; } 18% { transform: translateX(-9px) rotate(-.6deg); } 36% { transform: translateX(8px) rotate(.5deg); } 54% { transform: translateX(-6px); } 72% { transform: translateX(4px); } }
.fx-shake { animation: fx-shake .42s ease-out; }
@keyframes fx-flash { 0% { opacity: .0; } 18% { opacity: 1; } 100% { opacity: 0; } }
#fx-flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0; }
#fx-flash.ok { background: radial-gradient(circle at 50% 55%, rgba(52,211,153,.38), rgba(52,211,153,0) 62%); animation: fx-flash .7s ease-out; }
#fx-flash.ko { background: radial-gradient(circle at 50% 55%, rgba(244,63,94,.34), rgba(244,63,94,0) 62%); animation: fx-flash .6s ease-out; }
/* bouton d'action principal de l'animateur : respiration discrète pour dire « c'est à toi » */
@keyframes fx-cta { 0%,100% { box-shadow: 0 10px 25px -10px rgba(251,191,36,.45); } 50% { box-shadow: 0 10px 38px -4px rgba(251,191,36,.85); } }
#ww-next-btn:not(.hidden), #uc-action-btn, [id$="-action-btn"]:not(.hidden) { animation: fx-cta 1.8s ease-in-out infinite; }
/* score qui s'actualise : petit éclat */
.fx-bump { animation: fx-bump .5s cubic-bezier(.2,.9,.3,1.4); }
@media (prefers-reduced-motion: reduce) { .fx-stag, .fx-shake, #fx-flash, #ww-next-btn, #uc-action-btn, [id$="-action-btn"] { animation: none !important; } html { scroll-behavior: auto; } }
@media (prefers-reduced-motion: reduce) { .fx-in, .chip-pop, #podium-list > div, #total-list > div, #mob-rank > div, .fx-urgent { animation: none !important; } }

/* ===== Mode soirée : ordre des jeux ===== */
.g-pick.soi.ring-2::after { content: attr(data-order); font-weight: 900; }
