/* =========================================================
   TH3REALFR — IDENTITÉ PREMIUM / DOCUMENTAIRE V191
   Référence visuelle : Collections Populaires Premium V16
   SAFE : couche CSS uniquement, logique fonctionnelle inchangée.
========================================================= */
:root{
  --th3-gold:#c6a252;
  --th3-gold-2:#e2c777;
  --th3-gold-3:#f0d994;
  --th3-black:#070504;
  --th3-black-soft:#0d0907;
  --th3-panel:#120d0a;
  --th3-panel-raised:#19110d;
  --th3-white:#f5f0e8;
  --th3-muted:rgba(245,240,232,.65);
  --th3-line:rgba(255,232,195,.08);
  --th3-line-gold:rgba(198,162,82,.18);
  --th3-radius-card:26px;
  --th3-radius-panel:24px;
  --th3-radius-control:14px;
  --th3-shadow-card:0 24px 68px rgba(0,0,0,.58);
  --th3-shadow-card-hover:0 38px 100px rgba(0,0,0,.78),0 0 56px rgba(198,162,82,.11);
  --th3-font-ui:Inter,Poppins,Arial,sans-serif;
  --th3-font-display:Poppins,Inter,Arial,sans-serif;
}

html{background:var(--th3-black)}
body:not(.wp-admin){
  background:
    radial-gradient(circle at 50% -220px,rgba(198,162,82,.045),transparent 480px),
    var(--th3-black) !important;
  color:var(--th3-white);
  font-family:var(--th3-font-ui);
}

/* Astra / WordPress : conserver un vrai fond TH3REALFR. */
body:not(.wp-admin) :where(.site,.site-content,.content-area,.site-main,.entry-content){
  background-color:transparent;
}

/* Typographie de marque. */
body:not(.wp-admin) :where(h1,h2,h3,.th3-title,.th3yt-archive-title,.th3yt-video-title,.th3-series-hub-title){
  font-family:var(--th3-font-display);
  color:#fff;
}

/* Les grands titres de page deviennent plus éditoriaux, sans forcer les petits titres de cartes. */
body:not(.wp-admin) :where(.th3yt-archive-title,.th3-series-hub-title,.th3-profile-info>h1,.th3-ma h1,.th3u-title){
  font-weight:950;
  letter-spacing:-.05em;
  line-height:.94;
  text-transform:uppercase;
  text-wrap:balance;
}

body:not(.wp-admin) :where(.th3yt-archive-description,.th3-profile-info p,.th3-ma-muted,.th3-v6-member-info p,.th3-footer-v300__description){
  color:var(--th3-muted) !important;
}

/* Accent doré réservé à la hiérarchie et aux actions. */
body:not(.wp-admin) :where(.th3-profile-kicker,.th3-v6-brand-kicker,.th3-ma-kicker,.th3yt-video-badge,.th3-footer-v300__eyebrow small){
  color:var(--th3-gold-2) !important;
}

/* Boutons principaux : capsule dorée du code Collections. */
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
){
  min-height:46px;
  border:0 !important;
  border-radius:999px !important;
  color:#111 !important;
  background:linear-gradient(135deg,var(--th3-gold-3),var(--th3-gold-2),var(--th3-gold)) !important;
  font-family:var(--th3-font-ui);
  font-weight:950 !important;
  box-shadow:0 18px 42px rgba(0,0,0,.44),0 0 34px rgba(198,162,82,.12) !important;
  transition:transform .22s ease,box-shadow .22s ease,filter .22s ease !important;
}

@media(hover:hover){
  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
  ):hover{
    transform:translateY(-2px);
    filter:saturate(1.06) brightness(1.02);
    box-shadow:0 24px 58px rgba(0,0,0,.58),0 0 46px rgba(198,162,82,.18) !important;
  }
}

/* Actions secondaires : verre noir discret. */
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:1px solid rgba(255,232,195,.08) !important;
  border-radius:999px !important;
  color:#fff !important;
  background:rgba(245,240,232,.035) !important;
  box-shadow:none !important;
}

/* Cartes principales communes. Ne touche pas aux dimensions propres à chaque module. */
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-line) !important;
  border-radius:var(--th3-radius-panel) !important;
  background:
    radial-gradient(circle at 18% 0,rgba(198,162,82,.055),transparent 34%),
    linear-gradient(145deg,#19110d,#0d0907 74%) !important;
  box-shadow:var(--th3-shadow-card) !important;
}

/* Cartes média : rendu cinématographique, contours subtils. */
body:not(.wp-admin) :where(.th3yt-card-thumbnail,.th3-series-card,.th3-video-card,.th3-ma-item){
  outline:1px solid rgba(255,255,255,.055);
  outline-offset:-1px;
}

