/* =========================================================
   VEFA MASTER — Stylage Asgaros Forum "Le Club du Neuf"
   Chargé conditionnellement (cf. functions.php) uniquement
   sur la page /club et les sous-routes Asgaros.
   ========================================================= */

:root {
  --vm-navy:   #0D1B2A;
  --vm-gold:   #C9A84C;
  --vm-gold-light: #EFCB63;
  --vm-gold-glow: rgba(239,203,99,0.55);
  --vm-gold-glow-soft: rgba(239,203,99,0.25);
  --vm-gradient-or: linear-gradient(145deg, #A88A35 0%, #C9A84C 30%, #EFCB63 70%, #F4D275 100%);
  --vm-gradient-cta: linear-gradient(135deg, #EFCB63 0%, #C9A84C 58%, #DCBE57 100%);
  --vm-cream:  #F8F5EF;
  --vm-ink:    #1a2638;
  --vm-mute:   #6b7280;
  --vm-line:   rgba(13, 27, 42, 0.08);
  --vm-line-2: rgba(13, 27, 42, 0.14);
  --vm-shadow: 0 1px 2px rgba(13,27,42,.04), 0 8px 24px -12px rgba(13,27,42,.12);
  --vm-radius: 14px;
}

/* Page /club : chapeau éditorial */
.page-id-138 .entry-content > .vm-club-intro,
.page-id-138 .entry-content > p.vm-club-intro {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--vm-ink);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  padding: 1.25rem 1.5rem;
  background: var(--vm-cream);
  border-radius: var(--vm-radius);
  border: 1px solid var(--vm-line);
}
.page-id-138 .entry-content > .vm-club-intro strong {
  color: var(--vm-navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

/* ---- Wrapper forum ---- */
#af-wrapper {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--vm-ink);
  max-width: 1080px;
  margin: 0 auto;
  font-size: 1.05rem;       /* base agrandie pour meilleure lisibilité */
  line-height: 1.55;
}

#af-wrapper a {
  color: var(--vm-navy);
  text-decoration: none;
  transition: color .15s ease;
}
#af-wrapper a:hover { color: var(--vm-gold); }

/* ---- Header (nav + recherche)
   Le CSS d'Asgaros se charge après le child theme : on force avec !important
   sur les règles critiques (couleurs, layout). Pas de !important sur le décor.
   ---- */
#af-wrapper #forum-header {
  background: var(--vm-navy) !important;
  background-image: none !important;
  color: #fff !important;
  border-radius: var(--vm-radius);
  padding: 0.5rem 0.75rem !important;
  display: flex !important;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--vm-shadow);
  margin-bottom: 1.25rem;
}
#af-wrapper #forum-header a,
#af-wrapper #forum-header a:visited {
  color: #fff !important;
  background: transparent !important;
  font-weight: 500;
  text-decoration: none !important;
}
#af-wrapper #forum-header a:hover { color: var(--vm-gold) !important; }

#af-wrapper #forum-navigation {
  display: flex !important;
  gap: 1.25rem;
  flex: 1;
  flex-wrap: wrap;
  background: transparent !important;
}
#af-wrapper #forum-navigation a {
  padding: 0.5rem 0.25rem !important;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  background: transparent !important;
  border-radius: 0 !important;
}

#af-wrapper #forum-search {
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}
#af-wrapper #forum-search form {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255,255,255,.08) !important;
  border-radius: 999px !important;
  padding: 0.3rem 0.9rem !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  margin: 0 !important;
  height: 36px !important;
  box-sizing: border-box !important;
}
#af-wrapper #forum-search input,
#af-wrapper #forum-search input[type="search"] {
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  outline: 0 !important;
  width: 160px !important;
  max-width: 100% !important;
  height: auto !important;
  line-height: 1.2 !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  vertical-align: middle !important;
}
#af-wrapper #forum-search input::placeholder { color: rgba(255,255,255,.55) !important; }
#af-wrapper #forum-search .search-icon { color: var(--vm-gold) !important; margin-right: 0.5rem; }

#af-wrapper #forum-navigation-mobile a {
  background: var(--vm-gold) !important;
  color: var(--vm-navy) !important;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

/* Les liens "Se connecter" / "S'inscrire" dans la nav du forum-header :
   on garde le même traitement neutre que les autres liens (pas de pastille). */
#af-wrapper #forum-header .login-link,
#af-wrapper #forum-header .register-link {
  background: transparent !important;
  color: #fff !important;
}
#af-wrapper #forum-header .login-link:hover,
#af-wrapper #forum-header .register-link:hover {
  color: var(--vm-gold) !important;
}

/* ---- Breadcrumbs ---- */
#forum-breadcrumbs {
  font-size: 0.85rem;
  color: var(--vm-mute);
  padding: 0 0.25rem 1rem;
}
#forum-breadcrumbs a { color: var(--vm-mute); }
#forum-breadcrumbs a:hover { color: var(--vm-navy); }
#forum-breadcrumbs .separator { margin: 0 0.5rem; color: var(--vm-line-2); }

/* ---- Titres ---- */
.main-title,
#af-wrapper h1,
#af-wrapper h2,
#af-wrapper h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--vm-navy);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.main-title { font-size: 2.6rem; margin: 0.5rem 0 1.25rem; }
.main-title em,
#af-wrapper h1 em,
#af-wrapper h2 em {
  font-style: italic;
  background: var(--vm-gradient-or);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-right: 0.15em;
}

