/* New Run — style « entre-deux » (validé le 02.11.2026) : sombre, sobre, ambre = XP, touches de jeu. */
:root {
  --bg: #12141C; --card: #1A1D27; --card-done: #1E1B14; --tile: #232733; --tile-done: #3A2F14;
  --edge: #0B0D12; --line: #2E3340; --text: #EDEBE6; --muted: #9AA0A6;
  --amber: #F2B33D; --amber-dark: #B9821F; --amber-soft: #3A2F14; --danger: #FF8A80;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; }
a { color: var(--amber); }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 19px; margin: 24px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Mise en page : téléphone = menu en bas ; ordinateur = menu à gauche */
.shell { min-height: 100vh; }
.main { max-width: 560px; margin: 0 auto; padding: 20px 16px 96px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--bg); border-top: 1px solid var(--tile); z-index: 10; }
.nav .brand { display: none; }
.nav-item { flex: 1; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.nav-item.active { color: var(--amber); }
@media (min-width: 900px) {
  .shell { display: flex; }
  .nav { position: sticky; top: 0; height: 100vh; flex-direction: column; justify-content: flex-start; width: 230px; padding: 28px 12px; border-top: none; border-right: 1px solid var(--tile); gap: 6px; }
  .nav .brand { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 12px 16px; }
  .nav-item { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; font-size: 15px; }
  .nav-item.active { background: var(--amber-soft); }
  .main { flex: 1; padding: 32px 24px 48px; }
}

/* En-tête niveau */
.level { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.level-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.level-top { display: flex; justify-content: space-between; align-items: baseline; }
.level h1 { font-size: 19px; }
.bar { height: 12px; border-radius: 6px; background: var(--tile); overflow: hidden; }
.bar > div { height: 100%; border-radius: 6px; background: var(--amber); box-shadow: inset 0 -3px 0 #D99A2B; transition: width .4s ease; }
.reserve { color: var(--amber); margin-top: 2px; }
.bar.thin { height: 8px; }
.bar.thin > div { box-shadow: none; }
.page-title { font-size: 28px; margin-bottom: 4px; }

/* Bandeaux */
.banner { display: block; border-radius: var(--radius); border: 1px solid var(--line); padding: 12px 14px; margin: 10px 0; color: var(--text); text-decoration: none; }
.banner.light { background: var(--text); color: var(--bg); font-weight: 700; text-align: center; border: none; border-bottom: 3px solid var(--muted); }
.mode-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.error { color: var(--danger); }

/* Listes de quêtes */
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 6px; }
.section-head h2 { margin: 0; }
.chip { font-weight: 700; color: var(--amber); border: 1px solid #5A4520; border-radius: 10px; padding: 3px 10px; font-size: 14px; }
.hint { margin: 0 0 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 6px 0 10px; border-radius: var(--radius); background: var(--card); border-bottom: 2px solid var(--edge); }
.row.done { background: var(--card-done); }
.row-main { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0; border: none; background: none; text-align: left; min-width: 0; }
.tile { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--tile); color: #C9CCD3; display: flex; align-items: center; justify-content: center; }
.row.done .tile { background: var(--tile-done); color: var(--amber); }
.txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.name { font-weight: 600; }
.row.done .name { color: var(--muted); }
.xp { font-size: 12px; font-weight: 600; color: var(--amber); }
.mini-txt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.check { width: 26px; height: 26px; flex: none; border-radius: 13px; border: 2px solid #4A4F59; display: flex; align-items: center; justify-content: center; color: var(--bg); }
.row.done .check { border-color: var(--amber); background: var(--amber); }
.mini { min-height: 44px; min-width: 52px; border-radius: 12px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--card); color: var(--muted); font-size: 13px; }
.info { min-height: 44px; min-width: 44px; border: none; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 0 4px; }
.row.full { opacity: .6; }
.detail { background: var(--card); border-radius: var(--radius); padding: 10px 14px; margin-top: -4px; font-size: 14px; }
.detail p { margin: 4px 0; }
.detail ul { margin: 4px 0; padding-left: 18px; }

/* Bonus du jour */
.combo { display: flex; align-items: center; gap: 10px; border-radius: var(--radius); border: 1px dashed #3A3F48; padding: 11px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.combo.on { background: var(--amber); color: var(--bg); border: none; border-bottom: 3px solid var(--amber-dark); font-weight: 700; font-size: 15px; }
.dots { display: flex; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 5px; background: var(--line); }
.dot.on { background: var(--amber); }

/* Cartes et paliers */
.card { background: var(--card); border-radius: 16px; border-bottom: 2px solid var(--edge); padding: 14px; margin-top: 16px; }
.card.palier { border: 1px solid #5A4520; border-bottom-width: 2px; }
.card-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.card.palier .card-kicker { color: var(--amber); }
.card-title { display: flex; align-items: center; gap: 10px; }
.card-title h3 { flex: 1; font-size: 16px; }
.pill { font-size: 12px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.card p { margin: 10px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: none; border-bottom: 3px solid var(--amber-dark); background: var(--amber); color: var(--bg); font-weight: 700; text-decoration: none; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); border-bottom-width: 2px; }
.btn.wide { width: 100%; min-height: 52px; margin-top: 16px; }
.link { background: none; border: none; color: var(--amber); text-decoration: underline; min-height: 44px; padding: 0 4px; }
.link.danger { color: var(--danger); }

/* Niveau atteint */
.levelup { text-align: center; margin: 10px 0 16px; }
.kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.big { font-size: 64px; font-weight: 800; line-height: 1; }
.unlock { background: var(--card); border-radius: var(--radius); padding: 10px 14px; }
.unlock.palier { border: 1px solid #5A4520; }
.pick { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 2px solid var(--tile); background: var(--card); }
.pick.on { border-color: var(--amber); background: #1F1B12; }
.pick-top { display: flex; justify-content: space-between; }
.pick-name { font-weight: 700; font-size: 16px; }

/* Parcours */
.phase { background: var(--bg); border: 1px solid var(--tile); border-radius: 16px; padding: 14px; }
.phase.active { background: var(--card); border-color: #5A4520; }
.phase-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lvs { display: flex; gap: 8px; }
.lv { flex: 1; height: 34px; border-radius: 10px; border: 2px solid var(--tile); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.lv.pal { border-color: #5A4520; }
.lv.done { background: var(--amber); border-color: var(--amber); color: var(--bg); }
.lv.cur { border-color: var(--amber); color: var(--amber); background: #1F1B12; }
.emblems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.emblem { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; font-weight: 600; }

/* Moi */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.badge { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 10px; border-bottom: 2px solid var(--edge); }
.badge > div { display: flex; flex-direction: column; }
.badge.locked b { color: var(--muted); }
.tier { font-size: 12px; font-weight: 700; color: var(--muted); }
.tier.t1 { color: #C98B4F; } .tier.t2 { color: #C9CED6; } .tier.t3 { color: var(--amber); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 300px; }
.cal { height: 28px; border-radius: 6px; background: #1A1C21; }
.cal.v1 { background: #4A3A17; } .cal.v2 { background: #8A6A22; } .cal.v3 { background: var(--amber); }
.cal.pause { outline: 1px dashed var(--line); }
.calendar.month .cal { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--muted); height: 34px; }
.calendar.month .cal.v2, .calendar.month .cal.v3 { color: var(--bg); }
.cal.today { outline: 2px solid var(--text); outline-offset: -2px; }
.dow { text-align: center; font-size: 11px; color: var(--muted); }
.cal-head { display: flex; align-items: center; justify-content: space-between; max-width: 300px; margin: 8px 0; }
.cal-head .link { font-size: 22px; text-decoration: none; min-width: 44px; }
.cal-toggle button { min-width: 70px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.cal-legend .cal { width: 14px; height: 14px; display: inline-block; }
.year { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.mini-month { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: var(--card); border: none; border-radius: 12px; padding: 8px; text-align: left; }
.calendar.tiny { gap: 2px; max-width: none; width: 100%; }
.calendar.tiny .cal, .calendar.tiny span { height: 9px; border-radius: 2px; }
.force { display: flex; flex-direction: column; gap: 5px; }
.force-top { display: flex; justify-content: space-between; font-size: 14px; }
.field { display: flex; align-items: center; gap: 10px; }
select, input { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 0 12px; }
input { width: 100%; font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 14px; border-bottom: 2px solid var(--edge); }
.offer > div { display: flex; flex-direction: column; }
.legal-links { margin-top: 32px; font-size: 13px; color: var(--muted); }

/* Accueil */
.welcome { max-width: 480px; margin: 0 auto; padding: 56px 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.welcome h1 { font-size: 40px; font-weight: 800; }
.welcome .lead { font-size: 17px; color: #C9C7C2; margin: 0; }
.welcome .stack { align-items: stretch; }
.first { margin: 8px 0 0; padding-left: 22px; }
.first li { margin: 4px 0; }

/* Défi du jour, routine, « demain », bandeau coffre */
.card.defi { border: 1px solid #5A4520; border-bottom-width: 2px; }
.card.defi .card-kicker { color: var(--amber); }
.card.defi.done { opacity: .75; }
.card.routine { padding-bottom: 8px; }
.card.routine .row { background: var(--bg); }
.card.routine .row.done { background: var(--card-done); }
.banner.gold { background: var(--amber); color: var(--bg); font-weight: 700; border: none; display: flex; gap: 8px; align-items: center; }
.teaser { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; margin: 24px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); }
.recap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.recap > div { background: var(--card); border-radius: var(--radius); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.recap b { font-size: 22px; color: var(--amber); }

.flame { display: inline-flex; align-items: center; gap: 2px; color: #FF9F43; font-weight: 800; }
.phase.soon { opacity: .55; filter: blur(1.2px); }
.week { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: var(--radius); background: var(--card); color: var(--text); text-decoration: none; }
.compare { display: flex; align-items: center; gap: 10px; }
.compare > div:not(.arrow) { flex: 1; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); padding: 12px; }
.compare b { font-size: 20px; color: var(--amber); }
.compare .arrow { font-size: 22px; color: var(--amber); }
.hours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hours .choice { text-align: center; padding: 0; }
.bilan-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.bilan-row.off .bilan-name { text-decoration: line-through; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.seg button { min-height: 40px; padding: 0 12px; border: none; background: var(--card); color: var(--muted); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--bg); font-weight: 700; }
.bilan-row.off .seg button[aria-pressed="true"] { background: var(--danger); color: var(--bg); }
.honest { display: flex; gap: 10px; align-items: center; font-size: 15px; min-height: 44px; }
.honest input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--amber); }

/* Départ (6 écrans) */
.onboard { max-width: 520px; margin: 0 auto; padding: 40px 20px; display: flex; flex-direction: column; gap: 16px; min-height: 100vh; box-sizing: border-box; }
.onboard h1 { font-size: 30px; font-weight: 800; }
.onboard .lead { font-size: 17px; color: #C9C7C2; margin: 0; }
.ob-dots { justify-content: center; margin-bottom: 12px; }
.choice { min-height: 56px; border-radius: var(--radius); border: 1px solid var(--line); border-bottom-width: 2px; background: var(--card); text-align: left; padding: 0 16px; font-size: 16px; font-weight: 600; }
.choice:hover { border-color: var(--amber); }
.lvs.path { flex-wrap: wrap; }
.lvs.path .lv { flex: 1 1 30%; height: auto; padding: 8px; font-size: 12px; }
.pledge { font-size: 24px; font-weight: 700; text-align: center; margin: 24px 0; }
.btn.hold { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.hold-fill { position: absolute; inset: 0; width: 0; background: #FFD27A; }
.btn.hold.holding .hold-fill { width: 100%; transition: width 2s linear; }
.hold-label { position: relative; }

/* Page de vente */
.landing { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; }
.land-top { display: flex; align-items: center; gap: 12px; }
.land-brand { font-size: 22px; font-weight: 800; letter-spacing: .16em; }
.hero { display: grid; gap: 32px; align-items: center; padding: 40px 0; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; margin: 12px 0 16px; }
.hero .lead { font-size: 18px; color: #C9C7C2; max-width: 560px; margin: 0 0 20px; }
.btn.big-cta { min-height: 60px; padding: 0 28px; font-size: 18px; margin-bottom: 10px; }
.phone { background: var(--bg); border: 1px solid var(--line); border-radius: 28px; padding: 18px; max-width: 340px; width: 100%; justify-self: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.phone .card { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.mini-row { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 4px 0; color: var(--text); }
.mini-row.done { color: var(--amber); }
.story { max-width: 760px; margin: 24px auto; text-align: center; }
.story p { font-size: 20px; line-height: 1.5; margin: 0 0 8px; }
.steps3 { display: grid; gap: 14px; margin: 32px 0; }
.step { background: var(--card); border-radius: 16px; padding: 18px; border-bottom: 2px solid var(--edge); display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.step svg { color: var(--amber); }
.step p { margin: 0; }
.num { width: 32px; height: 32px; border-radius: 16px; background: var(--amber-soft); color: var(--amber); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.unlocks { text-align: center; margin: 40px 0; }
.emblems.wide { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 16px 0; }
.medals { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.faq { max-width: 760px; margin: 32px auto; }
.faq details { background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.final { text-align: center; margin: 40px 0 0; }
.landing .legal-links { text-align: center; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.2fr 1fr; }
  .steps3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Récompenses animées */
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: var(--amber); color: var(--bg); font-weight: 800; border-radius: 12px; padding: 6px 14px; animation: pop 1.6s ease forwards; }
.toast.big { font-size: 20px; padding: 10px 20px; animation-duration: 2.6s; }
@keyframes pop { 0% { opacity: 0; transform: translateY(10px) scale(.9); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti span { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .6; } }
@media (prefers-reduced-motion: reduce) {
  .toast, .confetti span, .bar > div { animation: none; transition: none; }
  .confetti { display: none; }
}
