/* (2 novembre 2026) Le direct d'Opadaya (direct.view.js) : messages à durée réglée et sondages, en haut du jeu. Mêmes jetons et
   même pile que les bulles de l'équipe (annonces.css). Seuls transform et opacity s'animent : le jeu garde toutes ses images. */
.direct-bulle { pointer-events: auto; position: relative; overflow: hidden; display: grid; gap: 8px; padding: 0 0 14px; border-radius: var(--rayon);
  background: var(--carte); color: var(--texte); border: 2px solid var(--indigo-doux); box-shadow: var(--ombre-forte);
  text-align: left; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto;
  animation: direct-arrivee .55s cubic-bezier(.2, .9, .3, 1.35); transition: opacity .25s, transform .25s; -webkit-user-select: none; user-select: none; }
.direct-bulle.sortie { opacity: 0; transform: translateY(-10px) scale(.97); }
.direct-tete { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 5px 6px 5px 10px; background: linear-gradient(100deg, var(--indigo), var(--violet) 62%, var(--rose)); }
.direct-logo { flex: none; width: auto; height: 40px; filter: drop-shadow(0 2px 4px rgba(13, 11, 63, .45)); animation: direct-saut 1s cubic-bezier(.3, 1.6, .5, 1) .3s 2; }
.direct-qui { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.direct-auteur { font: 600 15.5px/1.2 var(--titre); color: #fff; }
.direct-live { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 2px 9px; border-radius: 999px; background: #fff; color: var(--indigo); font: 800 12px/1.4 var(--corps); }
.direct-live i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: direct-pouls 1.1s ease-in-out infinite; }
.direct-tete .annonce-fermer { flex: none; margin: -4px 0 -4px auto; color: #fff; }
.direct-chrono { flex: none; margin-left: auto; font: 600 19px/1 var(--titre); color: #fff; font-variant-numeric: tabular-nums; }
.direct-chrono + .annonce-fermer { margin-left: 0; }
.direct-chrono.urgent { padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--rouge); animation: direct-tic 1s ease-in-out infinite; }
.direct-bulle > p { margin: 0 14px; overflow-wrap: anywhere; white-space: pre-line; font: 700 14.5px/1.4 var(--corps); }
.direct-bulle > .direct-question { font: 600 17px/1.25 var(--titre); color: var(--encre); }
.direct-temps { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--indigo-doux); }
.direct-temps i { display: block; height: 100%; background: var(--rose); transform-origin: left; animation: direct-compte linear forwards; }
.direct-temps-suivi i { animation: none; transition: transform 1s linear; }

.direct-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 12px; }
.direct-choix-btn { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--cible); padding: 7px 12px; overflow: visible; isolation: isolate;
  border: 2px solid var(--indigo-clair); border-radius: var(--rayon-petit); background: var(--carte); color: var(--encre); font: 800 14.5px/1.2 var(--corps); text-align: left; cursor: pointer;
  animation: direct-choix-entree .5s cubic-bezier(.2, .9, .3, 1.5) both; animation-delay: calc(.12s + var(--i, 0) * .07s); transition: transform .15s, border-color .25s; touch-action: manipulation; }
