/* Grand écran 16:9 (1080p ou 4K) : toutes les tailles en vw/vh pour suivre la résolution. */
body {
  overflow: hidden;
}
#scene {
  position: absolute;
  inset: 0 0 6vh 0;
  padding: 3vh 3vw;
  display: flex;
  flex-direction: column;
  gap: 2.4vh;
}

.titre-evenement {
  font-size: 1.4vw;
  font-weight: 600;
  color: var(--bleu);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: 3.6vw;
  font-weight: 800;
  line-height: 1.05;
}
h2 {
  margin: 0;
  font-size: 1.8vw;
  font-weight: 700;
}
.discret {
  color: var(--texte);
}

/* ── Ouverture ─────────────────────────────────────────────── */
.phases {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2vw;
  flex: 1;
  min-height: 0;
}
.phase {
  background: var(--surface);
  border-radius: 1.2vw;
  padding: 2vh 1.2vw;
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
}
.phase .libelle {
  font-size: 1.3vw;
  font-weight: 600;
}
.phase .nb {
  font-size: 5.5vw;
  font-weight: 800;
  color: var(--bleu);
  line-height: 1;
}
.phase.vide .nb {
  color: var(--contour);
}
.pions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45vw;
  align-content: flex-start;
}
.pion {
  width: 1.5vw;
  height: 1.5vw;
  border-radius: 50%;
  background: var(--asso, var(--bleu));
}
.compteurs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2vw;
}
.compteur {
  background: var(--profond);
  color: #ffffff;
  border-radius: 1.2vw;
  padding: 2vh 1.5vw;
}
.compteur .nb {
  font-size: 3.4vw;
  font-weight: 800;
  line-height: 1;
}
.compteur .libelle {
  font-size: 1.1vw;
  opacity: 0.9;
}

/* ── Page d'une association ────────────────────────────────── */
.bandeau {
  background: var(--asso);
  color: var(--asso-texte);
  border-radius: 1.4vw;
  padding: 2.2vh 2vw;
  display: flex;
  align-items: baseline;
  gap: 2vw;
}
.bandeau h1 {
  font-size: 3vw;
}
.bandeau .mission {
  font-size: 1.3vw;
  opacity: 0.95;
}
.corps-asso {
  display: grid;
  grid-template-columns: 38fr 62fr;
  gap: 1.5vw;
  flex: 1;
  min-height: 0;
}
.colonne {
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
  min-height: 0;
}
.carte {
  background: var(--surface);
  border-radius: 1.2vw;
  padding: 2vh 1.4vw;
  min-height: 0;
}
.avancement {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6vw;
  align-items: end;
  height: 14vh;
}
.barre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5vh;
  height: 100%;
  justify-content: flex-end;
}
.barre .remplie {
  width: 100%;
  background: var(--asso);
  border-radius: 0.5vw 0.5vw 0 0;
  min-height: 0.4vh;
}
.barre .nb {
  font-size: 1.4vw;
  font-weight: 700;
}
.barre .libelle {
  font-size: 0.75vw;
  color: var(--texte);
  text-align: center;
}

.coeur {
  flex: 1;
  overflow: hidden;
}
.coeur h2 {
  margin-bottom: 1.4vh;
}
.liste-cartes {
  display: flex;
  flex-direction: column;
  gap: 1vh;
}
.prob {
  background: var(--surface-base);
  border-left: 0.5vw solid var(--asso);
  border-radius: 0.8vw;
  padding: 1.2vh 1vw;
  font-size: 1.35vw;
  font-weight: 500;
}
.prob .tables {
  font-size: 0.95vw;
  color: var(--texte);
  font-weight: 400;
}
.revelation .prob {
  animation: apparition 0.8s ease-out both;
}
.revelation .prob:nth-child(2) {
  animation-delay: 0.4s;
}
.revelation .prob:nth-child(3) {
  animation-delay: 0.8s;
}
.revelation .prob:nth-child(4) {
  animation-delay: 1.2s;
}
.revelation .prob:nth-child(5) {
  animation-delay: 1.6s;
}
@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(2vh);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mosaique {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.8vw;
  flex: 1;
  min-height: 0;
}
.tuile {
  background: var(--surface);
  border-radius: 0.9vw;
  padding: 1vh 0.8vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.tuile .num {
  font-size: 1.9vw;
  font-weight: 800;
}
.tuile .etat {
  font-size: 0.9vw;
  color: var(--texte);
}
.tuile.en-ligne {
  background: var(--asso);
  color: var(--asso-texte);
}
.tuile.en-ligne .etat {
  color: inherit;
  opacity: 0.9;
}
.tuile .version {
  position: absolute;
  top: 0.8vh;
  right: 0.7vw;
  background: var(--jaune);
  color: var(--profond);
  font-weight: 700;
  font-size: 0.85vw;
  border-radius: 999px;
  padding: 0.1vh 0.6vw;
}
.tuile.nouvelle {
  animation: pulse 1.6s ease-in-out 3;
}
@keyframes pulse {
  50% {
    transform: scale(1.04);
  }
}

.alaune {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1vw;
}
.une {
  background: var(--profond);
  color: #ffffff;
  border-radius: 1vw;
  padding: 1.6vh 1.2vw;
}
.une .t {
  font-size: 1.1vw;
  font-weight: 600;
  color: var(--jaune);
}
.une .p {
  font-size: 1.15vw;
  margin: 0.6vh 0;
}
.une .u {
  font-size: 0.85vw;
  opacity: 0.85;
  word-break: break-all;
}

/* ── Fiche d'une table ─────────────────────────────────────── */
.fiche {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4vw;
  flex: 1;
  min-height: 0;
}
.fiche .carte h2 {
  font-size: 1.3vw;
  color: var(--bleu);
  margin-bottom: 1vh;
}
.fiche .carte p,
.fiche .carte li {
  font-size: 1.25vw;
  margin: 0.4vh 0;
}

/* ── Pied : rail des associations et temps de la scène ─────── */
.pied {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6vh;
  padding: 0 3vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8vh;
}
.rail {
  display: flex;
  gap: 0.8vw;
}
.rail span {
  font-size: 0.95vw;
  padding: 0.3vh 0.9vw;
  border-radius: 999px;
  background: var(--surface-base);
  color: var(--texte);
}
.rail span.courant {
  background: var(--asso);
  color: var(--asso-texte);
  font-weight: 600;
}
.temps {
  height: 0.5vh;
  background: var(--surface-haute);
  border-radius: 999px;
  overflow: hidden;
}
.temps-barre {
  height: 100%;
  width: 0;
  background: var(--rose);
  transition: width 1s linear;
}
.connexion {
  position: fixed;
  top: 2vh;
  right: 2vw;
  background: var(--rose);
  color: #ffffff;
  padding: 1vh 1.2vw;
  border-radius: 0.8vw;
  font-size: 1vw;
}
.vide-msg {
  font-size: 1.4vw;
  color: var(--texte);
}
