/* ===========================================
   SHARED.CSS — Solitarius
   Styles communs : variables, reset, body,
   header, footer, lang-switcher, back-link
   =========================================== */

/* ── Variables ───────────────────────────── */
:root {
  --gold:        #d4a853;
  --gold-light:  #f0c97a;
  --gold-dim:    #8c6239;
  --bg:          #0e0b07;
  --bg2:         #1a1410;
  --bg3:         #221c14;
  --text:        #e8dcc8;
  --text-dim:    #9a8a72;
  --border:      rgba(140,98,57,0.35);
}

/* ── Reset minimal ───────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Body commun (pages secondaires) ──────
   index.html conserve son propre body dans style.css */
body.page-secondary {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Fond radial décoratif */
body.page-secondary::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(212,168,83,.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(140,98,57,.04)  0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── En-tête ─────────────────────────────── */
.site-header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--gold-dim);
  padding: 28px 40px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-header__brand {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  letter-spacing: 3px;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 0 20px rgba(212,168,83,.3);
  /* non-cliquable sur la page courante via aria-current */
}

/* Variante titre centré (classement / famous) */
.site-header--centered {
  padding: 32px 40px 24px;
}
.site-header__title-wrap {
  text-align: center;
  flex: 1;
}
.site-header__title-wrap h1 {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(212,168,83,.4);
}
.site-header__title-wrap .header-subtitle {
  font-style: italic;
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Lien "retour" ───────────────────────── */
.back-link {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 4px;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.back-link:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}
.back-link--small {
  font-size: 11px;
}

/* ── Sélecteur de langue ─────────────────── */
#lang-switcher {
  position: fixed;
  top: 12px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 9000;
}
.lang-btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid rgba(140,98,57,.5);
  background: rgba(30,22,12,.85);
  color: rgba(212,168,83,.6);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.lang-btn.active {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(212,168,83,.15);
}

/* ── Pied de page ─────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: rgba(140,98,57,.45);
  letter-spacing: 1px;
  line-height: 1.9;
}
.site-footer__links {
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.site-footer__links a {
  color: rgba(260,180,100,.6);
  text-decoration: none;
  transition: color .2s;
}
.site-footer__links a:hover {
  color: var(--gold);
}
.site-footer__sep {
  color: rgba(260,180,100,.4);
  user-select: none;
}
.site-footer__copy {
  color: rgba(260,180,100,.4);
}

/* ── Spinner commun ──────────────────────── */
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── État vide / message ─────────────────── */
.state-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-style: italic;
}
.state-msg .icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 600px) {
  .site-header,
  .site-header--centered {
    padding: 20px 16px;
  }
  .site-header__title-wrap h1 {
    font-size: 20px;
    letter-spacing: 2px;
  }
}
