/* ============================================================= */
/* 🎨 Thème principal : couleurs & variables globales */
/* ============================================================= */
:root {
  --bg: #0f1114;
  --panel: #171a1f;
  --panel-2: #1c2026;
  --text: #e7edf5;
  --muted: #9aa6b2;
  --line: #2b3138;
  --brand: #00c1ff;
  --brand-2: #69e1ff;
  --shadow: 0 12px 28px rgba(0, 0, 0, .35);

  /* 🎖️ Couleurs des badges */
  --badge-green: #00d17a;
  --badge-red: #e63946;
  --badge-blue: #00bfff;
  --badge-grey: #5f6772;
  --badge-purple: #9b59b6;
  --badge-gold: linear-gradient(90deg, #f1c40f, #f39c12);
}

/* ============================================================= */
/* ⚙️ Structure globale */
/* ============================================================= */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 30% -10%, rgba(0,193,255,.06), transparent),
             radial-gradient(1000px 500px at 110% 10%, rgba(0,193,255,.04), transparent),
             var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================================= */
/* 🧭 Barre latérale (Sidebar) */
/* ============================================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

/* --- Logo & marque --- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0,193,255,.25);
}
.brand-name {
  font-weight: 800;
  letter-spacing: .4px;
}

/* --- Liens de navigation --- */
.nav {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.nav-link:hover {
  background: rgba(255,255,255,.03);
  border-color: var(--line);
}
.nav-link.active {
  background: rgba(0,193,255,.08);
  border-color: rgba(0,193,255,.3);
  box-shadow: 0 0 0 1px rgba(0,193,255,.25) inset;
}
.nav-ico { width: 22px; text-align: center; }

/* --- 🔐 Lien Administration --- */
#adminLink {
  display: none; /* affiché uniquement pour les rôles autorisés */
  margin-top: 6px;
  color: #00d17a;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all .15s ease;
}
#adminLink:hover {
  background: rgba(0, 209, 122, 0.1);
  border-color: rgba(0, 209, 122, 0.3);
}
#adminLink .nav-ico {
  color: #00d17a;
}

/* --- Bouton Déconnexion --- */
.logout {
  margin-top: auto;
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.logout:hover {
  background: rgba(255,255,255,.03);
  border-color: rgba(0,193,255,.4);
}

/* ============================================================= */
/* 📄 Contenu principal */
/* ============================================================= */
.page {
  margin-left: 260px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.page-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .3px;
}

/* ============================================================= */
/* 🧱 Grille & cartes */
/* ============================================================= */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px 28px 6px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.span-2 { grid-column: span 2 / span 2; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .3px;
}

/* ============================================================= */
/* 👤 Profil utilisateur */
/* ============================================================= */
.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #101317;
}
.who {
  display: grid;
  gap: 10px;
}
.who-row {
  display: flex;
  gap: 14px;
  align-items: center;
}
.label {
  color: var(--muted);
  font-size: 12px;
  min-width: 80px;
  letter-spacing: .7px;
}
.value { font-weight: 600; }

/* ============================================================= */
/* 🔗 Liens utiles */
/* ============================================================= */
.links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.links li:last-child { border-bottom: 0; }
.chip {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(0,193,255,.35);
  padding: 6px 10px;
  border-radius: 999px;
  transition: all .15s ease;
}
.chip:hover { background: rgba(0,193,255,.08); }

/* ============================================================= */
/* 🧬 Carte personnage */
/* ============================================================= */
.perso-grid {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px;
}
.perso-card {
  background: #12151a;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  width: 100%;
  max-width: 550px;
  color: var(--text);
  box-shadow: 0 4px 15px rgba(0,0,0,.3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.perso-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}

/* ============================================================= */
/* 🏷️ Titres & libellés */
/* ============================================================= */
.section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand-2);
  margin: 14px 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

.perso-card p {
  margin: 6px 0;
  font-size: 14px;
  color: var(--text);
}
.label-strong {
  color: var(--muted);
  font-weight: 600;
  margin-right: 4px;
}
.value,
.value-strong {
  color: var(--text);
  font-weight: 500;
}
.value-strong {
  font-weight: 600;
  color: #fff;
}

/* ============================================================= */
/* 🪪 Badges */
/* ============================================================= */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid;
  transition: all .15s ease;
}
.badge-green {
  color: var(--badge-green);
  border-color: var(--badge-green);
  background: rgba(0, 209, 122, 0.1);
}
.badge-red {
  color: var(--badge-red);
  border-color: var(--badge-red);
  background: rgba(230, 57, 70, 0.1);
}
.badge-blue {
  color: var(--badge-blue);
  border-color: var(--badge-blue);
  background: rgba(0, 191, 255, 0.1);
}
.badge-grey {
  color: var(--badge-grey);
  border-color: var(--badge-grey);
  background: rgba(95, 103, 114, 0.15);
}
.badge-purple {
  color: var(--badge-purple);
  border-color: var(--badge-purple);
  background: rgba(155, 89, 182, 0.1);
}
.badge-gold {
  color: #ffcf40;
  border-color: #ffcf40;
  background: rgba(255, 207, 64, 0.1);
}

/* ============================================================= */
/* ⚓ Pied de page */
/* ============================================================= */
.foot {
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

/* ============================================================= */
/* 📱 Responsive Design */
/* ============================================================= */
@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
