/* Casino en ligne moderne : fond sombre neutre, rouge mat pour les boutons, vert du tapis en accent. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --fond: #0d0e11;
  --surface: #16181d;
  --surface-2: #1f2228;
  --surface-3: #2a2e36;
  --ligne: rgba(255, 255, 255, .08);
  --texte: #f2f3f5;
  --doux: #9a9fab;
  --rouge: #c23a44;        /* rouge mat : boutons et accents */
  --rouge-vif: #d4474f;
  --rouge-fonce: #7d2029;
  --vert: #1f7a57;         /* vert du tapis */
  --vert-fonce: #12513a;
  --vert-clair: #4ccb93;   /* argent, places libres */
  --jaune: #f3d36b;        /* blackjack : place du propriétaire */
  --violet: #b48cff;       /* blackjack : participation */
  --rayon: 16px;
  --hauteur-barre: 65px;   /* hauteur de la barre du haut */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fond);
  color: var(--texte);
  font: 400 15px/1.5 "Archivo", "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }

/* Barre du haut */
.barre {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 14, 17, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ligne);
}
.barre-in {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 960px; margin: 0 auto; padding: 12px 20px;
}
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; line-height: 1.1; }
.logo small { display: block; font-size: .72rem; font-weight: 500; letter-spacing: 0; color: var(--doux); }
.logo-marque {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 10px; background: var(--rouge); font: 1.2rem/1 "Times New Roman", serif;
}
.compte { display: flex; align-items: center; gap: 10px; }
.solde {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px;
  font-variant-numeric: tabular-nums;
}
.solde strong { font-weight: 700; }
.jeton-solde {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--vert-clair); box-shadow: inset 0 0 0 3px var(--vert);
}
.profil {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 4px;
  background: transparent; border: 0; border-radius: 12px; color: var(--texte);
  font: inherit; font-weight: 600; cursor: pointer;
}
.profil:hover, .profil.actif { background: var(--surface); }
.nav { display: flex; gap: 4px; margin-right: 6px; }
.nav-lien {
  height: 40px; padding: 0 14px; border: 0; border-radius: 12px;
  background: transparent; color: var(--doux); font: inherit; font-weight: 700; cursor: pointer;
}
.nav-lien, #btn-deconnexion { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.nav-lien:hover { color: var(--texte); }
/* Icônes de la barre (affichées à la place du texte sur téléphone) */
.icone {
  display: none; flex: none; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* La barre prend la même largeur que la page en dessous */
body.en-table .barre-in { max-width: none; }
body.en-admin .barre-in { max-width: 1300px; }
.nav-lien.actif { background: var(--surface); color: var(--texte); }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--surface-3); color: var(--texte); font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}

main { max-width: 960px; margin: 0 auto; padding: 28px 20px 72px; }

