/**
 * hosanna-theme.css
 * Thème sombre doré partagé entre toutes les pages backoffice :
 * dashboard, login, invite, stats-director, admin
 *
 * Dépendances : aucune (autonome)
 * Utilisation  : <link rel="stylesheet" href="/css/hosanna-theme.css">
 */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Lato:wght@300;400;700&family=Fira+Code:wght@400;500&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --bg:         #0d0f14;
  --surface:    #13161e;
  --surface2:   #191c26;
  --border:     #1f2433;
  --border2:    #2a2f42;
  --accent:     #c9a84c;
  --accent-dim: #7d6630;
  --accent-bg:  rgba(201,168,76,.08);
  --accent-glow:rgba(201,168,76,.15);
  --text:       #e8e4da;
  --muted:      #6b7080;
  --muted2:     #4a4f60;
  --success:    #4caf7d;
  --error:      #e05c5c;
  --warn:       #e0a400;
  --radius:     .6rem;
  --radius-lg:  1rem;
}

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

/* ── Base ─────────────────────────────────────────────────────────────────── */
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-weight: 300;
}

/* ── Fond décoratif (dégradés dorés) ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% -5%,  rgba(201,168,76,.07) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 95% 80%,  rgba(201,168,76,.04) 0%, transparent 50%);
}

/* ── Header sticky ────────────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13,15,20,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

/* ── Marque Hosanna ───────────────────────────────────────────────────────── */
.header-brand {
  display: flex; align-items: center; gap: .5rem;
}
.header-brand .cross,
.header-brand .cross-icon {
  color: var(--accent);
  font-size: 1rem;
}
.header-brand h1 {
  font-family: 'Cinzel', serif;
  font-size: 1rem; font-weight: 600; letter-spacing: .12em;
  color: var(--text);
}

/* ── Titre de section dans le header ─────────────────────────────────────── */
.header-left  { display: flex; align-items: center; gap: .8rem; }
.header-sep   { color: var(--muted2); font-size: .8rem; }
.header-title { font-size: .85rem; color: var(--muted); letter-spacing: .06em; }

/* ── Bouton retour ────────────────────────────────────────────────────────── */
.btn-back {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem; background: transparent;
  border: 1px solid var(--border2); border-radius: var(--radius);
  color: var(--muted); font-family: 'Lato', sans-serif; font-size: .8rem;
  cursor: pointer; transition: border-color .2s, color .2s; text-decoration: none;
}
.btn-back:hover { border-color: var(--accent-dim); color: var(--accent); }

/* ── Bouton déconnexion ───────────────────────────────────────────────────── */
.btn-logout {
  background: transparent; border: 1px solid var(--border2); border-radius: var(--radius);
  color: var(--muted); font-family: 'Lato', sans-serif; font-size: .8rem;
  padding: .35rem .75rem; cursor: pointer; transition: border-color .2s, color .2s;
}
.btn-logout:hover { border-color: var(--error); color: var(--error); }

/* ── Bouton primaire doré ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.2rem;
  background: linear-gradient(135deg, #b8922e, var(--accent));
  border: none; border-radius: var(--radius);
  color: #0d0f14;
  font-family: 'Cinzel', serif; font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; cursor: pointer; transition: opacity .2s;
  white-space: nowrap;
}
.btn-primary:hover   { opacity: .88; }
.btn-primary:active  { transform: scale(.98); }
.btn-primary:disabled{ opacity: .5; cursor: default; }

/* ── Select ───────────────────────────────────────────────────────────────── */
select {
  background: var(--bg); border: 1px solid var(--border2); border-radius: var(--radius);
  color: var(--text); font-family: 'Lato', sans-serif; font-size: .82rem;
  padding: .3rem .6rem; outline: none; cursor: pointer; transition: border-color .2s;
}
select:focus { border-color: var(--accent-dim); }

/* ── Section label (titre Cinzel doré) ───────────────────────────────────── */
.section-label {
  font-family: 'Cinzel', serif; font-size: .72rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); opacity: .7; margin-bottom: .9rem;
}

/* ── Layout principal ─────────────────────────────────────────────────────── */
main {
  max-width: 960px; margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative; z-index: 1;
}

/* ── Toast ────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem; z-index: 100;
}
.toast {
  padding: .55rem .9rem; border-radius: var(--radius);
  font-size: .82rem; animation: toastIn .25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.toast.success { background: #1a3327; border: 1px solid rgba(76,175,125,.4); color: var(--success); }
.toast.error   { background: #2d1a1a; border: 1px solid rgba(224,92,92,.4);  color: var(--error); }

/* ── Loader / spinner ─────────────────────────────────────────────────────── */
.loader { text-align: center; padding: 3rem; color: var(--muted); }
.spinner-gold {
  display: inline-block; width: 1.2rem; height: 1.2rem;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: .5rem;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: .9rem; }
.empty .cross-big {
  font-size: 2.5rem; color: var(--accent); opacity: .2;
  display: block; margin-bottom: 1rem;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── Modal confirmation ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: none; align-items: center; justify-content: center; z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 1.8rem;
  width: min(380px, 90vw); text-align: center;
}
.modal h3 { font-family: 'Cinzel', serif; font-size: 1rem; margin-bottom: .7rem; }
.modal p  { font-size: .88rem; color: var(--muted); margin-bottom: 1.4rem; line-height: 1.5; }
.modal-actions { display: flex; gap: .6rem; justify-content: center; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  main { padding: 1.2rem .8rem 3rem; }
  header { padding: .6rem 1rem; }
}
