/**------- Kit « bande dessinée » commun aux trois couleurs : cases cernées d'encre noire, aplats vifs, récitatifs jaunes, bulles, grosses lettres rouges, trame de points. Aucune couleur de monde ici : chaque thème fournit ses jetons -------*/

/**------- Trame de points d'imprimerie, plus dense vers le bas de la page -------*/
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, var(--trame) 1.3px, transparent 1.8px) 0 0 / 11px 11px;
  -webkit-mask: linear-gradient(to top, #000 0%, transparent 62%);
  mask: linear-gradient(to top, #000 0%, transparent 62%);
}

/**------- Lettrage -------*/
.titre, .barre__nom, .jeu__nom, .choix__nom, .logo__ra, .logo__games, .table__jeu, .feuille__tete h2,
.profil__nom, .partie__nom, .bascule__nom, .etiquette, .groupe__titre, .bouton, .segment, .touche,
.cam__nom, .siege__libre, .table__partage {
  font-family: var(--police-titre);
  font-weight: 400;
  letter-spacing: 0.015em;
}

/**------- Grosses lettres pleines, cernées d'encre, avec une ombre dure décalée -------*/
.titre, .barre__nom, .jeu__nom, .logo__ra, .logo__games, .table__jeu, .feuille__tete h2, .profil__nom {
  color: var(--lettres, #FFFFFF);
  -webkit-text-stroke: var(--trait-lettres, 5px) var(--encre);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--encre);
}

.titre { --lettres: var(--rouge); font-size: 31px; line-height: 1.12; transform: rotate(-1.5deg); transform-origin: left center; }
.barre__nom { --trait-lettres: 4px; font-size: 19px; text-shadow: 2px 2px 0 var(--encre); }
.barre__sous, .sous-titre, .note, .vocal, .attente { font-weight: 700; }
.sous-titre { color: var(--texte); }

/**------- Récitatifs : les étiquettes sont des cartouches jaunes, comme en haut d'une case -------*/
.etiquette, .groupe__titre {
  align-self: flex-start;
  padding: 3px 11px 4px;
  border: 2.5px solid var(--encre);
  background: var(--recit);
  box-shadow: 3px 3px 0 var(--encre);
  color: var(--encre);
  font-size: 15px;
  transform: rotate(-1deg);
}

/**------- Cases : tout ce qui porte une information ou un réglage -------*/
.partie, .segment, .bascule, .code-partie, .note--encadre, .champ, .touche, .code__cadenas, .rond, .commande {
  --doux: var(--papier-doux);
  border: 3px solid var(--encre);
  border-radius: 10px;
  background: var(--papier);
  box-shadow: 4px 4px 0 var(--encre);
  color: var(--encre);
}

.rond, .commande, .code__cadenas { border-radius: 50%; box-shadow: 3px 3px 0 var(--encre); }
.code__cadenas { background: var(--recit); }
.note--encadre { border-radius: 18px; color: var(--encre); }
.touche { font-size: 25px; }

.champ--libre { border-color: var(--encre); background: var(--papier); }
.champ--libre .champ__etat { color: var(--ok); }
.champ--pris, .champ--manquant { border-color: var(--rouge); box-shadow: 4px 4px 0 var(--rouge); }
.champ__message { font-weight: 700; }

.segment { font-size: 18px; }
.segment small { font-family: var(--police-corps); font-weight: 700; }

.segment.est-choisi, .bascule.est-active {
  --doux: var(--encre);
  border-color: var(--encre);
  background: var(--recit);
  color: var(--encre);
}

.commande.est-coupe { border-color: var(--encre); background: var(--rouge); color: #FFFFFF; }

.ou { color: var(--texte); font-weight: 700; }
.ou::before, .ou::after { height: 0; border-top: 3px dashed var(--encre); background: none; }

/**------- Boutons : aplat, trait noir, tranche noire dessous -------*/
.bouton {
  min-height: 58px;
  margin-bottom: 6px;
  border: 3px solid var(--encre);
  border-radius: 14px;
  background: var(--btn);
  box-shadow: 0 6px 0 var(--encre);
  color: #FFFFFF;
  font-size: 21px;
  letter-spacing: 0.03em;
  text-shadow: 2px 2px 0 var(--encre);
}

.bouton--second {
  border: 3px solid var(--encre);
  background: var(--btn2);
  color: var(--encre);
  text-shadow: none;
}

.bouton--petit { min-height: 46px; font-size: 15.5px; box-shadow: 0 4px 0 var(--encre); }

/**------- Compte : la mascotte, le titre du jeu, une bulle -------*/
.accueil { padding-bottom: 6px; }

.mascotte {
  position: relative;
  flex: 1 1 0;
  align-self: stretch;
  min-height: 120px;
}

.mascotte img {
  position: absolute;
  left: 50%;
  bottom: -14px;
  height: calc(100% + 4px);
  max-height: 310px;
  width: auto;
  transform: translateX(-50%);
  filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, 0.22));
}

