/* Pages Compte du site (code promo, admin) : même nuit bleue et même verre que la page d'accueil. */
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
:root {
  --night: #070A12; --glass: rgba(255,255,255,0.045); --glass-hi: rgba(255,255,255,0.08); --line: rgba(255,255,255,0.09);
  --text: #F4F6FB; --muted: rgba(226,232,245,0.64); --blue: #3D9BFF; --blue-soft: #7CC6FF; --warm: #FFE2B0;
  --ok: #BFE3C9; --bad: #FF8A82; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--text);
  font-family: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif; font-weight: 300; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 15% -10%, rgba(61,155,255,0.20), transparent 70%), radial-gradient(700px 420px at 100% 0%, rgba(61,155,255,0.08), transparent 70%);
}
a { color: var(--blue-soft); text-decoration: none; }
h1, h2 { font-weight: 300; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; }
h2 { font-size: 22px; font-weight: 400; }
p { margin: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px max(20px, 4vw); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; font-weight: 400; }
.brand svg { width: 30px; height: 30px; }
.who { color: var(--muted); font-size: 14px; display: flex; gap: 14px; align-items: center; }
main { padding: 12px max(20px, 4vw) 80px; }
.narrow { max-width: 480px; margin: 6vh auto 0; display: grid; gap: 22px; }
.wide { max-width: 1120px; margin: 0 auto; display: grid; gap: 26px; }
.lead { color: var(--muted); }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: 26px; padding: 26px; display: grid; gap: 16px; backdrop-filter: blur(18px) saturate(140%); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
input, select {
  width: 100%; height: 50px; padding: 0 20px; border-radius: 25px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(60,60,67,0.45); color: var(--text); font: inherit; font-weight: 400; font-size: 16px; outline: none;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 17px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus { border-color: rgba(255,255,255,0.45); box-shadow: 0 0 18px rgba(61,155,255,0.35); }
input.code { text-transform: uppercase; letter-spacing: 0.12em; font-size: 18px; text-align: center; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.btn {
  height: 50px; padding: 0 26px; border-radius: 25px; border: 1px solid rgba(255,255,255,0.12); cursor: pointer;
  background: var(--glass-hi); color: var(--text); font: inherit; font-size: 16px; font-weight: 400; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: rgba(255,255,255,0.14); }
.btn.primary { background: #FFFFFF; color: #0B0B0D; border-color: transparent; font-weight: 500; }
.btn.primary:hover { box-shadow: 0 0 26px rgba(255,255,255,0.4); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.msg { font-size: 15px; min-height: 1px; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }
.seg { justify-self: start; display: inline-flex; gap: 6px; padding: 5px; border-radius: 28px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.seg button { height: 40px; padding: 0 18px; border-radius: 20px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #FFFFFF; color: #0B0B0D; }
.result { display: grid; gap: 10px; }
.codes { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; font-size: 15px; line-height: 1.8; padding: 16px 20px; border-radius: 18px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); white-space: pre-wrap; max-height: 260px; overflow: auto; user-select: all; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
td.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; letter-spacing: 0.04em; }
tr.off td { opacity: 0.45; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 11px; font-size: 12px; background: rgba(61,155,255,0.2); color: #CFE6FF; white-space: nowrap; }
.pill.gift { background: rgba(255,184,92,0.2); color: var(--warm); }
.tablewrap { overflow-x: auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.toolbar input { max-width: 300px; height: 42px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { padding: 14px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); min-width: 150px; }
.stat b { display: block; font-size: 26px; font-weight: 300; color: var(--text); }
.stat span { color: var(--muted); font-size: 13px; }
.done { text-align: center; display: grid; gap: 14px; justify-items: center; }
.badge { width: 84px; height: 84px; border-radius: 42px; display: grid; place-items: center; background: rgba(61,155,255,0.16); border: 1px solid rgba(125,187,255,0.4); box-shadow: 0 0 40px rgba(61,155,255,0.45); }
.fine { color: var(--muted); font-size: 13px; }

/* Admin: sections, tableau de bord. */
.tabs { position: sticky; top: 10px; z-index: 2; backdrop-filter: blur(18px); background: rgba(7,10,18,0.7); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.grid2 { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.days { height: 160px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; align-items: end; border-bottom: 1px solid var(--line); }
.day { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.day span { display: block; width: 100%; max-width: 22px; margin: 0 auto; background: var(--blue); border-radius: 4px 4px 0 0; }
.day:hover span { background: var(--blue-soft); box-shadow: 0 0 14px rgba(61,155,255,0.45); }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: -8px; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(90px, 130px) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 5px; background: rgba(255,255,255,0.05); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 0 5px 5px 0; background: var(--blue); }
.bar-n { min-width: 2.5em; text-align: right; color: var(--text); }
.tip { position: absolute; z-index: 10; pointer-events: none; padding: 6px 12px; border-radius: 12px; font-size: 13px; color: var(--text); background: rgba(20,24,36,0.95); border: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 520px) { .tabs { overflow-x: auto; max-width: 100%; } .seg button { padding: 0 12px; } .card { padding: 20px; } }
.pane { display: grid; gap: 26px; min-width: 0; }
.grid2 > .card { align-content: start; }
.tablewrap.scroll { max-height: 560px; overflow: auto; }
.tablewrap.scroll th { position: sticky; top: 0; background: #0E131E; }