@media(hover:hover){
  body:not(.wp-admin) :where(.th3-series-card,.th3-video-card,.th3-ma-item,.th3-v6-dashboard a){
    transition:transform .32s cubic-bezier(.2,.8,.2,1),border-color .32s ease,outline-color .32s ease,box-shadow .32s ease !important;
  }
  body:not(.wp-admin) :where(.th3-series-card,.th3-video-card,.th3-ma-item,.th3-v6-dashboard a):hover{
    transform:translateY(-5px);
    border-color:rgba(226,199,119,.25) !important;
    outline-color:rgba(226,199,119,.24);
    box-shadow:var(--th3-shadow-card-hover) !important;
  }
}

/* Images média : même densité que Collections V16. */
body:not(.wp-admin) :where(.th3yt-card-thumbnail img,.th3-series-card img,.th3-video-card img,.th3-ma-thumb){
  filter:brightness(.78) saturate(1.02) contrast(1.04);
  transition:transform .55s cubic-bezier(.2,.8,.2,1),filter .3s ease;
}
@media(hover:hover){
  body:not(.wp-admin) :where(.th3-series-card,.th3-video-card,.th3-ma-item):hover img{
    filter:brightness(.92) saturate(1.06) contrast(1.05);
  }
}

/* Badges : noir translucide + or, cohérent avec les Collections. */
body:not(.wp-admin) :where(.th3yt-card-badge,.th3yt-video-badge,.th3-profile-kicker,.th3-v6-brand-kicker){
  border:1px solid rgba(198,162,82,.27) !important;
  border-radius:999px;
  color:var(--th3-gold-2) !important;
  background:rgba(0,0,0,.56) !important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 9px 24px rgba(0,0,0,.28) !important;
}

/* Champs de formulaire. */
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:1px solid rgba(255,232,195,.08);
  border-radius:var(--th3-radius-control);
  background:#0d0907;
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
body:not(.wp-admin) [class*="th3-"] :where(input,select,textarea):focus{
  border-color:rgba(226,199,119,.45);
  box-shadow:0 0 0 3px rgba(198,162,82,.08);
}

/* Header : rapprocher PC de la palette Collections, sans toucher à la structure mobile. */
.th3u-header{
  background:linear-gradient(180deg,rgba(13,9,7,.985),rgba(13,9,7,.955)) !important;
  border-bottom-color:rgba(198,162,82,.16) !important;
  box-shadow:0 12px 42px rgba(0,0,0,.48) !important;
}
.th3u-brand strong{
  background:linear-gradient(135deg,#fff 12%,var(--th3-gold-3) 64%,var(--th3-gold)) !important;
  -webkit-background-clip:text !important;
  background-clip:text !important;
  color:transparent !important;
}
.th3u-ranking,.th3u-icon,.th3u-profile-trigger{
  border-color:rgba(255,232,195,.08) !important;
  background:rgba(245,240,232,.035) !important;
}

/* Footer : même noir, séparateurs fins et or discret. */
.th3-footer-v300{
  background:
    radial-gradient(circle at 20% 0,rgba(226,195,122,.07),transparent 34%),
    linear-gradient(180deg,#0d0907,#070504) !important;
}
.th3-footer-v300__bottom{border-color:rgba(255,255,255,.07) !important}
.th3-footer-v300 a:hover{color:var(--th3-gold-2) !important}

/* Mobile SAFE : pas de hover artificiel, rayons et ombres plus légers. */
@media(max-width:767px){
  :root{
    --th3-radius-card:22px;
    --th3-radius-panel:20px;
    --th3-shadow-card:0 18px 48px rgba(0,0,0,.5);
  }
  body:not(.wp-admin){
    background:var(--th3-black) !important;
  }
  body:not(.wp-admin) :where(.th3-ma-card,.th3-ma-item,.th3-membership-card,.th3-v6-dashboard a,.th3-profile-stats>div,.th3u-meta,.th3u-sidebar){
    box-shadow:0 16px 42px rgba(0,0,0,.44) !important;
  }
  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){
    min-height:48px;
    box-shadow:0 12px 30px rgba(0,0,0,.38),0 0 20px rgba(198,162,82,.08) !important;
  }
  .th3u-header{
    background:rgba(13,9,7,.97) !important;
    border-bottom-color:rgba(255,255,255,.075) !important;
  }
}

@media(prefers-reduced-motion:reduce){
  body:not(.wp-admin) [class*="th3-"] *,
  body:not(.wp-admin) [class*="th3-"] *::before,
  body:not(.wp-admin) [class*="th3-"] *::after{
    transition:none !important;
    animation:none !important;
  }
}
