/* ==========================================================================
   VitaniumRP • Mantine-like dark theme
   - Garde tes classes actuelles (card, btn, badge, status, stack, staff-row, etc.)
   - Palette, typographie, rayons, ombres et focus ring inspirés de Mantine
   ========================================================================== */

/* ----- Design tokens ----------------------------------------------------- */
:root{
  /* Palette */
  --bg:#0f0d13;
  --bg-soft:#151821;
  --panel:#181a24;
  --panel-2:#1e2130;
  --border:#2a2f42;
  --text:#eef1ff;
  --muted:#b8bfd9;

  /* Accent (orange → rose) */
  --grad:linear-gradient(90deg,#ff7a18 0%,#af002d 70%);
  --accent-50:#fff4e6; --accent-100:#ffe8cc; --accent-200:#ffd8a8; --accent-300:#ffc078;
  --accent-400:#ffa94d; --accent-500:#ff922b; --accent-600:#fd7e14; --accent-700:#f76707;

  /* Échelles */
  --radius-xs:8px;  --radius-sm:10px; --radius:14px; --radius-lg:18px;
  --space-1:6px; --space-2:10px; --space-3:14px; --space-4:20px; --space-5:28px;

  /* Ombres (proches Mantine) */
  --shadow-xs: 0 1px 3px rgba(0,0,0,.35);
  --shadow-sm: 0 4px 10px rgba(0,0,0,.35);
  --shadow-md: 0 10px 22px rgba(0,0,0,.35);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.45);

  /* Focus ring */
  --ring: 0 0 0 2px rgba(255, 145, 110, .55);
}

/* ----- Base -------------------------------------------------------------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font: 14px/1.45 Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  display:flex; flex-direction:column;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
a{color:inherit; text-decoration:none}
:focus-visible{outline:none; box-shadow:var(--ring)}

/* ----- Header / Nav ------------------------------------------------------ */
header{
  background:var(--grad); color:#fff; box-shadow:var(--shadow-sm); position:sticky; top:0; z-index:20;
}
header .nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 26px;
}
header .brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.3px}
.brand-logo{height:30px;width:auto;display:block;filter:drop-shadow(0 2px 6px rgba(0,0,0,.35))}
header nav a{
  color:#fff; opacity:.95; margin-left:18px; font-weight:600; padding:6px 10px; border-radius:10px;
}
header nav a:hover{opacity:1; background:rgba(255,255,255,.08)}

/* ----- Layout ------------------------------------------------------------ */
main{flex:1; max-width:1400px; margin:0 auto; padding:var(--space-5)}
footer{
  padding:14px; text-align:center; color:var(--muted);
  background:#10131a; border-top:1px solid var(--border)
}

/* ----- Card -------------------------------------------------------------- */
.card{
  background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:var(--space-5);
  box-shadow:var(--shadow-md); margin-bottom:var(--space-4);
}

/* ----- Buttons ----------------------------------------------------------- */
button,.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--grad); color:#fff; border:none;
  border-radius:var(--radius-sm); padding:8px 12px;
  font-weight:700; letter-spacing:.2px; cursor:pointer;
  transition:filter .15s, transform .04s ease;
  box-shadow:0 0 0 1px rgba(255,122,24,.18) inset;
}
button:hover,.btn:hover{filter:brightness(1.08)}
button:active,.btn:active{transform:translateY(1px)}
.btn-sm{padding:7px 11px; font-size:13px; border-radius:10px}
.btn-light{
  background:rgba(255,255,255,.06); color:#fff; border:1px solid var(--border);
  box-shadow:none;
}
.btn-outline{
  background:transparent; color:#ffd0b2; border:1px solid rgba(255,140,66,.35)
}

