html, body {
  /* height: 95vh; */
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: #101c2b;
  background-image: repeating-linear-gradient(
    135deg,
    #101c2b,
    #111f30 50%,
    #101c2b 100%
  );
  background-repeat: no-repeat;
  background-size: cover;
  color: #e0eaf5;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

header {
  background-color: #0a192f;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #7dc1ff;
  text-align: center;
  border-bottom: 2px solid #1b3b66;
}

/* Main content hidden initially */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: none;
  overflow-y: auto;
  height: 100%;
}

/* Login screen overlay */
#loginScreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #152a4f, #0f1c2e);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  user-select: none;
}
#loginScreen h2 {
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  font-size: 1.8rem;
  color: #4db8ff;
  text-transform: uppercase;
}
#progressBarContainer {
  width: 320px;
  height: 20px;
  background: #1a2a4f;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 0 8px #4db8ff44;
}
#progressBar {
  height: 100%;
  width: 0%;
  background: #4db8ff;
  transition: width 0.2s ease-out;
}
#progressText {
  font-size: 1rem;
  font-style: italic;
  min-height: 1.2em;
  color: #a0cfff;
  font-family: "Consolas", monospace;
}
.search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-bar input,
.search-bar select {
  padding: 0.5rem 1rem;
  background-color: #182b45;
  border: 1px solid #334d6e;
  color: #e0eaf5;
  border-radius: 4px;
}

.search-bar input:focus,
.search-bar select:focus {
  outline: none;
  border-color: #7dc1ff;
  box-shadow: 0 0 5px #7dc1ff88;
}

/* Card Styles */
.person-card {
  background: #12263f;
  border: 1px solid #223;
  border-radius: 8px;
  margin-bottom: 2rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px rgba(51, 153, 255, 0.2);
}

.person-card:hover {
  transform: scale(1.01);
  box-shadow: 0 0 20px rgba(51, 153, 255, 0.4);
}

.person-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.person-header img.visuel {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top; /* <-- aligne le haut de l’image */
  border: 2px solid #334d6e;
}

.person-content div,
.extra-info div {
  margin: 0.25rem 0;
}

.toggle-extra {
  margin-top: 1rem;
  background: none;
  color: #7dc1ff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  text-align: left;
}

.extra-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #334d6e;
}

.hidden {
  display: none;
}

.share-link {
  display: inline-block;
  margin-top: 1rem;
  color: #a0d2ff;
  text-decoration: underline;
}

.share-link:hover {
  color: #ffffff;
}
/* Modal overlay */
#image-modal {
  display: none; /* cachée par défaut */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

/* Modal content (the image) */
#image-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 20px #00aaffcc;
  cursor: zoom-out;
}

.aff-tessier-ashpol {
  border-left: 4px solid #bba246; /* Jaune vieilli */
  box-shadow: 0 0 8px #bba24633;
}

.aff-green-pastures {
  border-left: 4px solid #5e7d64; /* Vert terne naturel */
  box-shadow: 0 0 8px #5e7d6433;
}

.aff-free-air {
  border-left: 4px solid #7a8a99; /* Gris acier naturel */
  box-shadow: 0 0 8px #7a8a9944;
}

.aff-weyland-cat {
  border-left: 4px solid #507d89; /* Bleu pétrole */
  box-shadow: 0 0 8px #507d8944;
}

.aff-bluetech {
  border-left: 4px solid #5a6c8f; /* Bleu désaturé tech */
  box-shadow: 0 0 8px #5a6c8f44;
}

.aff-default {
  border-left: 4px solid #666; /* Gris standard */
  box-shadow: 0 0 6px #44444422;
}

.aff-independent {
  border-left: 4px solid #7a8a99; /* Gris acier */
  box-shadow: 0 0 6px #7a8a9933;
}

.aff-banard {
  border-left: 4px solid #6a5a7d; /* Violet industriel */
  box-shadow: 0 0 8px #6a5a7d33;
}

.aff-sirius {
  border-left: 4px solid #507d89; /* Bleu pétrole technocratique */
  box-shadow: 0 0 8px #507d8933;
}

.aff-dalai-noir {
  border-left: 4px solid #444; /* Noir technique */
  box-shadow: 0 0 8px #44444455;
}

.aff-europa {
  border-left: 4px solid #7a8a99; /* Acier glacial */
  box-shadow: 0 0 8px #7a8a9944;
}

.aff-cic {
  border-left: 4px solid #888; /* Gris administratif */
  box-shadow: 0 0 8px #88888833;
}

.aff-mankind-united,
.aff-sol-united {
  border-left: 4px solid #bba246; /* Jaune terne solaire */
  box-shadow: 0 0 8px #bba24633;
}

