:root{
  --bg1:#0b1220; 
  --bg2:#0a0f1a; 
  --text:#e7eaf0; 
  --muted:#9aa4b2;
  --indigo:#6366f1; 
  --violet:#8b5cf6; 
  --card:rgba(255,255,255,0.06);
  --border:rgba(255,255,255,0.12); 
  --success:#22c55e; 
  --danger:#ef4444;
}

*{
  box-sizing:border-box;
}

body{
  margin:0; 
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:var(--text);
  background:linear-gradient(180deg,var(--bg1),var(--bg2));
  min-height:100vh;
}

.container{
  max-width:1024px;
  margin:0 auto;
  padding:16px;
}

/* HEADER */
header{
  position:sticky; 
  top:0; 
  z-index:10; 
  backdrop-filter:saturate(120%) blur(8px);
  background:rgba(10,15,26,.75); 
  border-bottom:1px solid var(--border);
}

header .row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
}

.logo{
  width:40px;
  height:40px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--indigo),var(--violet));
  display:grid;
  place-items:center;
  font-weight:700;
}

.btn{
  border:1px solid var(--border); 
  color:var(--text); 
  background:transparent;
  padding:8px 12px; 
  border-radius:12px; 
  cursor:pointer;
}

.btn.primary{
  background:var(--indigo);
  border-color:transparent;
}

.btn.danger{
  background:var(--danger);
  border-color:transparent;
}

/* TABS */
.tabs{
  display:inline-flex;
  gap:4px;
  padding:4px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card);
  margin:0 16px 12px;
}

.tab{
  display:inline-block;
  padding:8px 10px;
  border-radius:10px;
  color:#cdd3dd;
  cursor:pointer;
  border:0;
  background:transparent;
  text-decoration:none;
  font-size:14px;
}

.tab.active{
  background:var(--indigo);
  color:#fff;
}

/* MAIN */
main{
  padding:20px 16px 32px;
}

.grid{
  display:grid;
  gap:12px;
}

.kpis{
  grid-template-columns:repeat(1,minmax(0,1fr));
}

@media(min-width:640px){
  .kpis{
    grid-template-columns:repeat(3,1fr);
  }
}

.card{
  background:var(--card); 
  border:1px solid var(--border); 
  border-radius:14px; 
  padding:12px;
}

.kpi{
  background:linear-gradient(135deg,rgba(99,102,241,.15),rgba(139,92,246,.15));
}

.kpi small{
  color:var(--muted);
}

/* TABLE */
table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

thead{
  background:rgba(255,255,255,0.06); 
  color:#cdd3dd;
}

th,td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}

.list li{
  list-style:none;
}

/* MODALS */
.modal-back{
  position:fixed; 
  inset:0; 
  background:rgba(0,0,0,.6); 
  display:none; 
  place-items:center; 
  z-index:50;
}

.modal{
  width:calc(100% - 24px);
  max-width:360px;
  background:rgba(10,15,26,.92);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
}

.field{
  display:grid; 
  gap:4px; 
  margin-top:8px;
}

.field input{
  background:#0f172a;
  border:1px solid var(--border);
  border-radius:12px;
  padding:9px 12px;
  font-size:14px;
  color:var(--text);
}

.row-right{
  display:flex; 
  gap:8px; 
  justify-content:flex-end; 
  margin-top:10px;
}

/* FAB */
.fab{
  position:fixed; 
  right:16px; 
  bottom:24px; 
  width:56px; 
  height:56px; 
  border-radius:16px;
  background:linear-gradient(135deg,var(--indigo),var(--violet)); 
  display:grid; 
  place-items:center;
  color:#fff; 
  border:0; 
  cursor:pointer; 
  box-shadow:0 12px 30px rgba(0,0,0,.35);
}

.muted{
  color:var(--muted);
  font-size:12px;
}

/* LINKS */
.link{
  color:#c7d2fe;
  text-decoration:none;
}

.link:hover{
  text-decoration:underline;
}

.fab-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    background: #6C63FF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: 0.2s;
    z-index: 9999;
}

.fab-btn:hover {
    background: #554cf2;
    transform: scale(1.05);
}
.list .item {
    display: flex;
    justify-content: space-between;
    background: #1b1d29;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.delete-btn {
    color: #ff6b6b;
    font-weight: bold;
    text-decoration: none;
}

.delete-btn:hover {
    text-decoration: underline;
}
.grid {
    display: grid;
    gap: 20px;
}

.grid.kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.card.kpi {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}
.table-ranking {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-ranking thead tr {
  background: rgba(255,255,255,0.03);
}

.table-ranking th,
.table-ranking td {
  padding: 10px 12px;
  text-align: left;
}

.table-ranking tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

.table-ranking tbody tr:nth-child(odd) {
  background: transparent;
}

.table-ranking tbody tr:hover {
  background: rgba(255,255,255,0.04);
}

.table-ranking .empty {
  text-align: center;
  color: #888;
  font-style: italic;
}

/* Badge rond utilisateur dans le header */
.logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #6C63FF;   /* violet moderne */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 18px;
    user-select: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
