:root {
  --tapis: #1d4d3b;
  --tapis-fonce: #143a2c;
  --papier: #f6f1e4;
  --encre: #1c1c1c;
  --rouge: #b3261e;
  --laiton: #c9a24a;
  --discret: #6b6558;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--tapis-fonce);
  color: var(--papier);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  margin: 0 0 1rem;
  font-family: Georgia, "Iowan Old Style", serif;
  font-weight: 600;
  font-size: 1.6rem;
}

/* Commandes */
.commandes {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1.25rem;
}
.commandes label { display: grid; gap: .25rem; font-size: .9rem; }
.commandes input {
  width: 7rem;
  padding: .5rem .6rem;
  border: 1px solid var(--laiton);
  border-radius: 4px;
  background: var(--papier);
  color: var(--encre);
  font-size: 1rem;
}
.commandes button {
  padding: .55rem .9rem;
  border: 1px solid var(--laiton);
  border-radius: 4px;
  background: transparent;
  color: var(--papier);
  font-size: 1rem;
  cursor: pointer;
}
.commandes button:hover { background: rgba(201, 162, 74, .18); }
input:focus-visible, button:focus-visible {
  outline: 3px solid var(--laiton);
  outline-offset: 2px;
}

/* Table : Nord en haut, Ouest à gauche, Est à droite, Sud en bas */
.table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    ".  n  ."
    "o  c  e"
    ".  s  .";
  gap: 1rem;
  padding: 1.25rem;
  border: 2px solid var(--laiton);
  border-radius: 10px;
  background: var(--tapis);
}
.main-N { grid-area: n; }
.main-E { grid-area: e; }
.main-S { grid-area: s; }
.main-O { grid-area: o; }
.centre { grid-area: c; }

/* Une main : la place est en rouge si elle est vulnérable */
.main {
  padding: .75rem .9rem;
  border-radius: 6px;
  background: var(--papier);
  color: var(--encre);
}
.main h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 .5rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--encre);
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.05rem;
}
.main.vulnerable h2 { border-bottom-color: var(--rouge); color: var(--rouge); }
.main .donneur { font-size: .8rem; font-weight: normal; color: var(--discret); }

.couleurs { margin: 0; padding: 0; list-style: none; }
.couleurs li {
  display: flex;
  gap: .5rem;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.15rem;
  line-height: 1.6;
}
.couleurs .sy { width: 1.2em; text-align: center; }
.couleurs .rouge { color: var(--rouge); }
.couleurs .cartes { letter-spacing: .06em; }

.stats { margin: .5rem 0 0; font-size: .85rem; color: var(--discret); }

