/* ════════════════════════════════════════════════════════════════
   SGC OVERVIEW — FACTION HERO BANNER
   Bannière pleine largeur avec illustration race (infra<faction>.png.webp),
   emblème, nom, tagline. Aussi voyante que la planète 3D (≈260px desktop).
   ════════════════════════════════════════════════════════════════ */

.ov-faction-hero {
  position: relative;
  height: 260px;
  margin: 8px 0 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(135deg,
    rgba(var(--accent-rgb), 0.12) 0%,
    rgba(8, 12, 22, 0.7) 50%,
    rgba(0, 0, 0, 0.85) 100%);
  box-shadow:
    0 0 28px rgba(var(--accent-rgb), 0.10) inset,
    0 6px 24px rgba(0, 0, 0, 0.55);
}

/* Background image : object-fit cover. La valeur object-position est
   définie inline par le JS (FACTION_HERO_POS dans sgc-overview-faction-hero.js)
   pour permettre un cadrage fin par race, éditable à la main. */
.ofh-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%; /* fallback, overridé inline par le JS */
  z-index: 0;
  filter: saturate(1.08) contrast(1.04);
  transform-origin: center;
  animation: ofhKenburns 32s ease-in-out infinite alternate;
}
@keyframes ofhKenburns {
  0%   { transform: scale(1.00) translateX(0); }
  100% { transform: scale(1.06) translateX(-1.5%); }
}

/* Gradient overlay : sombre à gauche pour lisibilité du texte, fondu vers la droite */
.ofh-grad {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(0,0,0,0.72) 0%,
      rgba(0,0,0,0.48) 32%,
      rgba(0,0,0,0.18) 62%,
      rgba(0,0,0,0.05) 100%),
    linear-gradient(180deg,
      rgba(0,0,0,0.10) 0%,
      transparent 28%,
      transparent 70%,
      rgba(0,0,0,0.50) 100%);
}

/* Ligne d'accent en bas */
.ofh-accent-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(var(--accent-rgb), 0.7) 30%,
    rgba(var(--accent-rgb), 0.7) 70%,
    transparent 100%);
  z-index: 3;
}

/* Corner tech brackets — cohérents avec le Command Center */
.ofh-corner {
  position: absolute;
  width: 20px; height: 20px;
  border: 1.5px solid rgba(var(--accent-rgb), 0.7);
  z-index: 4;
  pointer-events: none;
}
.ofh-corner.tl { top: 12px; left: 12px;     border-right: 0; border-bottom: 0; }
.ofh-corner.tr { top: 12px; right: 12px;    border-left: 0;  border-bottom: 0; }
.ofh-corner.bl { bottom: 12px; left: 12px;  border-right: 0; border-top: 0; }
.ofh-corner.br { bottom: 12px; right: 12px; border-left: 0;  border-top: 0; }

/* Contenu (emblème + textes) */
.ofh-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 32px;
}

.ofh-emblem {
  width: 110px;
  height: 110px;
  object-fit: contain;
  flex-shrink: 0;
  filter:
    drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.6))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
}

.ofh-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ofh-eyebrow {
  font-family: 'Orbitron', var(--font-display, sans-serif);
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
}

.ofh-name {
  font-family: 'Orbitron', var(--font-display, sans-serif);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 0 16px rgba(var(--accent-rgb), 0.6),
    0 2px 8px rgba(0, 0, 0, 0.9);
  line-height: 1.05;
}

.ofh-tagline {
  font-family: 'Rajdhani', var(--font-body, sans-serif);
  font-size: 15px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  max-width: 58%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ov-faction-hero { height: 220px; }
  .ofh-content { gap: 20px; padding: 0 24px; }
  .ofh-emblem { width: 88px; height: 88px; }
  .ofh-name { font-size: 32px; letter-spacing: 4px; }
  .ofh-tagline { font-size: 14px; max-width: 65%; }
}
@media (max-width: 768px) {
  .ov-faction-hero { height: 180px; margin: 6px 0 12px; }
  .ofh-content { gap: 16px; padding: 0 18px; }
  .ofh-emblem { width: 72px; height: 72px; }
  .ofh-name { font-size: 26px; letter-spacing: 3px; }
  .ofh-tagline { font-size: 13px; max-width: 72%; }
  .ofh-corner { width: 16px; height: 16px; }
}
@media (max-width: 480px) {
  .ov-faction-hero { height: 140px; border-radius: 10px; }
  .ofh-content { gap: 12px; padding: 0 14px; }
  .ofh-emblem { width: 56px; height: 56px; }
  .ofh-name { font-size: 22px; letter-spacing: 2px; }
  .ofh-tagline { font-size: 11px; max-width: 100%; }
  .ofh-eyebrow { font-size: 10px; letter-spacing: 2.5px; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .ofh-bg { animation: none; }
}