/* ---- Bandeau de catégorie ---- */
.title-element {
  background: linear-gradient(135deg, var(--vm-navy) 0%, #142a44 100%);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: var(--vm-radius) var(--vm-radius) 0 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}
.title-element .last-post-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vm-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.title-element-dark {
  background: var(--vm-cream);
  color: var(--vm-navy);
  border-radius: var(--vm-radius);
  margin: 1.5rem 0 0.75rem;
  border: 1px solid var(--vm-line);
}
.title-element-dark .title-element-icon { color: var(--vm-gold); margin-right: 0.5rem; }

/* ---- Liste des forums ---- */
.content-container {
  background: #fff;
  border-radius: 0 0 var(--vm-radius) var(--vm-radius);
  border: 1px solid var(--vm-line);
  border-top: 0;
  overflow: hidden;
  box-shadow: var(--vm-shadow);
}

.content-element {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--vm-line);
  background: #fff;
  transition: background .15s ease;
}
.content-element:last-child { border-bottom: 0; }
.content-element:hover { background: var(--vm-cream); }

.forum-status {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--vm-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vm-gold);
  font-size: 1.1rem;
}
.forum-status.unread { background: var(--vm-gold); color: var(--vm-navy); }

.forum-name { flex: 1; min-width: 0; }
.forum-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--vm-navy);
  display: block;
  line-height: 1.2;
}
.forum-title:hover { color: var(--vm-gold); }
.forum-description {
  display: block;
  color: var(--vm-mute);
  font-size: 1rem;
  margin-top: 0.25rem;
  line-height: 1.5;
}
.forum-stats {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--vm-mute);
  background: var(--vm-cream);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.forum-poster, .forum-lastpost-small {
  flex: 0 0 200px;
  font-size: 0.95rem;
  color: var(--vm-mute);
}
.no-topics { font-style: italic; color: var(--vm-mute); }

/* ---- Boutons ---- */
.button,
#af-wrapper button,
#af-wrapper input[type="submit"],
.editor-element button,
#editor-submit {
  background: var(--vm-gradient-cta);
  color: var(--vm-navy);
  border: 0;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .35s ease, box-shadow .35s ease;
  box-shadow: 0 8px 25px var(--vm-gold-glow-soft);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button::before,
#af-wrapper button::before,
#af-wrapper input[type="submit"]::before,
#editor-submit::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  z-index: -1;
  pointer-events: none;
}
.button:hover,
#af-wrapper button:hover,
#af-wrapper input[type="submit"]:hover,
#editor-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px var(--vm-gold-glow);
}
.button:hover::before,
#af-wrapper button:hover::before,
#af-wrapper input[type="submit"]:hover::before,
#editor-submit:hover::before { left: 120%; }

a.button-normal,
#af-wrapper .new-content-element a {
  background: var(--vm-navy);
  color: #fff;
}
a.button-normal:hover { background: var(--vm-ink); color: var(--vm-gold); }

/* ---- Notices ---- */
.notices-panel .notice {
  background: var(--vm-cream);
  border-left: 3px solid var(--vm-gold);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  color: var(--vm-ink);
  font-size: 1.02rem;
  margin: 0.5rem 0 1.25rem;
}
.notices-panel .notice a { color: var(--vm-navy); font-weight: 600; }

/* ---- Editeur de message ---- */
.editor-element textarea,
.editor-element input[type="text"],
#af-wrapper input[type="text"],
#af-wrapper input[type="email"],
#af-wrapper input[type="password"] {
  border: 1px solid var(--vm-line-2);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--vm-ink);
  width: 100%;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.editor-element textarea:focus,
#af-wrapper input:focus {
  border-color: var(--vm-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, .15);
}

/* ---- Statistiques ---- */
#statistics {
  background: #fff;
  border: 1px solid var(--vm-line);
  border-radius: var(--vm-radius);
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: var(--vm-shadow);
}
#statistics-elements {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.statistics-element {
  text-align: center;
  padding: 1.1rem 0.5rem;
  border-right: 1px solid var(--vm-line);
}
.statistics-element:last-child { border-right: 0; }
.element-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--vm-gold);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.statistics-element-icon { color: var(--vm-navy); margin-right: 0.4rem; opacity: 0.6; }
.element-name {
  font-size: 0.88rem;
  text-transform: uppercase;
  color: var(--vm-mute);
  letter-spacing: 0.08em;
}
#statistics-online-users {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--vm-line);
  font-size: 0.95rem;
  color: var(--vm-mute);
  background: var(--vm-cream);
}
.online-users-icon { color: var(--vm-gold); margin-right: 0.35rem; }

/* ---- Read/Unread légende ---- */
#read-unread {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  color: var(--vm-mute);
  background: var(--vm-cream);
  border-radius: var(--vm-radius);
  margin: 1rem 0;
}
.indicator {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
}
.indicator.unread { background: var(--vm-gold); }
.indicator.read   { background: var(--vm-line-2); }

/* ---- Profil / avatar ---- */
.profile-link.highlight-admin {
  color: var(--vm-gold);
  font-weight: 600;
}
.profile-link.highlight-admin::before {
  content: "★ ";
  color: var(--vm-gold);
}

/* ---- Pagination ---- */
.pagination a, .pagination span {
  display: inline-block;
  min-width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 8px;
  margin: 0 2px;
  font-size: 0.88rem;
  background: var(--vm-cream);
  color: var(--vm-navy);
}
.pagination .current {
  background: var(--vm-gold);
  color: var(--vm-navy);
  font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
  #forum-navigation { display: none; }
  #forum-navigation.toggled { display: flex; flex-direction: column; width: 100%; }
  #forum-search input { width: 130px; }
  .content-element { flex-wrap: wrap; }
  .forum-poster, .forum-lastpost-small { flex: 1 0 100%; padding-left: 60px; }
  #statistics-elements { grid-template-columns: repeat(2, 1fr); }
  .statistics-element { border-right: 0; border-bottom: 1px solid var(--vm-line); }
  .main-title { font-size: 1.6rem; }
}
