/* ========================================================================== 
   TH3REALFR 6.7.1.598.31 — PALETTE GLOBALE ISSUE DU HERO
   Couche visuelle SAFE : couleurs, surfaces, contrôles et états uniquement.
   Les dimensions / templates métier des pages ne sont pas restructurés.
   ========================================================================== */
:root{
  --th3-hero-bg:#02070d;
  --th3-hero-bg-soft:#04101a;
  --th3-hero-panel:#07131f;
  --th3-hero-panel-2:#0b1a29;
  --th3-hero-panel-3:#101f2e;
  --th3-hero-gold:#d5a746;
  --th3-hero-gold-light:#e4b24d;
  --th3-hero-gold-pale:#f1d58c;
  --th3-hero-text:#f2f4f6;
  --th3-hero-muted:#9aa9b7;
  --th3-hero-line:rgba(171,198,222,.10);
  --th3-hero-line-gold:rgba(228,178,77,.22);
  --th3-hero-konoha:#5fa968;
  --th3-hero-suna:#d5a746;
  --th3-hero-kumo:#8f5ad8;
  --th3-hero-kiri:#4c93cc;
  --th3-hero-iwa:#8a6042;
  --th3-hero-tetsu:#c1c9d2;
}

body:not(.wp-admin){
  background:
    radial-gradient(circle at 67% -240px,rgba(119,76,185,.095),transparent 520px),
    radial-gradient(circle at 42% -280px,rgba(63,126,181,.085),transparent 580px),
    linear-gradient(180deg,#02070d 0%,#030b13 48%,#02070d 100%) !important;
  color:var(--th3-hero-text);
}
body:not(.wp-admin) :where(.site,.site-content,.content-area,.site-main,.entry-content){background-color:transparent!important}
body:not(.wp-admin) :where(h1,h2,h3,h4,h5,h6){color:var(--th3-hero-text)}
body:not(.wp-admin) :where(.th3-ma-muted,.th3-profile-info p,.th3yt-archive-description,.th3-v6-member-info p,.th3-footer-v300__description){color:var(--th3-hero-muted)!important}

/* Surfaces communes — bleu nuit du Hero. */
body:not(.wp-admin) :where(
  .th3-series-card,.th3-video-card,.th3-member-card,.th3-universe-card,
  .th3-ma-card,.th3-ma-item,.th3-membership-card,.th3-v6-dashboard a,
  .th3-profile-stats>div,.th3u-meta,.th3u-sidebar,.th3u-sidebox,.th3u-info
){
  border-color:var(--th3-hero-line)!important;
  background:
    radial-gradient(circle at 20% 0,rgba(76,147,204,.075),transparent 38%),
    linear-gradient(145deg,var(--th3-hero-panel-2),var(--th3-hero-bg-soft) 74%)!important;
  box-shadow:0 26px 76px rgba(0,0,0,.56),inset 0 1px 0 rgba(255,255,255,.018)!important;
}
@media(hover:hover){
  body:not(.wp-admin) :where(.th3-series-card,.th3-video-card,.th3-ma-item,.th3-v6-dashboard a):hover{
    border-color:rgba(228,178,77,.28)!important;
    box-shadow:0 34px 92px rgba(0,0,0,.68),0 0 44px rgba(143,90,216,.07)!important;
  }
}

/* Boutons principaux et secondaires. */
body:not(.wp-admin) :where(
  .th3-btn-primary,.th3-v6-btn-primary,.th3-profile-btn-primary,
  .th3-membership-upgrade,.th3-avatar-submit,.th3-crop-validate,
  .th3-ma-btn:not(.is-dark),.th3u-btn.is-primary,.th3-add-cart
){
  color:#081018!important;
  background:linear-gradient(135deg,var(--th3-hero-gold-pale),var(--th3-hero-gold-light),var(--th3-hero-gold))!important;
  box-shadow:0 16px 42px rgba(0,0,0,.45),0 0 30px rgba(228,178,77,.11)!important;
}
body:not(.wp-admin) :where(.th3-btn-secondary,.th3-v6-btn-secondary,.th3-profile-actions a,.th3yt-action-button,.th3-ma-btn.is-dark){
  border-color:var(--th3-hero-line)!important;
  background:rgba(7,19,31,.66)!important;
  color:var(--th3-hero-text)!important;
}

/* Badges / labels. */
body:not(.wp-admin) :where(.th3yt-card-badge,.th3yt-video-badge,.th3-profile-kicker,.th3-v6-brand-kicker){
  border-color:var(--th3-hero-line-gold)!important;
  color:var(--th3-hero-gold-light)!important;
  background:rgba(2,7,13,.72)!important;
}

/* Formulaires et recherche internes. */
body:not(.wp-admin) [class*="th3-"] :where(input[type="text"],input[type="email"],input[type="password"],input[type="search"],input[type="number"],select,textarea){
  border-color:var(--th3-hero-line)!important;
  background:#04101a!important;
  color:var(--th3-hero-text)!important;
}
body:not(.wp-admin) [class*="th3-"] :where(input,select,textarea):focus{
  border-color:rgba(228,178,77,.52)!important;
  box-shadow:0 0 0 3px rgba(228,178,77,.075)!important;
}

/* Footer global dans le même bleu nuit. */
body:not(.wp-admin) .th3-footer-v300{
  background:
    radial-gradient(circle at 24% 0,rgba(76,147,204,.07),transparent 34%),
    linear-gradient(180deg,#04101a,#02070d)!important;
  border-top-color:var(--th3-hero-line-gold)!important;
}
body:not(.wp-admin) .th3-footer-v300__bottom{border-color:var(--th3-hero-line)!important}
body:not(.wp-admin) .th3-footer-v300 a:hover{color:var(--th3-hero-gold-light)!important}

/* Palette canonique des six villages. On expose l'accent sans imposer de layout. */
:where(.th3-village-konoha,.village-konoha,.is-konoha,[data-village="konoha"]){--th3-village-accent:var(--th3-hero-konoha)}
:where(.th3-village-suna,.village-suna,.is-suna,[data-village="suna"]){--th3-village-accent:var(--th3-hero-suna)}
:where(.th3-village-kumo,.village-kumo,.is-kumo,[data-village="kumo"]){--th3-village-accent:var(--th3-hero-kumo)}
:where(.th3-village-kiri,.village-kiri,.is-kiri,[data-village="kiri"]){--th3-village-accent:var(--th3-hero-kiri)}
:where(.th3-village-iwa,.village-iwa,.is-iwa,[data-village="iwa"]){--th3-village-accent:var(--th3-hero-iwa)}
:where(.th3-village-tetsu,.village-tetsu,.is-tetsu,[data-village="tetsu"]){--th3-village-accent:var(--th3-hero-tetsu)}

/* Header historique mobile : palette uniquement, structure intacte. */
@media(max-width:1040px){
  body:not(.wp-admin) .th3u-header{
    background:rgba(2,7,13,.975)!important;
    border-bottom-color:rgba(228,178,77,.16)!important;
    box-shadow:0 14px 44px rgba(0,0,0,.48)!important;
  }
  body:not(.wp-admin) .th3u-ranking,
  body:not(.wp-admin) .th3u-icon,
  body:not(.wp-admin) .th3u-profile-trigger{
    border-color:var(--th3-hero-line)!important;
    background:rgba(7,19,31,.76)!important;
  }
}
