.monstres-list {
  column-count: 6;
  column-gap: 2px;
}
.monstre {
  display: block;
  margin-bottom: 5px;
  border: solid 1px;
  padding-left: 3px;
}
.localisation-red,
.qualite-red,
.monstre-red,
.compo-red {
  background-color: #da291c;
  color: white;
  border: 1px solid #333;
}

.hide {
  display: none;
}
.center {
  margin: auto;
  text-align: center;
}
html {
  background:
    url('https://mh2.mh.raistlin.fr/mountyhall/MH_Packs/packMH_parchemin/fond/fond.jpg')
      repeat-y,
    url('https://mh2.mh.raistlin.fr/mountyhall/MH_Packs/packMH_parchemin/fond/fond2.jpg')
      repeat;
  padding-left: 55px;
  margin: 0px;
}
body {
  margin: 0px;
  background-color: #f0f0f0;
  color: #000000;
  font-size: 12px;
  font-family: 'Trebuchet MS', 'Times New Roman', Times, serif;
  background: url('https://mh2.mh.raistlin.fr/mountyhall/MH_Packs/packMH_parchemin/fond/fond2.jpg')
    repeat;
}
h1,
h2 {
  margin: 15px 0px;
  padding-top: 15px;
  color: #000;
  text-align: center;
}
.mh_form_submit {
  font-family: 'Trebuchet MS', 'Times New Roman', Times, serif;
  font-size: 12px;
  background-color: #666633;
  color: #ffc;
  border-style: outset;
  border-width: 1px;
  border-color: #cccc00 #330000 #330000 #cccc00;
  padding: 3px;
  margin: 10px 0;
}
.mh_tdtitre {
  background-image: url('https://games.mountyhall.com/mountyhall/MH_Packs/packMH_parchemin/tableau/tableau2.jpg');
  background-color: #ebedab;
  border: 1px solid #333;
  padding: 3px;
  margin: 3px;
}
.mh_tdpage {
  background-image: url('https://games.mountyhall.com/mountyhall/MH_Packs/packMH_parchemin/tableau/tableau1.jpg');
  background-color: #ffffee;
  border: 1px solid #333;
  padding: 3px;
  margin: 3px;
}
.compo-red .mh_tdpage,
.mh_tdpage.localisation-red,
.mh_tdpage.qualite-red,
.mh_tdpage.monstre-red {
  background-image: none;
  background-color: #da291c;
}
table {
  border-collapse: collapse;
  margin: 0 0 20px 0;
}
th {
  padding: 3px;
  margin: 3px;
}
.mh_tdtitre th {
  border: 1px solid #333;
}
.mh_tdpage.rouge,
.mh_tdpage.niveau-rouge,
.compo-rouge .mh_tdpage,
.compo-rouge.compo-vert .mh_tdpage {
  background-image: none;
  background-color: #da291c;
  color: white;
  border: 1px solid #333;
}
.mh_tdpage.vert,
.compo-vert .mh_tdpage {
  background-image: none;
  background-color: green;
  color: white;
  border: 1px solid #333;
}
.rouge,
.rouge_tableau_resume,
.monstre-rouge {
  background-image: none;
  background-color: #da291c;
  color: white;
  border: 1px solid #333;
}
.vert,
.monstre-vert {
  background-image: none;
  background-color: green;
  color: white;
  border: 1px solid #333;
}
.orange,
.monstre-orange {
  background-image: none;
  background-color: orange;
  color: white;
  border: 1px solid #333;
}
.recap {
  margin: 0px 3px 10px 3px;
}

nav {
  background-color: rgba(235, 204, 159, 0.9);
  padding: 10px 0;
  background: url('https://mh2.mh.raistlin.fr/mountyhall/MH_Packs/packMH_parchemin/fond/fond2.jpg')
    repeat;
  margin: auto;
  text-align: center;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}
nav ul li {
  display: inline;
  position: relative;
}
nav ul li a,
span {
  color: #990000;
  text-decoration: none;
  font-weight: bold;
}
nav ul span {
  padding: 0px 10px 20px;
}

nav ul li a:hover,
nav ul li span:hover {
  color: #550000;
  text-decoration: underline;
  border-radius: 4px;
  cursor: pointer;
}

nav ul li a.active,
nav ul li span.active {
  color: #333;
  font-weight: bold;
}

