:root{
  --bg:#070B18;
  --stroke: rgba(255,255,255,.10);
  --txt:#EAF0FF;
  --muted: rgba(234,240,255,.70);

  /* Couleurs logo OR */
  --gold:#CCA42C;
  --gold2:#A37D12;
  --gold3:#E6D08A;
  --goldStroke: rgba(204,164,44,.20);
  --goldSoft: rgba(204,164,44,.10);

  /* Anciennes couleurs */
  --brand:#2A6BFF;
  --brand2:#12D6A7;

  --danger:#ff4d5f;
  --shadow: 0 24px 60px rgba(0,0,0,.45);
  --r: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--txt);

  background:
    radial-gradient(1200px 700px at 10% 20%, rgba(40,120,255,.55), transparent 60%),
    radial-gradient(1000px 650px at 85% 10%, rgba(0,210,255,.35), transparent 55%),
    radial-gradient(900px 600px at 65% 90%, rgba(80,90,255,.25), transparent 60%),

    repeating-radial-gradient(circle at 20% 30%,
      rgba(0,160,255,.10) 0px,
      rgba(0,160,255,.10) 60px,
      rgba(0,0,0,0) 120px
    ),

    repeating-radial-gradient(circle at 80% 70%,
      rgba(70,140,255,.10) 0px,
      rgba(70,140,255,.10) 70px,
      rgba(0,0,0,0) 140px
    ),

    linear-gradient(180deg, #030716 0%, #050b1e 45%, #02040f 100%);

  min-height:100vh;
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}

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

/* ===== TOPBAR ===== */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border:1px solid var(--stroke);
  border-radius:16px;
  background:rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
  position:sticky;
  top:12px;
  z-index:20;
  box-shadow: var(--shadow);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}

/* Logo image */
.logo{
  width:34px;
  height:34px;
  border-radius:10px;
  flex: 0 0 auto;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(204,164,44,.06);
  border: 1px solid rgba(204,164,44,.18);
  box-shadow: 0 10px 26px rgba(204,164,44,.12);
}
.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-weight:600;
  font-size:14px;
}
.nav a{
  padding:9px 12px;
  border-radius:12px;
  border:1px solid transparent;
}
.nav a.active,
.nav a:hover{
  background:rgba(204,164,44,.10);
  color:var(--txt);
  border-color: rgba(204,164,44,.14);
}

.right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.pill{
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.05);
  font-weight:700;
  font-size:13px;
  max-width:320px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ===== BUTTONS ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 14px;
  border-radius:14px;
  font-weight:800;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--txt);
  transition:.2s ease;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.10);
}
.btn:active{
  transform:translateY(0px) scale(.99);
}

.btn.primary{
  border:1px solid rgba(230,208,138,.35);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold2) 100%);
  box-shadow: 0 18px 40px rgba(204,164,44,.18);
  color:#0b1022;
}

.btn.danger{
  border:1px solid rgba(255,77,95,.35);
  background:rgba(255,77,95,.12);
}

.btn.small{
  padding:8px 10px;
  border-radius:12px;
  font-size:12px;
  font-weight:900;
}

.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}

/* ===== BURGER (mobile) ===== */
.burger{
  display:none;
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--txt);
  align-items:center;
  justify-content:center;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.burger svg{
  width:20px;
  height:20px;
  opacity:.95;
}

/* ===== MOBILE TOP MENU ===== */
.mBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  opacity:0;
  pointer-events:none;
  transition:.18s ease;
  z-index:9998;
}
.mTopMenu{
  position:fixed;
  left:12px;
  right:12px;
  top:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(12,14,28,.92);
  box-shadow: 0 28px 90px rgba(0,0,0,.65);
  padding:12px;
  opacity:0;
  pointer-events:none;
  transform: translateY(-6px);
  transition: .18s ease;
  z-index:9999;
}
.mTopMenu.open,
.mBackdrop.open{
  opacity:1;
  pointer-events:auto;
  transform: translateY(0);
}
.mHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 6px 10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  margin-bottom:10px;
}
.mClose{
  width:40px;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.92);
  font-weight:900;
  cursor:pointer;
}
.mUserRow{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin: 8px 4px 10px;
}
.mUserText{
  font-weight:900;
  font-size:13px;
  color: rgba(234,240,255,.92);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width: 70vw;
}
.mLinks{
  display:grid;
  gap:8px;
  padding:4px;
}
.mLinks a{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(234,240,255,.92);
  font-weight:900;
}
.mLinks a.active{
  background: var(--goldSoft);
  border-color: rgba(204,164,44,.22);
  color: var(--txt);
}
.mActions{
  margin-top:10px;
  padding:10px 4px 4px;
  border-top:1px solid rgba(255,255,255,.10);
  display:grid;
  gap:10px;
}
.mActions .btn{width:100%}

/* ===== CARDS ===== */
.card{
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.titleRow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

h1{margin:0; font-size:20px}

.muted{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
  margin:6px 0 0;
}

/* ===== GRID pages ===== */
.grid{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  align-items:start;
}

@media (max-width: 980px){
  .wrap{padding:14px}
  .grid{grid-template-columns:1fr}
}

@media (max-width: 700px){
  .nav{display:none;}
  .right{display:none;}
  .burger{display:inline-flex;}
  .wrap{padding-bottom:90px;}
  .topbar{
    position:sticky;
    top:0;
    border-radius:0;
    border-left:none;
    border-right:none;
  }
}