.logo {
  position: relative;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  line-height: 1;
  transform: rotate(-3deg);
}

/**------- Deux mots de même taille, un rouge, un jaune : le nom se lit d'un bloc -------*/
.logo__ra { --lettres: var(--rouge); --trait-lettres: 7px; font-size: 52px; text-shadow: 4px 4px 0 var(--encre); }
.logo__games { --lettres: var(--recit); --trait-lettres: 7px; font-size: 52px; margin-right: 0; letter-spacing: 0.02em; text-shadow: 4px 4px 0 var(--encre); }

.accueil__phrase {
  margin-top: 12px;
  padding: 5px 14px 6px;
  border: 2.5px solid var(--encre);
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 3px 3px 0 var(--encre);
  color: var(--encre);
  font-size: 14px;
  font-weight: 700;
}

/**------- Profil -------*/
.profil__pastille {
  width: 50px;
  height: 50px;
  overflow: hidden;
  border: 3px solid var(--encre);
  background: var(--papier);
  box-shadow: 3px 3px 0 var(--encre);
}

.profil__pastille img { width: 100%; height: 100%; object-fit: cover; }
.profil__texte { gap: 3px; align-items: flex-start; }
.profil__nom { --trait-lettres: 4px; font-size: 18px; text-shadow: 2px 2px 0 var(--encre); overflow: visible; }

.profil__niveau {
  padding: 0 8px 1px;
  border: 2px solid var(--encre);
  background: var(--recit);
  color: var(--encre);
  font-size: 12px;
  font-weight: 700;
}

/**------- Tuiles de jeu : trois cases d'album, un peu de travers, avec des lignes de vitesse derrière les cartes -------*/
.jeu {
  padding: 10px 16px;
  border: 3.5px solid var(--encre);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--encre);
}

.jeu:nth-child(odd) { transform: rotate(-1.2deg); }
.jeu:nth-child(even) { transform: rotate(1deg); }
.jeux { gap: 18px; padding: 4px 6px 8px 2px; }

.jeu::before {
  content: "";
  position: absolute;
  inset: -80% -30%;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 24% 50%, rgba(255, 255, 255, 0.3) 0deg 6deg, transparent 6deg 12deg);
}

.jeu--domino { background: var(--domino); }
.jeu--gwinch { background: var(--gwinch); }
.jeu--tafaron { background: var(--tafaron); }

.jeu__image { flex-basis: 40%; }
.jeu__texte { gap: 8px; align-items: flex-start; }
.jeu__nom { font-size: 32px; }

.jeu__sous {
  padding: 2px 8px 3px;
  border: 2px solid var(--encre);
  background: #FFFFFF;
  color: var(--encre);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.visuel img {
  box-shadow: none;
  filter: drop-shadow(0 0 1px var(--encre)) drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.35));
}

/**------- Joindre ou créer : le jeu choisi devant un éclat jaune -------*/
.mode__image::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92%, 300px);
  aspect-ratio: 1;
  border: 3px solid var(--encre);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(var(--recit) 0deg 10deg, var(--recit-clair) 10deg 20deg);
  box-shadow: 5px 5px 0 var(--encre);
}

.mode__titres .titre { font-size: 42px; transform: rotate(-2deg); transform-origin: center; }

.mode__titres .sous-titre {
  align-self: center;
  padding: 2px 12px 3px;
  border: 2.5px solid var(--encre);
  background: #FFFFFF;
  box-shadow: 3px 3px 0 var(--encre);
  color: var(--encre);
}

.choix { gap: 16px; }

.choix__bouton {
  min-height: 86px;
  margin-bottom: 6px;
  padding: 10px 20px 12px;
  border: 3px solid var(--encre);
  border-radius: 14px;
  box-shadow: 0 6px 0 var(--encre);
}