nav ul li .submenu {
  display: none;
  position: absolute;
  background-image: url('https://games.mountyhall.com/mountyhall/MH_Packs/packMH_parchemin/tableau/tableau1.jpg');
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
  border: 1px solid black;
}

nav ul li:hover .submenu {
  display: block;
  margin-top: 8px;
  width: auto;
}

nav ul li .submenu li {
  display: flex;
  justify-content: center;
  padding: 5px 0;
  width: 100%;
}

/***** PAGE RECETTE *****/
.table-container {
  display: flex;
  gap: 20px;
}
.table-container table {
  width: 100%; /* Ajuste la largeur des tableaux */
}
.table-container-monstres {
  display: flex;
  gap: 20px; /* Espacement entre les tableaux */
  flex-wrap: wrap; /* Permet aux tableaux de se déplacer sur plusieurs lignes si nécessaire */
  min-width: 1040px;
}
.container-list-compo-monstre {
  padding: 0 20px;
}
.monstres table {
  width: 100%; /* Ajuste la largeur de chaque tableau */
  margin-bottom: 20px; /* Espacement entre les tableaux */
}
.logout {
  color: #da291c;
  font-weight: bold;
  text-decoration: underline;
}
.table-horizontale {
  display: inline-grid;
  grid-auto-flow: column;
  border-collapse: collapse;
  margin-bottom: 10px;
}
.table-horizontale tr {
  display: contents;
}
.bold {
  font-weight: bold;
}
.bottom {
  margin-bottom: 45px;
}

/* Style Guide d'utilisation et légende des couleurs */
.legende-container {
  margin: 20px 0;
  padding: 15px;
  border-radius: 5px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}
.legende-section {
  margin-bottom: 15px;
}
.legende-section h3 {
  padding-bottom: 5px;
  margin-top: 10px;
  margin-bottom: 5px;
}
.legende-vert {
  color: white;
  font-weight: bold;
  padding: 0 3px;
  border: 1px solid green;
  background-color: rgba(0, 128, 0, 1);
}
.legende-orange {
  color: white;
  font-weight: bold;
  padding: 0 3px;
  border: 1px solid orange;
  background-color: rgba(255, 165, 0, 1);
}
.legende-rouge {
  color: white;
  font-weight: bold;
  padding: 0 3px;
  border: 1px solid #da291c;
  background-color: rgba(255, 0, 0, 1);
}
.legende-container .mh_tdpage {
  line-height: 1.7;
}

/* CSS Recette/tableau_recapitulatif */
.recapitulatif-flex-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.recapitulatif-container,
.suggestions-container {
  flex: 1;
  min-width: 300px;
  margin-top: 30px;
  padding: 15px;
  border-radius: 5px;
}
.table-recap,
.table-suggestions {
  width: 100%;
  border-collapse: collapse;
}
.table-recap th,
.table-recap td,
.table-suggestions th,
.table-suggestions td {
  padding: 8px;
  text-align: center;
}
.table-recap tr:nth-child(even),
.table-suggestions tr:nth-child(even) {
  background-color: #f2f2f2;
}
.recapitulatif-container h3,
.suggestions-container h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 15px;
}

/* Style pour les parties de monstre correspondantes (vert) */
.partie_correspondante {
  background-color: green;
  padding: 2px 5px;
  border-radius: 3px;
  color: white;
}
/* Style pour les parties de monstre orange */
.partie_orange {
  background-color: orange;
  padding: 2px 5px;
  border-radius: 3px;
  color: white;
}

/******************* Style pour la page enchantements ****************/

.glass-box {
  padding: 20px;
  margin-bottom: 20px;
}

.perfect_match {
  background-color: #046a38;
  padding: 2px 5px;
  border-radius: 3px;
  color: white;
  border: 1px solid #ccc;
}

.better_quality {
  position: relative;
  background-color: #002d72;
  padding: 2px 5px;
  border-radius: 3px;
  color: white;
  border: 1px solid #ccc;
}

.no_match {
  background-color: #da291c;
  padding: 2px 5px;
  border-radius: 3px;
  color: white;
  border: 1px solid #ccc;
}

.deal,
.better_quality.deal,
.no_match.deal {
  background-color: orange !important;
  padding: 2px 5px;
  border-radius: 3px;
  color: white;
  border: 1px solid #ccc;
}

