.builder {
  max-width: 750px;
  margin: auto;
  font-family: "Courier New", monospace;
  padding: 0 !important;
  position: relative;
}

.builder.section-custom {
  background:
    url("https://primary.jwwb.nl/public/u/g/p/temp-pollwmcayzhsexjumldk/top-high.png") top center no-repeat,
    url("https://primary.jwwb.nl/public/u/g/p/temp-pollwmcayzhsexjumldk/middle-high.png") center repeat-y,
    url("https://primary.jwwb.nl/public/u/g/p/temp-pollwmcayzhsexjumldk/bottom-high.png") bottom center no-repeat;
  background-size: 100% auto; /*100% auto !important;*/
  padding-top: 850px;
  padding-bottom: 270px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .print-section, .print-section * {
    visibility: visible;
  }
}

/* Effet document impérial */
.builder::before {
  content: "ADEPTUS ADMINISTRATUM";
  position: absolute;
  color: gold;
  top: 40px;
  right: 20px;
  font-size: 11px;
}
  
h1 {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 3px;
  text-shadow: -1px -1px white, 1px 1px black;
}

h1::before {
  content: "☩ ";
  font-size: 28px;
  color: #4caac9;
}

h1::after {
  content: " ☩";
  font-size: 28px;
  color: #4caac9;
}

.section {
  background: transparent;
  padding: 15px;
  margin-top: 20px;
}

.disabled-section {
  opacity: 0.6;
  pointer-events: none;   /* Désactive TOUT : inputs, selects, textarea, boutons */
}

/* Labels */
label {
  color: #4caac9;
  display: block;
  margin-top: 8px;
  margin-bottom: 3px;
  font-weight: 900; /* plus épais = plus lisible */
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;

  /* Ombre plus nette et plus proche du texte */
  text-shadow:
    1px 1px black,
    -1px -1px white;
}

/* Inputs */
input, select, textarea {
  width: 100%;
  padding: 6px;
  margin-top: 2px;
  border: none;
  border-bottom: 1px solid black;
  opacity: 0.6;
  font-family: inherit;
}

textarea {
  border: 1px solid black;
}

/* Grid */
.char-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.char-col {
  background: rgba(255,255,255,0.05);
  padding: 8px;
  box-sizing: border-box;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 20px; /* espace entre les boutons */
  margin-bottom: 20px;
}

/* Largeurs personnalisées */
.col-10 { flex: 0 0 10%; }
.col-20 { flex: 0 0 20%; }
.col-25 { flex: 0 0 25%; }
.col-28 { flex: 0 0 28%; }
.col-30 { flex: 0 0 30%; }
.col-31 { flex: 0 0 31%; }
.col-33 { flex: 0 0 33.33%; }
.col-40 { flex: 0 0 40%; }
.col-50 { flex: 0 0 50%; }
.col-60 { flex: 0 0 60%; }
.col-70 { flex: 0 0 70%; }
.col-80 { flex: 0 0 80%; }
.col-100 { flex: 0 0 100%; }

/* Talents */
#talent-system {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  background: transparent;
}

#talent-list-container,
#talent-chosen-container {
  flex: 1;
  min-width: 350px;
}

/* Textarea dans la liste des talents */
.list-textarea {
    width: 100%;
    padding: 4px;
    font-size: 14px;
    line-height: 1.2em;
}

/* Textarea dans les talents choisis */
.chosen-talent-item {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #bfa77a;
    border-radius: 4px;
}

.chosen-talent-label {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
    display: block;
}

.chosen-textarea {
    width: 100%;
    background: rgba(255, 255, 255); /* blanc doux */
    border: 1px solid #bfa77a;
    padding: 6px;
    font-size: 14px;
    line-height: 1.3em;
    color: #222;
    box-sizing: border-box;
}

.talent-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 6px;
    border-bottom: 2px solid #ccc;
}

.talent-cost {
    flex: 1;
    text-align: right;
}

.listview {
  padding: 10px;
  background: transparent;
}

.talent-item {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 8px;
  background: white;
  opacity: 0.8;
}

.talent-name {
    font-weight: normal;          /* plus de bold */
    letter-spacing: -0.5px;       /* effet condensé */
    white-space: nowrap;          /* empêche les retours à la ligne */
    overflow: hidden;             /* coupe proprement si trop long */
    text-overflow: ellipsis;      /* ajoute "..." si trop long */
    flex: 2;                      /* occupe plus d'espace dans la ligne */
    opacity: 1;
    color: black;
}

.talent-cost {
    flex: 1;
    text-align: right;
    color: #444;
    white-space: nowrap;
    opacity: 1;
}

.talent-btn {
    flex: 0;
    background: black;
    color: #ede8d8;
    cursor: pointer;
    white-space: nowrap;
}

.talent-prereq {
    flex: 0;
    background: white;
    color: black;
    cursor: pointer;
    white-space: nowrap;
}

.talent-blocked {
    flex: 0;
    background: white;
    color: red;
    cursor: pointer;
    white-space: nowrap;
}

.talent-desc {
  width: 100%;
  min-height: 80px;
  margin-bottom: 12px;
  padding: 8px;
  resize: none;
  background: #fff;
  border: 1px solid #ccc;
}

/* Boutons style impérial */
button {
  margin-top: 10px;
  padding: 8px 12px;
  background: black;
  color: #ede8d8;
  border: 1px solid black;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
}

button:hover {
  background: #333;
  color: #ede8d8;
}

/* Corruption highlight */
#char-cp {
  background: #3b0000;
  color: #ffb3b3;
  font-weight: bold;
}
  
#repeatable-popup {
    position: fixed;
  
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    display: none; /* ou flex quand ouvert */
    justify-content: flex-start;
    align-items: center;

    background: rgba(0, 0, 0, 0.6); /* fond semi-transparent */
    z-index: 999999999; /* passe devant TOUT */
}

#repeatable-popup .popup-content {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    margin: 40px;
}

/* Impression */
@media print {
  body {
    background: white;
  }

  button {
    display: none;
  }

  .builder {
    box-shadow: none;
    border: none;
  }
}