.choix__bouton--joindre { background: var(--btn); color: #FFFFFF; }
.choix__bouton--creer { background: var(--btn2); color: var(--encre); }

.choix__nom { font-size: 27px; }
.choix__bouton--joindre .choix__nom { color: #FFFFFF; -webkit-text-stroke: 4px var(--encre); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--encre); }
.choix__detail { font-size: 13.5px; font-weight: 700; opacity: 1; }

/**------- Créer une partie, code -------*/
.code-partie { gap: 12px; }
.code-partie__titre { color: var(--encre); font-weight: 700; }

.chiffres span, .saisie span {
  border: 3px solid var(--encre);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 3px 3px 0 var(--encre);
  color: var(--encre);
  font-family: var(--police-titre);
  font-weight: 400;
}

.saisie span.est-courant { background: var(--recit); box-shadow: 3px 3px 0 var(--encre); }
.saisie--faux span { border-color: var(--rouge); box-shadow: 3px 3px 0 var(--rouge); }
.erreur { font-weight: 700; }

/**------- Parties à joindre -------*/
.partie { min-height: 80px; }
.parties { gap: 14px; padding: 2px 6px 6px 0; }
.parties li:nth-child(odd) .partie { transform: rotate(-0.6deg); }
.parties li:nth-child(even) .partie { transform: rotate(0.5deg); }

.partie__avatar {
  border: 3px solid var(--encre);
  border-radius: 8px;
}

.partie__nom { font-size: 18px; }
.partie__infos { font-weight: 700; }
.partie__places { color: var(--encre); font-size: 13px; }
.partie--privee .partie__acces { color: var(--rouge-texte); }
.pions i { width: 11px; height: 11px; border-width: 2px; }
.pions i.est-pris { background: var(--rouge); border-color: var(--encre); }

/**------- Caméra avant d'entrer : une photo punaisée -------*/
.apercu {
  border: 4px solid var(--encre);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--encre);
  transform: rotate(-1deg);
}

.apercu__coupee {
  position: absolute;
  top: 12px;
  left: 50%;
  flex-direction: row;
  padding: 4px 12px;
  border: 2.5px solid var(--encre);
  transform: translateX(-50%);
  background: #FFFFFF;
  color: var(--encre);
  font-size: 13px;
  white-space: nowrap;
}

.apercu__coupee svg { width: 18px; height: 18px; }

.apercu__nom {
  border: 2.5px solid var(--encre);
  border-radius: 0;
  background: var(--recit);
  color: var(--encre);
  font-weight: 700;
}

.bascule__nom { font-size: 17px; }

/**------- Table : un tapis vert en aplat, un rebord de bois, le tout cerné d'encre -------*/
.table__tapis::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.14) 1.3px, transparent 1.8px) 0 0 / 11px 11px;
  -webkit-mask: radial-gradient(ellipse at 50% 50%, transparent 35%, #000 100%);
  mask: radial-gradient(ellipse at 50% 50%, transparent 35%, #000 100%);
}

.table__jeu { font-size: 24px; }
.table__info { max-width: 128px; font-weight: 700; opacity: 1; text-shadow: 1px 1px 0 var(--encre); }
.table__mascotte img { height: 136px; width: auto; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.3)); }

.table__partage {
  border: 3px solid var(--encre);
  border-radius: 10px;
  background: var(--recit);
  box-shadow: 3px 3px 0 var(--encre);
  color: var(--encre);
  font-size: 15px;
}

.cam__image {
  border: 3px solid var(--encre);
  border-radius: 10px;
  background: var(--papier);
  box-shadow: 4px 4px 0 var(--encre);
}

.cam--vous .cam__image { box-shadow: 0 0 0 3px var(--recit), 0 0 0 6px var(--encre); }

.cam__nom {
  padding: 1px 9px 2px;
  border: 2px solid var(--encre);
  border-radius: 0;
  background: #FFFFFF;
  color: var(--encre);
  font-size: 12.5px;
}

.cam--vous .cam__nom { margin-top: 4px; background: var(--recit); }

/**------- Contrat : une étiquette blanche cernée d'encre ; l'atout garde sa couleur de carte -------*/
.cam__contrat {
  border: 2px solid var(--encre);
  border-radius: 0;
  background: #FFFFFF;
  color: var(--encre);
  box-shadow: 2px 2px 0 var(--encre);
}