.container {
  width: calc(100% - 20px);
  margin: 0 auto;
  border-collapse: collapse;
  padding: 20px;
}

label {
  display: block;
  color: #000;
  font-weight: bold;
  margin-bottom: 10px;
}

input,
textarea,
select {
  padding: 5px;
  border-radius: 5px;
  border: none;
  background-color: rgba(255, 255, 255, 0.6);
  color: #000;
}

.troll-select {
  width: 178px; /* Ajustez cette valeur selon la largeur désirée */
  height: 30px; /* Ajustez cette valeur selon la hauteur désirée */
  padding: 5px;
  border-radius: 5px;
  border: none;
  font-size: 13px;
  background-color: rgba(255, 255, 255, 0.6);
  color: #000;
  text-align: center; /* Aligne le texte au centre */
}

.enchant {
  width: 100%;
  table-layout: auto; /* Permet aux colonnes de s'ajuster selon leur contenu */
  border-collapse: collapse;
  margin-top: 20px;
}

th.shop-header {
  min-width: 130px;
  padding-left: 1px;
  padding-right: 1px;
  width: 250px;
}

.item-header strong {
  flex-grow: 1; /* Permet au nom d'occuper l'espace restant dans la cellule */
  overflow-wrap: break-word; /* Permet de couper les mots long et effectuer un retour à la ligne */
  word-wrap: break-word; /* Supporte les anciens navigateurs */
  white-space: normal; /* Permet au texte de s'étendre sur plusieurs lignes */
  margin-right: 10px; /* Ajoute un espace entre le nom de l'item et les composants */
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden; /* Empêche le contenu de déborder */
  text-overflow: ellipsis; /* S'assure que le contenu tronqué se termine par des ellipses si nécessaire */
  width: 100%;
  min-width: 150px; /* Assure une taille minimale décente */
}

.component-group {
  display: flex;
  flex-direction: column;
}

.component-block {
  display: flex;
  justify-content: space-between; /* Aligne la checkbox à droite */
  align-items: center;
  padding: 2px 0;
  width: 100%; /* Assurez-vous que le bloc prend toute la largeur */
}

.component {
  flex-grow: 1; /* Permet au texte de prendre l'espace nécessaire */
}

.delete-button {
  flex-shrink: 0; /* Assure que le bouton poubelle garde sa taille et ne se réduit pas */
  margin-left: 10px; /* Ajoute un espace entre l'item name et le bouton */
  cursor: pointer;
}

.delete-button:hover {
  opacity: 0.7;
}

.deal-checkbox {
  margin-left: 10px;
  vertical-align: middle;
}

.better_quality:hover::after {
  content: attr(data-quality); /* Display the data-quality attribute */
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px;
  background-color: #fff;
  color: black;
  border-radius: 3px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  z-index: 10;
}

.no_match .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/******************* Style pour la modale de validation ****************/
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-container.hidden {
  display: none;
}

.modal-content {
  background-image: url('https://games.mountyhall.com/mountyhall/MH_Packs/packMH_parchemin/tableau/tableau1.jpg');
  padding: 20px;
  border: 1px solid #333;
  width: 90%;
  max-width: 600px;
  margin: 40px auto; /* Ajoutez un margin-top pour garder un espace au-dessus */
  border-radius: 8px;
  text-align: left;
}

.modal-button:hover {
  background: #2563eb;
}

.modal-h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.modal-options {
  margin: 1rem 0;
}

.modal-option {
  margin: 0.5rem 0;
}

.modal-option input[type='radio'] {
  margin-right: 10px;
}

.modal-button {
  background: #3b82f6;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  margin: 0.25rem;
  cursor: pointer;
}

.modal-option select {
  width: calc(100% - 20px); /* Ajustez la largeur pour s'adapter au conteneur */
  padding: 5px;
  border-radius: 5px;
  border: none;
  background-color: rgba(255, 255, 255, 0.6);
  color: #000;
  font-size: 14px;
  margin-top: 5px; /* Espacement entre le radio button et le menu déroulant */
}

.total-effects {
  font-weight: bold;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ddd;
}

/* ✅ NOUVELLE classe pour 'sur-troll' */
.sur-troll {
  background-color: #a100a7;
}