/* Boutons */
.btn {
  height: 40px; padding: 0 18px; border-radius: 12px; border: 0;
  background: var(--surface-2); color: var(--texte);
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn.principal { background: var(--rouge); color: #fff; }
.btn.principal:hover { background: var(--rouge-vif); }
.btn.grand { height: 48px; font-size: 1rem; }
.btn.petit { height: 34px; padding: 0 12px; font-size: .85rem; }
.btn.fantome { background: transparent; border: 1px solid var(--ligne); color: var(--doux); font-weight: 600; }
.btn.fantome:hover { color: var(--texte); border-color: rgba(255, 255, 255, .22); }
.btn:disabled { background: var(--surface-2); color: var(--doux); cursor: not-allowed; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Formulaires */
form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: .85rem; font-weight: 600; color: var(--doux); }
.option { font-weight: 400; }
input, select {
  width: 100%; height: 46px; padding: 0 14px;
  background-color: var(--fond); color: var(--texte);
  border: 1px solid var(--ligne); border-radius: 12px;
  font: inherit; font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239a9fab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: var(--surface); color: var(--texte); }
input::placeholder { color: #666b76; }
input:hover, select:hover { border-color: rgba(255, 255, 255, .18); }
input:focus, select:focus { outline: 0; border-color: var(--rouge); box-shadow: 0 0 0 3px rgba(194, 58, 68, .28); }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.erreur {
  padding: 11px 14px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(194, 58, 68, .14); border: 1px solid rgba(212, 71, 79, .45); color: #ffb9bd;
  font-size: .9rem; font-weight: 500;
}
form .erreur { margin: 0; }

/* Connexion */
.auth {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 920px; margin: 5vh auto 0;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 24px; overflow: hidden;
}
.auth-visuel {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  min-height: 460px; padding: 36px;
  background: linear-gradient(160deg, var(--vert) 0%, var(--vert-fonce) 100%);
}
.auth-visuel h1 { font-size: 2.3rem; }
.auth-visuel p { color: rgba(255, 255, 255, .78); max-width: 32ch; }
.auth-cartes { position: absolute; top: 44px; left: 44px; }
.mini-carte {
  position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 104px; height: 146px; padding: 12px 14px; border-radius: 12px;
  background: #fff; color: #15161a; font-weight: 800; font-size: 1.6rem; line-height: 1;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.mini-carte i { font: normal 1.7rem/1 "Times New Roman", serif; }
.mini-carte.rouge { color: var(--rouge); }
.mini-carte.c1 { transform: rotate(-9deg); }
.mini-carte.c2 { left: 74px; top: 8px; transform: rotate(7deg); }
.auth-form { padding: 36px; align-self: center; }
.onglets { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; background: var(--fond); border-radius: 14px; }
.onglet {
  height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--doux);
  font: inherit; font-weight: 700; cursor: pointer;
}
.onglet.actif { background: var(--surface-2); color: var(--texte); }

/* Mon compte */
.profil-bandeau {
  display: flex; align-items: center; gap: 22px; padding: 30px 32px; margin-bottom: 20px;
  border-radius: 24px; background: linear-gradient(140deg, var(--vert) 0%, var(--vert-fonce) 100%);
}
.profil-bandeau h1 { overflow-wrap: anywhere; }
.profil-bandeau p { margin-top: 6px; color: rgba(255, 255, 255, .78); }
.profil-bandeau strong { color: #fff; font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
.avatar.geant { width: 76px; height: 76px; font-size: 1.5rem; background: rgba(0, 0, 0, .28); }
.panneaux { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panneau { padding: 26px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 20px; }
.panneau h2 { margin-bottom: 20px; }
.succes {
  padding: 11px 14px; border-radius: 12px;
  background: rgba(31, 122, 87, .22); border: 1px solid rgba(76, 203, 147, .45); color: #a6ecc9;
  font-size: .9rem; font-weight: 500;
}
.panneau-titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panneau-titre h2 { margin: 0; }
.compteur {
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2);
  color: var(--doux); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.explication { margin: -8px 0 20px; color: var(--doux); font-size: .9rem; }
.aide { font-weight: 400; font-size: .8rem; }
.vide { padding: 22px; text-align: center; color: var(--doux); }

/* Accueil : deux cases côte à côte, qui gardent toujours la même taille */
.accueil {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px;
  height: clamp(420px, calc(100dvh - var(--hauteur-barre) - 100px), 720px); /* tient dans l'écran, sans défilement */
}
.carte { display: flex; flex-direction: column; min-height: 0; container-type: inline-size; }
.carte .panneau-titre { flex: none; height: 34px; }
.carte .erreur { flex: none; margin: 14px 0 0; }

/* Une photo, ou une case vide à la même place */
.photo-vide {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--doux); font-size: .9rem; font-weight: 600;
}
.casino-photo .photo-vide, .carte-lieu-photo .photo-vide { color: var(--surface-3); font: 3rem/1 "Times New Roman", serif; }

/* Accueil : le casino (ouvert / fermé, où) */
.statut {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: rgba(194, 58, 68, .16); color: #ffb9bd; font-size: .85rem; font-weight: 700;
}
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge-vif); }
.statut.ouvert { background: rgba(31, 122, 87, .3); color: #a6ecc9; }
.statut.ouvert::before { background: var(--vert-clair); box-shadow: 0 0 0 4px rgba(76, 203, 147, .18); }
.casino-photo { position: relative; flex: 1; min-height: 120px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.casino-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.casino-lieu { flex: none; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; min-width: 0; }
.casino-nom, .casino-depuis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.casino-nom { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.casino-depuis { color: var(--doux); font-size: .85rem; }
.casino-admin {
  flex: none; display: flex; align-items: center; min-height: 63px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ligne);
}
.casino-ouvrir { flex-direction: row; gap: 8px; width: 100%; }
.casino-ouvrir select { flex: 1; min-width: 0; }
.casino-ouvrir .btn, #btn-fermer { height: 46px; }
#btn-fermer { width: 100%; }
.casino-admin > .aide { color: var(--doux); font-size: .85rem; }
.titre-droite { display: flex; align-items: center; gap: 10px; }

/* Accueil : la liste défile à l'intérieur de sa case */
.carte .explication { flex: none; margin: -6px 0 14px; }
.carte .tables { flex: 1; min-height: 0; overflow-y: auto; }
.tables .vide { flex: 1; display: grid; place-items: center; border: 1px dashed var(--ligne); border-radius: 14px; }

/* Accueil : tables */
.tables, .lignes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.table {
  flex: none; display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 20px;
  padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--ligne); border-radius: 14px;
}
.table-actions { display: flex; align-items: center; gap: 8px; }
.table-absent { color: #ffb9bd; font-size: .78rem; font-weight: 600; }
.table-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.table-info strong { font-weight: 700; }
.table-jeu { color: var(--doux); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.table-mises { color: var(--doux); font-size: .9rem; font-variant-numeric: tabular-nums; }
.table-places { font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--doux); }
.table-places.libre { color: var(--vert-clair); }
/* Case étroite (téléphone, ou écran moyen) : nom et mises à gauche, joueurs à droite, boutons dessous */
@container (max-width: 560px) {
  .table { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .table-mises { grid-row: 2; }
  .table-places { grid-row: 1 / 3; grid-column: 2; }
  .table-actions { grid-column: 1 / -1; flex-wrap: wrap; margin-top: 8px; }
}

#form-table .aide { color: var(--doux); }

/* Table de blackjack : le tapis a une taille fixe (il défile sur petit écran) */
/* La page de la table tient exactement dans l'écran : barre, tapis (mis à l'échelle), actions */
body.en-table main { max-width: none; padding-block: 14px; }
#vue-table {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  height: calc(100dvh - var(--hauteur-barre) - 28px);
}
.table-barre { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.table-titre { flex: 1; min-width: 200px; display: flex; flex-direction: column; line-height: 1.3; }
.table-titre strong { font-size: 1.15rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-titre span { color: var(--doux); font-size: .85rem; }
.table-stats { display: flex; gap: 8px; margin: 0; }
.table-stats div { min-width: 118px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; }
.table-stats dt { color: var(--doux); font-size: .7rem; font-weight: 600; white-space: nowrap; }
.table-stats dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Croupier : le bénéfice (vert s'il gagne, rouge s'il perd) et ses boutons */
.table-stats .stat-benefice { border-color: rgba(243, 211, 107, .45); }
.table-stats .stat-benefice.positif { background: rgba(31, 122, 87, .25); border-color: rgba(76, 203, 147, .5); }
.table-stats .stat-benefice.positif dd { color: var(--vert-clair); }
.table-stats .stat-benefice.negatif { background: rgba(194, 58, 68, .16); border-color: rgba(212, 71, 79, .5); }
.table-stats .stat-benefice.negatif dd { color: #ffb9bd; }
.actions-croupier { display: flex; align-items: center; }

/* Récapitulatif à la fermeture */
.fenetre-recap { width: min(520px, calc(100% - 32px)); }
.recap-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.recap-chiffres div { padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.recap-chiffres dt { color: var(--doux); font-size: .78rem; font-weight: 600; }
.recap-chiffres dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.recap-chiffres .benefice.positif { background: rgba(31, 122, 87, .25); }
.recap-chiffres .benefice.positif dd { color: var(--vert-clair); }
.recap-chiffres .benefice.negatif { background: rgba(194, 58, 68, .16); }
.recap-chiffres .benefice.negatif dd { color: #ffb9bd; }
#recap-tables h3 { margin: 0 0 8px; font-size: .9rem; }
.recap-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
.recap-liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
.recap-table-nom { display: flex; flex-direction: column; min-width: 0; }
.recap-table-nom span { color: var(--doux); font-size: .78rem; }
.recap-liste .etiquette { font-size: .8rem; padding: 2px 10px; }
/* Modos : le bouton « Vérifier » de l'accueil, et le bandeau visible par tous sur le tapis */
.btn.verifier { background: rgba(180, 140, 255, .18); color: #e3d6ff; }
.btn.verifier:hover { background: rgba(180, 140, 255, .3); }
.verificateurs {
  position: absolute; top: 22px; left: 70px; max-width: 300px; padding: 6px 12px; border-radius: 999px;
  background: rgba(20, 10, 40, .55); border: 1px solid var(--violet); color: #e3d6ff;
  font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Mode vérification : la carte cachée du croupier est visible (en pointillés violets) */
.carte-jeu.revelee { opacity: .85; outline: 2px dashed var(--violet); outline-offset: 2px; }

/* Les prochaines cartes du sabot, dans la barre du bas */
.sabot-suite { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.sabot-suite li { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--doux); font-size: .62rem; font-weight: 700; }
.sabot-suite .carte-jeu { width: 30px; height: 42px; font-size: .6rem; border-radius: 4px; }
.sabot-suite li:first-child .carte-jeu { outline: 2px solid var(--violet); outline-offset: 1px; }

/* La fenêtre avec l'ordre complet du sabot (elle défile à l'intérieur) */
.fenetre-sabot { width: min(900px, calc(100% - 32px)); }
.sabot-ordre {
  list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px;
}
.sabot-ordre li { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--doux); font-size: .66rem; font-weight: 700; }
.sabot-ordre .carte-jeu { width: 38px; height: 54px; font-size: .78rem; }

/* Les erreurs s'affichent par-dessus le tapis, pour ne rien décaler */
#partie-erreur { position: absolute; top: 64px; left: 50%; z-index: 5; transform: translateX(-50%); max-width: 90%; margin: 0; }
/* Le milieu de la page : les règles à gauche, le tapis à droite */
.table-milieu { flex: 1; min-height: 0; display: flex; gap: 12px; }
.tapis-cadre { position: relative; flex: 1; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }

/* Fin de manche : le gain ou la perte en grand par-dessus le tapis (ne décale rien, ne bloque pas les clics) */
.annonce-gain {
  position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 4px;
  pointer-events: none; text-align: center;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 60%);
  animation: annonce-fond 2.8s ease both;
}
.annonce-titre { font-size: clamp(1rem, 3vw, 1.6rem); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.annonce-montant {
  font-size: clamp(2.6rem, 9vw, 5rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  animation: annonce-pop 2.8s cubic-bezier(.2, 1.4, .4, 1) both;
}
.annonce-gain.gagne .annonce-montant { color: var(--vert-clair); text-shadow: 0 0 24px rgba(76, 203, 147, .75), 0 4px 0 #06291b; }
.annonce-gain.gagne .annonce-titre { color: var(--jaune); }
.annonce-gain.perdu .annonce-montant { color: #ff8a92; text-shadow: 0 0 24px rgba(194, 58, 68, .8), 0 4px 0 var(--rouge-fonce); }
.annonce-gain.perdu .annonce-titre { animation: annonce-secousse .5s .25s ease both; }
.annonce-gain.perdu .annonce-montant { animation-name: annonce-chute; }
/* Une de mes mains saute : plus court, rouge, ça tremble */
.annonce-gain.saute { animation-duration: 2s; }
.annonce-gain.saute .annonce-titre { font-size: clamp(1.8rem, 6vw, 3.4rem); color: #ff8a92; text-shadow: 0 0 20px rgba(194, 58, 68, .8), 0 3px 0 var(--rouge-fonce); animation: annonce-secousse .5s .1s ease both; }
.annonce-gain.saute .annonce-montant { font-size: clamp(1.2rem, 4vw, 2rem); color: #fff; animation: annonce-chute 2s ease both; }
.annonce-gain.egalite .annonce-montant { font-size: clamp(1.6rem, 5vw, 2.6rem); color: #fff; }
.annonce-jeton {
  position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; opacity: 0;
  background: var(--vert-clair); box-shadow: inset 0 0 0 4px var(--vert), 0 2px 6px rgba(0, 0, 0, .4);
  animation: annonce-jeton 1.3s ease-out both;
}
.annonce-jeton:nth-child(3n) { background: var(--jaune); box-shadow: inset 0 0 0 4px #9a7a14, 0 2px 6px rgba(0, 0, 0, .4); }
.annonce-jeton:nth-child(3n+1) { background: var(--rouge-vif); box-shadow: inset 0 0 0 4px var(--rouge-fonce), 0 2px 6px rgba(0, 0, 0, .4); }
@keyframes annonce-fond { 0% { opacity: 0; } 8%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes annonce-pop { 0% { transform: scale(.3); } 18%, 100% { transform: scale(1); } }
@keyframes annonce-chute { 0% { transform: translateY(-30px); opacity: 0; } 15%, 100% { transform: none; opacity: 1; } }
@keyframes annonce-secousse { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes annonce-jeton {
  0% { opacity: 1; transform: translate(0, 0) scale(.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) scale(1) rotate(200deg); }
}

/* Le solde clignote en vert quand il monte, en rouge quand il baisse */
.solde.monte { animation: solde-monte 1.2s ease; }
.solde.baisse { animation: solde-baisse 1.2s ease; }
@keyframes solde-monte { 0%, 60% { border-color: var(--vert-clair); box-shadow: 0 0 0 3px rgba(76, 203, 147, .35); color: var(--vert-clair); } }
@keyframes solde-baisse { 0%, 60% { border-color: var(--rouge-vif); box-shadow: 0 0 0 3px rgba(194, 58, 68, .35); color: #ff8a92; } }

/* Le panneau des règles (fixe, visible par tous) */
.regles {
  flex: none; width: 230px; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 16px;
  font-size: .72rem; line-height: 1.3;
}
.regles h3 { margin: 0; font-size: .9rem; font-weight: 800; }
.regles h4 { margin: 0 0 2px; font-size: .78rem; font-weight: 800; }
.regles h4 small { display: block; color: var(--doux); font-size: .66rem; font-weight: 600; }
.regles dl { margin: 0; display: flex; flex-direction: column; gap: 0; }
.regles dl div { display: flex; justify-content: space-between; gap: 8px; }
.regles dt { color: var(--doux); }
.regles dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.regles section + section { padding-top: 6px; border-top: 1px solid var(--ligne); }
.regles-mise { margin-top: 2px; color: var(--jaune); font-size: .68rem; font-weight: 700; }
.regles-note { margin-top: auto; color: var(--doux); font-size: .66rem; }
.tapis-echelle { width: calc(1500px * var(--echelle-tapis, 1)); height: calc(580px * var(--echelle-tapis, 1)); }
.tapis {
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: 1500px; height: 580px; padding: 18px 18px 0;
  transform: scale(var(--echelle-tapis, 1)); transform-origin: top left;
  background: radial-gradient(ellipse at 50% 0%, #26946a 0%, var(--vert) 45%, var(--vert-fonce) 100%);
  border: 10px solid #3b2618; border-radius: 30px 30px 50% 50% / 30px 30px 24% 24%;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .4);
}
.tapis.grille {
  width: calc(var(--colonnes) * 190px + (var(--colonnes) - 1) * 12px + 56px); height: auto;
  padding-bottom: 18px; border-radius: 30px;
}
.tapis.grille .places { flex-wrap: wrap; width: 100%; gap: 12px; } /* la dernière ligne reste centrée */
.tapis.grille .place { margin-top: 0 !important; } /* pas d'arrondi en grille */
.tapis.grille .sabot { top: 16px; right: 24px; }
.tapis.grille .verificateurs { top: 14px; left: 18px; max-width: calc(100% - 120px); }
.tapis.grille .sabot-scene { top: 200px; left: 28px; right: 28px; bottom: 28px; }
/* L'étalage est dessiné sur 1400 px de large : réduit à la largeur du tapis */
.tapis.grille .sabot-scene.etalage { right: auto; width: 1400px; transform: scale(var(--echelle-scene)); transform-origin: top left; }
.croupier { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 130px; }
.croupier-titre {
  color: rgba(255, 255, 255, .6); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.croupier .cartes { height: 74px; }
.croupier .carte-jeu { width: 52px; height: 74px; font-size: 1rem; }

.croupier .carte-jeu + .carte-jeu { margin-left: -22px; }
.croupier .carte-jeu.dos { --echelle: .4; }
.croupier-titre.absent { color: #ffb9bd; }
.tapis-annonce { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 58px; }
#tapis-message { height: 1.4em; color: #fff; font-size: 1.05rem; font-weight: 800; white-space: nowrap; }

/* Vue téléphone (voir ajusterTapis) : le croupier et la place qui joue en grand, les 7 places en petit */
.tapis-mobile { display: none; }
.tapis-cadre.compact { display: flex; }
.tapis-cadre.compact .tapis-echelle { display: none; }
.tapis-cadre.compact .tapis-mobile {
  display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; min-height: 0; padding: 10px;
  background: radial-gradient(ellipse at 50% 0%, #26946a 0%, var(--vert) 45%, var(--vert-fonce) 100%);
  border: 6px solid #3b2618; border-radius: 22px; box-shadow: inset 0 0 50px rgba(0, 0, 0, .35); overflow: hidden;
}
.mobile-haut { flex: 1; min-height: 0; display: flex; align-items: center; gap: 8px; }
.mobile-croupier {
  flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
}
.mobile-croupier .cartes { min-height: 74px; }
.mobile-croupier .carte-jeu { width: 52px; height: 74px; font-size: 1rem; }
.mobile-croupier .carte-jeu + .carte-jeu { margin-left: -30px; }
.mobile-croupier .carte-jeu.dos { --echelle: .4; }
.mobile-message {
  display: flex; align-items: center; justify-content: center; min-height: 2.5em;
  color: #fff; font-size: .85rem; font-weight: 800; line-height: 1.25;
}
.mobile-message[hidden] { display: flex !important; visibility: hidden; } /* garde sa place */
.mobile-sabot { color: rgba(255, 255, 255, .6); font-size: .66rem; font-weight: 700; }
.mobile-verif { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--violet); color: #e3d6ff; font-size: .62rem; font-weight: 700; }
/* La grande place : dessinée à sa taille normale (190 × 310), puis réduite pour tenir */
.mobile-focus {
  flex: none; list-style: none; margin: 0; padding: 0;
  width: calc(190px * var(--echelle-focus, 1)); height: calc(310px * var(--echelle-focus, 1));
}
.mobile-focus .place { margin: 0 !important; transform: scale(var(--echelle-focus, 1)); transform-origin: top left; }
/* Les 7 places en petit : touche une place pour la voir en grand */
.mobile-places { flex: none; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mini-place {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 100%; height: 88px; padding: 3px 2px; min-width: 0;
  border: 1.5px dashed rgba(255, 255, 255, .28); border-radius: 10px; background: rgba(0, 0, 0, .15);
  color: #fff; font: inherit; line-height: 1.15; cursor: pointer;
}
.mini-place.proprio { border-style: solid; border-color: var(--jaune); }
.mini-place.participation { border-style: solid; border-color: var(--violet); }
.mini-place.en-grand { background: rgba(255, 255, 255, .2); }
.mini-place.tour { box-shadow: 0 0 0 2px #fff; }
.mini-tete { display: flex; align-items: baseline; justify-content: center; gap: 3px; max-width: 100%; min-width: 0; }
.mini-num { flex: none; font-size: .56rem; font-weight: 800; color: rgba(255, 255, 255, .6); }
/* Les cartes en tout petit : la valeur et le signe dans le coin, elles se chevauchent */
.mini-cartes { display: flex; justify-content: center; height: 25px; margin: 2px 0; }
.mini-cartes .carte-jeu { width: 17px; height: 25px; border-radius: 3px; font-size: .52rem; box-shadow: -1px 1px 2px rgba(0, 0, 0, .35); }
.mini-cartes .carte-jeu + .carte-jeu { margin-left: calc(var(--pas, 9px) - 17px); }
.mini-cartes .coin.haut { top: .2em; left: .2em; }
.mini-cartes .coin.bas { display: none; }
.mini-cartes .carte-jeu.nouvelle { animation: none; }
.mini-bas { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 26px; max-width: 100%; }
.mini-libre { align-self: center; color: rgba(255, 255, 255, .5); font-size: .6rem; font-weight: 600; }
.mini-nom { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; font-weight: 800; }
.mini-place.libre .mini-nom { color: rgba(255, 255, 255, .5); font-weight: 600; }
.mini-place.moi .mini-nom { color: var(--jaune); }
.mini-total { padding: 0 5px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: .62rem; font-weight: 800; white-space: nowrap; }
.mini-total.gagne, .mini-total.blackjack { background: var(--vert-clair); color: #06291b; }
.mini-total.perdu { background: var(--rouge); }
.mini-mise { font-size: .56rem; font-weight: 700; color: rgba(255, 255, 255, .75); white-space: nowrap; }
/* Téléphone à l'horizontale : les petites places à droite, sur deux lignes */
.tapis-cadre.paysage .tapis-mobile { flex-direction: row; }
.tapis-cadre.paysage .mobile-places { width: 250px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: center; }
.tapis-cadre.paysage .mini-place { height: 84px; }

/* Chargement du sabot sur téléphone : la scène remplace le croupier et les places */
.tapis-mobile { position: relative; }
.tapis-mobile.scene-active .mobile-haut, .tapis-mobile.scene-active .mobile-places { visibility: hidden; }
.tapis-mobile .sabot-scene { top: 10px; left: 10px; right: 10px; bottom: 10px; }
/* L'étalage est dessiné sur 1400 px de large : réduit à la largeur du téléphone, l'arc vers le haut */
.tapis-mobile .sabot-scene.etalage {
  top: 38%; right: auto; bottom: auto; width: 1400px; height: 400px;
  transform: scale(var(--echelle-scene)); transform-origin: top left;
}

/* Petit écran : les règles s'ouvrent dans une fenêtre (bouton « Règles ») */
.btn-regles { display: none; }
.fenetre-regles { width: min(420px, calc(100% - 24px)); }
.regles-fenetre { display: flex; flex-direction: column; gap: 10px; font-size: .85rem; line-height: 1.35; }
.regles-fenetre h4 { margin: 0 0 4px; font-size: .95rem; font-weight: 800; }
.regles-fenetre h4 small { display: block; color: var(--doux); font-size: .75rem; font-weight: 600; }
.regles-fenetre dl { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.regles-fenetre dl div { display: flex; justify-content: space-between; gap: 10px; }
.regles-fenetre dt { color: var(--doux); }
.regles-fenetre dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.regles-fenetre section + section { padding-top: 10px; border-top: 1px solid var(--ligne); }
.regles-fenetre .regles-mise { margin-top: 4px; color: var(--jaune); font-size: .8rem; font-weight: 700; }
.regles-fenetre .regles-note { color: var(--doux); font-size: .78rem; }

/* Croupier : virer le joueur d'une place (entre deux manches) */
.btn-virer {
  margin-left: auto; flex: none; height: 22px; padding: 0 8px; border-radius: 999px;
  border: 1px solid rgba(255, 185, 189, .6); background: rgba(0, 0, 0, .35); color: #ffb9bd;
  font: inherit; font-size: .62rem; font-weight: 800; cursor: pointer;
}
.btn-virer.confirmer { background: var(--rouge); border-color: var(--rouge); color: #fff; }

/* Le solde dans la barre de la table : seulement quand la barre du haut est cachée */
.table-solde { display: none; }

/* Les cartes */
.cartes { display: flex; justify-content: center; }
.carte-jeu {
  position: relative; display: inline-flex; flex: none;
  width: 44px; height: 62px; border-radius: 6px;
  background: #fff; color: #15161a; box-shadow: -2px 2px 6px rgba(0, 0, 0, .3);
  font-weight: 800; font-size: .9rem; line-height: 1;
}
.carte-jeu + .carte-jeu { margin-left: -20px; }
/* Les deux coins : valeur + symbole en haut à gauche, et la même chose à l'envers en bas à droite */
.coin { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.coin.haut { top: .25em; left: .3em; }
.coin.bas { right: .3em; bottom: .25em; transform: rotate(180deg); }
.coin b { font-weight: 800; letter-spacing: -.04em; }
.coin i { font: normal .9em/1 "Times New Roman", serif; }
.carte-jeu.rouge { color: var(--rouge); }

/* Dos de carte : le logo SRP au centre, dans un cadre rouge */
.carte-jeu.dos {
  position: relative; align-items: center; justify-content: center; padding: 0; overflow: hidden;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--rouge), -2px 2px 6px rgba(0, 0, 0, .3);
}
/* Le logo est dessiné à sa taille d'origine (90 × 85) puis réduit à la taille de la carte */
.logo-srp {
  position: relative; flex: none; width: 90px; height: 85px; transform: scale(var(--echelle, .33));
  font-family: "Arial Black", Arial, sans-serif; font-weight: 900; color: #15161a;
}
.logo-srp span { position: absolute; line-height: 1; }
.logo-srp .s { font-size: 76px; top: 3px; left: 4px; color: transparent; -webkit-text-stroke: 3px #15161a; }
.logo-srp .r, .logo-srp .p { font-size: 35px; top: 36px; }
.logo-srp .r { left: 34px; }
.logo-srp .p { left: 55px; }
.place .carte-jeu.dos { --echelle: .36; }
.place-mains.plusieurs .carte-jeu.dos { --echelle: .22; }

/* Les cartes arrivent du sabot, la carte cachée se retourne */
.carte-jeu.nouvelle { animation: donner .35s ease-out both; }
.croupier .carte-jeu.nouvelle { animation-name: donner-croupier; }
.carte-jeu.retournee { animation: retourner .45s ease-out; }
@keyframes donner { from { opacity: 0; transform: translate(60px, -160px) rotate(-12deg) scale(.85); } }
@keyframes donner-croupier { from { opacity: 0; transform: translate(240px, -10px) rotate(8deg); } }
@keyframes retourner { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }

/* Changement de sabot : la scène s'affiche par-dessus les places */
.sabot-scene {
  position: absolute; top: 200px; left: 40px; right: 40px; bottom: 40px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
/* Pendant le changement de sabot, les places s'effacent : la scène se joue sur le tapis */
.places { transition: opacity .3s; }
.places.cachees { opacity: 0; visibility: hidden; }
.sabot-scene .carte-jeu { width: 30px; height: 42px; font-size: .52rem; border-radius: 4px; }
/* 1. Étalage : chaque jeu en éventail sur un arc de cercle, les cartes arrivent une à une, face visible */
.sabot-scene.etalage { display: block; }
.etalage .carte-jeu { position: absolute; margin: 0; transform: rotate(var(--r)); animation: etaler .3s ease-out both; }
@keyframes etaler { from { opacity: 0; transform: rotate(var(--r)) translateY(-30px); } }
.sabot-pile.vide { opacity: .25; }

/* Le sabot, posé sur la table à droite du croupier */
.sabot {
  position: absolute; top: 22px; right: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, .7); font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.sabot-pile { position: relative; width: 50px; height: 66px; }
.sabot-pile .carte-jeu { position: absolute; top: 0; left: 0; margin: 0; }
.sabot-pile .carte-jeu:nth-child(2) { top: 2px; left: 2px; }
.sabot-pile .carte-jeu:nth-child(3) { top: 4px; left: 4px; }
.total {
  padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45);
  color: #fff; font-size: .75rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.total.saute { background: var(--rouge); }
/* Main sautée : les cartes s'assombrissent et un tampon « Sauté » tombe dessus */
.cartes.sautee { position: relative; }
.cartes.sautee .carte-jeu { filter: grayscale(.7) brightness(.6); }
.tampon-saute {
  position: absolute; top: 50%; left: 50%; z-index: 2; padding: 2px 10px; transform: translate(-50%, -50%) rotate(-14deg);
  border: 3px solid #ff8a92; border-radius: 8px; background: rgba(125, 32, 41, .85); color: #fff;
  font-size: 1rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5); pointer-events: none;
}
.place-mains.plusieurs .tampon-saute { padding: 0 5px; border-width: 2px; font-size: .6rem; }
/* Juste après la carte qui fait sauter : la main tremble et le tampon tombe */
.cartes.vient-de-sauter { animation: main-secousse .45s .35s ease both; }
.cartes.vient-de-sauter .carte-jeu { animation: donner .35s ease-out both, griser .3s .35s ease both; }
.cartes.vient-de-sauter .carte-jeu:not(.nouvelle) { animation: griser .3s .35s ease both; }
.vient-de-sauter .tampon-saute { animation: tampon .35s .4s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes griser { from { filter: none; } }
@keyframes tampon { from { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(2.6); } }
@keyframes main-secousse { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.mini-cartes.sautee .carte-jeu { filter: grayscale(.7) brightness(.6); }

/* Les 7 places : toujours la même taille */
.places { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 12px; }
.place {
  display: flex; flex-direction: column; width: 190px; height: 310px; padding: 8px;
  border: 2px dashed rgba(255, 255, 255, .28); border-radius: 16px; background: rgba(0, 0, 0, .12);
}
/* Jaune : la place du propriétaire. Violet : une participation */
.place.proprio { --couleur-place: var(--jaune); border-style: solid; border-color: var(--jaune); }
.place.participation { --couleur-place: var(--violet); border-style: solid; border-color: var(--violet); }
.place.moi { cursor: pointer; background: rgba(0, 0, 0, .22); }
.place.choisie { background: color-mix(in srgb, var(--couleur-place) 22%, transparent); }
.place.tour { box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(255, 255, 255, .45); }
.place-tete { flex: none; display: flex; align-items: center; gap: 6px; height: 30px; }
.place-numero {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); font-size: .7rem; font-weight: 800;
}
.place.proprio .place-numero, .place.participation .place-numero { background: var(--couleur-place); color: #15161a; }
.place-nom { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.place-nom strong { font-size: .92rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place.libre .place-nom strong { color: rgba(255, 255, 255, .55); }
.place-role { color: var(--couleur-place); font-size: .66rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-mains { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden; }
.main { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; }
.main.active { background: rgba(243, 211, 107, .25); }
.main-info { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; }
.main-haut { display: flex; align-items: center; gap: 4px; }
.place .carte-jeu { width: 48px; height: 68px; font-size: .92rem; }

.place .carte-jeu + .carte-jeu { margin-left: calc(var(--pas, 28px) - 48px); }
/* Une place séparée en plusieurs mains : une main par ligne, avec sa mise (petit jeton) */
.place-mains.plusieurs .main { flex-direction: row; justify-content: space-between; padding: 3px 4px; }
.place-mains.plusieurs .carte-jeu { width: 27px; height: 37px; font-size: .54rem; border-radius: 4px; }
.place-mains.plusieurs .main { padding-block: 2px; }

.place-mains.plusieurs .carte-jeu + .carte-jeu { margin-left: calc(var(--pas, 18px) - 28px); }
.place-mains.plusieurs .cartes { flex: none; }
.place-mains.plusieurs .total { padding: 1px 6px; font-size: .7rem; }
.place-mains.plusieurs .main-info { flex: none; }
.place-mains.plusieurs .main-info { flex-direction: column; align-items: flex-end; gap: 1px; }
.resultat {
  padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .45);
  color: #fff; font-size: .66rem; font-weight: 800; white-space: nowrap;
}
.resultat.gagne, .resultat.blackjack { background: var(--vert-clair); color: #06291b; }
.resultat.perdu { background: var(--rouge); }
.resultat.apparait { animation: resultat-pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes resultat-pop { from { transform: scale(0); } }
.place-pied { flex: none; display: flex; align-items: center; justify-content: center; gap: 4px; height: 54px; }
.place-pied .btn { height: 30px; padding: 0 10px; font-size: .75rem; }
/* Ligne d'étiquettes (total, assurance, gain…) au-dessus du pied */
.place-etiquettes {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 18px; overflow: hidden;
}
.place-centre { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; }

/* Paris annexes sur le cadre : 2+1 (bleu) à gauche, Dame de cœur (rose) à droite */
.pari-annexe { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 54px; }
.pari-cercle {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 2px dashed var(--couleur-pari); color: var(--couleur-pari);
  font-size: .6rem; font-weight: 800; white-space: nowrap; transition: transform .1s;
}
.pari-annexe.deuxPlusUn { --couleur-pari: #8fc6ff; --fond-pari: #2d6fb8; }
.pari-annexe.dame { --couleur-pari: #ff9ec2; --fond-pari: #c2346d; }
.pari-cercle.mise { border-style: solid; border-color: #fff; background: var(--fond-pari); color: #fff; box-shadow: 0 0 0 2px var(--fond-pari); }
.pari-nom, .pari-resultat { max-width: 72px; font-size: .55rem; font-weight: 700; white-space: nowrap; color: rgba(255, 255, 255, .6); }
.pari-annexe.choisissable { cursor: pointer; }
.pari-annexe.choisissable:hover .pari-cercle { transform: scale(1.08); }
.pari-annexe.choisi .pari-cercle { outline: 2px solid #fff; outline-offset: 2px; }
.pari-annexe.gagne .pari-cercle { box-shadow: 0 0 0 2px var(--vert-clair), 0 0 14px rgba(76, 203, 147, .6); }
.pari-annexe.gagne .pari-resultat { color: var(--vert-clair); }
.pari-annexe.perdu { opacity: .55; }
.pari-annexe.attente .pari-resultat { color: var(--jaune); }

/* Le choix du pari dans la barre de mise */
.choix-pari { display: flex; gap: 3px; padding: 3px; background: var(--fond); border-radius: 11px; }
.choix-pari .choix {
  height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--doux); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.choix-pari .choix.actif { background: var(--surface-2); color: var(--texte); }
.choix-pari .choix:disabled { opacity: .4; cursor: not-allowed; }

/* Un jeton : toujours rond, le montant en court (1,5 k) pour ne jamais l'étirer */
.jeton {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--couleur-jeton, var(--rouge)); color: #fff; border: 3px dashed rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 2px var(--couleur-jeton, var(--rouge)), 0 2px 6px rgba(0, 0, 0, .35);
  font: inherit; font-size: .66rem; font-weight: 800; line-height: 1; white-space: nowrap; overflow: hidden;
}
/* Les jetons pour miser : une couleur par valeur, du plus petit au plus grand */
.jeton.couleur-0 { --couleur-jeton: #c23a44; } /* rouge */
.jeton.couleur-1 { --couleur-jeton: #1f8a5e; } /* vert */
.jeton.couleur-2 { --couleur-jeton: #2d6fb8; } /* bleu */
.jeton.couleur-3 { --couleur-jeton: #2a2e36; } /* noir */
.jeton.couleur-4 { --couleur-jeton: #7a4fd0; } /* violet */
.jeton.couleur-5 { --couleur-jeton: #c8901c; } /* or */
/* Texte entier (« Dame de cœur », « Doubler (+100 $) ») ou court quand la place manque (téléphone) */
.texte-court { display: none; }
.jeton.mini { width: 24px; height: 24px; border-width: 2px; box-shadow: 0 0 0 1px var(--rouge); font-size: .5rem; }
.etiquette {
  padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .4);
  font-size: .62rem; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.etiquette.positif { background: var(--vert-clair); color: #06291b; }
.etiquette.negatif { background: var(--rouge); }

/* La barre d'actions : toujours la même hauteur */
.commandes {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 8px;
  height: 72px; padding: 0 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 16px;
}
.commandes-info { color: var(--doux); font-weight: 600; }
.commandes-titre { font-weight: 800; margin-right: 6px; }
.jeton-bouton { width: 48px; height: 48px; font-size: .75rem; cursor: pointer; transition: transform .1s; }
.jeton-bouton:hover:not(:disabled) { transform: translateY(-2px); }
.jeton-bouton:disabled { opacity: .35; cursor: not-allowed; }

/* Admin : le panel tient exactement dans l'écran (jamais de défilement).
   Chaque liste remplit la place restante ; ses lignes ont une hauteur fixe et les places libres
   sont des cases vides : le bloc garde toujours la même taille, plein ou vide. */
body.en-admin main { max-width: 1300px; padding-block: 14px; }
/* Deux colonnes : une petite pour la navigation, une grande pour la page */
#vue-admin {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px;
  height: calc(100dvh - var(--hauteur-barre) - 28px);
}
#vue-admin > .sous-nav {
  grid-column: 1; flex-direction: column; align-self: stretch; width: auto; margin: 0; padding: 12px; gap: 4px;
  border-radius: 20px;
}
.sous-nav-titre {
  padding: 4px 10px 10px; color: var(--doux); font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
#vue-admin .sous-lien { width: 100%; height: 42px; text-align: left; padding: 0 14px; }
#vue-admin > .panneau { grid-column: 2; grid-row: 1; min-height: 0; display: flex; flex-direction: column; }
#vue-admin > .panneau > * { flex: none; }
#vue-admin > .panneau > .lignes, #vue-admin > .panneau > .grille-lieux { flex: 1 1 0; min-height: 0; overflow: hidden; }
#vue-admin .lignes { gap: 8px; }
#liste-comptes { --hauteur-ligne: 54px; }
#liste-identifiants { --hauteur-ligne: 62px; }
#liste-historique { --hauteur-ligne: 58px; } /* assez haut pour la date et le texte, lettres comprises */
#liste-revenus { --hauteur-ligne: 62px; }
#vue-admin .lignes > li { flex: none; height: var(--hauteur-ligne); overflow: hidden; }
#vue-admin .lignes > .vide { display: grid; place-items: center; padding: 0; border: 1px dashed var(--ligne); border-radius: 12px; }
.case-vide { border: 1px dashed rgba(255, 255, 255, .06); border-radius: 12px; }
.grille-lieux .case-vide { border-radius: 14px; }
/* Les textes trop longs sont coupés (le texte complet s'affiche au survol) */
.identifiant-info > span, .evenement-texte > span, .revenu-info > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Historique : la date et le texte à gauche, le bénéfice (fermetures) à droite */
.evenement-texte { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; flex: 1; line-height: 1.35; }

/* Revenus : les totaux, puis une ligne par ouverture du casino */
.revenus-totaux { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: -6px 0 16px; }
.revenus-totaux div { padding: 10px 14px; background: var(--surface-2); border-radius: 12px; min-width: 0; }
.revenus-totaux dt { color: var(--doux); font-size: .76rem; font-weight: 600; }
.revenus-totaux dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.revenus-totaux .benefice.positif { background: rgba(31, 122, 87, .25); }
.revenus-totaux .benefice.positif dd { color: var(--vert-clair); }
.revenus-totaux .benefice.negatif { background: rgba(194, 58, 68, .16); }
.revenus-totaux .benefice.negatif dd { color: #ffb9bd; }
.ligne-revenu {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 14px; background: var(--surface-2); border-radius: 12px; cursor: pointer; transition: background .15s;
}
.ligne-revenu:hover { background: var(--surface-3); }
.revenu-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.revenu-info span { color: var(--doux); font-size: .82rem; }
.ligne-revenu .etiquette, .evenement .etiquette { flex: none; font-size: .8rem; padding: 2px 10px; }

/* Admin : navigation entre les pages */
.sous-nav {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; width: fit-content; max-width: 100%;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px;
}
.sous-lien {
  height: 38px; padding: 0 18px; border: 0; border-radius: 10px; background: transparent;
  color: var(--doux); font: inherit; font-weight: 700; cursor: pointer;
}
.sous-lien:hover { color: var(--texte); }
.sous-lien.actif { background: var(--surface-2); color: var(--texte); }

/* Admin : filtres */
.filtres { flex-direction: row; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filtres input[type="search"] { flex: 1 1 220px; width: auto; }
.filtres select { flex: 0 1 220px; width: auto; }
.filtre-date { flex-direction: row; align-items: center; gap: 8px; flex: 0 1 auto; }
.filtre-date input { width: 160px; color-scheme: dark; }
.filtres .btn { height: 46px; }

/* Admin : pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; min-height: 38px; }
.page {
  min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--ligne); border-radius: 10px;
  background: transparent; color: var(--texte); font: inherit; font-weight: 700; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.page:hover:not(:disabled) { background: var(--surface-2); }
.page:disabled { cursor: default; color: var(--doux); opacity: .5; }
.page.actif { background: var(--rouge); border-color: var(--rouge); color: #fff; opacity: 1; }
.page-trou { display: grid; place-items: center; min-width: 20px; color: var(--doux); }

/* Petites étiquettes */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-3);
  color: var(--doux); font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.badge.admin { background: rgba(194, 58, 68, .2); color: #ffb9bd; }
.badge.libre { background: rgba(31, 122, 87, .3); color: #a6ecc9; }
.badge.modo { background: rgba(180, 140, 255, .2); color: #d6c2ff; }

/* Admin : comptes */
.comptes-entete, .ligne-compte {
  display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1.3fr 1.3fr auto; align-items: center; gap: 14px;
}
.comptes-entete {
  padding: 0 14px 8px; color: var(--doux); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.ligne-compte { padding: 10px 14px; background: var(--surface-2); border-radius: 12px; }
.compte-qui { display: flex; align-items: center; gap: 12px; min-width: 0; }
.compte-nom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.compte-nom strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.compte-nom .badge { flex: none; }
.compte-solde { font-weight: 700; font-variant-numeric: tabular-nums; }
.compte-date { color: var(--doux); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* Case étroite (téléphone, tablette) : nom et solde, puis la dernière connexion et « Gérer » */
#vue-admin > .panneau { container: page-admin / inline-size; }
@container page-admin (max-width: 620px) {
  #liste-comptes { --hauteur-ligne: 76px; }
  .comptes-entete { display: none; }
  .ligne-compte { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .compte-solde { text-align: right; }
  .compte-date { grid-column: 1; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .compte-cree { display: none; }
  .ligne-compte .avatar { width: 28px; height: 28px; font-size: .66rem; }
  .compte-qui { gap: 10px; }
  .compte-date::before { content: attr(data-label) " : "; }
  .ligne-compte .btn { grid-column: 2; grid-row: 2; height: 30px; }
}

/* Admin : fiche d'un compte */
.fiche {
  width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 26px;
  background: var(--surface); color: var(--texte); border: 1px solid var(--ligne); border-radius: 20px;
}
.fiche::backdrop { background: rgba(0, 0, 0, .6); }
.fiche > * + * { margin-top: 18px; }
.fiche-entete { display: flex; align-items: center; gap: 14px; }
.fiche-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fiche-titre h2 { overflow-wrap: anywhere; }
.avatar.grand { width: 52px; height: 52px; font-size: 1rem; }
.fiche-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 0; }
.fiche-infos div { padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.fiche-infos dt { color: var(--doux); font-size: .78rem; font-weight: 600; }
.fiche-infos dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.fiche-argent { flex-direction: row; align-items: flex-end; gap: 10px; }
.fiche-argent label { flex: 1; }
.fiche-argent .btn { height: 46px; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid var(--ligne); }
.fiche-actions .aide { flex-basis: 100%; color: var(--doux); font-size: .85rem; }
.btn.danger { background: transparent; border: 1px solid rgba(212, 71, 79, .55); color: #ffb9bd; }
.btn.danger:hover { background: rgba(194, 58, 68, .16); }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; background: transparent; }
.btn.danger[data-confirmer] { background: var(--rouge); color: #fff; }

/* Admin : identifiants */
.generer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.generer .btn { height: 48px; }
.code-cree {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px;
  background: rgba(31, 122, 87, .22); border: 1px solid rgba(76, 203, 147, .45);
}
.generer .code-cree { flex-direction: row; align-items: center; gap: 12px; padding: 8px 14px; }
.code-cree span { color: #a6ecc9; font-size: .85rem; font-weight: 600; }
.code-cree strong { font: 700 1.5rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; user-select: all; }
.ligne-identifiant {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--surface-2); border-radius: 12px;
}
.identifiant-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.identifiant-haut { display: flex; align-items: center; gap: 10px; }
.identifiant-info code { font: 700 1rem ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; user-select: all; }
.identifiant-info > span { color: var(--doux); font-size: .82rem; }
.ligne-identifiant.utilise code { color: var(--doux); }

/* Admin : lieux */
/* Une grille de cartes toutes de la même taille ; la grille garde sa hauteur même vide */
.grille-lieux {
  list-style: none; margin: 0; padding: 0;
  --hauteur-ligne: 160px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--hauteur-ligne); gap: 12px;
  align-content: start;
}
.grille-lieux .vide {
  grid-column: 1 / -1; display: grid; place-items: center;
  border: 1px dashed var(--ligne); border-radius: 14px;
}
.carte-lieu {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0;
  background: var(--surface-2); border: 1px solid var(--ligne); border-radius: 14px; overflow: hidden;
  color: var(--texte); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s;
}
.carte-lieu:hover { border-color: rgba(255, 255, 255, .25); }
.carte-lieu-photo { position: relative; flex: 1; min-height: 0; background: var(--surface-2); }
.carte-lieu-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.carte-lieu strong { flex: none; padding: 10px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--ligne); }
.carte-lieu-badge { position: absolute; top: 8px; left: 8px; background: rgba(18, 81, 58, .92); }

/* Admin : fenêtre d'un lieu (nom + photo) */
#dialog-lieu { width: min(460px, calc(100% - 32px)); }
.lieu-apercu {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); border: 1px dashed var(--ligne);
}
.lieu-apercu img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lieu-apercu:focus { outline: 2px solid var(--doux); outline-offset: 2px; }
.lieu-coller {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  background: rgba(0, 0, 0, .7); font-weight: 600;
}
.lieu-photo-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: -4px; }
.lieu-photo-boutons .aide { color: var(--doux); }

/* Admin : historique */
.evenement {
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: var(--surface-2); border-left: 3px solid var(--surface-3); border-radius: 10px;
  font-size: .9rem; min-width: 0;
}
.evenement.table-supprimee, .evenement.casino-ferme { border-left-color: var(--jaune); }
.evenement.argent { border-left-color: var(--vert-clair); }
.evenement.inscription { border-left-color: var(--rouge); }
.evenement.casino-ouvert, .evenement.table-creee { border-left-color: var(--vert-clair); }
.evenement.compte-supprime, .evenement.admin-retire,
.evenement.casino-ferme, .evenement.lieu-supprime { border-left-color: #e0a64a; }
.evenement-date { color: var(--doux); font-size: .78rem; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .profil span:last-child { display: none; }
  .grille-lieux { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .regles { display: none; } /* écran étroit : la place va au tapis */
  .btn-regles { display: inline-flex; align-items: center; }
  /* Hauteur fixe (prévue pour le cas le plus chargé) : le tapis au-dessus ne bouge jamais */
  .commandes { height: 120px; padding-block: 10px; }
  /* Admin : la navigation passe au-dessus de la page, en une ligne */
  #vue-admin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  #vue-admin > .sous-nav { flex-direction: row; overflow-x: auto; padding: 4px; border-radius: 14px; scrollbar-width: none; }
  .sous-nav-titre { display: none; }
  #vue-admin .sous-lien { flex: 1 0 auto; width: auto; height: 38px; text-align: center; }
  #vue-admin > .panneau { grid-column: 1; grid-row: 2; }
  /* Filtres : la recherche sur toute la largeur, le reste par deux */
  .filtres { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
  .filtres > * { width: 100%; min-width: 0; }
  .filtres input[type="search"] { grid-column: 1 / -1; }
  #filtres-lieux { grid-template-columns: minmax(0, 1fr) auto; }
  #filtres-lieux input[type="search"] { grid-column: auto; }
  #filtres-historique select { order: 1; }
  #filtres-historique [type="reset"] { order: 2; }
  #filtres-historique .filtre-date { order: 3; }
  .filtre-date input { width: 100%; min-width: 0; padding: 0 10px; }
}
@media (max-width: 760px) {
  /* Les deux cases passent l'une sous l'autre, chacune avec une hauteur fixe */
  .accueil { grid-template-columns: 1fr; height: auto; }
  .carte { height: 460px; }
}
@media (max-width: 680px) {
  /* Barre du haut : des icônes à la place du texte */
  .icone { display: block; }
  .nav-lien > span, #btn-deconnexion > span { display: none; }
  .nav-lien, #btn-deconnexion { width: 40px; padding: 0; }
  .nav { margin-right: 0; }
  .compte { gap: 6px; }
  .solde { padding: 0 10px; }
  .logo > span:last-child { display: none; }

  /* Connexion : les cartes au-dessus du titre, sans le chevaucher */
  .auth { grid-template-columns: 1fr; margin-top: 0; border-radius: 20px; }
  .auth-visuel { min-height: 0; padding: 150px 24px 24px; }
  .auth-visuel h1 { font-size: 1.9rem; }
  .auth-cartes { top: 22px; left: 26px; }
  .mini-carte { width: 76px; height: 106px; padding: 10px 12px; font-size: 1.25rem; }
  .mini-carte i { font-size: 1.35rem; }
  .mini-carte.c2 { left: 56px; }
  .auth-form { padding: 24px; }

  /* Mon compte */
  .panneaux { grid-template-columns: 1fr; }
  .profil-bandeau { padding: 22px; gap: 16px; border-radius: 20px; }
  .avatar.geant { width: 60px; height: 60px; font-size: 1.2rem; }
  .panneau { padding: 18px; }
  .panneau-titre { margin-bottom: 14px; }

  /* Table : titre et bouton du croupier sur une ligne, les chiffres en dessous */
  body.en-table main { padding: 10px 12px; }
  #vue-table { gap: 8px; height: calc(100dvh - var(--hauteur-barre) - 20px); }
  .table-barre { gap: 8px; }
  .table-titre { flex: 1 1 0; min-width: 0; line-height: 1.25; }
  .table-titre strong { font-size: 1rem; }
  .table-titre span { font-size: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .actions-croupier .btn { height: 34px; padding: 0 12px; font-size: .82rem; }
  .btn-regles { width: 34px; padding: 0; justify-content: center; font-size: 1rem; }
  .btn-regles span { display: none; }
  .table-stats { order: 3; width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
  .table-stats div { min-width: 0; padding: 4px 8px; border-radius: 10px; }
  .table-stats dt { font-size: .66rem; }
  .table-stats dd { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; }
  .commandes { height: 116px; padding: 10px; gap: 6px; border-radius: 14px; }
  /* Mises : le choix du pari et « Effacer » sur la 1re ligne, les jetons et « Quitter » sur la 2e */
  .commandes > .commandes-titre, .commandes > .choix-pari { order: 0; }
  .commandes-titre { margin-right: 0; }
  .commandes > .btn-effacer { order: 1; }
  .commandes > .jeton-bouton { order: 2; }
  .commandes > .btn-quitter { order: 3; }
  .texte-long { display: none; }
  .texte-court { display: inline; }
  .jeton-bouton { width: 44px; height: 44px; }
  .commandes .btn { height: 36px; padding: 0 10px; font-size: .85rem; }
  .choix-pari .choix { height: 32px; padding: 0 10px; }

  #vue-admin .sous-lien { padding: 0 8px; font-size: .78rem; }
  #vue-admin .explication { margin: -6px 0 12px; font-size: .8rem; }
  .filtres input, .filtres select, .filtres .btn { height: 42px; }
  .generer { gap: 10px; margin-bottom: 14px; }
  .generer .code-cree strong { font-size: 1.2rem; }
  .grille-lieux { grid-template-columns: repeat(2, minmax(0, 1fr)); --hauteur-ligne: 150px; }
  .revenus-totaux { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: -4px 0 12px; }
  .revenus-totaux div { padding: 8px 12px; }
  .revenus-totaux dd { font-size: 1rem; }

  /* Fenêtres */
  .fiche { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 18px; border-radius: 18px; }
  .fiche > * + * { margin-top: 14px; }
  .fiche-infos { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fiche-infos div { padding: 8px 10px; min-width: 0; }
  .fiche-infos dd { overflow-wrap: anywhere; font-size: .9rem; }
  .fiche-argent { flex-wrap: wrap; }
  .fiche-argent label { flex-basis: 100%; }
  .fiche-argent .btn { flex: 1; }
  .fiche-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding-top: 14px; }
  .fiche-actions .aide, .fiche-actions .btn.danger { grid-column: 1 / -1; }
  .fiche-actions .btn { height: auto; min-height: 40px; padding: 8px 10px; white-space: normal; line-height: 1.2; }
  .lieu-photo-boutons .btn { flex: 1; padding: 0 12px; }
  .lieu-photo-boutons .aide { flex-basis: 100%; }
}

/* Téléphone (ou écran peu haut) : les listes du panel admin gardent un minimum de lignes, la page défile */
@media (max-width: 680px), (max-height: 560px) {
  #vue-admin { height: auto; min-height: calc(100dvh - var(--hauteur-barre) - 28px); }
  #vue-admin .lignes { --lignes-min: 6; }
  #vue-admin > .panneau > .lignes {
    flex: 1 0 auto; min-height: calc(var(--hauteur-ligne) * var(--lignes-min) + (var(--lignes-min) - 1) * 8px);
  }
  #vue-admin > .panneau > .grille-lieux { flex: 1 0 auto; min-height: calc(var(--hauteur-ligne) * 3 + 2 * 12px); }
}

/* Écran peu haut (téléphone à l'horizontale) */
@media (max-height: 559px) {
  .accueil { height: auto; }
  .carte { height: 420px; }
  /* Table : la barre du haut est cachée pour laisser la place au jeu (le solde passe dans la barre de la table) */
  body.en-table { --hauteur-barre: 0px; }
  body.en-table .barre { display: none; }
  body.en-table main { padding-block: 8px; }
  #vue-table { gap: 8px; height: calc(100dvh - 16px); }
  .table-solde { display: flex; height: 36px; }
  .table-titre { min-width: 0; }
  .table-titre span { display: none; }
  .table-stats div { min-width: 0; padding: 3px 10px; }
  .commandes { height: 64px; padding-block: 6px; }
  .commandes .btn { height: 36px; padding: 0 10px; font-size: .85rem; }
  .jeton-bouton { width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  :root { --hauteur-barre: 61px; }
  .barre-in { padding: 10px 12px; }
  body.connecte .logo { display: none; } /* la place va aux boutons et au solde */
  .compte { width: 100%; justify-content: flex-end; }
  .solde { order: -1; margin-right: auto; }
  main { padding: 16px 12px 48px; }
  .ligne { grid-template-columns: 1fr; }
  .profil { padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 360px) {
  .commandes { gap: 5px; }
  .jeton-bouton { width: 40px; height: 40px; }
  .choix-pari .choix { padding: 0 8px; }
}