.aff-centauri {
  border-left: 4px solid #6a5a7d; /* Violet spatial maîtrisé */
  box-shadow: 0 0 8px #6a5a7d33;
}

.aff-seven-spades {
  border-left: 4px solid #444; /* Noir discret, espionnage */
  box-shadow: 0 0 8px #44444444;
}

.aff-eridani {
  border-left: 4px solid #5e7d64; /* Vert militaire pâle */
  box-shadow: 0 0 8px #5e7d6444;
}

.aff-tusk {
  border-left: 4px solid #705a48; /* Brun désaturé, robuste */
  box-shadow: 0 0 8px #705a4833;
}

.aff-habea-corpus-inc {
  border-left: 4px solid #9a5a5a; /* Rouge désaturé, légaliste */
  box-shadow: 0 0 8px #9a5a5a33;
}

.aff-dupont-monsanto {
  border-left: 4px solid #5e7d64; /* Vert terne industriel */
  box-shadow: 0 0 8px #5e7d6433;
}

.aff-ustf {
  border-left: 4px solid #445a66; /* Bleu acier militaire */
  box-shadow: 0 0 8px #445a6644;
}

.modifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.badge {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: bold;
  background: #333;
  color: #fff;
  letter-spacing: 0.04em;
}

/* Styles spécifiques */
.badge.renegade {
  background: #661111;
  color: #fdd;
}
.badge.deceased {
  background: #222;
  color: #aaa;
  font-style: italic;
}
.badge.classified {
  background: #111;
  color: #fff;
  border: 1px solid #888;
}
.badge.red-notice {
  background: #550000;
  color: #ffaaaa;
}
.badge.black-notice {
  background: #000;
  color: #ccc;
}
.badge.do-not-engage {
  background: #bba246;
  color: #111;
}
.badge.shoot-to-kill {
  background: #220000;
  color: #ff4444;
}

.person-card.deceased {
  filter: grayscale(0.9) brightness(0.8);
  opacity: 0.75;
  position: relative;
}

.person-card.classified .person-content,
.person-card.classified .extra-info {
  filter: blur(1px);
  pointer-events: none;
  user-select: none;
}

.person-card.renegade::before {
  content: "RENEGADE";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #661111;
  color: #fdd;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
  transform: rotate(5deg);
  box-shadow: 0 0 4px #000;
  z-index: 2;
}

.person-card.shoot-to-kill::after {
  content: "⚠ SHOOT TO KILL";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #220000;
  color: #ff4444;
  text-align: center;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 0;
  box-shadow: 0 0 6px #000;
  z-index: 1;
}

.person-card {
  position: relative;
  padding-bottom: 2.5rem; /* so shoot-to-kill banner doesn't cover content */
  transition: all 0.3s ease;
}


.tab-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin: 0.75em 0;
  background: linear-gradient(to right, #0a1e33, #0e2945);
  padding: 0.4em 0.6em;
  border-radius: 6px;
  box-shadow: inset 0 0 4px #1b3b6644;
}

/*.tab-header {
  position: relative;
  z-index: 1;
}*/

.tab-button {
  padding: 0.4em 0.8em;
  border: none;
  background: #14304e;
  color: #7dc1ff;
  cursor: pointer;
  font-size: 0.9em;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.tab-button:hover {
  background: #1a3c62;
  color: #d2eaff;
}

.tab-button.tab-active {
  background: #0b223a;
  color: #ffffff;
  font-weight: bold;
  box-shadow: 0 0 6px #4db8ff88;
}

/*.tab-button.tab-active {
  border-bottom: 2px solid transparent;
  position: relative;
  z-index: 2;
}*/


.tab-content {
  margin-bottom: 1.2em;
  background: #0d1a2b;
  border: 1px solid #1e3c5e;
  padding: 1em;
  border-radius: 6px;
  box-shadow: inset 0 0 8px #1e3c5e44;
  color: #cde8ff;
}

.tab-content.hidden {
  display: none;
}

.field {
  margin-bottom: 0.75em;
}

.field ul {
  margin: 0.3em 0 0 1.2em;
  padding-left: 1em;
  color: #b5d9ff;
}

.qrcode-wrapper {
  display: inline-block;
  padding: 1em;
  background: #0a1e33;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(77, 184, 255, 0.3);
  border: 1px solid #1b3b66;
}
.share-link,
.qrcode-button {
  text-decoration: none;
  margin-left: 1em;
  background: #003366;
  color: white;
  border: none;
  padding: 0.4em 0.8em;
  border-radius: 4px;
  cursor: pointer;
}
.qrcode-button:hover {
  background: #005599;
}
