/* Charte : couleurs inspirées d'Ecobank (bleu profond + vert lime).
   Ajustez les valeurs ci-dessous selon la charte officielle fournie par l'agence. */
:root {
  --eb-blue: #00467f;
  --eb-blue-deep: #002c52;
  --eb-lime: #8dc63f;
  --eb-lime-soft: #eef7e1;
  --paper: #f3f6f9;
  --surface: #ffffff;
  --ink: #13283b;
  --muted: #5a6b7c;
  --line: #d5dee7;
  --ok: #2f8f3a;
  --ko: #c0392b;
  --g1: #00467f;
  --g2: #0e8a8f;
  --g3: #6b9512;
  --radius: 10px;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { line-height: 1.5; font-size: 17px; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--eb-lime); outline-offset: 2px; }

/* En-tête : bande bleue + filet vert */
.band {
  background: var(--eb-blue-deep);
  color: #fff;
  border-bottom: 5px solid var(--eb-lime);
}
.band-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.band img.logo { height: 34px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; }
.band .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.band .sub { font-size: .9rem; opacity: .85; }
.band .spacer { flex: 1; }
.pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; background: var(--eb-lime); color: var(--eb-blue-deep);
}
.pill.off { background: #e7ecf1; color: var(--muted); }

main { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; }
main.wide { max-width: 1100px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 8px; color: var(--eb-blue-deep); }
h2 { font-size: 1.2rem; margin: 28px 0 12px; color: var(--eb-blue-deep); }
p.lead { color: var(--muted); margin: 0 0 22px; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}

label.field { display: block; font-weight: 600; margin: 16px 0 6px; }
select, input[type=text], input[type=password] {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 8px; padding: 13px 22px; font-weight: 600; cursor: pointer;
  background: var(--eb-blue); color: #fff; text-decoration: none;
}
.btn:hover { background: var(--eb-blue-deep); }
.btn.lime { background: var(--eb-lime); color: var(--eb-blue-deep); }
.btn.lime:hover { background: #7bb32f; }
.btn.ghost { background: transparent; color: var(--eb-blue); border: 1px solid var(--line); }
.btn.ghost:hover { background: #e9eff5; }
.btn.danger { background: #fff; color: var(--ko); border: 1px solid #e6b8b2; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

.msg { padding: 12px 14px; border-radius: 8px; margin: 14px 0; }
.msg.error { background: #fbeceb; color: #8a2a20; }
.msg.info { background: var(--eb-lime-soft); color: #33521a; }

/* Groupe */
.gtag { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 600; }
.gtag.G1 { background: var(--g1); } .gtag.G2 { background: var(--g2); } .gtag.G3 { background: var(--g3); }

/* Quiz */
.progress { height: 8px; background: #dfe7ee; border-radius: 99px; overflow: hidden; margin: 6px 0 20px; }
.progress > span { display: block; height: 100%; background: var(--eb-lime); transition: width .25s; }
.qmeta { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.qtext { font-size: 1.25rem; font-weight: 600; margin: 4px 0 6px; line-height: 1.35; }
.qhint { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.qhint.multi { color: var(--eb-blue); font-weight: 600; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 0 0 10px; cursor: pointer; color: var(--ink);
}
.opt:hover { border-color: #9fb3c6; }
.opt .letter {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; background: #e9eff5; color: var(--eb-blue);
}
.opt.multi .letter { border-radius: 6px; }
.opt[aria-pressed=true] { border-color: var(--eb-blue); background: #eaf2f9; }
.opt[aria-pressed=true] .letter { background: var(--eb-blue); color: #fff; }

.navq { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 18px 0 8px; }

/* Résultat */
.score-big { font-size: 3.4rem; font-weight: 800; color: var(--eb-blue-deep); line-height: 1; }
.bar-line { display: grid; grid-template-columns: 1fr 120px 54px; gap: 10px; align-items: center; margin: 8px 0; font-size: .95rem; }
.bar { height: 10px; background: #e3eaf0; border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--eb-blue); }

/* Tables admin */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: .93rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef3f7; color: var(--eb-blue-deep); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
.heat td.cell { text-align: center; font-weight: 700; color: #fff; min-width: 90px; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 24px 0 18px; flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button[aria-selected=true] { color: var(--eb-blue-deep); border-bottom-color: var(--eb-lime); }

.groups3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.gcard { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--g1); border-radius: var(--radius); padding: 16px; }
.gcard.G2 { border-top-color: var(--g2); } .gcard.G3 { border-top-color: var(--g3); }
.gcard .big { font-size: 2rem; font-weight: 800; color: var(--eb-blue-deep); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar-line { grid-template-columns: 1fr 70px 46px; }
  .qtext { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