/* Centre de la table */
.centre {
  display: grid;
  align-content: center;
  gap: .35rem;
  text-align: center;
  font-size: .95rem;
}
.centre .numero {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.5rem;
}
.controle { margin-top: 1rem; font-size: .9rem; }
.controle.ok { color: #b9e0c5; }
.controle.ko { color: #ffb4ab; }

/* Format compact pour la base de données */
.chaine {
  margin-top: 1rem;
  font-size: .85rem;
  color: #d8d2c0;
}
.chaine code { word-break: break-all; }

@media (max-width: 720px) {
  .table {
    grid-template-columns: 1fr;
    grid-template-areas: "c" "n" "e" "s" "o";
  }
}

/* Enchères */
.encheres {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 2px solid var(--laiton);
  border-radius: 10px;
  background: var(--tapis);
}
.encheres h2 {
  margin: 0 0 .25rem;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.25rem;
}
.encheres .aide { margin: 0 0 1rem; font-size: .9rem; color: #d8d2c0; }

.zone-encheres {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

/* Historique des enchères */
.historique {
  width: 100%;
  border-collapse: collapse;
  background: var(--papier);
  color: var(--encre);
  border-radius: 6px;
  overflow: hidden;
  font-family: Georgia, "Iowan Old Style", serif;
}
.historique th, .historique td {
  padding: .4rem .5rem;
  text-align: center;
  font-size: 1rem;
}
.historique th {
  border-bottom: 2px solid var(--encre);
  font-size: .95rem;
}
.historique th.vulnerable { color: var(--rouge); border-bottom-color: var(--rouge); }
.historique td.rouge { color: var(--rouge); }
.historique td.attente { color: var(--discret); }

/* Boîte d'enchères */
.boite {
  padding: .75rem;
  border-radius: 6px;
  background: var(--papier);
  color: var(--encre);
}
.boite .tour { margin: 0 0 .6rem; font-weight: 600; }
.niveaux {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .3rem;
}
.speciales {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .3rem;
  margin-top: .6rem;
}
.boite button {
  padding: .45rem .2rem;
  border: 1px solid var(--encre);
  border-radius: 4px;
  background: #fff;
  color: var(--encre);
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1rem;
  cursor: pointer;
}
.boite button.rouge { color: var(--rouge); }
.boite button:hover:not(:disabled) { background: #efe7d0; }
.boite button:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.encheres .commandes button:disabled { opacity: .4; cursor: not-allowed; }

.resultat {
  min-height: 1.5em;
  margin: 1rem 0 .5rem;
  font-weight: 600;
  color: #f1e3b5;
}

@media (max-width: 720px) {
  .zone-encheres { grid-template-columns: 1fr; }
}

/* Jeu de la carte */
[hidden] { display: none !important; }

.jeu {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 2px solid var(--laiton);
  border-radius: 10px;
  background: var(--tapis);
}
.jeu h2 {
  margin: 0 0 .25rem;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.25rem;
}
.jeu .aide { margin: 0 0 1rem; font-size: .95rem; color: #f1e3b5; }
.jeu .commandes button:disabled { opacity: .4; cursor: not-allowed; }

/* La place qui doit jouer est entourée */
.main.actif { box-shadow: 0 0 0 3px var(--laiton); }
.main .role { font-size: .8rem; font-weight: normal; color: var(--discret); }

#table-jeu .couleurs .cartes {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  letter-spacing: 0;
  align-items: center;
}
.couleurs .sy.rouge { color: var(--rouge); }
.carte {
  min-width: 2rem;
  padding: .1rem .3rem;
  border: 1px solid var(--encre);
  border-radius: 4px;
  background: #fff;
  color: var(--encre);
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.05rem;
  cursor: pointer;
}
.carte.rouge { color: var(--rouge); }
.carte:hover:not(:disabled) { background: #efe7d0; }
.carte:disabled { opacity: .3; cursor: default; }
.carte:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }

/* Le pli au centre de la table */
.pli {
  display: grid;
  grid-template-columns: repeat(3, 2.8rem);
  grid-template-rows: repeat(3, 2.2rem);
  grid-template-areas:
    ".  n  ."
    "o  .  e"
    ".  s  .";
  gap: .25rem;
  justify-content: center;
  margin: 0 auto .5rem;
}
.pli .slot {
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--papier);
  color: var(--encre);
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.05rem;
}
.pli .slot.rouge { color: var(--rouge); }
.pli .slot.vide { background: rgba(0, 0, 0, .22); }
.pli .slot.gagnant { outline: 3px solid var(--laiton); }
.slot-N { grid-area: n; }
.slot-E { grid-area: e; }
.slot-S { grid-area: s; }
.slot-O { grid-area: o; }

/* Pendant que le pli terminé reste sur la table, les mains sont atténuées */
.carte.attente { opacity: .3; cursor: default; }
.carte.attente:hover { background: #fff; }

/* Marque */
.marque {
  max-width: 28rem;
  margin: 0 0 1rem;
  padding: .9rem 1rem;
  border-radius: 6px;
  background: var(--papier);
  color: var(--encre);
}
.marque h3 {
  margin: 0 0 .25rem;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.1rem;
}
.marque .vuln { margin: 0 0 .6rem; font-size: .9rem; color: var(--discret); }
.detail-marque { width: 100%; border-collapse: collapse; }
.detail-marque td { padding: .3rem 0; border-bottom: 1px solid rgba(0, 0, 0, .12); }
.detail-marque .pts { text-align: right; font-variant-numeric: tabular-nums; }
.detail-marque .total td {
  padding-top: .5rem;
  border-bottom: 0;
  border-top: 2px solid var(--encre);
  font-weight: 700;
  font-size: 1.05rem;
}


/* Mode solo */
.commandes .solo { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.commandes .solo input { width: auto; }
.main.cachee { display: grid; align-content: start; background: rgba(246, 241, 228, .14); color: var(--papier); }
.main.cachee h2 { border-bottom-color: var(--laiton); color: var(--papier); }
.main.cachee .stats { color: #d8d2c0; }
body.solo-actif .chaine, body.solo-actif .controle { display: none; }

.explications { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .3rem; font-size: .92rem; }
.explications li { padding: .35rem .6rem; border-left: 3px solid var(--laiton); background: rgba(0, 0, 0, .18); }
.explications:empty { display: none; }


/* Sablier pendant que les robots réfléchissent */
.sablier {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-top: .9rem;
  font-weight: 600;
  color: #f1e3b5;
}
.sablier .grain {
  display: inline-block;
  font-size: 1.4rem;
  animation: retourne 1.4s ease-in-out infinite;
}
@keyframes retourne {
  0%, 40% { transform: rotate(0deg); }
  70%, 100% { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sablier .grain { animation: none; }
}
.historique th.vous { background: rgba(201, 162, 74, .25); }
.boite .tour { min-height: 1.4em; }

.erreur-robot {
  margin: .75rem 0 0;
  padding: .5rem .75rem;
  border-left: 3px solid #ffb4ab;
  background: rgba(179, 38, 30, .25);
  color: #ffdad6;
  font-size: .92rem;
}

/* Compte joueur et classement */
.compte { margin-bottom: 1rem; }
.compte .connecte { margin: 0; }
.compte .connecte button { margin-left: .5rem; padding: .3rem .7rem; border: 1px solid var(--laiton); border-radius: 4px; background: transparent; color: var(--papier); cursor: pointer; }
.compte .aide { margin: .25rem 0 0; color: #ffb4ab; min-height: 1.2em; }
.detail-marque thead th { text-align: left; padding-bottom: .3rem; border-bottom: 2px solid var(--encre); }
.detail-marque thead th.pts { text-align: right; }
.detail-marque td { padding-right: .6rem; }

/* Mode analyse : les quatre jeux sont visibles */
.centre .analyse { margin-top: .3rem; font-weight: bold; color: #f0c36b; }

/* Plateau : les jeux à gauche, les enchères à droite, toujours visibles (colonne collante) */
.page { max-width: 1400px; }
.plateau {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
}
.plateau .encheres {
  position: sticky;
  top: .75rem;
  max-height: calc(100vh - 1.5rem);
  overflow-y: auto;
  margin-top: 0;
  padding: 1rem;
  border: 2px solid var(--laiton);
  border-radius: 10px;
  background: var(--tapis);
}
/* Dans la colonne, l'historique et la boîte d'enchères l'un sous l'autre */
.plateau .zone-encheres { grid-template-columns: 1fr; gap: .8rem; }
.plateau .encheres .aide { margin-bottom: .6rem; }
.jeu { max-width: 960px; margin-left: auto; margin-right: auto; }
#revele { max-width: 960px; }

/* Écran étroit (tablette en portrait, téléphone) : les enchères repassent sous les jeux */
@media (max-width: 1050px) {
  .plateau { grid-template-columns: 1fr; }
  .plateau .encheres { position: static; max-height: none; overflow: visible; }
  .plateau .zone-encheres { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .plateau .zone-encheres { grid-template-columns: 1fr; }
}

/* Boîte d'enchères plus compacte dans la colonne de droite */
.plateau { grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr); }
.plateau .boite { padding: .5rem; }
.plateau .boite .tour { margin-bottom: .4rem; font-size: .95rem; }
.plateau .niveaux, .plateau .speciales { gap: .2rem; }
.plateau .speciales { margin-top: .4rem; }
.plateau .boite button { padding: .2rem .1rem; font-size: .85rem; line-height: 1.2; }
.plateau .historique th, .plateau .historique td { padding: .25rem .4rem; font-size: .9rem; }

/* Jeux plus compacts : les quatre mains tiennent sur un portable à 150 % */
.page { padding-top: .8rem; }
h1 { margin-bottom: .5rem; font-size: 1.35rem; }
.commandes { margin-bottom: .6rem; gap: .5rem; }
.commandes button { padding: .35rem .7rem; font-size: .9rem; }
.commandes input { padding: .3rem .5rem; font-size: .9rem; }
.table { gap: .5rem; padding: .7rem; }
.main { padding: .4rem .6rem; }
.main h2 { margin-bottom: .25rem; padding-bottom: .15rem; font-size: .95rem; }
.couleurs li { font-size: 1rem; line-height: 1.35; }
.stats { margin-top: .2rem; font-size: .78rem; }
.centre { gap: .15rem; font-size: .85rem; }
.jeu { margin-top: .8rem; padding: .8rem; }
/* Ouest et Est sur toute la hauteur, à côté de Nord, du centre et de Sud : la table prend moins de hauteur */
@media (min-width: 721px) {
  .table {
    grid-template-areas:
      "o n e"
      "o c e"
      "o s e";
  }
  .table .main-O, .table .main-E { align-self: center; }
}
.commandes .solo { font-size: .82rem; }
/* Aide des enchères repliée par défaut */
.aide-repliable { margin: 0 0 .5rem; font-size: .85rem; }
.aide-repliable summary { cursor: pointer; color: #d8d2c0; }
.aide-repliable summary:hover { color: var(--papier); }
.aide-repliable .aide { margin: .3rem 0 0; }
/* Titre « Enchères » à gauche, « Aide sur les enchères » à droite sur la même ligne */
.entete-encheres { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: .5rem; }
.entete-encheres h2 { margin: 0; }
.entete-encheres .aide-repliable { margin: 0 0 0 auto; }
/* une fois ouverte, l'aide s'affiche dans une bulle sous le titre, sans décaler la boîte */
.entete-encheres { position: relative; }
.entete-encheres .aide-repliable[open] .aide {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
  margin: .3rem 0 0; padding: .6rem .8rem;
  border: 1px solid var(--laiton); border-radius: 6px;
  background: var(--papier); color: var(--encre);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

/* ---------- Menu commun aux pages ---------- */
.menu { display: flex; gap: .25rem; margin: 0 0 .8rem; border-bottom: 1px solid rgba(201, 162, 74, .45); }
.menu a {
  padding: .35rem .8rem; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0;
  color: var(--papier); text-decoration: none; font-size: .95rem;
}
.menu a:hover { background: rgba(201, 162, 74, .15); }
.menu a[aria-current="page"] { border-color: rgba(201, 162, 74, .45); background: var(--tapis); color: var(--laiton); font-weight: 600; }
.message-tournoi { margin: 0 0 .8rem; padding: .5rem .8rem; border-radius: 6px; background: #5c1d18; color: #ffd9d4; }

/* ---------- Accueil ---------- */
.accueil { max-width: 960px; }
.accueil .intro { margin: 0 0 1rem; color: #d8d2c0; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.tuile {
  display: grid; gap: .4rem; height: 100%; padding: 1rem 1.1rem;
  border: 2px solid var(--laiton); border-radius: 10px; background: var(--tapis);
  color: var(--papier); text-decoration: none; transition: transform .1s, background .1s;
}
.tuile:hover, .tuile:focus-visible { background: #24604a; transform: translateY(-2px); }
.tuile-titre { font-family: Georgia, "Iowan Old Style", serif; font-size: 1.2rem; color: var(--laiton); }
.tuile-texte { font-size: .9rem; color: #e4dfd0; }
.tuile-info { font-size: .85rem; font-weight: 600; }

/* ---------- Tournois ---------- */
.tournois { max-width: 960px; }
.bloc { margin: 0 0 1.25rem; padding: 1rem; border: 2px solid var(--laiton); border-radius: 10px; background: var(--tapis); }
.bloc h2 { margin: 0 0 .6rem; font-family: Georgia, "Iowan Old Style", serif; font-size: 1.2rem; }
.entete-bloc { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; }
.filtre { font-size: .9rem; }
.filtre select { margin-left: .4rem; padding: .25rem .4rem; border: 1px solid var(--laiton); border-radius: 4px; background: var(--papier); color: var(--encre); }
.liste-tournois { width: 100%; border-collapse: collapse; background: var(--papier); color: var(--encre); border-radius: 6px; overflow: hidden; }
.liste-tournois th, .liste-tournois td { padding: .4rem .6rem; text-align: left; border-bottom: 1px solid #ddd5c0; }
.liste-tournois th { background: #e9e0c8; font-size: .85rem; }
.liste-tournois .pts { text-align: right; }
.bouton { display: inline-block; padding: .25rem .7rem; border: 1px solid var(--tapis); border-radius: 4px; color: var(--tapis); font-weight: 600; text-decoration: none; }
.bouton:hover { background: var(--tapis); color: var(--papier); }
.bloc .aide code { color: var(--laiton); }
.rapport-import { margin: .5rem 0 0; padding-left: 1.2rem; }
.rapport-import li.ok { color: #b9f0c2; }
.rapport-import li.ko { color: #ffb4ab; }
.commandes .fichier input { width: auto; max-width: 100%; padding: .3rem; font-size: .9rem; }
.commandes button:disabled { opacity: .4; cursor: default; }
/* Face au simultané FFB (page de jeu) */
.simultane h3 { margin: 0 0 .5rem; font-family: Georgia, "Iowan Old Style", serif; }
.simultane p { margin: .3rem 0; }
.simultane strong { color: var(--laiton); }
.simultane .detail-marque { margin: .5rem 0; }
.moyenne-simultane { font-size: 1.05rem; }
/* Rappel du mode de jeu (page de jeu) */
.mode-jeu { flex-basis: 100%; margin: 0; font-size: .85rem; color: #d8d2c0; }
.mode-jeu a { color: var(--laiton); }

/* Petits écrans (tablette, téléphone) : jeux puis enchères l'un sous l'autre, historique au-dessus de la boîte.
   Placé en fin de fichier pour l'emporter sur la mise en page en deux colonnes ci-dessus. */
@media (max-width: 1050px) {
  .plateau { grid-template-columns: 1fr; }
  .plateau .encheres { position: static; max-height: none; overflow: visible; }
  .plateau .zone-encheres { grid-template-columns: 1fr; }
  .plateau .boite button { padding: .45rem .1rem; font-size: .95rem; }   /* boutons plus faciles à toucher */
}
@media (max-width: 720px) {
  .plateau .boite button { padding: .5rem 0; }
  .commandes .solo { flex-basis: 100%; }
}
/* Tournoi du jour (accueil) et classement du tournoi (page de jeu) */
.tuile-jour { border-color: #e7c873; background: #24604a; }
.detail-marque tr.moi td { font-weight: 700; }

/* ---------- Vraies cartes au jeu de la carte (28/11/2026) ---------- */
/* Le mode analyse (et le mode solo) passent à la ligne, sous les boutons */
.commandes .solo { flex-basis: 100%; }

/* Éventail : chaque carte recouvre la précédente ; on ne voit que le coin, sauf la dernière.
   Les emplacements (.pos) rétrécissent si la place manque, la carte, elle, garde sa taille. */
.eventail { display: flex; align-items: flex-end; min-height: 4.6rem; padding-top: .45rem; }
.eventail .pos { position: relative; flex: 0 1 1.65rem; min-width: .85rem; height: 4.1rem; }
.eventail .pos:last-child { flex: 0 0 2.9rem; }
#table-jeu .carte, .pli .carte {
  position: absolute; left: 0; top: 0;
  width: 2.9rem; height: 4.1rem; min-width: 0; padding: 0;
  border: 1px solid #9a9384; border-radius: 5px;
  background: #fff; color: var(--encre);
  box-shadow: -1px 1px 3px rgba(0, 0, 0, .35);
  font-family: Georgia, "Iowan Old Style", serif;
  text-align: left; overflow: hidden;
  transition: transform .1s;
}
#table-jeu .carte.rouge, .pli .slot.rouge .carte { color: var(--rouge); }
.carte .coin { position: absolute; left: .18rem; top: .1rem; display: flex; flex-direction: column; align-items: center; font-size: .95rem; line-height: 1; }
.carte .coin b { font-weight: 700; letter-spacing: -.06em; }
.carte .motif { position: absolute; right: .15rem; bottom: .05rem; font-size: 1.7rem; line-height: 1; }
/* cartes jouables : on les soulève au survol ; les autres sont grisées sans transparence (on ne voit pas à travers) */
#table-jeu .carte:not(:disabled):not(.attente) { cursor: pointer; }
#table-jeu .carte:hover:not(:disabled):not(.attente) { background: #fff; transform: translateY(-.45rem); }
#table-jeu .carte:disabled, #table-jeu .carte.attente { opacity: 1; filter: brightness(.72) saturate(.6); cursor: default; }
#table-jeu .carte:focus-visible { outline: 3px solid var(--laiton); outline-offset: 1px; z-index: 1; }
/* dos des cartes des robots */
.carte-dos {
  position: absolute; left: 0; top: 0; width: 2.9rem; height: 4.1rem;
  border: 1px solid #fff; border-radius: 5px; box-shadow: -1px 1px 3px rgba(0, 0, 0, .35);
  background: repeating-linear-gradient(45deg, #7d1f2c 0 4px, #962a38 4px 8px);
  outline: 2px solid #7d1f2c; outline-offset: -4px;
}
.main.cachee .eventail { opacity: .9; }

/* Le pli : vraies cartes en croix */
.pli { grid-template-columns: repeat(3, 3.1rem); grid-template-rows: 3.1rem 3rem 3.1rem; gap: 0 .2rem; margin-bottom: .9rem; }
.pli .slot { position: relative; display: block; width: 2.9rem; height: 4.1rem; margin: auto; background: none; }
.pli .slot-N { align-self: start; margin-top: -.5rem; }
.pli .slot-S { align-self: end; margin-bottom: -.5rem; z-index: 1; }
.pli .slot-O, .pli .slot-E { align-self: center; }
.pli .slot.vide { border: 1px dashed rgba(246, 241, 228, .25); border-radius: 5px; background: rgba(0, 0, 0, .15); }
.pli .slot.gagnant { outline: none; }
.pli .slot.gagnant .carte { box-shadow: 0 0 0 3px var(--laiton), -1px 1px 3px rgba(0, 0, 0, .35); }
.centre { padding-top: .5rem; }
/* cartes rouges dans le pli (la règle #table-jeu .carte, plus forte, les remettait en noir) */
#table-jeu .pli .slot.rouge .carte { color: var(--rouge); }

/* ---------- Mort étalé et cartes plus lisibles (28/11/2026) ---------- */
/* Cartes un peu plus grandes, index plus gros et plus gras */
.eventail { min-height: 4.95rem; }
.eventail .pos { flex-basis: 1.95rem; min-width: 1rem; height: 4.5rem; }
.eventail .pos:last-child { flex-basis: 3.2rem; }
#table-jeu .carte, .pli .carte, .pli .slot, .carte-dos { width: 3.2rem; height: 4.5rem; }
.carte .coin { left: .2rem; top: .12rem; font-size: 1.12rem; font-weight: 700; }
.carte .coin b { font-family: Arial, "Helvetica Neue", sans-serif; font-size: 1.05em; }
.carte .motif { font-size: 1.9rem; }
#table-jeu .carte { border-color: #6f685a; }
#table-jeu .carte:disabled, #table-jeu .carte.attente { filter: brightness(.8) saturate(.7); }
.pli { grid-template-columns: repeat(3, 3.4rem); grid-template-rows: 3.3rem 3.2rem 3.3rem; }

/* Le mort : quatre colonnes, les cartes d'une couleur se recouvrent vers le bas */
.etale { display: flex; gap: .35rem; padding-top: .2rem; }
.etale .colonne { display: flex; flex-direction: column; width: 3.2rem; }
.etale .colonne .pos { position: relative; height: 1.55rem; flex: none; }
.etale .colonne .pos:last-child { height: 4.5rem; }
.etale .colonne.vide { height: 4.5rem; border: 1px dashed rgba(29, 77, 59, .35); border-radius: 5px; }
.etale .carte .motif { display: none; }
.etale .colonne .pos:last-child .carte .motif { display: block; }
.etale .carte .coin { flex-direction: row; gap: .1rem; align-items: baseline; }
#table-jeu .etale .carte:hover:not(:disabled):not(.attente) { transform: translateX(.3rem); }
.carte .coin b.dix { letter-spacing: -.14em; font-size: .92em; margin-left: -.08em; }

/* Jeu de la carte : titre et informations sur la même ligne, en deux lignes au plus */
.entete-jeu { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .9rem; margin-bottom: .5rem; }
.entete-jeu h2 { margin: 0; }
.entete-jeu .aide { margin: 0; font-size: .9rem; }
.centre { gap: .05rem; line-height: 1.3; }
/* au milieu : invitation à ramasser le pli, bien visible */
.legende-pli { min-height: 1.3em; white-space: nowrap; }
.legende-pli .ramasser { color: var(--laiton); font-weight: 700; }
/* carte forcée : elle se soulève avant de partir toute seule */
#table-jeu .carte.forcee { transform: translateY(-.45rem); box-shadow: 0 0 0 2px var(--laiton), -1px 1px 3px rgba(0, 0, 0, .35); }
#table-jeu .etale .carte.forcee { transform: translateX(.3rem); }

/* ---------- Compte à droite du menu ---------- */
.menu-compte { display: flex; align-items: center; gap: .5rem; margin-left: auto; white-space: nowrap; }
.menu-compte a { color: var(--laiton); font-weight: 600; border-color: rgba(201, 162, 74, .45); }
.menu-compte .deconnexion-menu { margin-bottom: .2rem; }
.menu-compte .pseudo-menu { color: var(--laiton); font-weight: 600; font-size: .95rem; }
.menu-compte .pseudo-menu::before { content: "\263A  "; }
.menu-compte button { padding: .15rem .55rem; border: 1px solid rgba(201, 162, 74, .6); border-radius: 4px; background: none; color: var(--papier); font-size: .82rem; cursor: pointer; }
.menu-compte button:hover { background: rgba(201, 162, 74, .18); }

/* Page de connexion */
.page-connexion { max-width: 960px; }
.page-connexion .compte { max-width: 22rem; padding: 1.1rem; border: 2px solid var(--laiton); border-radius: 10px; background: var(--tapis); }
.page-connexion #form-compte { display: grid; gap: .6rem; margin: 0; }
.page-connexion #form-compte label { display: grid; gap: .25rem; }
.page-connexion #form-compte input { width: 100%; box-sizing: border-box; }
.page-connexion .connecte { display: grid; gap: .6rem; margin: 0; }
.page-connexion #compte-message { margin: .6rem 0 0; }
.page-connexion #compte-message:empty { display: none; }

/* Deux petites tuiles l'une sous l'autre, dans la même case */
.tuiles-doubles { display: grid; gap: .6rem; }
.tuile.petite { gap: .15rem; padding: .55rem .9rem; }
.tuile.petite .tuile-titre { font-size: 1.05rem; }
.tuile.petite .tuile-texte { font-size: .82rem; }