.cam__contrat--rouge svg { color: var(--rouge); }

.cam__coupee, .cam__micro {
  position: absolute;
  top: -9px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--encre);
  border-radius: 50%;
}

.cam__coupee { left: -9px; background: #FFFFFF; color: var(--encre); }
.cam__micro { right: -9px; background: var(--rouge); color: #FFFFFF; }
.cam__coupee svg, .cam__micro svg { width: 14px; height: 14px; }

.siege__libre {
  border: 3px dashed var(--encre);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--encre);
  font-size: 13px;
}

/**------- Main et dernier pli : cernés d'encre, sans quoi des cartes blanches posées l'une sur l'autre se confondent -------*/
.main__carte img { border-radius: 5px; box-shadow: 0 0 0 2px var(--encre), -4px 3px 0 1px rgba(22, 22, 22, 0.3); }
.pose__carte img { border-radius: 4px; box-shadow: 0 0 0 2px var(--encre), 3px 4px 0 1px rgba(22, 22, 22, 0.3); }

/**------- Dominos : le cerne suit les coins arrondis de la pièce. Il est posé sur la case et non sur l'image, sinon l'ombre tournerait avec les pièces couchées -------*/
.main__piece, .chaine__piece {
  filter: drop-shadow(1.5px 0 0 var(--encre)) drop-shadow(-1.5px 0 0 var(--encre)) drop-shadow(0 1.5px 0 var(--encre))
    drop-shadow(0 -1.5px 0 var(--encre)) drop-shadow(2px 3px 0 rgba(22, 22, 22, 0.3));
}

.pli__titre, .score__titre { border: 2px solid var(--encre); border-radius: 0; background: var(--recit); color: var(--encre); }

/**------- Scores : des cases blanches cernées d'encre ; celle du joueur, ou de son camp, prend la couleur des récitatifs -------*/
.score__case, .score__croix .score__valeur {
  border: 2px solid var(--encre);
  background: #FFFFFF;
  color: var(--encre);
  box-shadow: 2px 2px 0 var(--encre);
}

.score__case:first-child, .score__croix .score__valeur--bas { background: var(--recit); }

.cam__minuterie { --minuterie-cerne: var(--encre); --minuterie-reste: var(--rouge); --minuterie-vide: #FFFFFF; }

.pli__carte {
  border: 2px solid var(--encre);
  background: #FFFFFF;
  color: var(--encre);
  box-shadow: 2px 2px 0 var(--encre);
}

.pli__carte--rouge { color: var(--rouge); }

.attente { font-size: 15px; }

/**------- Feuille des réglages, et le message court dans une bulle -------*/
/**------- Cernée sur trois côtés comme une case : un trait seulement en haut s'amincissait dans les coins arrondis -------*/
.feuille {
  --doux: var(--papier-doux);
  border: 4px solid var(--encre);
  border-bottom-width: 0;
  border-radius: 18px 18px 0 0;
  background: var(--papier);
  box-shadow: none;
  color: var(--encre);
}

.feuille__tete h2 { --lettres: var(--rouge); --trait-lettres: 4px; font-size: 26px; text-shadow: 2px 2px 0 var(--encre); }
.ligne { border-top: 3px dashed rgba(22, 22, 22, 0.35); font-weight: 700; }
.ligne__texte { font-weight: 700; }
.voile { background: rgba(22, 22, 22, 0.5); }

.interrupteur { width: 60px; height: 36px; border: 3px solid var(--encre); background: #FFFFFF; }
.interrupteur::after { top: 2px; left: 2px; border: 2.5px solid var(--encre); background: #FFFFFF; box-shadow: none; }
.interrupteur.est-actif { background: var(--btn); }
.interrupteur.est-actif::after { transform: translateX(24px); }

.toast {
  border: 3px solid var(--encre);
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 4px 4px 0 var(--encre);
  color: var(--encre);
  font-weight: 700;
}

/**------- La queue de la bulle -------*/
/* Dessinée d'un seul trait ouvert en haut : le blanc de la pointe recouvre le bord de la bulle, qui reste donc d'un seul tenant */
.toast::after {
  content: "";
  position: absolute;
  left: 40px;
  bottom: -18px;
  width: 28px;
  height: 21px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 21'%3E%3Cpath d='M2 0 L8 19 L26 0' fill='%23FFFFFF' stroke='%23161616' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
