:root{
  --green:#58cc02;
  --green-dark:#2a7a00;
  --blue:#1cb0f6;
  --blue-dark:#0a84ae;
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#12141a;
  --muted:#6b7280;
  --danger:#b00020;
  --ok:#16a34a;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
  background:var(--bg); color:var(--text); line-height:1.45;
}

/* Header / nav onglets */
.duo-header{
  position:sticky; top:0; z-index:20;
  background:#fff; border-bottom:1px solid #e5e7eb;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px;
}
.duo-brand{display:flex; align-items:center; gap:10px}
.duo-logo{font-size:22px}
.duo-title{font-weight:700}

.duo-nav{display:flex; gap:14px; align-items:flex-end}
.duo-nav a{
  text-decoration:none; color:#6b7280; font-weight:600; padding:8px 2px; position:relative;
}
.duo-nav a.active{color:var(--blue)}
.duo-nav a.active::after{
  content:""; position:absolute; left:0; right:0; bottom:-12px; height:3px; background:var(--blue); border-radius:3px;
}

/* API box */
.api-box{display:flex; gap:8px; align-items:center}
.api-box input{
  height:36px; padding:8px 10px; border:1px solid #d1d5db; border-radius:10px; min-width:220px;
}
.api-box button{
  height:36px; padding:0 12px; border:0; border-radius:10px; background:var(--blue); color:#fff; font-weight:700; cursor:pointer;
}
.api-box button:hover{background:var(--blue-dark)}
.status{font-size:12px; color:var(--muted)}
.status.ok{color:var(--ok); font-weight:700}

/* Layout */
.container{max-width:980px; margin:0 auto; padding:20px 16px}
h1{font-size:28px; margin:8px 0 14px}
h2{font-size:20px; margin:14px 0}

/* Cards / élèves */
.card{
  background:var(--card); border-radius:16px; box-shadow:0 6px 18px rgba(10,20,40,.06);
  padding:14px; margin:12px 0;
}
.card .row{display:flex; justify-content:space-between; align-items:center; gap:10px}
.card .name{font-weight:700}
.card .points{font-weight:800}
.card .points.blocked{color:var(--danger)}

.bar{background:#eef2ff; height:10px; border-radius:999px; overflow:hidden; margin:10px 0 6px}
.fill{height:100%}
.fill.ok{background:var(--green)}
.fill.mid{background:#f59e0b}
.fill.low{background:#ef4444}

.card.student.blocked{opacity:.75; filter:grayscale(.35)}
.card .actions{display:flex; justify-content:flex-end}
.applyBtn{
  background:var(--green); color:#fff; border:0; border-radius:999px; padding:10px 14px; font-weight:800; cursor:pointer;
}
.applyBtn:hover{background:var(--green-dark)}

/* Lists / grid */
.controls{display:flex; gap:10px; flex-wrap:wrap; margin:8px 0 16px}
select{
  height:40px; border:1px solid #d1d5db; border-radius:10px; padding:0 12px; min-width:220px;
}

/* Admin */
.blocked-card{background:#fff; border-radius:14px; padding:12px; box-shadow:0 6px 18px rgba(10,20,40,.06); margin:10px 0}
.blocked-card .points{color:var(--danger); font-weight:800}
.unblockBtn{
  margin-top:8px; background:var(--blue); color:#fff; border:0; border-radius:999px; padding:8px 12px; font-weight:700; cursor:pointer;
}
.unblockBtn:hover{background:var(--blue-dark)}
.history{background:#fff; border-radius:14px; padding:12px; box-shadow:0 6px 18px rgba(10,20,40,.06)}
.h-row{display:grid; grid-template-columns:110px 140px 1fr 60px; gap:10px; padding:8px 0; border-bottom:1px solid #f1f5f9}
.h-row:last-child{border-bottom:0}
.h-delta.neg{color:#ef4444; font-weight:800}
.h-delta.pos{color:var(--ok); font-weight:800}

/* Toast + flash */
.toast{
  position:fixed; right:16px; bottom:16px; background:#111827; color:#fff;
  padding:10px 14px; border-radius:12px; display:none; box-shadow:0 8px 22px rgba(0,0,0,.2); z-index:50;
}
.flash-ok{animation:flash .9s ease}
@keyframes flash{0%{box-shadow:0 0 0 0 rgba(22,163,74,.8)}100%{box-shadow:0 0 0 16px rgba(22,163,74,0)}}

/* Hero (home) */
.hero{background:#fff; padding:30px 16px; border-bottom:1px solid #eef2f7}
.cta{display:flex; gap:10px; flex-wrap:wrap}
.btn{
  display:inline-block; background:var(--green); color:#fff; border-radius:999px; padding:12px 18px; text-decoration:none; font-weight:800;
}
.btn.secondary{background:var(--blue)}
.btn.gray{background:#e5e7eb; color:#111827}

/* Mobile */
@media (max-width:720px){
  .duo-nav a.active::after{bottom:-10px}
  .h-row{grid-template-columns:90px 110px 1fr 54px}

/* --- CTA modern --- */
.cta-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 20px;
}

.btn.cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.btn.cta.primary {
  background: var(--green);
  color: var(--white);
}

.btn.cta.secondary {
  background: #f1f3f4;
  color: var(--text);
}

.btn.cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
}
