:root {
  --bg: #0a0b0f;
  --bg-glow-1: rgba(245, 170, 60, .10);
  --bg-glow-2: rgba(70, 120, 255, .07);
  --card: #13151c;
  --card-2: #0d0f14;
  --border: #252a36;
  --border-soft: #1d212b;
  --text: #eceef3;
  --muted: #9aa1b2;
  --gold: #f6c354;
  --gold-strong: #ffb52e;
  --red: #ff7a6b;
  --green: #45d39a;
  --accent: #f6b13c;
  --accent-ink: #1a1203;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 8% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, var(--bg-glow-2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .86em;
  background: #1c2030;
  color: #ffd98a;
  padding: .1em .4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
h1, h2, h3 { margin: 0; }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 11, 15, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.top-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-right { margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #12141b;
  color: var(--text); font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.pill:hover { text-decoration: none; border-color: #3a4152; background: #171a23; }
.pill.active { background: rgba(246, 177, 60, .14); border-color: rgba(246, 177, 60, .55); color: #ffd58a; }
.pill-profile.active, .pill-profile:hover { border-color: rgba(69, 211, 154, .5); }
.pill-alt { border-color: rgba(120, 140, 255, .45); background: rgba(90, 110, 255, .12); }
.ico-sm { flex: none; }

.banner {
  text-align: center; padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(90deg, rgba(246,177,60,.08), rgba(246,177,60,.16), rgba(246,177,60,.08));
  border-bottom: 1px solid rgba(246,177,60,.18);
  display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap;
}

/* ---------- Mise en page ---------- */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 20px 40px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-2.tight { gap: 12px; margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, #151821, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card > * + * { margin-top: 12px; }
.card-accent { border-color: rgba(246, 177, 60, .35); }
.card h3 { font-size: 16px; margin-top: 18px; }
.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c9cfdc;
  display: flex; align-items: center; gap: 8px;
}
.title { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.big-line { display: flex; align-items: center; gap: 16px; }
.big { font-size: 42px; font-weight: 800; letter-spacing: -.02em; }
.huge { font-size: clamp(44px, 8vw, 68px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.hero .muted.small { margin-top: 6px; }

.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.tile {
  background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 12px 14px; min-width: 110px;
}
.tile-big { display: flex; align-items: center; gap: 14px; padding: 18px; min-width: 0; }
.label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #bfc5d2; }
.value { font-size: 17px; font-weight: 800; margin-top: 2px; }
.tile-big .value { font-size: 24px; }
.gold { color: var(--gold); }
.red { color: var(--red); }

/* ---------- Encarts ---------- */
.callout {
  background: rgba(246, 177, 60, .09);
  border: 1px solid rgba(246, 177, 60, .45);
  border-radius: 12px; padding: 12px 14px;
}
.callout strong { color: #ffc967; }
.callout p { margin: 4px 0 0; }
.callout b { color: #ffd98a; }
.checks {
  list-style: none; margin: 10px 0 0; padding: 10px 12px;
  background: rgba(69, 211, 154, .07); border: 1px solid rgba(69, 211, 154, .3); border-radius: 12px;
}
.checks li { padding: 6px 0 6px 28px; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 9px; width: 16px; height: 16px; border-radius: 5px;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6' fill='none' stroke='%230a0b0f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.steps { padding-left: 20px; margin: 8px 0 0; }
.steps li { margin: 4px 0; }
.notice { border-radius: 12px; padding: 12px 16px; font-weight: 600; border: 1px solid; }
.notice-ok { background: rgba(69, 211, 154, .09); border-color: rgba(69, 211, 154, .4); color: #b9f2d8; }
.notice-warn { background: rgba(246, 177, 60, .09); border-color: rgba(246, 177, 60, .45); color: #ffd98a; }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: 13px; font-weight: 700; color: #c9cfdc; }
input[type=number] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: #0d0f15; color: var(--text); font: inherit; font-size: 16px;
}
input[type=number]:focus { outline: 2px solid rgba(246, 177, 60, .6); outline-offset: 1px; border-color: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 14px;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-primary { background: linear-gradient(180deg, #ffc65a, var(--accent)); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-danger { background: #ff6f61; color: #230705; }
.danger-zone { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.check input { margin-top: 4px; accent-color: #ff6f61; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #bfc5d2;
  padding: 12px 14px; background: #10131a; white-space: nowrap; font-weight: 800;
}
th .ico { vertical-align: -3px; margin-right: 4px; }
td { padding: 12px 14px; border-top: 1px solid var(--border-soft); white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; }
td.strong { font-weight: 800; }
td.type { display: flex; align-items: center; gap: 10px; }
tbody tr:hover { background: rgba(255,255,255,.02); }

.devices { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.devices li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--card-2); }
.details summary { cursor: pointer; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; color: #c9cfdc; }
.details[open] summary { margin-bottom: 8px; }

/* ---------- Guide ---------- */
.guide-steps { list-style: none; counter-reset: step; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.guide-steps > li { counter-increment: step; position: relative; padding: 14px 0 14px 52px; border-top: 1px solid var(--border-soft); }
.guide-steps > li:first-child { border-top: 0; }
.guide-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(180deg, #ffc65a, var(--accent)); color: var(--accent-ink);
}
.guide-steps h3 { margin: 4px 0 4px; font-size: 16px; }
.guide-steps p { margin: 0; }
.guide-steps .callout { margin-top: 10px; }
.plain { margin: 8px 0 0; padding-left: 18px; }
.plain li { margin: 7px 0; }
.faq { border-top: 1px solid var(--border-soft); padding: 12px 0; }
.faq:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* ---------- Divers ---------- */
.hero-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xl { width: 100%; justify-content: center; padding: 15px 18px; font-size: 16px; border-radius: 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: rgba(120, 140, 255, .14); color: #c6cdff; border: 1px solid rgba(120, 140, 255, .35); }
.badge-live { background: rgba(69, 211, 154, .14); color: #b9f2d8; border-color: rgba(69, 211, 154, .45); }
.tile .label .ico-sm { vertical-align: -2px; margin-right: 2px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(69,211,154,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(69,211,154,0); } 100% { box-shadow: 0 0 0 0 rgba(69,211,154,0); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* ---------- Mode console ---------- */
.console { max-width: 640px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice { display: flex; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { flex: 1; text-align: center; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); font-weight: 700; cursor: pointer; }
.choice input:checked + span { border-color: rgba(246,177,60,.7); background: rgba(246,177,60,.12); color: #ffd58a; }
.choice input:focus-visible + span { outline: 2px solid rgba(246,177,60,.7); outline-offset: 2px; }
.live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.live-total { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.live-total .muted { font-size: 16px; font-weight: 700; }
.tap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tap-card { background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.tap-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tap-label { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap-count { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.tap { border: 0; border-radius: 12px; font: inherit; font-weight: 800; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tap-open { min-height: 64px; font-size: 17px; background: linear-gradient(180deg, #ffc65a, var(--accent)); color: var(--accent-ink); }
.tap-destroy { min-height: 40px; font-size: 13px; background: rgba(255, 122, 107, .14); color: #ffb4aa; border: 1px solid rgba(255,122,107,.35); }
.tap:active { transform: scale(.97); filter: brightness(1.1); }
.link-danger { background: none; border: 0; color: #ff9a8f; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; align-self: center; padding: 8px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: #2a1414; border: 1px solid rgba(255,122,107,.5); color: #ffd2cc; padding: 10px 16px; border-radius: 12px; font-weight: 700; z-index: 20; }
@media (max-width: 360px) { .tap-grid { grid-template-columns: 1fr; } }

/* ---------- Butin de la semaine ---------- */
.event { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-2); }
.event-live { border-color: rgba(69,211,154,.5); background: rgba(69,211,154,.08); }
.event-title { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.event p { margin: 6px 0 0; }
.event-when { font-size: 20px; font-weight: 800; color: var(--gold); }
.event-when time, .slots time:first-child { display: inline-block; }
.event-when time::first-letter, .slots time:first-child::first-letter { text-transform: uppercase; }
.loot-name { display: flex; align-items: center; gap: 8px; white-space: normal; min-width: 200px; color: #e9ddff; }
.loot-name .ico-sm { color: #c9a7ff; flex: none; }
.loot-img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; background: #0d0f15; }
.mult { color: var(--gold); font-weight: 800; white-space: nowrap; }
.event-when .mult { font-size: 15px; }
.img-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 220px; }
.img-cell input[type=file] { font-size: 12px; padding: 4px; max-width: 200px; }
.thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: #0d0f15; display: inline-grid; place-items: center; color: #c9a7ff; }
.tiny { font-size: 11px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.tiny input { width: auto; }
td .muted.small { font-size: 12px; }
.slots { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.slots li { padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--card-2); }
.slots time:first-child { font-weight: 700; }

/* ---------- Admin ---------- */
.admin { display: flex; flex-direction: column; gap: 18px; }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-grid label, .admin-table input { font-size: 13px; }
.admin-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: #c9cfdc; }
.admin-grid .wide { grid-column: 1 / -1; }
.admin-grid label.check { flex-direction: row; align-items: center; font-weight: 600; }
.admin-grid label.check input { margin-top: 0; width: 18px; height: 18px; flex: none; }
.admin input, .admin textarea, .form input[type=password] {
  width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border);
  background: #0d0f15; color: var(--text); font: inherit; font-size: 14px; color-scheme: dark;
}
.admin-table td { padding: 6px 8px; }
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; } }

/* ---------- Stats perso ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px; }
.stat-main { background: linear-gradient(160deg, rgba(246,177,60,.22), rgba(246,177,60,.08)); border-color: rgba(246,177,60,.45); }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-main .stat-value { color: var(--gold); font-size: 36px; }
.stat-label { color: #c3c9d6; font-size: 13.5px; margin-top: 6px; line-height: 1.35; }
.stat-label .muted { font-size: 12px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; margin-top: 14px; padding: 0 2px; border-bottom: 1px solid var(--border-soft); }
.bar { flex: 1; min-width: 0; background: linear-gradient(180deg, #ffc65a, #c98a2b); border-radius: 4px 4px 0 0; position: relative; }
.bar-empty { background: #262b37; }
.bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.chart-small { height: 110px; }
.budget-line { display: flex; flex-direction: column; gap: 8px; }
.budget-line .stat-value { font-size: 26px; }
.budget-bar { height: 12px; border-radius: 999px; background: #232836; overflow: hidden; border: 1px solid var(--border-soft); }
.budget-fill { height: 100%; background: linear-gradient(90deg, #45d39a, #f6c354); }
.budget-warn { background: linear-gradient(90deg, #f6c354, #ff7a6b); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
@media (max-width: 640px) { .chart { gap: 2px; height: 140px; } .bar span { display: none; } .stat-value { font-size: 24px; } .stat-main .stat-value { font-size: 28px; } }

/* ---------- Page d'arrivée (Instagram) ---------- */
.landing { max-width: 720px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.landing-hero { text-align: center; padding: 28px 22px; }
.landing-logo { display: flex; justify-content: center; }
.landing-title { font-size: clamp(28px, 6vw, 40px); font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.landing-sub { color: #c9cfdc; font-size: 16px; max-width: 520px; margin: 10px auto 0; }
.landing-hero .btn-download { margin-top: 18px; font-size: 18px; padding: 17px 20px; }
.landing-hero .callout { text-align: left; margin-top: 18px; }
.center { text-align: center; }
.url-box { margin: 10px 0; padding: 12px; border-radius: 10px; background: #0d0f15; border: 1px dashed rgba(246,177,60,.6); font-weight: 800; font-size: 17px; text-align: center; word-break: break-all; color: #ffd98a; }
.insta { display: inline-block; margin-top: 16px; font-weight: 800; color: #ffd98a; }
.guide-steps.compact > li { padding-top: 10px; padding-bottom: 10px; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature { display: flex; flex-direction: column; gap: 6px; color: var(--text); padding: 16px; }
.feature:hover { text-decoration: none; border-color: rgba(246,177,60,.45); }
.feature .ico-sm, .feature .ico { color: var(--gold); }
.mobile-only { display: none; }
@media (max-width: 760px) {
  .landing-features { grid-template-columns: 1fr; }
}
@media (hover: none) and (pointer: coarse) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
}

.foot { text-align: center; color: #6c7384; font-size: 12px; padding: 18px 16px 26px; }

@media (max-width: 640px) {
  .top-inner { padding: 10px 16px; gap: 8px; }
  .nav-right { margin-left: 0; }
  /* Menu sur une seule ligne qui défile, pour laisser la place au contenu (visiteurs venus d'Instagram). */
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .wrap { padding: 16px 16px 32px; }
  .card { padding: 18px; }
  .pill { padding: 6px 11px; font-size: 13px; }
}
