#agents-page {
  min-height: calc(100vh - 58px);
  background-color: #f4f4f2;
  background-image:
    linear-gradient(180deg, rgba(244,244,242,.88), rgba(244,244,242,.94)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="180" height="90"><text x="0" y="18" font-family="monospace" font-size="13" fill="%2300000018">01001101 0</text><text x="15" y="40" font-family="monospace" font-size="13" fill="%2300000018">1101 01100</text><text x="0" y="62" font-family="monospace" font-size="13" fill="%2300000018">10 0110101</text><text x="20" y="84" font-family="monospace" font-size="13" fill="%2300000018">01 101001</text></svg>'),
    url('/img/agents-bg.jpg');
  background-size: auto, auto, cover;
  background-position: center, center, center;
  background-repeat: repeat, repeat, no-repeat;
  background-attachment: scroll, scroll, fixed;
  color: #111;
  padding: 40px 24px 60px;
}

.agents-header { text-align: center; max-width: 700px; margin: 0 auto 40px; }
.agents-header h1 {
  font-family: 'JetBrains Mono', monospace; font-size: 26px; letter-spacing: 6px;
  color: #0a0a0a; margin: 0 0 8px; font-weight: 700;
}
.agents-header p { color: #444; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }

#agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}

.agent-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  background: #0a0a0a;
  border: 2px solid #0a0a0a;
  filter: grayscale(1) contrast(1.15);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.agent-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .2s; }
.agent-card .agent-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(10,10,10,.88); color: #fff;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 3px;
  text-align: center; padding: 10px 6px;
}
.agent-card:hover, .agent-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 0 0 3px #0a0a0a, 0 0 28px 4px rgba(0,0,0,.55);
  filter: grayscale(.4) contrast(1.15);
}
.agent-card:hover img { opacity: 1; }

/* Dossier plein écran */
#agent-dossier {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(6,6,6,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
#agent-dossier-inner {
  background: #f4f4f2; color: #111;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 3px solid #0a0a0a;
  position: relative;
}
#dossier-close {
  position: sticky; top: 0; left: 0; right: 0; z-index: 5;
  width: 100%; background: #0a0a0a; color: #fff; border: none;
  padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 2px; cursor: pointer;
}
#dossier-close:hover { background: #222; }

.dossier-body { display: flex; flex-wrap: wrap; gap: 0; }
.dossier-photo-wrap {
  position: relative; flex: 0 0 260px; max-width: 100%;
  filter: grayscale(1) contrast(1.2);
  border-right: 3px solid #0a0a0a;
}
.dossier-photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }
.dossier-stamp {
  position: absolute; top: 18px; left: -18px;
  transform: rotate(-18deg);
  border: 4px solid #7a1f1f; color: #7a1f1f;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 20px; letter-spacing: 3px;
  padding: 6px 14px; background: rgba(244,244,242,.75);
  text-transform: uppercase;
}

.dossier-text { flex: 1; min-width: 280px; padding: 22px 24px; }
.dossier-text h2 {
  font-family: 'JetBrains Mono', monospace; font-size: 22px; letter-spacing: 4px; margin: 0 0 14px;
  border-bottom: 2px solid #0a0a0a; padding-bottom: 10px;
}
.dossier-text pre {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; margin: 0; color: #1a1a1a;
}

@media (max-width: 640px) {
  .agents-header h1 { font-size: 19px; letter-spacing: 3px; }
  .dossier-photo-wrap { flex-basis: 100%; border-right: none; border-bottom: 3px solid #0a0a0a; }
  .dossier-photo-wrap img { min-height: 220px; }
}