/* ----- Inputs / Search / Pills ------------------------------------------ */
.toolbar{display:flex; gap:18px; justify-content:space-between; align-items:center; margin-bottom:16px}
.search{flex:1; min-width:260px}
input[type="text"]{
  width:100%; background:#0f1421; color:#e9eeff;
  border:1px solid #293559; border-radius:12px; padding:10px 12px; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
input[type="text"]:focus{border-color:#4668c9; box-shadow:0 0 0 2px rgba(70,104,201,.35)}
.pill{
  padding:6px 12px; border-radius:999px; background:#0e0c18;
  border:1px solid #2b2840; color:#e2e1e6; font-size:13px
}
.muted{color:var(--muted); font-size:13px}

/* ----- Badges ------------------------------------------------------------ */
.badge{
  background:#272233; color:#ffd7cc; border-radius:12px;
  padding:4px 10px; font-size:12px; border:1px solid #3b2e46
}
/* rôles en surbrillance (look Mantine gradient) */
.badge.role-superadmin{
  background:linear-gradient(90deg,#ff8c42,#ff3b3b);
  color:#fff; border:none;
  box-shadow:0 0 0 1px rgba(255,140,66,.35) inset, 0 0 18px rgba(255,60,60,.35);
  text-shadow:0 0 6px rgba(255,200,160,.6);
}
.badge.role-respstaff{
  background:linear-gradient(90deg,#ff6fb1,#ff8c42);
  color:#fff; border:none;
  box-shadow:0 0 0 1px rgba(255,111,177,.4) inset, 0 0 18px rgba(255,145,110,.35);
  text-shadow:0 0 6px rgba(255,210,210,.55);
}

/* ----- Status pills ------------------------------------------------------ */
.status{
  font-weight:800; font-size:12px; padding:6px 10px; border-radius:10px; display:inline-block
}
.on{ background:rgba(46, 201, 103, .14); color:#b9ffd1; border:1px solid rgba(72, 220, 130, .45) }
.off{ background:#232231; color:#e7dfeb; border:1px solid #3a2f42 }

/* ----- Tables ------------------------------------------------------------ */
table{width:100%; border-collapse:separate; border-spacing:0 6px; margin-top:10px; font-size:15px}
th,td{padding:12px 14px; border-bottom:1px solid var(--border)}
th{ text-align:left; color:var(--accent-300); font-weight:700; letter-spacing:.2px }
tr:hover{ background:#1b1f2b }
td code{font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace}

/* Stripes (option) */
.table-striped tbody tr:nth-child(odd){ background:#161a25 }

/* ----- Staff list cards -------------------------------------------------- */
.stack{display:flex; flex-direction:column; gap:22px}
.staff-row{
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  background:var(--panel-2); border:1px solid var(--border); border-radius:16px;
  padding:18px 20px; box-shadow:var(--shadow-sm);
}
.staff-main{display:flex; flex-direction:column; gap:6px}
.staff-actions{display:flex; gap:12px}
.job{ color:#ffd7cc }
.accent{ color:#ffd0b2 }

/* ----- Chips filtres (logs) -------------------------------------------- */
.chips{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:6px 0 14px}
.chips .tools{display:flex; gap:8px; margin-left:8px}
.chips .tool{
  background:#0f0d14; border:1px solid #2b2640; color:#e6e0ee;
  padding:6px 10px; border-radius:999px; font-size:12px; cursor:pointer
}
.chips .tool:hover{filter:brightness(1.1)}
.chip{position:relative}
.chip input{position:absolute; inset:0; opacity:0; pointer-events:none}
.chip label{
  display:inline-flex; align-items:center; gap:8px;
  background:#1a1621; border:1px solid #322a3e; color:#d8ccd9;
  padding:8px 12px; border-radius:999px; font-size:13px; font-weight:700;
  user-select:none; cursor:pointer; transition:all .15s ease; box-shadow:var(--shadow-xs);
}
.chip label .dot{width:8px; height:8px; border-radius:50%; background:#6f6a79; box-shadow:0 0 0 1px #3a3147 inset}
.chip input:checked + label{
  color:#fff; border:none; background:var(--grad);
  box-shadow:0 0 14px rgba(255,122,24,.45), 0 0 0 1px rgba(255,122,24,.2) inset;
}
.chip input:checked + label .dot{background:#fff; box-shadow:0 0 10px #ffd3b6}

/* ----- Utilities --------------------------------------------------------- */
.container{max-width:1400px; margin:0 auto}
.hidden{display:none !important}
.center{display:flex; align-items:center; justify-content:center}
/* ===== Mantine-like Footer ============================================ */
.footer {
  margin-top: 120px;
  padding-top: 48px;                 /* ≈ 2x spacing-xl */
  padding-bottom: 48px;
  background: #0f0d13;               /* dark-6 */
  border-top: 1px solid #2a2f42;     /* dark-5 */
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

.footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.footer .logo {
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer .logo img {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}

.footer .description {
  margin-top: 8px;
  color: #b8bfd9;                    /* dimmed */
  font-size: 13px;
  line-height: 1.5;
}

.footer .groups {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer .wrapper {
  width: 180px;
}

.footer .title {
  font-size: 16px;                   /* lg */
  font-weight: 600;
  font-family: Outfit, Inter, system-ui, sans-serif;
  margin-bottom: 8px;
  color: #fff;
}

.footer .link {
  display: block;
  color: #c7cee6;                    /* gray-6 / dark-1 */
  font-size: 14px;                   /* sm */
  padding: 4px 0;
  text-decoration: none;
  transition: color .15s, text-decoration-color .15s;
}

.footer .link:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* after footer (bottom bar) */
.afterFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #2a2f42;     /* dark-4/5 */
  gap: 16px;
}

.afterFooter .copy {
  color: #b8bfd9;
  font-size: 14px;
}

/* social icons */
.social {
  display: flex;
  gap: 8px;
}

.social .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  color: #c7cee6;
  background: transparent;
  border: 1px solid #2a2f42;
  transition: transform .06s ease, filter .15s, background .15s;
}

.social .icon:hover {
  background: rgba(255,255,255,.06);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.social .icon svg { width: 18px; height: 18px; }

/* Responsive */
@media (max-width: 640px) {
  .footer .inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer .logo { align-items: center; }
  .footer .description { margin-top: 10px; }
  .footer .groups { display: none; }   /* comme l’exemple Mantine */
  .afterFooter { flex-direction: column; }
  .social { margin-top: 8px; }
}

/* === Double Navbar façon Mantine ===================================== */
.navbar {
  background: #0e0c10;
  color: #e8e8e8;
  display: flex;
  border-right: 1px solid #1f1a23;
  box-shadow: 0 0 22px rgba(0, 0, 0, .35);
  height: 100vh;
}

.wrapper {
  display: flex;
  width: 300px;
  height: 100%;
}

/* barre verticale à gauche */
.aside {
  flex: 0 0 70px;
  background: #17141d;
  border-right: 1px solid #2a2331;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
}

.aside .logo img {
  width: 36px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}

/* icônes principales */
.mainLink {
  width: 44px;
  height: 44px;
  margin: 6px 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8bfd9;
  transition: all .15s;
  text-decoration: none;
}

.mainLink:hover {
  background: #1f1a23;
  color: #fff;
}

.mainLink.active {
  background: linear-gradient(90deg,#ff7a18,#af002d 70%);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,122,24,.45);
}

/* partie principale droite */
.main {
  flex: 1;
  background: #0e0c10;
  display: flex;
  flex-direction: column;
}

.title {
  font-family: "Outfit", Inter, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  background: #17141d;
  border-bottom: 1px solid #2a2331;
  padding: 16px 22px;
  color: #fff;
  text-shadow: 0 0 6px rgba(255,255,255,.15);
}

.links {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.link {
  color: #c7cee6;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 6px;
  transition: all .15s;
}

.link:hover {
  background: #1f1a23;
  color: #fff;
}

.link.active {
  background: linear-gradient(90deg,#ff7a18,#af002d 70%);
  color: #fff;
  box-shadow: 0 0 10px rgba(255,122,24,.35);
}

/* responsive */
@media (max-width: 960px) {
  .navbar {
    flex-direction: row;
    height: auto;
    width: 100%;
  }
  .wrapper {
    width: 100%;
    flex-direction: column;
  }
  .aside {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #2a2331;
  }
  .main {
    display: none; /* masqué sur mobile, tu peux le garder si tu veux */
  }
}

/* Sidebar fixe à gauche, contenu poussé */
.navbar{
  position: fixed; left: 0; top: 0;
  width: 300px; height: 100vh;
  z-index: 20;
}

body.with-sidebar{
  padding-left: 300px;           /* réserve l’espace */
}

/* le bloc .main de la nav reste visible (ne pas masquer sur desktop) */
.navbar .main{ display: block; }

/* Responsive : la sidebar devient un header en haut */
@media (max-width: 960px){
  .navbar{
    position: fixed;
    left: 0; top: 0; right: 0;
    width: 100%; height: auto;
    border-right: none; border-bottom: 1px solid #2a2331;
  }
  body.with-sidebar{
    padding-left: 0;
    padding-top: 72px;           /* réserve la hauteur de la barre sur mobile */
  }
  .navbar .wrapper{
    width: 100%; flex-direction: row;
  }
  .navbar .aside{
    flex-direction: row; gap: 8px; width: auto;
    border-right: none; border-bottom: none;
  }
  .navbar .main{ display: none; } /* on cache la colonne de liens sur mobile */
}
.navbar{
  position: fixed; left:0; top:0; width:300px; height:100vh; z-index:20;
}
.content-wrap{ margin-left:300px; }

@media (max-width:960px){
  .navbar{ left:0; right:0; width:100%; height:auto; }
  .content-wrap{ margin-left:0; margin-top:72px; }
}
/* === Sidebar fixe + contenu décalé proprement ======================= */
.navbar{
  position: fixed; left: 0; top: 0;
  width: 300px; height: 100vh;       /* largeur de la sidebar */
  z-index: 20;
}

/* Réserve la place pour le contenu */
body.with-sidebar{
  padding-left: 300px;               /* = même valeur que .navbar width */
}

/* Sur desktop on garde la colonne droite visible */
.navbar .main{ display: block; }

/* ===== Responsive (≤ 960px) : la nav passe en haut =================== */
@media (max-width: 960px){
  .navbar{
    position: fixed;
    left: 0; top: 0; right: 0;
    width: 100%; height: auto;
    border-right: none; border-bottom: 1px solid #2a2331;
  }
  body.with-sidebar{
    padding-left: 0;
    padding-top: 72px;               /* réserve la hauteur de la barre */
  }
  .navbar .wrapper{
    width: 100%;
    flex-direction: row;
  }
  .navbar .aside{
    flex-direction: row; gap: 8px;
    width: auto;
    border-right: none; border-bottom: none;
  }
  /* On masque la colonne de liens secondaire sur mobile */
  .navbar .main{ display: none; }
}
/* Supprimer le carré orange fantôme */
.mainLink::before { display:none !important; }

/* Correction d’alignement général */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: #0e0c10;
  border-right: 1px solid #1f1a23;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
}
body.with-sidebar { padding-left: 260px; }

/* Logo arrondi */
.logo img {
  width: 60px; height: auto;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 122, 24, .4);
  margin: 16px auto;
  display: block;
}

/* Icônes verticales */
.aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mainLink {
  color: #ccc;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  transition: all 0.2s ease;
}
.mainLink:hover { background: rgba(255, 122, 24, 0.1); color: #fff; }
.mainLink.active {
  background: linear-gradient(135deg, #ff7a18, #af002d);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 122, 24, 0.4);
}

/* Liens texte à droite */
.main {
  padding: 18px;
}
.main .title {
  font-weight: 700;
  margin-bottom: 18px;
  color: #fff;
}
.main .links a {
  display: block;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.15s;
}
.main .links a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.main .links a.active {
  background: linear-gradient(135deg, #ff7a18, #af002d);
  color: #fff;
  font-weight: 600;
}

/* === Panel plat façon Mantine ======================================= */
.panel-flat{
  background:#12141c;              /* fond très léger */
  border:1px solid #1f2331;
  border-radius:6px;               /* coins quasi droits */
  padding:22px;
  box-shadow:0 6px 18px rgba(0,0,0,.28);
  margin-bottom:26px;
}

/* Titre + toolbar déjà ok, on laisse */

/* === Tableau plat ===================================================== */
.tbl.tbl-flat{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  margin-top:14px;
}
.tbl.tbl-flat thead th{
  padding:12px 14px;
  color:#cbd2ea;
  font-weight:700;
  text-align:left;
  border-bottom:1px solid #23293a;
}
.tbl.tbl-flat tbody td{
  padding:14px;
  border-bottom:1px solid #1f2535;
}
.tbl.tbl-flat tbody tr:hover{ background:#151a24; }

/* cellule STAFF (avatar + nom + ligne secondaire) */
.cell-staff{
  display:flex; align-items:center; gap:12px;
}
.avatar{
  width:40px; height:40px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  color:#0e0c10; font-weight:800;
  background:linear-gradient(135deg,#ffb86b,#ff5667);
  box-shadow:0 0 0 2px #0e0c10 inset, 0 0 0 1px rgba(255,255,255,.08);
}
.staff-lines{display:flex; flex-direction:column}
.staff-name{font-weight:700; color:#fff}
.staff-sub{font-size:12px; color:#9aa3c0}

/* badge groupe plus sobre */
.badge-min{
  display:inline-block;
  padding:4px 8px;
  border-radius:8px;
  font-size:12px;
  font-weight:600;
  border:1px solid #2a2f42;
  color:#e8e8f2;
  background:#171b27;
}
.badge-min.role-superadmin{
  background:#2a1820; border-color:#57303a;
  color:#ffd7d7;
}
.badge-min.role-respstaff{
  background:#241826; border-color:#5a335b;
  color:#ffdff5;
}

/* statut pilule façon Mantine */
.pill{
  display:inline-block;
  min-width:92px;
  text-align:center;
  font-weight:800;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
}
.pill.on{
  background:#163521; color:#9ef0b8; border:1px solid #2b7d57;
}
.pill.off{
  background:#2a2c36; color:#cfd3e6; border:1px solid #3b4156;
}

/* dernière activité */
.cell-ago{ color:#b8bfd9; white-space:nowrap }

/* coins de tableau légèrement carrés */
.tbl.tbl-flat thead th:first-child,
.tbl.tbl-flat tbody td:first-child{ padding-left:8px }
.tbl.tbl-flat thead th:last-child,
.tbl.tbl-flat tbody td:last-child{ padding-right:8px }
