/* polices locales */

@font-face {
  font-family: Titre;
  src: local("Uncial Antiqua"), url("../fonts/titre.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: Texte;
  src: local("IM FELL English"), url("../fonts/texte.woff2") format("woff2");
  font-display: swap;
}

/* variables et reset */

:root {
  --nuit: #1a1410;
  --cuir: #2c2016;
  --parch: #e8d9b5;
  --or: #c9a24a;
  --sang: #7a1212;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: 
    radial-gradient(ellipse at 50% -10%, #4a3018, var(--nuit) 65%) fixed,
    repeating-linear-gradient(90deg, #ffffff06 0 2px, transparent 2px 7px);
  color: var(--parch);
  font: 1.1rem/1.7 Texte, "Palatino Linotype", Georgia, serif;
}

/* typo et liens */

h1,
h2,
.logo {
  font-family: Titre, "Palatino Linotype", Georgia, serif;
  color: var(--or);
  font-weight: 400;
  letter-spacing: 0.04em;
}

h1 {
  background: linear-gradient(#f6de9a, #b8862d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  filter: drop-shadow(2px 2px 0 var(--sang));
}

a {
  color: var(--or);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 2px;
}

/* layout et structure */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 4px double var(--or);
  background: linear-gradient(#000b, #0000);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(4px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.6rem;
  text-decoration: none;
}

nav a {
  color: var(--parch);
  margin-left: 1.2rem;
  padding: 0.2rem 0.5rem;
  text-decoration: none;
  border-bottom: 0;
  border-radius: 4px;
}

nav a:hover {
  background: var(--sang);
}

main {
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.5rem;
}

footer {
  border-top: 4px double var(--or);
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
}

footer ul {
  list-style: none;
  padding: 0;
}

/* boutons et composants */

.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5rem);
  margin: 0;
  text-shadow: none;
  filter: drop-shadow(3px 3px 0 var(--sang));
}

.accroche {
  font-size: 1.5rem;
  font-style: italic;
}

.btn,
button {
  display: inline-block;
  background: linear-gradient(#9a1a1a, #6a0e0e);
  color: var(--parch);
  border: 2px solid var(--or);
  border-radius: 6px;
  padding: 0.4rem 1rem;
  margin: 0.2rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 #3a0808;
  transition: transform 0.1s;
}

.btn:hover,
button:hover {
  background: #9a1a1a;
}

button:active {
  transform: translateY(2px);
  box-shadow: none;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

.parch {
  background: var(--parch);
  color: #2a1c10;
  padding: 1rem 1.5rem;
  border: 3px double var(--sang);
}

.parch h2 {
  color: var(--sang);
}

details.parch summary {
  cursor: pointer;
  font-weight: bold;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td,
th {
  border: 1px solid #8a6b3a;
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

#noms input,
select {
  display: block;
  margin: 0.3rem 0;
  padding: 0.3rem;
  font: inherit;
  background: #fff8e6;
  border: 1px solid var(--sang);
}

video {
  width: 100%;
  background: #000;
  border: 3px double var(--or);
}

.vide {
  border: 2px dashed var(--or);
  padding: 1rem;
}

.portes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.porte {
  display: block;
  padding: 1rem 1.2rem;
  text-align: left;
  text-decoration: none;
  color: var(--parch);
  border: 3px double var(--or);
  border-radius: 6px;
  background: linear-gradient(#3a2416, #241710);
  transition: transform 0.15s, box-shadow 0.15s;
}

.porte b {
  display: block;
  font: 1.7rem Titre, "Palatino Linotype", Georgia, serif;
  color: var(--or);
}

.porte:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px #000;
}

/* ccartes de règles, onglets */

.onglets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.onglets button {
  border-radius: 999px;
  background: var(--cuir);
}

.onglets .rouge {
  color: #ff9a8a;
}

.onglets button.on {
  background: var(--or);
  color: var(--nuit);
}

.onglets .rouge.on {
  color: var(--sang);
}

.paquet {
  max-width: 22rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.carte {
  position: relative;
  aspect-ratio: 5/7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.8rem 1.8rem;
  margin-bottom: 1rem;
  background: #fbf5e4;
  color: #1a1410;
  border: 2px solid #1a1410;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 30px #000, 5px 5px 0 #d9ccaa, 9px 9px 0 #a89870;
}

.carte::before {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border: 1px solid #c9b98a;
  border-radius: 10px;
  pointer-events: none;
}

.carte::after {
  content: attr(data-s);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13rem;
  opacity: 0.07;
  pointer-events: none;
}

.carte h2 {
  color: var(--sang);
  font-size: 1.6rem;
  margin: 0;
}

.carte .des {
  font-size: 3rem;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.08em;
}

.carte .texte {
  font-size: 0.98rem;
  line-height: 1.45;
  margin: 0;
}

.long h2 {
  font-size: 1.3rem;
}

.long .des {
  font-size: 2.2rem;
}

.long .texte {
  font-size: 0.82rem;
  line-height: 1.35;
}

.coin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  font-family: Titre, "Palatino Linotype", Georgia, serif;
}

.coin b {
  font-size: 1.7rem;
}

.coin span {
  font-size: 1.5rem;
}

.coin.haut {
  top: 0.9rem;
  left: 1rem;
}

.coin.bas {
  bottom: 0.9rem;
  right: 1rem;
  transform: rotate(180deg);
}

.rouge .coin,
.rouge.carte::after {
  color: #b01818;
}

.pas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.compte {
  font-size: 0.9rem;
  opacity: 0.8;
}

.pdf {
  text-align: center;
  margin: 1rem 0;
}

/* gestions joueurs, les blasons et fiches */

#jeu table {
  color: var(--parch);
}

#jeu td {
  border-color: var(--or);
}

tr.cur td {
  background: var(--sang);
}

.blason {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 3rem;
  margin: 0.2rem;
  padding: 0;
  border: 0;
  font-size: 1.5rem;
  background: radial-gradient(
    circle at 50% 25%,
    color-mix(in srgb, var(--c), #fff 28%),
    var(--c)
  );
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}

.joueur {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.joueur input {
  flex: 1;
}

.joueur .coul {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.tab {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.fiche {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.6rem;
  align-items: center;
  background: var(--cuir);
  border: 2px solid #5a4630;
  padding: 0.6rem;
}

.fiche.cur {
  border-color: #f2d64b;
}

.fiche em {
  grid-column: 1 / 3;
  font: normal 2.2rem Titre, serif;
  color: var(--or);
}

.fiche button {
  grid-column: 1 / 3;
  font-size: 0.8rem;
  padding: 0.1rem;
}

.bar {
  grid-column: 1 / 3;
  height: 0.4rem;
  background: #000;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--or);
}

/* table de jeu */

/* --- le tapis : j'ai essayé de faire quelque chose d'autre mais j'ai pas réussi --- */

.tapis {
  position: relative;
  min-height: 30rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.8rem 1.4rem 2rem;
  text-align: center;
  background: #2b1f17;
  border: 1px solid #6b5642;
  border-radius: 12px;
  box-shadow: inset 0 0 60px #0008;
}

.tapis h2 {
  margin: 0 0 1rem;
}

.tapis > .des {
  flex: none;
  min-height: 6.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tapis > :not(.des) {
  margin-top: auto;
  margin-bottom: auto;
}

.tapis .actions {
  margin-top: auto;
  margin-bottom: 0;
}
.tapis .res {
  margin: 0.8rem 0 1.2rem;
}

/* --- Les boutons de la table --- */

.tapis button {
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
  border-width: 1px;
  box-shadow: 0 2px 0 #3a0808;
  margin: 0.25rem 0.35rem;
  vertical-align: middle;
}

/* Les boutons principaux d'action (lancer, valider, fin de tour…) */

.tapis .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem auto 0;
}

.tapis .actions button {
  margin: 0;
}

.rangee {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 40rem;
  margin: 0.6rem auto;
}

.rangee button {
  flex: 0 1 auto;
  margin: 0;
}

.tapis .victoire {
  margin: auto 0;
}

@media (min-width: 60rem) {
  .tapis {
    min-height: 32rem;
  }
}

@media (max-width: 40rem) {
  .tapis {
    min-height: 24rem;
  }
}

/* --- Dés --- */

.des {
  text-align: center;
}

.de {
  display: inline-grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0.4rem;
  background: #f4ead0;
  color: #1a1410;
  border-radius: 14px;
  font-size: 4.6rem;
  line-height: 1;
  box-shadow: inset 0 -6px 0 #cbb98c, 0 8px 14px #000;
  animation: none;
}

.de.roule {
  animation: roule 0.6s both;
}

.trio {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.trio .de {
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s;
}

.trio .de:hover {
  transform: translateY(-6px) rotate(-6deg);
}

.de2 {
  display: inline-grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  width: 4.6rem;
  height: 4.6rem;
  margin: 1.2rem 1rem;
  padding: 0.55rem;
  background: #f4efe3;
  border-radius: 0.7rem;
  transform: rotate(var(--r, 0deg));
}

.de2 b {
  margin: 15%;
  border-radius: 50%;
}

.de2 b.p {
  background: #1a1410;
}

.res {
  font-size: 1.4rem;
  color: var(--or);
  text-align: center;
}

/* --- panneaux latéraux (Banque et Chante-Sloubi) --- */

.flanc {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.flanc button {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.4rem;
  font-size: 1.1rem;
  line-height: 1;
  background: linear-gradient(#8a1616, #6a0e0e);
  border: 1px solid #5a0808;
  border-radius: 8px;
  box-shadow: 0 2px 0 #3a0808;
}

.flanc button i {
  font-style: normal;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: transform 0.2s;
}

/* panneau ouvert : le ‹ se retourne et le bouton passe en l'or */

.flanc button[aria-pressed="true"] {
  background: linear-gradient(#a0761e, #8a6210);
  border-color: #6a4a0a;
}

.flanc button[aria-pressed="true"] i {
  transform: rotate(180deg);
  opacity: 1;
}

/* sur tel : les boutons passent en rangée au-dessus du contenu */

@media (max-width: 40rem) {
  .flanc {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
  }
}

/* le panneau ouvert laisse la place aux boutons */

.tapis .defi {
  max-width: min(34rem, calc(100% - 4rem));
}

/* défis, mises et paris */

/* --- panneau de défi --- */

.defi {
  margin: 1.4rem auto;
  max-width: 34rem;
  padding-bottom: 0.6rem;
  text-align: left;
  background: linear-gradient(#fbf5e4, #f2e9d2);
  color: #2a1c10;
  border: 1px solid #b8a880;
  border-radius: 10px;
  box-shadow: 0 6px 16px #0008, inset 0 0 2rem #c9b98a40;
}

.defi h3 {
  margin: 0 0 0.3rem;
  padding: 0.6rem 1.1rem 0.55rem;
  font: 1.25rem Titre, "Palatino Linotype", Georgia, serif;
  color: var(--sang);
  border-bottom: 2px solid #c9b98a;
}

.defi h3::before {
  content: "⚔ ";
}

/* filet décoratif sous le titre */

.defi h3::after {
  content: "· · ·";
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  color: #c9b98a;
  text-align: center;
}

.defi p {
  margin: 0;
  padding: 0.7rem 1.1rem 0.3rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.defi > :last-child {
  margin-bottom: 0.8rem;
}

/* --- une ligne par joueur --- */

.defi-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d9ccaa;
  border-radius: 8px;
  background: #ffffff70;
}

.defi-ligne b {
  flex: 1;
  min-width: 6rem;
  font-size: 0.98rem;
}

.defi-ligne small {
  opacity: 0.65;
  font-size: 0.8rem;
}

.defi-ligne .blason {
  width: 1.8rem;
  height: 2rem;
  font-size: 1rem;
  margin: 0;
}

.defi label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* --- selects et mises --- */

.mise,
.defi select,
.defi .defi-ligne select {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 1rem;
  color: #2a1c10;
  background: #fffdf6;
  border: 1px solid #b8a880;
  border-radius: 6px;
  box-shadow: inset 0 2px 0 #00000010;
  cursor: pointer;
}

.defi select {
  min-width: 9rem;
}

.mise {
  width: 5rem;
  text-align: center;
  font: bold 1.1rem Titre, Georgia, serif;
  border: 1px solid var(--or);
}

/* flèche du select */

.defi select,
.defi .defi-ligne select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7a1212 50%),
    linear-gradient(135deg, #7a1212 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}

/* nombres : pas de flèches parasites dans le navigateur de merde qu'est Chrome */

.mise::-webkit-outer-spin-button,
.mise::-webkit-inner-spin-button,
#blrp::-webkit-outer-spin-button,
#blrp::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.mise:focus-visible,
.defi select:focus-visible,
.defi .defi-ligne select:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 1px;
  border-color: var(--or);
}

.mise:hover,
.defi select:hover,
.defi .defi-ligne select:hover {
  border-color: var(--or);
}

/* --- Paris spécifiques --- */

/* Bleu-Rouge */

.defi .defi-ligne:has(#blrp) {
  justify-content: center;
  margin: 0.7rem 1rem 0.6rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(#f8f0d8, #efe2c2);
  border: 2px solid var(--or);
  border-radius: 10px;
}

.defi .defi-ligne:has(#blrp) b {
  font: 1.15rem Titre, "Palatino Linotype", Georgia, serif;
  color: var(--sang);
}

#blrp {
  width: 5.5rem;
  padding: 0.4rem 0.5rem;
  font: bold 1.4rem Titre, Georgia, serif;
  text-align: center;
  color: #1a1410;
  background: #fffdf6;
  border: 1px solid var(--or);
  border-radius: 8px;
  box-shadow: inset 0 2px 0 #00000014;
}

/* Les paris des autres joueurs sur le total */

.defi-ligne select.blrb {
  min-width: 4.5rem;
  font-weight: bold;
}

/* Les oiseaux du Sirotage : le nom se lit comme une carte */

.defi-ligne select.siv {
  min-width: 10.5rem;
  font-style: italic;
}

/* Les paris des tiers pendant la Grelottine */

.defi-ligne select.grb {
  min-width: 5.5rem;
}

/* La combinaison imposée par la Grelottine : une annonce, en Titre */

.defi-ligne select.gk {
  min-width: 13rem;
  font-family: Titre, "Palatino Linotype", Georgia, serif;
  font-size: 1.05rem;
}

/* --- Les boutons d'action dans un défi : format compact --- */

.defi button {
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(#8a1616, #6a0e0e);
  border: 1px solid #5a0808;
  box-shadow: 0 2px 0 #3a0808;
  white-space: nowrap;
}

.defi button:hover {
  background: #8a1616;
}

/* Boutons d'annonce (Grelottine, Boucliette) : dorés */
.defi button[data-a="gr"],
.defi button[data-a="gbo"],
.defi button[data-a="sbo"] {
  background: linear-gradient(#a0761e, #8a6210);
  border-color: #6a4a0a;
  box-shadow: 0 2px 0 #4a340a;
}

.defi button[data-a="gr"]:hover,
.defi button[data-a="gbo"]:hover,
.defi button[data-a="sbo"]:hover {
  background: #a0761e;
}

/* --- Mobile : les lignes de paris passent en colonne, j'espère, faut que je vois une vois publier --- */

@media (max-width: 40rem) {
  .defi-ligne {
    flex-wrap: wrap;
  }

  .defi-ligne b {
    min-width: 100%;
    margin-bottom: 0.1rem;
  }
}

/* écran de victoire */

/* --- Panneau de confirmation --- */

.voile {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #000a;
  animation: fond 0.2s;
}

.panneau {
  max-width: 24rem;
  padding: 1.4rem 1.6rem;
  text-align: center;
  background: var(--parch);
  color: #2a1c10;
  border: 3px double var(--sang);
  border-radius: 10px;
  box-shadow: 0 20px 50px #000;
  animation: monte 0.25s;
}

.panneau h2 {
  color: var(--sang);
  margin: 0 0 0.4rem;
}

.panneau p {
  margin: 0.4rem 0 1rem;
}

.choix {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.panneau .danger {
  background: #3a0808;
  border-color: #3a0808;
}

/* Champs du panneau (Chante-Sloubi…) <-- je l'ai dans la tête */

.panneau input[type="text"],
.panneau input:not([type]),
.panneau input[maxlength] {
  padding: 0.3rem 0.5rem;
  font: inherit;
  color: #2a1c10;
  background: #fffdf6;
  border: 1px solid #b8a880;
  border-radius: 6px;
}

.panneau label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- victoire, ouaiiis, gg --- */

.victoire {
  text-align: center;
  padding: 0.5rem 0;
}

.victoire h2 {
  font-size: clamp(2.4rem, 8vw, 4rem);
  margin: 0.3rem 0;
  animation: pop 0.9s 0.15s both;
}

.victoire .nom {
  font: 1.6rem Titre, "Palatino Linotype", Georgia, serif;
  margin: 0;
}

.blason.grand {
  width: 6rem;
  height: 6.8rem;
  font-size: 3.4rem;
  animation: pop 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.podium {
  list-style: none;
  padding: 0;
  max-width: 20rem;
  margin: 1rem auto;
  text-align: left;
}

.podium li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-bottom: 1px dashed #ffffff40;
}

.podium li b {
  margin-left: auto;
}

.podium li:first-child {
  font-size: 1.2rem;
}

/* --- Effets visuels divers, tente des trucs au passage --- */

.emblem {
  animation: flotte 3s ease-in-out infinite;
}

.confettis {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9;
}

.confettis i {
  position: absolute;
  top: -2rem;
  font-size: 2rem;
  font-style: normal;
  animation: tombe 3.5s linear both;
}

.vu .blason.grand,
.vu h2 {
  animation: none;
}

/* histo de partie */

.journal {
  margin: 1rem 0;
  border: 1px solid #5a4630;
  border-radius: 8px;
  background: #241a12;
  overflow: hidden;
}

.journal summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  font: 1.15rem Titre, "Palatino Linotype", Georgia, serif;
  color: var(--or);
  list-style: none;
  transition: background 0.15s;
}

.journal summary::-webkit-details-marker {
  display: none;
}

.journal summary::before {
  content: "▸";
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.journal[open] summary::before {
  transform: rotate(90deg);
}

.journal[open] summary {
  border-bottom: 1px solid #5a4630;
}

.journal summary:hover {
  background: #2c2016;
}

.j-cpte {
  margin-left: auto;
  display: flex;
  gap: 0.45rem;
  font: 0.8rem Texte, Georgia, serif;
}

.j-cpte i {
  font-style: normal;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #00000060;
}

.j-cpte .j-gain { color: #8fce7a; }
.j-cpte .j-perte { color: #e07a6a; }
.j-cpte .j-jet { color: #c8b88e; }
.j-cpte .j-info { color: var(--parch); }

/* --- liste déroulante --- */

.log {
  max-height: 18rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.5rem 0.9rem 0.7rem;
  font-size: 0.95rem;
  color: var(--parch);
  scroll-behavior: smooth;
}

.log li {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.28rem 0.35rem;
  border-radius: 6px;
  border-bottom: 1px dashed #ffffff14;
  animation: monte 0.25s both;
}

.log li:last-child {
  border-bottom: 0;
}

/* icône de type */

.j-ico {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-grid;
  place-items: center;
  font-size: 0.8rem;
  border-radius: 50%;
  align-self: center;
  background: #00000070;
}

.j-txt {
  flex: 1;
}

/* Points à droite pour gains/pertes */

.j-pts {
  flex: none;
  font: 1.05rem Titre, Georgia, serif;
}

/* Typage des entrées */
.j-jet { color: #c8b88e; }
.j-jet .j-ico { background: #c8b88e30; }

.j-gain { color: #a8d896; }
.j-gain .j-ico { background: #8fce7a40; }
.j-gain .j-pts { color: #8fce7a; }

.j-perte { color: #e8907e; }
.j-perte .j-ico { background: #e07a6a40; }
.j-perte .j-pts { color: #e07a6a; }

.j-info { color: var(--parch); }
.j-info .j-ico { background: #c9a24a40; }

/* Les 3 derniers évent ressortent */
.log li:nth-last-child(-n + 3) {
  font-size: 1rem;
  background: #ffffff08;
}

/* le plus chiant, l'animation média */

@keyframes roule {
  from {
    transform: rotate(-200deg) scale(0.4);
  }
}

@keyframes vire {
  from {
    transform: translateX(50px) rotate(6deg);
    opacity: 0;
  }
}

@keyframes flotte {
  50% {
    transform: translateY(-8px) rotate(-3deg);
  }
}

@keyframes tombe {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

@keyframes pop {
  from {
    transform: scale(0.2) rotate(-12deg);
    opacity: 0;
  }
}

@keyframes fond {
  from {
    opacity: 0;
  }
}

@keyframes monte {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
}

.jete2 {
  animation: jete2 0.9s cubic-bezier(0.3, 0.6, 0.4, 1) var(--d) both;
}

@keyframes jete2 {
  0% {
    transform: translate(-9rem, -7rem) rotate(-620deg) scale(1.3);
  }
  55% {
    transform: translate(0, 0) rotate(var(--r)) scale(1);
  }
  72% {
    transform: translate(0, -1.2rem) rotate(var(--r)) scale(1);
  }
  86% {
    transform: translate(0, 0) rotate(var(--r)) scale(1);
  }
  93% {
    transform: translate(0, -0.3rem) rotate(var(--r)) scale(1);
  }
  100% {
    transform: translate(0, 0) rotate(var(--r)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .de,
  .vire,
  .emblem,
  .confettis i,
  .de.roule,
  .jete2,
  .blason.grand,
  .victoire h2,
  .voile,
  .panneau,
  .log li {
    animation: none;
  }

  .rot {
    transition: none;
  }
}