/* Page Theorycraft : namecards en haut (style de Créer un match), contenu
   du thème choisi en dessous, tableaux en lecture seule (style de la page
   Administration). */

.zone-theorycraft {
  max-width: 68.75rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  box-sizing: border-box;
}

.zone-theorycraft[hidden],
.panneau-theorycraft[hidden],
.etat-theorycraft[hidden],
.modal-tc[hidden] {
  display: none;
}

/* ---- Onglets des thèmes (même style que Classement et Historique) ---- */
.onglets-theorycraft {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.onglet-theorycraft {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  background-color: rgba(20, 20, 20, 0.55);
  color: white;
  font-family: var(--police-titre);
  font-size: 1.375rem;
  text-align: center;
  cursor: pointer;
}

.onglet-theorycraft span {
  font-family: var(--police-titre);
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.onglet-theorycraft:hover {
  border-color: var(--accent-bordure);
}

.onglet-theorycraft.active {
  border-color: var(--accent);
  background-color: var(--accent-fond);
  box-shadow: 0 0 0.75rem rgba(245, 197, 66, 0.3);
}

@media (max-width: 1000px) {
  .onglets-theorycraft {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .onglet-theorycraft {
    padding: 0.625rem 0.5rem;
    font-size: 1.125rem;
  }

  .onglet-theorycraft span {
    font-size: 0.75rem;
  }
}

.etat-theorycraft {
  margin: 2rem 0;
  text-align: center;
  color: var(--texte-doux);
}

/* ---- Contenu d'un thème ---- */
.panneau-theorycraft {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.125rem;
}

.aide-theorycraft {
  margin: 0;
  color: var(--texte-doux);
  font-size: 0.9375rem;
}

/* Textes sur le fond de la page : dans un rectangle lisible. */
.panneau-theorycraft > .aide-theorycraft,
.notes-theorycraft,
.texte-theorycraft {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background-color: rgba(20, 20, 20, 0.6);
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
}

.notes-theorycraft {
  padding-left: 2rem;
}

.barre-theorycraft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.recherche-theorycraft {
  flex: 1;
  min-width: 10rem;
  max-width: 20rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: inherit;
  font: inherit;
}

.compte-theorycraft {
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.filtres-theorycraft {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.groupe-tc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Filtres : mêmes boutons que la page Administration. */
.filtre-tc {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.4375rem;
  border: 2px solid transparent;
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.filtre-tc.filtre-icone {
  width: 2.4375rem;
  padding: 0.3125rem;
}

.filtre-tc.filtre-icone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.filtre-tc.filtre-texte {
  padding: 0 0.75rem;
  white-space: nowrap;
}

.filtre-tc:hover,
.filtre-tc.active {
  border-color: rgba(245, 197, 66, 0.8);
}

.filtre-tc.active {
  background-color: rgba(245, 197, 66, 0.15);
}

/* ---- Tableaux ---- */
.tableau-conteneur {
  overflow-x: auto;
  border-radius: 0.75rem;
  background-color: rgba(20, 20, 20, 0.45);
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
}

.tableau-theorycraft {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.tableau-theorycraft th,
.tableau-theorycraft td {
  padding: 0.375rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tableau-theorycraft thead th {
  background-color: rgba(30, 30, 30, 0.95);
  font-weight: bold;
}

/* Tableaux des thèmes : pas de défilement propre au tableau (comme dans la
   page admin), seule la page défile ; l'en-tête reste figé en haut de
   l'écran. */
.panneau-theorycraft .tableau-conteneur {
  overflow: visible;
}

.panneau-theorycraft .tableau-theorycraft thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.panneau-theorycraft .tableau-theorycraft thead th {
  background-color: #1e1e1e;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.tableau-theorycraft th.triable {
  cursor: pointer;
  user-select: none;
}

.tableau-theorycraft th.triable:hover {
  color: #f5c542;
}

.fleche-tc {
  margin-left: 0.25rem;
  font-size: 0.75em;
}

.tableau-theorycraft .col-nom {
  text-align: left;
  white-space: nowrap;
}

/* Mode des bonus (addition / multiplication) sous les titres de colonne. */
.ligne-modes th {
  font-size: 0.75rem;
  font-weight: normal;
}

.mode-tc.multiplication {
  color: #f5c542;
}

.miniature-tc {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 0.375rem;
  overflow: hidden;
  background-size: cover;
}

.miniature-tc img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-apercu-tc {
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-apercu-tc:hover {
  border-color: rgba(245, 197, 66, 0.8);
}

/* Personnage buffé par le théâtre du mois : bonus théâtre appliqué. */
.tableau-theorycraft td.avec-buff {
  background-color: rgba(245, 197, 66, 0.12);
  color: #f5c542;
  font-weight: bold;
}

.texte-buff {
  color: #f5c542;
}

.col-bonus-saison {
  white-space: nowrap;
}

/* Perso + signa : arme signature avec ses points R1. */
.tableau-theorycraft .col-signa-tc {
  text-align: left;
  white-space: nowrap;
}

.signa-tc {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.signa-tc .miniature-tc {
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0;
}

.nom-signa-tc {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8125rem;
  opacity: 0.8;
}

.sans-signa-tc {
  opacity: 0.5;
}

/* ---- Boss ---- */
.icone-element-tc {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  vertical-align: middle;
}

/* Cellules du corps seulement : en flex, la case "Boss" de l'en-tête ne
   serait plus une cellule et ne prendrait que la hauteur de son texte. */
.tableau-boss-tc td.col-nom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.images-boss-tc img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.images-boss-tc .duo-boss img {
  width: 1.5rem;
}

.infos-boss-tc {
  display: flex;
  flex-direction: column;
  white-space: normal;
}

.immunise-tc {
  color: #f5c542;
  font-weight: bold;
}

.type-boss-tc {
  font-size: 0.75rem;
  color: var(--texte-doux);
}

.notes-theorycraft {
  margin: 0;
  color: var(--texte-doux);
  font-size: 0.875rem;
}

/* ---- Système d'équilibrage ---- */
.texte-theorycraft h2 {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
}

.texte-theorycraft p {
  margin: 0;
}

.formule-tc {
  padding: 0.75rem 1rem;
  border-left: 3px solid rgba(245, 197, 66, 0.8);
  border-radius: 0.375rem;
  background-color: rgba(20, 20, 20, 0.45);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.tableau-paliers-tc {
  max-width: 24rem;
}

/* ---- Aperçu d'un personnage ---- */
.modal-tc {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-tc-contenu {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(48rem, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  background-color: #2b2b2b;
}

.modal-tc-entete {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-tc-entete h2 {
  flex: 1;
  margin: 0;
}

.modal-tc-entete .miniature-tc {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0;
}

.fermer-tc {
  border: none;
  background: none;
  color: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.avec-theatre {
  font-size: 0.75rem;
  font-weight: normal;
  color: #f5c542;
}