.direct-choix-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); }
.direct-choix-btn:active:not(:disabled) { transform: scale(.96); }
.direct-choix-btn:focus-visible { outline: 3px solid var(--indigo-clair); outline-offset: 2px; }
.direct-choix-btn:disabled { cursor: default; color: var(--encre); opacity: 1; }
.direct-libelle { position: relative; z-index: 1; min-width: 0; overflow-wrap: anywhere; }
.direct-pct { position: relative; z-index: 1; flex: none; font: 600 15px/1 var(--titre); font-variant-numeric: tabular-nums; }
.direct-remplie { position: absolute; z-index: 0; inset: 0 auto 0 0; width: 0; border-radius: 10px; background: var(--indigo-doux); transition: width .8s cubic-bezier(.2, .9, .3, 1.1); }
.direct-sondage:not(.chiffres) .direct-pct { display: none; }
.direct-sondage.a-vote .direct-choix-btn:not(.choisi), .direct-sondage.fini .direct-choix-btn:not(.gagnant) { border-color: var(--ligne); }
.direct-choix-btn.choisi { border-color: var(--rose); animation: direct-vote .6s cubic-bezier(.2, .9, .3, 1.6); }
.direct-choix-btn.choisi .direct-remplie { background: #fedcef; }
.direct-choix-btn.choisi .direct-libelle::after { content: ' ✓'; color: var(--rose); }
.direct-choix-btn.gagnant { border-color: var(--or); animation: direct-gagnant .8s cubic-bezier(.2, .9, .3, 1.6); }
.direct-choix-btn.gagnant .direct-remplie { background: #fdeccb; }
.direct-choix-btn.gagnant .direct-libelle::before { content: '★ '; color: var(--or-fonce); }
.direct-bulle > .direct-pied { min-height: 19px; font: 800 13px/1.4 var(--corps); color: var(--doux); }
.direct-sondage:not(.a-vote):not(.fini) .direct-pied { color: var(--indigo); }

.direct-confettis { position: absolute; z-index: 2; left: 50%; top: 50%; pointer-events: none; }
.direct-confettis i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--rose); animation: direct-confetti .9s cubic-bezier(.15, .7, .4, 1) forwards; }
.direct-confettis i:nth-child(3n+1) { background: var(--or); border-radius: 50%; }
.direct-confettis i:nth-child(3n+2) { background: var(--indigo-clair); }

@keyframes direct-arrivee { from { opacity: 0; transform: translateY(-22px) scale(.92); } }
@keyframes direct-saut { 40% { transform: translateY(-6px) rotate(-8deg); } }
@keyframes direct-pouls { 50% { opacity: .35; transform: scale(.7); } }
@keyframes direct-tic { 50% { transform: scale(1.14); } }
@keyframes direct-compte { to { transform: scaleX(0); } }
@keyframes direct-choix-entree { from { opacity: 0; transform: translateY(10px) scale(.88); } }
@keyframes direct-vote { 35% { transform: scale(1.07); } }
@keyframes direct-gagnant { 40% { transform: scale(1.06) rotate(-1deg); } 70% { transform: scale(1.03) rotate(1deg); } }
@keyframes direct-confetti { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--t)); opacity: 0; } }

/* téléphone couché : le moins de hauteur possible, pour laisser le jeu visible */
@media (max-height: 500px) {
  .annonces-pile { top: calc(max(6px, env(safe-area-inset-top, 0px))); width: min(560px, calc(100% - 24px)); }
  .direct-bulle { gap: 4px; padding: 0 0 9px; }
  .direct-tete { min-height: 36px; padding: 2px 4px 2px 8px; }
  .direct-logo { height: 28px; }
  .direct-auteur { font-size: 14px; }
  .direct-bulle > .direct-question { font-size: 15px; }
  .direct-choix { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
  .direct-choix-btn { min-height: 38px; padding: 4px 9px; font-size: 13px; }
  .direct-bulle > .direct-pied { min-height: 0; font-size: 12px; }
}
.direct-live-court { display: none; }
@media (max-width: 420px) {
  .direct-tete { gap: 7px; }
  .direct-logo { height: 32px; }
  .direct-auteur { font-size: 14px; }
}
@media (max-width: 359px) {
  .direct-choix { grid-template-columns: minmax(0, 1fr); }
  .direct-live-long { display: none; }
  .direct-live-court { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .direct-bulle, .direct-logo, .direct-live i, .direct-chrono.urgent, .direct-choix-btn, .direct-choix-btn.choisi, .direct-choix-btn.gagnant { animation: none; }
  .direct-bulle, .direct-remplie, .direct-choix-btn, .direct-temps-suivi i { transition: none; }
  .direct-temps i { animation-timing-function: linear; }
}
