/* Dorémifacile · compagnon du Tome 1 — style « papier découpé » */
:root {
  --cream: #FBF6EC; --paper: #FFFFFF; --ink: #1F1D1B; --muted: #5B544C; --line: #E8DCC6; --line2: #F1E8D8;
  --yellow: #F3C63A; --yellow-d: #C99A12; --sage: #8FBC9A; --sage-d: #5E8F6B; --orange: #EE9B55; --orange-d: #B86A2C;
  --rasp: #A3285A; --rasp-d: #7E1D45; --blue: #2E6DA4; --brick: #B04F4A; --navy: #1B3550; --green: #3E7A57;
  --display: "Fraunces", Georgia, serif; --body: "Poppins", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
img { max-width: 100%; display: block; }
a { color: var(--rasp); }
a:hover { color: var(--rasp-d); }
button { font-family: var(--body); cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: 560px; margin: 0 auto; position: relative; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* papier découpé */
.cut { display: inline-block; padding: 2px 12px; clip-path: polygon(2% 6%, 100% 0, 97% 94%, 0 100%); }
.cut.b { clip-path: polygon(0 0, 98% 8%, 100% 100%, 3% 92%); }
.tilt-l { transform: rotate(-2deg); } .tilt-r { transform: rotate(1.5deg); }
.blob { position: absolute; pointer-events: none; z-index: 0; }
.shape1 { clip-path: polygon(12% 8%, 96% 0, 88% 90%, 0 100%); }
.shape2 { clip-path: polygon(0 10%, 92% 0, 100% 86%, 8% 100%); }
.tile { flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; font-weight: 900; }
.tile.s1 { clip-path: polygon(6% 4%, 100% 0, 94% 100%, 0 92%); }
.tile.s2 { clip-path: polygon(0 6%, 96% 0, 100% 94%, 4% 100%); }
.tile.s3 { clip-path: polygon(4% 0, 100% 6%, 96% 100%, 0 96%); }
.tile.s4 { clip-path: polygon(0 0, 94% 6%, 100% 100%, 6% 94%); }

.card { background: var(--paper); border-radius: 24px; padding: 18px; box-shadow: 0 5px 0 var(--line); position: relative; z-index: 1; }
.label { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px; background: var(--yellow); padding: 4px 10px; transform: rotate(-2deg); clip-path: polygon(2% 8%, 100% 0, 97% 92%, 0 100%); }
.label.sage { background: var(--sage); } .label.orange { background: var(--orange); } .label.navy { background: var(--navy); color: #fff; }
h2.h { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 2px; }

/* ---------- accueil ---------- */
.home { padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 20px; overflow: hidden; position: relative; }
.home .top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.home .top img { width: 140px; height: auto; }
.pill { background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 999px; }
.home h1 { margin: 6px 0 0; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 38px; line-height: 1.08; position: relative; z-index: 1; }
.home h1 .cut:first-child { background: var(--yellow); }
.home h1 .cut.b { background: var(--rasp); color: #fff; margin-top: 6px; }
.hello { font-size: 14px; color: var(--muted); position: relative; z-index: 1; }
.progress { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; }
.bar { height: 9px; background: var(--line2); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--orange); border-radius: 99px; transition: width .4s; }
.path { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.step-m { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 58px; border-radius: 18px; padding: 2px; }
.step-m .tile { width: 56px; height: 56px; font-size: 26px; }
.step-m .t { font-weight: 600; font-size: 14px; line-height: 1.25; }
.step-m .st { font-size: 14px; letter-spacing: 2px; color: #A87600; }
.step-m .st .off { color: #D9CDB8; }
.step-m.todo { opacity: .55; }
.step-m.todo:hover { opacity: .85; }
.step-m.cur { background: var(--paper); border: 3px solid var(--rasp); border-radius: 22px; padding: 12px; box-shadow: 0 5px 0 var(--rasp); opacity: 1; }
.step-m.cur .tile { width: 66px; height: 66px; font-size: 32px; }
.step-m.cur .here { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--rasp); }
.step-m.cur .t { font-size: 16px; font-weight: 700; }
.step-m.cur .sub { font-size: 12px; color: var(--muted); }
.step-m .go { margin-left: auto; flex: none; }
.indent-1 { margin-left: 44px; } .indent-2 { margin-left: 88px; }
.qrtip { background: var(--navy); color: #fff; border-radius: 20px; padding: 16px; display: flex; gap: 12px; align-items: center; font-size: 13px; position: relative; z-index: 1; }
.info { font-size: 13px; color: var(--muted); }
.info h2 { color: var(--ink); font-size: 15px; margin: 0 0 6px; }
.info p { margin: 0 0 8px; }
footer.f { text-align: center; font-size: 12px; color: var(--muted); padding: 10px 20px 30px; }
footer.f a { color: var(--muted); }

/* ---------- page mission ---------- */
.band { color: #fff; padding: 14px 20px 48px; position: relative; overflow: hidden; }
.band .back { color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; position: relative; z-index: 2; }
.band .bign { position: absolute; right: 26px; top: 50px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 88px; line-height: 1; color: var(--ink); z-index: 1; }
.band .bigtile { position: absolute; right: -26px; top: 26px; width: 150px; height: 150px; transform: rotate(14deg); clip-path: polygon(10% 0, 100% 10%, 90% 100%, 0 88%); }
.band .kicker { color: rgba(255,255,255,.82); margin-top: 4px; position: relative; z-index: 2; }
.band h1 { margin: 8px 0 0; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 34px; line-height: 1.06; position: relative; z-index: 2; max-width: 250px; }
.band .sub { font-size: 13px; color: rgba(255,255,255,.85); margin-top: 6px; position: relative; z-index: 2; max-width: 250px; }
.mbody { padding: 0 20px 28px; margin-top: -30px; display: flex; flex-direction: column; gap: 18px; position: relative; }

/* lecteur */
.player { display: flex; flex-direction: column; gap: 14px; }
.wave { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.wave i { flex: 1; border-radius: 3px; background: var(--line); transition: background .15s; }
.wave i.y { background: var(--yellow); } .wave i.on { background: var(--rasp); }
.beats { display: flex; gap: 10px; justify-content: center; height: 54px; align-items: center; }
.beats span { width: 46px; height: 46px; border-radius: 50%; background: var(--line2); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 20px; color: var(--muted); transition: transform .08s, background .08s; }
.beats span.on { background: var(--yellow); color: var(--ink); transform: scale(1.12); }
.beats span.on.one { background: var(--rasp); color: #fff; }
.prow { display: flex; align-items: center; gap: 14px; }
.play { width: 64px; height: 64px; flex: none; border: 0; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 var(--rasp); }
.play:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--rasp); }
.ptitle { font-weight: 700; font-size: 15px; } .psub { font-size: 12px; color: var(--muted); }
.speeds { display: flex; gap: 8px; }
.speeds button { flex: 1; min-height: 44px; border-radius: 14px; font-size: 13px; font-weight: 600; border: 2px solid var(--ink); background: #fff; }
.speeds button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.soon { font-size: 12px; color: var(--muted); background: var(--line2); border-radius: 12px; padding: 8px 12px; }

/* retenir / astuce */
.keep { background: var(--yellow); border-radius: 22px; padding: 16px 18px; position: relative; z-index: 1; }
.keep .kicker { color: var(--ink); }
.keep p { margin: 6px 0 0; font-weight: 600; font-size: 15px; }
.tipc { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.tipc b { color: var(--ink); }

/* étapes */
.steps { display: flex; flex-direction: column; gap: 10px; }
.stepb { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; border-radius: 18px; padding: 12px 14px; background: #fff; box-shadow: 0 3px 0 var(--line); text-align: left; min-height: 64px; }
.stepb .tile { width: 42px; height: 42px; font-size: 20px; }
.stepb .tx { flex: 1; font-size: 14px; font-weight: 600; }
.stepb .hint { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.stepb[aria-pressed="true"] { box-shadow: 0 3px 0 var(--sage-d); }
.stepb[aria-pressed="true"] .tile { background: var(--sage) !important; color: var(--ink) !important; }
.stepb.defi .tile { background: var(--navy); color: var(--yellow); }
.starsbox { background: var(--sage); border-radius: 22px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.starsbox .s { font-size: 30px; letter-spacing: 3px; line-height: 1; }
.starsbox .s .off { color: rgba(31,29,27,.22); }
.starsbox .m { font-size: 13px; font-weight: 600; }

/* mini-jeu */
.game { background: var(--navy); color: #fff; border-radius: 26px; padding: 18px; position: relative; overflow: hidden; z-index: 1; box-shadow: 0 6px 0 #0F2236; }
.game .gtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.game .kicker { color: var(--yellow); }
.game .score { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.game h2 { margin: 8px 0 4px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 26px; line-height: 1.1; }
.game h2 .cut { background: var(--yellow); color: var(--ink); }
.game .gi { font-size: 14px; color: #D6DEE8; margin: 8px 0 14px; }
.game .q { font-size: 16px; font-weight: 600; margin: 4px 0 12px; }
.stage { background: var(--cream); border-radius: 20px; padding: 16px 12px 12px; color: var(--ink); }
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choices.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.choice { min-height: 60px; border: 0; border-radius: 18px; background: #fff; color: var(--ink); font-family: var(--display); font-style: italic; font-weight: 900; font-size: 22px; box-shadow: 0 5px 0 #C9B999; padding: 6px; }
.choice.small { font-family: var(--body); font-style: normal; font-weight: 600; font-size: 14px; line-height: 1.25; }
.choice:active { transform: translateY(2px); box-shadow: 0 3px 0 #C9B999; }
.choice.good { background: var(--sage); box-shadow: 0 5px 0 var(--sage-d); }
.choice.bad { background: var(--orange); box-shadow: 0 5px 0 var(--orange-d); }
.choice:disabled { cursor: default; }
.fb { border-radius: 20px; padding: 14px 16px; margin-top: 14px; color: var(--ink); }
.fb.ok { background: var(--sage); } .fb.ko { background: var(--orange); }
.fb .ft { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 24px; }
.fb .fx { font-size: 14px; margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; padding: 0 18px; }
.btn.full { width: 100%; margin-top: 12px; }
.btn.y { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--yellow-d); }
.btn.ghost { background: transparent; border: 2px solid currentColor; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.25); }
.dots span.cur { background: var(--yellow); } .dots span.ok { background: var(--sage); } .dots span.ko { background: var(--orange); }
.listen { display: flex; justify-content: center; margin-bottom: 4px; }

/* clavier */
.kb { position: relative; display: flex; height: 160px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.kb.short { height: 130px; }
.kb .w { flex: 1; min-width: 0; height: 100%; background: #fff; border: 2px solid var(--ink); border-radius: 0 0 10px 10px; margin-left: -2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--navy); }
.kb .w:first-child { margin-left: 0; }
.kb button.w { cursor: pointer; font-family: var(--body); }
.kb button.w:active { background: #FFF6D6; }
.kb .bk { position: absolute; top: 0; height: 58%; background: var(--ink); border-radius: 0 0 6px 6px; pointer-events: none; }
.kb .mk { width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); margin-bottom: 8px; }
.kb .w.sel { background: var(--yellow); }
.kb .w.good { background: var(--sage); }
.kb .w.bad { background: var(--orange); }
.kb .w.lit { background: var(--yellow); }
.kb.many .w { font-size: 10px; }

/* mesure (tablature) */
.meas { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-left: 4px solid var(--ink); border-right: 4px solid var(--ink); border-radius: 6px; padding: 16px 12px; min-height: 70px; }
.meas b { font-size: 18px; color: var(--navy); }
.meas .tie { display: inline-block; width: 30px; height: 7px; border-radius: 4px; background: var(--navy); }
.sym { display: flex; justify-content: center; }
.sym span { min-width: 96px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 12px 18px; font-size: 30px; font-weight: 700; color: var(--navy); }
.sym .tie { display: inline-block; width: 46px; height: 10px; border-radius: 5px; background: var(--navy); vertical-align: middle; }

/* atelier composition */
.compo { display: flex; flex-direction: column; gap: 10px; }
.cm { background: #fff; border-radius: 14px; border: 2px solid var(--line); padding: 8px; }
.cm .ch { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cm .chord { min-height: 36px; min-width: 64px; border-radius: 10px; border: 2px dashed #9AA3B5; background: #fff; font-weight: 700; font-size: 13px; color: var(--navy); }
.cm .chord.set { border-style: solid; border-color: var(--navy); background: #EAF0F7; }
.cm .cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cm .cell { min-height: 48px; border-radius: 10px; border: 2px solid var(--line); background: var(--cream); font-weight: 700; font-size: 15px; color: var(--navy); display: flex; align-items: center; justify-content: center; }
.cm .cell.on { background: #fff; border-color: var(--navy); }
.cm .cell .tie { display: inline-block; width: 26px; height: 7px; border-radius: 4px; background: var(--navy); }
.cm .cell.now { background: var(--yellow); }
.checks { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #D6DEE8; }
.checks li { display: flex; gap: 8px; align-items: center; }
.checks li i { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #9FB1C6; flex: none; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; color: var(--ink); }
.checks li.ok { color: #fff; } .checks li.ok i { background: var(--sage); border-color: var(--sage); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* navigation bas de page */
.mnav { display: flex; gap: 10px; }
.mnav a { flex: 1; text-decoration: none; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: 0 4px 0 var(--line); color: var(--ink); min-height: 56px; display: flex; flex-direction: column; justify-content: center; }
.mnav a small { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.mnav a span { font-size: 13px; font-weight: 700; line-height: 1.2; }
.mnav a.nx { text-align: right; }

/* page texte */
.doc { padding: 24px 20px 40px; }
.doc h1 { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 30px; margin: 10px 0 16px; }
.doc h2 { font-size: 16px; margin: 20px 0 6px; }
.doc p, .doc li { font-size: 14px; color: #3A352F; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* mascotte Jonathan */
.home .hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.home .hero .masc { width: 140px; height: auto; margin: -10px -10px -24px 0; flex: none; }
.info { overflow: hidden; }
.info .masc-side { float: right; width: 96px; height: auto; margin: -6px -6px 4px 8px; }
.keep { display: flex; align-items: center; gap: 10px; }
.keep > div { flex: 1; }
.keep img { width: 88px; height: auto; flex: none; margin: -14px -8px -16px 0; }
.masc-star { width: 72px; height: auto; flex: none; margin: -12px 0 -14px -6px; }
.fb-end { display: grid; grid-template-columns: 1fr 96px; align-items: center; column-gap: 8px; }
.fb-end .masc-end { grid-column: 2; grid-row: 1 / span 2; width: 96px; height: auto; }
.fb-end .btn { grid-column: 1 / span 2; }
@media (max-width: 360px) { .home .hero .masc { width: 110px; } .keep img { width: 70px; } }

.tipc .masc-tip { width: 50px; height: auto; flex: none; }
.masc-star, .masc-end, .masc-side, .hero .masc, .keep img { aspect-ratio: auto; }
