
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:ital,wght@0,300;0,400;0,700;1,400&display=swap');

/* Note: si les fonts Google échouent (hors ligne), on bascule sur les fonts systèmes */

:root {
  --bg: #1a1410;
  --bg2: #221c16;
  --bg3: #2e261e;
  --border: #4a3c2a;
  --gold: #c9a84c;
  --gold-light: #e4c97a;
  --text: #d4c8b0;
  --text-muted: #8a7a65;
  --accent: #8b3a1a;
  --accent-light: #c4612e;
  --link: #c9a84c;
  --link-hover: #e4c97a;
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Lato', Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* --- Fond décoratif --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at top left, rgba(139,58,26,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(201,168,76,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.page-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- En-tête --- */
header {
  background: linear-gradient(135deg, #0d0b08 0%, #1a1410 40%, #221c16 100%);
  border-bottom: 2px solid var(--border);
  padding: 1.5rem 0 1rem;
  position: relative;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(201,168,76,0.3);
  line-height: 1.1;
}

.site-logo span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Lato', sans-serif;
}

nav {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: 'Lato', sans-serif;
}

nav a:hover, nav a.active {
  color: var(--gold);
  border-color: var(--border);
  background: rgba(201,168,76,0.07);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 0.7rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--link); text-decoration: none; }
.breadcrumb a:hover { color: var(--link-hover); }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.5; }

/* --- Titres de section --- */
h1 {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 1.6rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 1.2rem;
  color: var(--gold-light);
  font-weight: 600;
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* --- Cards/Panels --- */
.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.panel-header {
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.panel-header h2 {
  margin: 0;
  border: none;
  padding: 0;
  font-size: 1rem;
}

.panel-body { padding: 1rem; }

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: var(--bg3);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(74,60,42,0.4);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

tr:hover td {
  background: rgba(201,168,76,0.04);
}

/* --- Liens --- */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* --- Forum list sur l'accueil --- */
.forum-list { display: flex; flex-direction: column; gap: 0.5rem; }

.forum-category {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold);
  margin: 1.5rem 0 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forum-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s;
}

.forum-item:hover { border-color: var(--gold); }

.forum-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.forum-info { flex: 1; min-width: 0; }
.forum-title { font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.forum-title a { color: var(--text); }
.forum-title a:hover { color: var(--gold); }
.forum-desc { font-size: 0.85rem; color: var(--text-muted); }
.forum-stats { text-align: right; font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; }

/* --- Stats sur l'accueil --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}

.stat-card .value {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Messages de forum --- */
.post {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(74,60,42,0.4);
}

.post:last-child { border-bottom: none; }

.post-author {
  flex-shrink: 0;
  width: 110px;
  text-align: center;
}

.post-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin: 0 auto 0.4rem;
  display: block;
  object-fit: cover;
  background: var(--bg3);
}

.post-avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin: 0 auto 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--bg3);
  color: var(--text-muted);
}

.post-username {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold-light);
}

.post-username a { color: inherit; }

.post-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.post-content-wrap { flex: 1; min-width: 0; }

.post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-body {
  font-size: 0.92rem;
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-body blockquote.bbcode-quote {
  border-left: 3px solid var(--border);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  background: var(--bg3);
  border-radius: 0 4px 4px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.post-body blockquote.bbcode-quote cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.post-body pre.bbcode-code {
  background: #0d0b08;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 1rem;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  margin: 0.5rem 0;
}

.post-body img.bbcode-img {
  max-width: 100%;
  border-radius: 4px;
}

.post-body ul.bbcode-list,
.post-body ol.bbcode-list {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

/* --- Profil membre --- */
.member-profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.member-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bg3);
}

.member-meta dt {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.member-meta dd { color: var(--text); margin-bottom: 0.2rem; }

/* --- Recherche --- */
.search-bar {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.search-bar input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus { border-color: var(--gold); }

.search-bar button {
  background: var(--accent);
  color: var(--text);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.search-bar button:hover { background: var(--accent-light); }

#search-results {
  margin-top: 0.8rem;
  display: none;
}

.search-result-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(74,60,42,0.4);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-weight: 700; margin-bottom: 0.2rem; }
.search-result-excerpt { font-size: 0.85rem; color: var(--text-muted); }

/* --- Pagination --- */
.pagination {
  display: flex;
  gap: 0.3rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s;
}

.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--bg3); color: var(--gold); border-color: var(--gold); }

/* --- Page retrouvailles --- */
.retrouvailles-box {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.retrouvailles-box h2 {
  border: none;
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.retrouvailles-box p { max-width: 600px; margin: 0 auto 1rem; }

.contact-placeholder {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-bottom: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 700px) {
  .header-inner { flex-direction: column; gap: 0.8rem; }
  nav { margin: 0; }
  .post { flex-direction: column; }
  .post-author { width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left; }
  .post-avatar, .post-avatar-placeholder { margin: 0; }
  .member-profile { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .forum-item { flex-wrap: wrap; }
  .forum-stats { text-align: left; }
}

/* --- Utilitaires --- */
.text-muted { color: var(--text-muted); }
.badge {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-gold {
  border-color: var(--gold);
  color: var(--gold);
}

.mt1 { margin-top: 0.5rem; }
.mt2 { margin-top: 1rem; }
.mb1 { margin-bottom: 0.5rem; }
.mb2 { margin-bottom: 1rem; }

/* --- Séparateur décoratif --- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  position: relative;
  margin: 1.5rem 0;
}
.divider::after {
  content: '⚔';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 0.8rem;
  color: var(--border);
  font-size: 0.8rem;
}

/* --- No-robots notice --- */
.noindex-notice {
  background: rgba(139,58,26,0.1);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}
