/* ==========================================================================
   Piano avec Ju — identité « noir & or », cinématographique et chaleureuse.
   Sombre par choix (une seule ambiance), pensée d'abord pour le téléphone.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/poppins-light.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-regular.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-bold.woff") format("woff"); }

/* Mise en page : une colonne centrée, des bandes pleine largeur, l'or comme seule couleur d'accent. */
:root {
  --bg: #070608;
  --bg-2: #0e0c0f;
  --surface: #141116;
  --surface-2: #1c181e;
  --surface-3: #262027;
  --line: rgba(232, 190, 122, 0.16);
  --line-strong: rgba(232, 190, 122, 0.42);
  --hair: #2b252c;
  --gold: #e3b46b;
  --gold-hi: #f7d899;
  --gold-lo: #b37b37;
  --gold-ink: #1d1307;
  --text: #f6f0e7;
  --text-2: #cdc1b0;
  --muted: #918777;
  --right: #5ab0ff;
  --left: #f2b25c;
  --ok: #a6dd83;
  --warn: #f3c969;
  --danger: #ff8277;
  --lvl-1: #9be15d;
  --lvl-2: #f3c969;
  --lvl-3: #ff5c5c;
  --radius: 18px;
  --radius-s: 12px;
  --tap: 44px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Allura", "Snell Roundhand", "Apple Chancery", "Segoe Script", cursive;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --glow: 0 0 24px rgba(227, 180, 107, 0.35);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 400 15.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--gold-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 8px; }
main:focus, main:focus-visible { outline: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); }
h3 { font-size: 1.05rem; margin-top: 1.4em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.pad { padding: 24px 16px; }
.prewrap { white-space: pre-wrap; }
.ico { display: inline-flex; line-height: 0; }
.script { font-family: var(--script); font-weight: 400; color: var(--gold); letter-spacing: 0; }
.eyebrow { color: var(--gold); font-weight: 500; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; margin: 0 0 10px; }
.lead { color: var(--text-2); font-size: 1.02rem; margin: 0; max-width: 60ch; }
[hidden] { display: none !important; }

/* ---------- En-tête ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(7,6,8,.92), rgba(7,6,8,.78)); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
body[data-page="home"] .site-header { position: absolute; left: 0; right: 0; top: env(safe-area-inset-top, 0px); background: linear-gradient(rgba(7,6,8,.85), rgba(7,6,8,0)); border-bottom: 0; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: var(--tap); white-space: nowrap; }
.brand-mark { display: inline-flex; gap: 2px; align-items: flex-end; height: 22px; }
.brand-mark i { width: 4px; border-radius: 2px; background: var(--text); }
.brand-mark i:nth-child(1) { height: 18px; } .brand-mark i:nth-child(2) { height: 22px; }
.brand-mark i:nth-child(3) { height: 15px; background: var(--gold); } .brand-mark i:nth-child(4) { height: 20px; }
.brand-name { font-size: 1.12rem; font-weight: 500; letter-spacing: .01em; }
.brand-script { font-family: var(--script); color: var(--gold); font-size: 1.75rem; line-height: .8; margin-left: 2px; transform: translateY(2px); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); text-decoration: none; font-size: .86rem; padding: 10px 10px; border-radius: 10px; position: relative; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold); box-shadow: var(--glow); }
.site-nav .ico svg { width: 17px; height: 17px; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20,17,22,.6); color: var(--text); text-decoration: none; font-size: .78rem; font-weight: 500; letter-spacing: .06em; }
.tool-btn:hover { border-color: var(--line-strong); }
.avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: var(--gold-hi); background: radial-gradient(circle at 30% 25%, #3a2c1b, #120e0b); text-decoration: none; }
.avatar .lvl-chip { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--gold-ink); font-size: .66rem; font-weight: 700; display: grid; place-items: center; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 56px max(16px, env(safe-area-inset-right, 0px)); outline: none; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
body[data-page="home"] main { max-width: none; padding: 0 0 40px; }
body[data-page="song"] main { max-width: 1280px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; padding: 26px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; display: grid; gap: 14px; justify-items: center; }
.footer-motto { display: flex; align-items: center; gap: 14px; width: min(100%, 760px); color: var(--text-2); letter-spacing: .22em; font-size: .7rem; text-transform: uppercase; }
.footer-motto::before, .footer-motto::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong)); }
.footer-motto::after { background: linear-gradient(90deg, var(--line-strong), transparent); }
.footer-motto .clef { font-size: 1.6rem; color: var(--gold); letter-spacing: 0; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.socials a:hover { border-color: var(--gold); color: var(--gold-hi); }
.site-footer p { margin: 0; max-width: 720px; }
.site-footer a { color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: .92rem; text-decoration: none; line-height: 1.1; transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: var(--gold-ink); box-shadow: 0 6px 24px rgba(227,180,107,.28), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-primary:hover { box-shadow: 0 8px 32px rgba(227,180,107,.45), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { background: rgba(20,17,22,.6); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255,130,119,.4); }
.btn-small { min-height: 38px; padding: 8px 16px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.link-btn { background: none; border: 0; color: var(--gold-hi); padding: 4px; text-decoration: underline; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--hair); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-wrap { flex-wrap: wrap; }
.seg-btn { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-weight: 500; font-size: .86rem; white-space: nowrap; }
.seg-btn[aria-selected="true"], .seg-btn[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); }
.seg-small .seg-btn { min-height: 34px; padding: 4px 11px; font-size: .82rem; }
.seg-btn.hand-R[aria-pressed="true"] { background: var(--right); color: #04121b; }
.seg-btn.hand-L[aria-pressed="true"] { background: var(--left); color: #1d0f02; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--hair); background: var(--surface-2); color: var(--text-2); font-weight: 500; font-size: .84rem; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"], .chip[aria-expanded="true"] { background: rgba(227,180,107,.14); color: var(--gold-hi); border-color: var(--gold); }
.chip.set { color: var(--gold-hi); border-color: var(--line-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.select, .input { min-height: var(--tap); padding: 8px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--surface); color: var(--text); width: 100%; }
.select { width: auto; }
.input:focus, .select:focus { border-color: var(--gold); outline: none; }
textarea.input { resize: vertical; }

.badge { font-size: .7rem; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: rgba(20,17,22,.8); color: var(--text-2); border: 1px solid var(--hair); white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.lvl-debutant { color: var(--lvl-1); border-color: rgba(155,225,93,.35); }
.badge.lvl-intermediaire { color: var(--lvl-2); border-color: rgba(243,201,105,.35); }
.badge.lvl-avance { color: var(--lvl-3); border-color: rgba(255,92,92,.35); }
.badge.quick { color: var(--gold-hi); border-color: var(--line-strong); }
.badge-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }

.panel { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel.narrow { max-width: 460px; margin: 32px auto; }
.empty, .error-box { padding: 32px 18px; text-align: center; color: var(--text-2); background: var(--surface); border: 1px dashed var(--hair); border-radius: var(--radius); }
.error-box { color: var(--danger); }
.banner { border-radius: var(--radius-s); padding: 12px 14px; font-size: .9rem; }
.banner-warn { background: #2f240f; color: var(--warn); border: 1px solid rgba(243,201,105,.3); }
.banner-error { background: #321715; color: #ffb7ae; border: 1px solid rgba(255,130,119,.3); }
.not-found { text-align: center; padding: 120px 16px 60px; }
.section-title { margin: 30px 0 14px; }
.page-head { padding: 36px 0 18px; display: grid; gap: 8px; }
.page-head h1 { margin: 0; }

/* ======================= Accueil ======================= */
.hero-home { position: relative; min-height: min(92vh, 760px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art canvas, .hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-home::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(7,6,8,.94) 0%, rgba(7,6,8,.7) 38%, rgba(7,6,8,.1) 70%),
  linear-gradient(0deg, var(--bg) 0%, rgba(7,6,8,0) 28%); }
.hero-inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 120px var(--gutter) 60px; display: grid; gap: 20px; }
.hero-inner h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 500; max-width: 14ch; margin: 0; }
.hero-inner h1 .script { font-size: 1.32em; line-height: .7; padding: 0 .06em; display: inline-block; transform: translateY(.08em); text-shadow: 0 0 30px rgba(227,180,107,.35); }
.hero-inner .lead { max-width: 42ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-motto { font-family: var(--script); color: var(--gold); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1; margin: 4px 0 0; }
.hero-motto::after { content: ""; display: block; width: 180px; height: 1px; margin-top: 4px; background: linear-gradient(90deg, var(--gold), transparent); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.features { margin-top: -30px; position: relative; z-index: 2; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: linear-gradient(180deg, rgba(28,24,30,.92), rgba(14,12,15,.95)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.feature { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 14px; color: var(--text); text-decoration: none; position: relative; }
.feature + .feature::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
.feature .ico { color: var(--gold); }
.feature .ico svg { width: 30px; height: 30px; }
.feature strong { font-weight: 500; font-size: .95rem; }
.feature span.small { color: var(--muted); max-width: 22ch; line-height: 1.4; }
.feature:hover strong { color: var(--gold-hi); }

.home-section { padding-block: 70px 10px; }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr); gap: 34px; align-items: center; }
.split-text { display: grid; gap: 12px; justify-items: start; }
.split-text h2 { margin: 0; }
.split-text p { color: var(--text-2); margin: 0 0 6px; }

.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel-wrap { position: relative; min-width: 0; }
.carousel-next { position: absolute; right: -6px; top: 42%; z-index: 2; }

.method { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr); gap: 34px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 8px; color: var(--text-2); }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist li::before { content: "✓"; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.demo-card { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.demo-stage { position: relative; min-height: 260px; background: #050406; }
.demo-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(10,8,10,.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); text-decoration: none; }
.demo-side { padding: 20px; display: grid; gap: 12px; align-content: start; border-left: 1px solid var(--line); }
.diff-dots { display: flex; gap: 6px; padding: 8px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--hair); width: max-content; }
.diff-dots i { width: 12px; height: 12px; border-radius: 50%; background: #3a3238; }
.diff-dots i.on { background: var(--gold); box-shadow: 0 0 8px rgba(227,180,107,.6); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: var(--text-2); }
.steps li i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--hair); display: grid; place-items: center; font-style: normal; font-size: .7rem; flex: none; }
.steps li.done i { background: var(--ok); border-color: var(--ok); color: #0c1a06; }
.steps li.done { color: var(--text); }
.xp-reward { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-hi); font-weight: 500; }

.community-band { position: relative; margin-top: 70px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background:
  radial-gradient(60% 120% at 80% 30%, rgba(227,180,107,.22), transparent 60%),
  radial-gradient(40% 80% at 55% 100%, rgba(255,150,80,.14), transparent 70%),
  linear-gradient(180deg, #19121a, #0d0a0e); }
.community-band .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: 32px; }
.community-band h2 { margin: 0 0 6px; }
.community-band p { color: var(--text-2); margin: 0 0 16px; }
.polaroids { position: relative; height: 190px; }
.polaroid { position: absolute; width: 150px; height: 170px; padding: 8px 8px 26px; background: #f2ece2; border-radius: 4px; box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.polaroid .pic { width: 100%; height: 100%; border-radius: 2px; overflow: hidden; }
.polaroid:nth-child(1) { left: 8%; top: 18px; transform: rotate(-8deg); }
.polaroid:nth-child(2) { left: 38%; top: 0; transform: rotate(3deg); }
.polaroid:nth-child(3) { left: 66%; top: 14px; transform: rotate(9deg); }
.polaroid.thanks { background: #141014; color: var(--gold); display: grid; place-items: center; text-align: center; font-family: var(--script); font-size: 1.6rem; line-height: 1.05; padding: 16px; border: 1px solid #3a2e22; }
.sparkle-stars { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff6, transparent), radial-gradient(1.5px 1.5px at 85% 70%, #ffd9a0aa, transparent), radial-gradient(1px 1px at 40% 80%, #fff5, transparent); }

/* ---------- Cartes morceaux (style affiche) ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { position: relative; background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s, box-shadow .2s; min-width: 0; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(227,180,107,.08); }
.card-thumb-wrap { position: relative; }
.card-thumb img { width: 100%; height: auto; aspect-ratio: auto; object-fit: cover; background: var(--surface-3); }
.card-thumb-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface-2) 0%, rgba(28,24,30,0) 12%); pointer-events: none; }
.card-thumb-wrap .card-level { position: absolute; left: 10px; top: 10px; z-index: 1; }
.card-body { padding: 2px 12px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; text-align: center; align-items: center; }
.card-title { font-size: .88rem; font-weight: 500; margin: 0; }
.card-artist { color: var(--muted); margin: 0; font-size: .72rem; }
.card-play { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; margin: 5px auto 3px; color: var(--text); text-decoration: none; }
.card:hover .card-play { border-color: var(--gold); color: var(--gold-hi); box-shadow: var(--glow); }
.card-meta { color: var(--muted); font-size: .68rem; margin: 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card .why { color: var(--gold-hi); font-size: .8rem; margin: 6px 0 0; }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card .fav-btn { z-index: 2; }
.fav-btn { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(7,6,8,.6); color: #fff; font-size: 1.2rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.fav-btn[aria-pressed="true"] { color: #ff7d93; }
.ghost-card { aspect-ratio: 3/4; border-radius: var(--radius); border: 1px dashed var(--line-strong); display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; background: linear-gradient(180deg, rgba(28,24,30,.6), rgba(14,12,15,.6)); }
.ghost-card .script { font-size: 1.8rem; }

/* ---------- Bibliothèque ---------- */
.filters { display: grid; gap: 12px; margin: 6px 0 8px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--hair); border-radius: 999px; padding: 0 18px; color: var(--muted); }
.search:focus-within { border-color: var(--gold); }
.search-input { flex: 1; min-height: 50px; border: 0; background: transparent; outline: none; font-size: .95rem; min-width: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cat-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .chip { flex: none; }
.count { margin: 12px 0; font-size: .86rem; }
.shelf { margin-top: 26px; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.shelf-head h2 { margin: 0; font-size: 1.2rem; }

/* ---------- Page morceau ---------- */
.song-page { display: grid; gap: 20px; padding-top: 18px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; min-height: 36px; font-size: .9rem; }
.song-hero { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 220px; display: flex; align-items: flex-end; isolation: isolate; }
.song-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.song-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,6,8,.96) 10%, rgba(7,6,8,.4) 60%, rgba(7,6,8,.2)); }
.song-hero-inner { padding: 22px; display: grid; gap: 8px; width: 100%; }
.song-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.song-title { margin: 0; }
.song-artist { color: var(--text-2); margin: 0; }
.song-actions { display: flex; align-items: center; gap: 8px; }
.song-actions .fav-btn { position: static; background: rgba(20,17,22,.7); border: 1px solid var(--line); }
.versions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.version-tab { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--surface); color: var(--text); }
.version-tab[aria-selected="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--glow); background: var(--surface-2); }
.tutorial { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.tutorial .steps li { font-size: .92rem; }
.resources { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.resources a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--bg-2); color: var(--text); text-decoration: none; }
.resources a:hover { border-color: var(--line-strong); }
.res-kind { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--gold); border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 6px; }
.howto ol { padding-left: 1.2em; margin: 0 0 8px; color: var(--text-2); }
.howto li { margin: 4px 0; }
.progress-facts { margin: 0 0 12px; padding-left: 1.1em; color: var(--text-2); }
.mastered-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-2); }

/* ---------- Modèle de page morceau : présentation + parcours ---------- */
.song-top { display: grid; gap: 22px; align-items: center; }
.song-media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #050405; aspect-ratio: 16 / 10; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.song-media.portrait { aspect-ratio: auto; max-height: 72vh; display: grid; place-items: center; }
.song-media .song-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.song-media.portrait .song-video { max-height: 72vh; height: auto; }
.song-media .song-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(10,8,8,.55); color: var(--gold-hi); display: grid; place-items: center; box-shadow: var(--glow); backdrop-filter: blur(4px); }
.media-play:hover { background: rgba(227,180,107,.18); }
.media-note { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: .82rem; color: var(--text-2); padding-inline: 12px; }
.media-dur { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(7,6,8,.8); border: 1px solid var(--line); font-size: .8rem; color: var(--text); pointer-events: none; }
.song-media:has(video) .media-dur { top: 12px; bottom: auto; }
.song-info { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.song-cat { display: inline-block; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold-hi); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(227,180,107,.06); }
.song-info .song-title { font-size: clamp(2.2rem, 6.5vw, 3.6rem); line-height: 1.05; text-wrap: balance; letter-spacing: -.01em; }
.song-sub { margin: -4px 0 0; font-family: var(--script); color: var(--gold); font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.1; }
.song-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.song-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--surface); color: var(--text-2); font-size: .86rem; }
.song-chip svg { color: var(--gold); }
.song-chip b { color: var(--text); font-weight: 500; }
.btn-cta { width: 100%; max-width: 440px; min-height: 62px; font-size: 1.12rem; font-weight: 700; letter-spacing: .02em; justify-content: center; gap: 12px; border-radius: 16px; margin-top: 4px; }
.btn-cta .cta-arrow { font-size: 1.8rem; line-height: 1; margin-left: auto; }
.btn-cta .cta-label { margin-right: auto; }
.song-hint { margin: 0; color: var(--gold); font-style: italic; font-size: .9rem; }

.song-main { display: grid; gap: 20px; align-items: start; }
.song-side { display: grid; gap: 20px; min-width: 0; }
.panel-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.15rem; }
.panel-title svg { color: var(--gold); }
.path-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.step { border: 1px solid var(--hair); border-radius: 16px; background: rgba(20,17,22,.6); transition: border-color .2s; min-width: 0; }
@keyframes pathPulse { 0% { box-shadow: 0 0 0 0 rgba(227,180,107,.7); } 100% { box-shadow: 0 0 0 18px rgba(227,180,107,0); } }
.path-panel.pulse { animation: pathPulse 1.2s ease-out; }
.step.open { border-color: var(--gold); }
.step-head { width: 100%; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; background: none; border: 0; color: var(--text); text-align: left; border-radius: 16px; cursor: pointer; }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-hi); font-weight: 700; font-size: .95rem; }
.step.done .step-num { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); }
.step-art { width: 84px; height: 46px; border-radius: 8px; border: 1px solid var(--hair); object-fit: cover; }
.step-text { display: grid; gap: 2px; min-width: 0; }
.step-text strong { font-weight: 500; font-size: 1rem; }
.step-text span { color: var(--text-2); font-size: .84rem; }
.step-status { color: var(--gold); display: grid; place-items: center; min-width: 28px; }
.step-go { font-size: 1.6rem; line-height: 1; color: var(--gold-hi); }
.step.locked .step-head { opacity: .55; }
.step.locked .step-status { color: var(--muted); }
.step-body { padding: 4px 14px 16px; display: grid; gap: 12px; min-width: 0; }
.step-long { margin: 0; color: var(--text-2); max-width: 70ch; }
.step-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.step-actions:empty { display: none; }
.step-actions .btn svg { margin-right: 6px; }
.step-practice { min-width: 0; }
.step-practice:empty { display: none; }
.step-crit { display: grid; gap: 6px; color: var(--text-2); }
.step-manual { justify-self: start; }

.res-list-ui { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--surface); color: var(--text); text-decoration: none; text-align: left; font: inherit; cursor: pointer; list-style: none; }
.res-row::-webkit-details-marker { display: none; }
.res-row:hover:not(:disabled) { border-color: var(--line-strong); }
.res-row:disabled { cursor: default; opacity: .6; }
.res-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(227,180,107,.1); color: var(--gold); flex: none; }
.res-label { flex: 1; min-width: 0; }
.res-chev { color: var(--gold-hi); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.res-soon { font-size: .72rem; color: var(--muted); border: 1px solid var(--hair); border-radius: 999px; padding: 2px 8px; }
.res-details[open] .res-chev { transform: rotate(90deg); }
.res-details > :not(summary) { margin: 10px 4px 4px; }
.res-text { color: var(--text-2); font-size: .92rem; }
.chords { display: grid; gap: 8px; }
.chord-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chord-label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; min-width: 70px; }
.chord { min-width: 46px; text-align: center; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--gold-hi); font-weight: 500; background: rgba(227,180,107,.05); }

.progress-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.path-ring { width: 84px; height: 84px; }
.path-ring > div { width: 70px; height: 70px; }
.path-ring b { font-size: 1.15rem; }
.progress-mid { display: grid; gap: 6px; min-width: 0; }
.progress-reward { display: grid; justify-items: center; gap: 2px; text-align: center; }
.medal-big { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: var(--gold-ink); font-size: 1.4rem; box-shadow: var(--glow); }
.progress-reward b { color: var(--gold-hi); font-size: .9rem; }

@media (min-width: 900px) {
  .song-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; }
  .song-main { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
}
@media (max-width: 520px) {
  .step-art { display: none; }
  .step-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .progress-grid { grid-template-columns: auto minmax(0, 1fr); }
  .progress-reward { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
  .medal-big { width: 34px; height: 34px; font-size: 1rem; }
}

/* vidéos sociales */
.social-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.social-card { display: grid; gap: 10px; justify-items: start; }
.embed-box { width: 100%; max-width: 100%; aspect-ratio: 9/16; max-height: 620px; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--hair); }
.embed-box.instagram { aspect-ratio: 4/5.6; }
.embed-box iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.embed-load { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; border: 0; background: transparent; text-align: center; color: var(--text); }
.embed-load.static { cursor: default; }
.platform-dot { width: 46px; height: 46px; border-radius: 14px; }
.platform-dot.tiktok { background: conic-gradient(from 90deg, #25f4ee, #fe2c55, #25f4ee); }
.platform-dot.instagram { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

/* ======================= Lecteur ======================= */
.player { --stage-h: clamp(340px, 62vh, 720px); background: #060507; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; outline: none; min-width: 0; max-width: 100%; box-shadow: var(--shadow); }
.player-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; flex-wrap: wrap; }
.top-right { display: flex; align-items: center; gap: 8px; }
.mode-badge { font-size: .72rem; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--hair); white-space: nowrap; }
.mode-badge.interactive { color: var(--gold-hi); border-color: var(--gold); }
.stage { position: relative; height: var(--stage-h); display: flex; flex-direction: column; background: #060507; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); min-width: 0; }
.fall-wrap { position: relative; flex: 1; min-height: 0; min-width: 0; }
.fall-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.score-wrap { position: relative; flex: 0 0 auto; height: 34%; min-height: 120px; background: #0e0b0e; border-bottom: 1px solid var(--hair); overflow: hidden; min-width: 0; }
.player[data-view="falling"] .score-wrap { display: none; }
.player[data-view="score"] .fall-wrap { display: none; }
.player[data-view="score"] .score-wrap { flex: 1; height: auto; display: flex; align-items: center; border-bottom: 0; }
.player[data-view="score"] .score-wrap .score-viewport { width: 100%; }
.rotate-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(20,17,22,.92); color: var(--text-2); font-size: .78rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hair); white-space: nowrap; pointer-events: none; }
.video-panel { flex: 0 0 auto; background: #000; border-bottom: 1px solid var(--hair); }
.video-panel video { display: block; width: 100%; max-height: 32vh; object-fit: contain; background: #000; }
.video-audio { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--text-2); padding: 6px 10px; }
.score-host { position: relative; }
.score-viewport { position: relative; overflow: hidden; width: 100%; }
.score-svg { display: block; will-change: transform; }
.score-head { position: absolute; left: 0; top: 0; background: linear-gradient(90deg, #0e0b0e 82%, rgba(14,11,14,0)); pointer-events: none; transition: opacity .2s; }
.score-cursor { position: absolute; width: 2px; background: var(--gold); box-shadow: 0 0 12px rgba(227,180,107,.7); border-radius: 2px; pointer-events: none; }
.score-svg line, .score-head line { stroke: #4d4448; stroke-width: 1; }
.score-svg .bar { stroke: #6a5f63; stroke-width: 1.2; }
.score-svg .bar-final { fill: #9b8f87; }
.score-svg .ledger { stroke: #9b8f87; stroke-width: 1.2; }
.score-svg .measure-num { fill: #7c7067; font: 500 9px var(--font); }
.clef-stroke { fill: none; stroke: #d9cdbb; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.clef-stroke.thick { stroke-width: 3; }
.clef-fill { fill: #d9cdbb; }
.timesig { fill: #efe5d6; font: 700 21px var(--font); text-anchor: middle; }
.acc { fill: #efe5d6; font: 500 15px system-ui, sans-serif; text-anchor: middle; }
.acc.key { font-size: 14px; }
.el .head { fill: #efe5d6; }
.el .head.open { fill: none; stroke: #efe5d6; stroke-width: 1.8; }
.el .head.whole-mask { display: none; }
.el .stem { stroke: #efe5d6; stroke-width: 1.3; }
.el .flag, .el .dot, .el .rest { fill: #d9cdbb; }
.el .rest-stroke { stroke: #d9cdbb; stroke-width: 1.6; fill: none; }
.el .tie { fill: none; stroke: #d9cdbb; stroke-width: 1.3; }
.el .note-name { fill: #a3978a; font: 500 8px var(--font); text-anchor: middle; }
.el .finger { fill: var(--gold); font: 700 9px var(--font); text-anchor: middle; }
.el.R.on .head { fill: var(--note-r, var(--right)); stroke: var(--note-r, var(--right)); }
.el.L.on .head { fill: var(--note-l, var(--left)); stroke: var(--note-l, var(--left)); }
.el.on .head.open { fill: none; stroke-width: 2.4; }
.el.R.on .stem, .el.R.on .flag { stroke: var(--note-r, var(--right)); fill: var(--note-r, var(--right)); }
.el.L.on .stem, .el.L.on .flag { stroke: var(--note-l, var(--left)); fill: var(--note-l, var(--left)); }
.el.on .note-name { fill: var(--text); }
.score-host[data-hands="R"] .el.L, .score-host[data-hands="L"] .el.R { opacity: .3; }

.transport { padding: 10px 12px 6px; display: grid; gap: 8px; }
.seek-wrap { position: relative; height: 28px; display: flex; align-items: center; }
.loop-zone { position: absolute; top: 9px; height: 10px; background: rgba(227,180,107,.3); border-left: 2px solid var(--gold); border-right: 2px solid var(--gold); border-radius: 3px; pointer-events: none; }
.loop-zone.off { background: rgba(255,255,255,.08); border-color: #6a5f63; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; position: relative; }
.seek::-webkit-slider-runnable-track { height: 5px; border-radius: 6px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #2f2830 var(--p, 0%)); }
.seek::-moz-range-track { height: 5px; border-radius: 6px; background: #2f2830; }
.seek::-moz-range-progress { height: 5px; border-radius: 6px; background: var(--gold); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-hi); margin-top: -6.5px; border: 3px solid #060507; box-shadow: var(--glow); }
.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--gold-hi); border: 3px solid #060507; }
.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.transport-btns { display: flex; align-items: center; gap: 8px; }
.play-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: var(--gold-ink); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(227,180,107,.35); }
.play-btn:active { transform: scale(.96); }
.time-box { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; min-width: 92px; }
.time { font-weight: 500; }
.measure-label { color: var(--muted); font-size: .8rem; }
.speed-box { display: flex; align-items: center; gap: 8px; }
.mini-label { font-size: .7rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.quick { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 8px 12px 12px; align-items: center; }
.quick-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.loop-info { font-size: .78rem; color: var(--muted); }
.settings { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); padding: 14px 14px 16px; border-top: 1px solid var(--hair); background: var(--bg-2); }
.settings-col { display: grid; gap: 10px; align-content: start; }
.settings-title { font-size: .92rem; font-weight: 500; }
.radio-group { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.radio-group legend { font-weight: 500; margin-bottom: 6px; font-size: .92rem; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; color: var(--text-2); }
.radio input { width: 20px; height: 20px; accent-color: var(--gold); }
.switch { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 42px; height: 24px; border-radius: 999px; background: #352d35; position: relative; flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #d9cdbb; transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--gold); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); background: var(--gold-ink); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.vol-row { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.vol-row input { flex: 1; accent-color: var(--gold); }
.midi-stats { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 12px 4px; }
.midi-stats b { color: var(--gold-hi); font-size: 1.3rem; }
.mic-heard { color: var(--gold-hi); min-height: 1.2em; margin: 0; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--hair); font-size: .82rem; color: var(--text-2); }
.lg { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.lg i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg-R i { background: var(--note-r, var(--right)); }
.lg-L i { background: var(--note-l, var(--left)); }
.lg-mode { font-weight: 500; color: var(--gold-hi); }
.lg-hint { font-size: .78rem; }
.player-empty { padding: 40px 16px; text-align: center; background: var(--surface); border: 1px dashed var(--hair); border-radius: var(--radius); }
.player:fullscreen, .player.pseudo-fs { border-radius: 0; border: 0; width: 100%; height: 100%; }
.player.pseudo-fs { margin: 0; max-width: none; position: fixed; inset: 0; z-index: 120; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.player.is-fs { --stage-h: auto; }
.player.is-fs .stage { flex: 1; height: auto; min-height: 0; }
.player.is-fs .legend, .player.is-fs .quick, .player.is-fs .settings { display: none; }
/* « À toi de jouer » en plein écran : plus de barre de progression, plus de place perdue */
.player.is-fs.is-wait .seek-wrap, .player.is-fs.is-wait .speed-box { display: none; }
.player.is-fs.is-wait .transport { padding: 4px 12px; }

/* ======================= Apprendre, trouveur, piano libre ======================= */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.learn-card { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); color: var(--text); text-decoration: none; }
.learn-card:hover { border-color: var(--line-strong); }
.learn-card .ico { color: var(--gold); }
.learn-card strong { font-weight: 500; font-size: 1.05rem; }
.learn-card p { margin: 0; color: var(--text-2); font-size: .9rem; }
.questions { display: grid; gap: 18px; }
.question { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.question legend { font-weight: 500; font-size: 1rem; margin-bottom: 8px; }
.piano-player { overflow: hidden; }
.piano-stage { position: relative; height: clamp(170px, 34vh, 300px); }
.last-note { display: flex; align-items: baseline; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.big-us { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 700; color: var(--right); font-variant-numeric: tabular-nums; }
.big-fr { font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 500; color: var(--gold); }
.transport-row.piano-controls { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 10px 12px; }
.range-label { min-width: 140px; text-align: center; color: var(--text-2); font-weight: 500; }

/* ======================= Jeu : XP, niveaux, défis, badges ======================= */
.level-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line-strong); background:
  radial-gradient(80% 140% at 0% 0%, rgba(227,180,107,.18), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--bg-2)); }
.level-ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), #2b242c 0); box-shadow: var(--glow); }
.level-ring > div { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; text-align: center; line-height: 1; }
.level-ring b { font-size: 1.9rem; font-weight: 700; color: var(--gold-hi); }
.level-ring span { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.level-info { display: grid; gap: 6px; min-width: 0; }
.level-name { font-family: var(--script); color: var(--gold); font-size: 2rem; line-height: 1; }
.xp-bar { height: 8px; border-radius: 8px; background: #2b242c; overflow: hidden; }
.xp-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); box-shadow: var(--glow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.tile-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.tile-value { font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.daily { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.daily li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--bg-2); }
.daily li.done { border-color: var(--line-strong); background: rgba(227,180,107,.07); }
.daily .d-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--gold); font-size: .95rem; }
.daily li.done .d-ico { background: var(--gold); color: var(--gold-ink); }
.daily .d-body { display: grid; gap: 6px; min-width: 0; }
.daily .d-xp { color: var(--gold-hi); font-weight: 500; font-size: .82rem; white-space: nowrap; }
.bar { height: 6px; background: #2b242c; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 6px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 12px; }
.badge-item { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--hair); background: var(--bg-2); }
.badge-item .medal { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: #241e25; color: #5e5459; border: 1px solid var(--hair); }
.badge-item.on .medal { background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 50%, var(--gold-lo)); color: var(--gold-ink); border-color: transparent; box-shadow: var(--glow); }
.badge-item strong { font-weight: 500; font-size: .84rem; }
.badge-item span { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.badge-item:not(.on) strong { color: var(--muted); }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.theme-btn { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--hair); background: var(--bg-2); color: var(--text); text-align: left; }
.theme-btn[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.theme-btn:disabled { opacity: .5; cursor: not-allowed; }
.theme-swatch { display: flex; gap: 4px; }
.theme-swatch i { flex: 1; height: 26px; border-radius: 6px; }
.space-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; }
.acc-form { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.confirm { margin-top: 12px; padding: 12px; border: 1px solid rgba(255,130,119,.4); border-radius: 12px; }
.reward-pop { position: fixed; left: 50%; top: calc(80px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 210; padding: 14px 22px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); font-weight: 500; box-shadow: 0 10px 40px rgba(227,180,107,.45); animation: pop .5s ease-out both; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -12px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ======================= Communauté ======================= */
.suggest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.suggest-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--bg-2); }
.suggest-list li.done { opacity: .75; }
.rank { width: 30px; text-align: center; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-variant-numeric: tabular-nums; }
.vote-btn[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

/* ======================= Administration ======================= */
.admin { display: grid; gap: 18px; padding-top: 22px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { margin: 4px 0 0; font-size: clamp(1.4rem, 4vw, 2rem); }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-list { display: grid; gap: 10px; }
.admin-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "img main status" "img actions actions"; gap: 6px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.admin-thumb { grid-area: img; width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }
.admin-row-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.admin-row-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .status { grid-area: status; }
.admin-row-actions { grid-area: actions; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.status { font-size: .74rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.status.published, .status.approved { background: rgba(166,221,131,.12); color: var(--ok); }
.status.draft, .status.pending { background: rgba(243,201,105,.12); color: var(--warn); }
.status.done { background: rgba(227,180,107,.14); color: var(--gold-hi); }
.status.hidden { background: rgba(255,130,119,.1); color: var(--danger); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.span2 { grid-column: 1 / -1; }
.label { display: grid; gap: 6px; font-weight: 500; font-size: .88rem; color: var(--text-2); }
.field .select, .label .select { width: 100%; max-width: 100%; }
.track-row .select { width: auto; }
.hint { color: var(--muted); font-size: .8rem; margin: 0; }
.form-error { color: var(--danger); font-weight: 500; margin: 4px 0 0; }
.form-error:empty { display: none; }
.ok { color: var(--ok); }
.bad { color: var(--danger); }
.ok-box { background: rgba(166,221,131,.08); border: 1px solid rgba(166,221,131,.3); color: #d8f2c6; border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: .88rem; }
.login { display: grid; gap: 10px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone { display: grid; gap: 6px; padding: 22px 16px; text-align: center; border: 2px dashed #4a3f3a; border-radius: var(--radius); cursor: pointer; background: var(--bg-2); }
.dropzone:hover { border-color: var(--gold); }
.midi-options { margin-top: 14px; }
.track-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.select-small { min-height: 38px; padding: 6px 10px; }
.input-small { width: 120px; }
.limits, .fingering { margin-top: 12px; color: var(--text-2); font-size: .9rem; }
.limits summary, .fingering summary { cursor: pointer; font-weight: 500; min-height: 36px; display: flex; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.facts div { background: var(--bg-2); border: 1px solid var(--hair); border-radius: 10px; padding: 8px 10px; }
.facts dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.preview-mount { margin-top: 8px; }
.preview-mount .player { --stage-h: clamp(300px, 52vh, 560px); }
.thumb-preview { width: 100%; max-width: 320px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; border: 1px solid var(--hair); }
.social-list, .res-list { display: grid; gap: 10px; margin: 12px 0; }
.social-row { display: flex; gap: 8px; align-items: flex-start; }
.grow { flex: 1; display: grid; gap: 4px; min-width: 0; }
.save-bar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: rgba(14,12,15,.96); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; backdrop-filter: blur(8px); margin-bottom: env(safe-area-inset-bottom); }
.save-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* notifications */
#toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; width: min(92vw, 420px); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .4s, transform .4s; }
.toast-error { background: #ffc2ba; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ======================= Tablette ======================= */
@media (max-width: 980px) {
  /* tablette en position verticale : les libellés restent visibles en haut, un peu plus petits */
  .site-nav a .nav-label { display: inline; }
  .site-nav a { padding: 8px 6px; font-size: .76rem; gap: 5px; }
  .split, .method { grid-template-columns: 1fr; }
  .space-grid { grid-template-columns: 1fr; }
}
/* Tablette en position verticale : navigation en bas (comme sur téléphone), pour ne plus chevaucher le logo en haut */
@media (max-width: 980px) and (orientation: portrait) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .site-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; justify-content: space-around; gap: 0; margin: 0;
    background: rgba(10,8,11,.97); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
  }
  .site-nav a { flex: 1; flex-direction: column; gap: 2px; font-size: .74rem; padding: 7px 2px 6px; min-height: 54px; justify-content: center; }
  .site-nav a .nav-label { display: block; }
  .site-nav a[aria-current="page"] { color: var(--gold-hi); }
  .site-nav a[aria-current="page"]::after { left: 30%; right: 30%; top: 0; bottom: auto; }
  .site-nav .ico svg { width: 21px; height: 21px; }
  #toasts { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
}


/* ======================= Téléphone ======================= */
@media (max-width: 760px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
  .site-header { padding-top: 10px; padding-bottom: 10px; gap: 10px; backdrop-filter: none; background: rgba(7,6,8,.97); }
  body[data-page="home"] .site-header { background: linear-gradient(rgba(7,6,8,.85), rgba(7,6,8,0)); }
  .seg-wrap { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg-wrap::-webkit-scrollbar { display: none; }
  .filter-row { display: grid; gap: 10px; }
  .site-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; justify-content: space-around; gap: 0; margin: 0;
    background: rgba(10,8,11,.97); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
  }
  .site-nav a { flex: 1; flex-direction: column; gap: 2px; font-size: .72rem; padding: 7px 2px 6px; min-height: 54px; justify-content: center; }
  .site-nav a .nav-label { display: block; }
  .site-nav a[aria-current="page"] { color: var(--gold-hi); }
  .site-nav a[aria-current="page"]::after { left: 30%; right: 30%; top: 0; bottom: auto; }
  .site-nav .ico svg { width: 21px; height: 21px; }
  .header-tools { margin-left: auto; }
  .hero-home { min-height: 640px; align-items: flex-end; }
  .hero-home::after { background: linear-gradient(0deg, var(--bg) 8%, rgba(7,6,8,.75) 48%, rgba(7,6,8,.25) 100%); }
  .hero-inner { padding-top: 220px; padding-bottom: 50px; gap: 16px; }
  .features { margin-top: -10px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(3)::before { display: none; }
  .feature:nth-child(n+3) { border-top: 1px solid var(--line); }
  .home-section { padding-block-start: 48px; }
  .carousel { grid-auto-columns: 72%; }
  .carousel-next { display: none; }
  .demo-card { grid-template-columns: 1fr; }
  .demo-side { border-left: 0; border-top: 1px solid var(--line); }
  .community-band .inner { grid-template-columns: 1fr; padding: 24px 20px; }
  .polaroids { height: 160px; }
  .polaroid { width: 118px; height: 140px; }
  .player { border-radius: 14px; margin: 0 -6px; --stage-h: clamp(300px, 58vh, 560px); }
  .song-main { grid-template-columns: minmax(0, 1fr); }
  .song-main > *, .song-side > *, .song-side .panel, .song-main .panel { min-width: 0; max-width: 100%; }
  .song-page, .song-main, .song-side { width: 100%; max-width: 100%; }
  .player-top { flex-wrap: nowrap; padding: 8px; }
  .player-top .seg { flex: 1; }
  .player-top .seg-btn { flex: 1; padding: 6px 8px; }
  .player-top .mode-badge { display: none; }
  .score-wrap { height: 38%; }
  .transport-row { display: grid; grid-template-columns: auto 1fr; }
  .speed-box { grid-column: 1 / -1; justify-content: space-between; }
  .speed-box .seg, .quick-group .seg { flex: 1; }
  .speed-box .seg-btn, .quick-group .seg-btn { flex: 1; }
  .time-box { text-align: right; align-items: flex-end; }
  .transport-btns .icon-btn { width: 40px; height: 40px; }
  .play-btn { width: 56px; height: 56px; }
  .quick-group { width: 100%; }
  .lg-hint { width: 100%; }
  .versions { grid-template-columns: repeat(3, 1fr); }
  .version-tab { padding: 10px; }
  .version-tab .small { display: none; }
  .tutorial { grid-template-columns: 1fr; }
  .level-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .admin-row { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img main" "status actions"; }
  .admin-thumb { width: 72px; height: 40px; }
  .save-bar { flex-direction: column; align-items: stretch; }
  .save-btns .btn { flex: 1; }
  #toasts { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
}
/* Téléphone en position verticale uniquement : la ligne des modes peut revenir à la ligne
   au lieu de déborder. En horizontal, on garde la mise en page actuelle. */
@media (max-width: 760px) and (orientation: portrait) {
  .player-top { flex-wrap: wrap; }
  .player-top .seg { flex: 1 1 100%; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .player { --stage-h: calc(100dvh - 150px); }
  .site-header { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}
.admin-tabs a { text-decoration: none; }

/* ======================= Vidéos hébergées ======================= */
.video-block { display: grid; gap: 10px; }
.video-frame { background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow); }
.song-video { display: block; width: 100%; max-height: 78vh; background: #000; }
.video-block.portrait .video-frame { max-width: 520px; width: 100%; margin: 0 auto; }
.video-block.portrait .song-video { aspect-ratio: 9 / 16; max-height: 82vh; object-fit: contain; }
.video-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center; }

/* ======================= Ajout rapide (admin, téléphone) ======================= */
.qa-cta { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); text-decoration: none; color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, var(--gold-lo)); box-shadow: 0 10px 30px rgba(227,180,107,.25); }
.qa-cta strong { display: block; font-size: 1.1rem; font-weight: 500; }
.qa-cta .small { opacity: .8; }
.qa-pick-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(0,0,0,.12); flex: none; }
.qa-head { display: grid; gap: 6px; }
.qa-head h1 { margin: 0; }
.qa-pick { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 16px; border-radius: var(--radius); border: 2px dashed var(--line-strong); background: var(--bg-2); cursor: pointer; color: var(--text); }
.qa-pick:hover, .qa-pick:focus-within { border-color: var(--gold); }
.qa-pick .qa-pick-ico { background: rgba(227,180,107,.12); color: var(--gold); }
.qa-queue { display: grid; gap: 16px; }
.qa-card { display: grid; gap: 14px; }
.qa-card.qa-done { border-color: var(--line-strong); }
.qa-top { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: start; }
.qa-thumb-wrap { display: grid; gap: 4px; justify-items: center; }
.qa-thumb { width: 110px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--hair); }
.qa-meta { display: grid; gap: 6px; min-width: 0; }
.qa-file { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-fields { display: grid; gap: 12px; }
.qa-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.qa-actions .btn { min-height: 52px; font-size: 1rem; }
.qa-frame { display: grid; gap: 8px; }
.qa-frame input { accent-color: var(--gold); width: 100%; }
.ig-card h2 { font-size: 1.1rem; }
.ig-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.ig-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.ig-list li > .row { grid-column: 1 / -1; justify-content: flex-end; }
.ig-list img, .ig-ph { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.howto-list { padding-left: 1.2em; color: var(--text-2); display: grid; gap: 6px; }
@media (min-width: 761px) { .ig-list li { grid-template-columns: 56px minmax(0, 1fr) auto; } .ig-list li > .row { grid-column: auto; } }
.tool-preview.on { background: #3a2a14; color: var(--gold-hi); border-color: var(--gold); }
.tool-add { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); border-color: transparent; }

/* ======================================================================
   v5 — méthodes, enregistrement, versions, progression, vote
   Texte toujours clair (blanc, blanc cassé, beige, or) sur fond sombre.
   ====================================================================== */
audio { color-scheme: dark; }
.hero-intro { display: grid; gap: 10px; margin: 6px 0 4px; }
.hero-intro .lead { color: var(--text); }
.lead-gold { color: var(--gold-hi) !important; font-style: italic; }
.checklist.steps-5 { counter-reset: st; gap: 12px; }
.checklist.steps-5 li { counter-increment: st; align-items: flex-start; flex-direction: column; gap: 2px; padding-left: 34px; position: relative; }
.checklist.steps-5 li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; font-size: .78rem; }
.checklist.steps-5 strong { color: var(--text); font-weight: 500; }
.checklist.steps-5 .small { color: var(--text-2); }
.time-note { margin: 16px 0 0; padding: 12px 14px; border-left: 2px solid var(--gold); background: rgba(227,180,107,.06); border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--text-2); font-size: .86rem; font-style: italic; }
.footer-motto { text-transform: none; letter-spacing: .02em; font-size: 1.02rem; color: var(--gold-hi); font-style: italic; text-align: center; }
.footer-motto span:first-child { flex: 0 1 auto; }
.footer-follow { color: var(--text-2); margin: 4px 0 0; text-align: center; }
.site-footer .socials a { color: var(--gold-hi); }

/* Choix de version : originale / ma reprise */
.edition-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.edition-btn { text-align: left; display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: var(--tap); cursor: pointer; }
.edition-btn span { font-size: .78rem; color: var(--text-2); }
.edition-btn strong { font-weight: 500; }
.edition-btn[aria-checked="true"] { border-color: var(--gold); background: linear-gradient(180deg, rgba(247,216,153,.14), rgba(227,180,107,.05)); box-shadow: var(--glow); }
.edition-btn[aria-checked="true"] strong { color: var(--gold-hi); }

/* Trois façons d'apprendre */
.methods-panel { margin-top: 18px; }
.method-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.method-card { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--surface)); color: var(--text); cursor: pointer; min-height: 120px; transition: border-color .2s, transform .2s; }
.method-card:hover:not(:disabled) { border-color: var(--line-strong); transform: translateY(-2px); }
.method-card strong { font-weight: 500; font-size: 1.02rem; }
.method-card .small { color: var(--text-2); }
.method-card .method-ico { color: var(--gold); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); }
.method-card[aria-checked="true"] { border-color: var(--gold); box-shadow: var(--glow); background: linear-gradient(160deg, rgba(247,216,153,.12), var(--surface)); }
.method-card[aria-checked="true"] strong { color: var(--gold-hi); }
.method-card:disabled { opacity: .5; cursor: not-allowed; }
.method-extra { margin-top: 12px; display: grid; gap: 10px; }
.chords-box { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg-2); }
@media (max-width: 720px) { .method-cards { grid-template-columns: 1fr; } .method-card { min-height: 0; grid-template-columns: auto 1fr; align-items: center; } .method-card .small { grid-column: 1 / -1; } }

/* Écouter mon enregistrement */
.listen-panel { margin-top: 18px; display: grid; gap: 10px; }
.rec-player { width: 100%; height: 44px; }
.rec-audio { display: none; }
.step-video { width: 100%; max-height: 60vh; border-radius: var(--radius-s); background: #000; margin: 8px 0; }
.lg-rec { color: var(--gold-hi); font-weight: 500; }

/* Notation américaine (lecteur) */
.letter-wrap { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 12px; background: #0b090c; }
.player[data-view="letters"] .letter-wrap { display: block; }
.player[data-view="letters"] .fall-wrap, .player[data-view="letters"] .score-wrap { display: none; }
.lt-legend { margin: 0 0 10px; color: var(--text-2); font-size: .8rem; }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.lt-measure { border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 8px 10px; background: var(--surface); cursor: pointer; display: grid; gap: 4px; transition: border-color .15s, background .15s; }
.lt-measure:focus-visible { outline: 2px solid var(--gold); }
.lt-measure.now { border-color: var(--gold); background: linear-gradient(180deg, rgba(247,216,153,.10), var(--surface)); }
.lt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.lt-num { color: var(--muted); font-size: .72rem; }
.lt-chord { color: var(--gold-hi); font-weight: 600; font-size: 1.05rem; }
.lt-chord.same { opacity: .55; }
.lt-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lt-hand { font-size: .62rem; letter-spacing: .08em; width: 22px; flex: none; font-weight: 600; }
.lt-R .lt-hand { color: var(--right); }
.lt-L .lt-hand { color: var(--left); }
.lt-note { font-family: var(--mono); font-size: .84rem; color: var(--text); padding: 2px 6px; border-radius: 6px; background: var(--surface-3); line-height: 1.3; }
.lt-note sup { color: var(--gold); font-size: .62rem; margin-left: 2px; }
.lt-stack { border: 1px solid var(--line); }
.lt-R .lt-note.on { background: var(--right); color: #04121b; }
.lt-L .lt-note.on { background: var(--left); color: #1d0f02; }
.lt-rest { color: var(--muted); }
.letter-wrap[data-hands="R"] .lt-L, .letter-wrap[data-hands="L"] .lt-R { opacity: .3; }
.seg-btn .ico { margin-right: 4px; vertical-align: -3px; }
@media (max-width: 560px) { .player-top .seg-btn span:not(.ico) { font-size: .74rem; } .player-top .seg-btn { padding: 6px 9px; } .player-top .seg-btn.view-both { display: none; } }

/* Progression : morceau / générale */
.overall-mini { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); color: var(--text); text-decoration: none; }
.overall-mini .xp-bar { grid-column: 1 / -1; }
.overall-mini b { color: var(--gold-hi); }
.card-progress { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .74rem; color: var(--gold-hi); position: relative; z-index: 1; }
.card-progress .xp-bar { flex: 1; }
.overall-card { display: grid; gap: 16px; }
.overall-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.overall-head h2 { margin: 0 0 4px; }
.overall-facts { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: .86rem; }
.overall-facts b { color: var(--gold-hi); font-weight: 600; }
.song-progress-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.song-progress-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr 3.2em; gap: 10px; align-items: center; }
.song-progress-list a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Vote : le morceau de la semaine */
.poll { margin: 24px 0; padding: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: radial-gradient(120% 100% at 0% 0%, rgba(227,180,107,.12), transparent 60%), var(--surface); box-shadow: var(--shadow); display: grid; gap: 16px; }
.poll h2 { margin: 0; color: var(--text); }
.poll-head { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; align-items: flex-end; }
.poll-meta { display: grid; justify-items: end; gap: 2px; }
.poll-count { color: var(--gold-hi); font-weight: 500; }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.poll-grid.carousel { display: flex; }
.poll-grid.carousel .poll-card { flex: 0 0 min(240px, 78vw); }
.poll-card { border: 1px solid var(--hair); border-radius: var(--radius-s); overflow: hidden; background: var(--bg-2); display: grid; grid-template-rows: auto 1fr; }
.poll-card.mine { border-color: var(--gold); }
.poll-card.winner { border-color: var(--gold-hi); box-shadow: var(--glow); }
.poll-img { position: relative; aspect-ratio: 16 / 10; background: #000; }
.poll-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poll-crown { position: absolute; top: 8px; left: 8px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 600; }
.poll-body { padding: 12px; display: grid; gap: 6px; align-content: start; }
.poll-body h3 { margin: 0; font-size: 1rem; font-weight: 500; color: var(--text); }
.poll-body .small { margin: 0; }
.poll-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.poll-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.poll-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.poll-votes { color: var(--gold-hi); font-size: .84rem; }
.poll-winner { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 18px; align-items: center; padding: 14px; border-radius: var(--radius-s); border: 1px solid var(--gold); background: linear-gradient(120deg, rgba(247,216,153,.12), transparent); }
.poll-winner img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }
.poll-winner h3 { margin: 2px 0; font-size: 1.4rem; color: var(--gold-hi); }
.poll-thanks { font-size: 1.8rem; color: var(--gold); margin: 4px 0 0; }
@media (max-width: 560px) { .poll { padding: 16px; } .poll-winner { grid-template-columns: 1fr; } .poll-meta { justify-items: start; } }
.home-poll .poll { margin-top: 8px; }

/* Administration */
.sub-panel { border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 14px; margin-top: 14px; background: var(--bg-2); display: grid; gap: 8px; }
.sub-panel h3 { margin: 0; color: var(--gold-hi); font-weight: 500; font-size: 1rem; }
.sub-stack { display: grid; }
.edition-body { display: grid; gap: 4px; margin-top: 10px; }
.media-prev:empty { display: none; }
.admin-media { width: 100%; max-width: 520px; max-height: 300px; border-radius: 10px; background: #000; }
audio.admin-media { height: 44px; }
.poll-admin-list { display: grid; gap: 10px; margin: 8px 0 12px; }
.poll-admin-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--bg-2); }
.poll-admin-img { width: 110px; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; }
.stack-s { display: grid; gap: 6px; }
.gold { color: var(--gold-hi); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (max-width: 560px) { .poll-admin-row { grid-template-columns: 1fr auto; } .poll-admin-img { grid-column: 1 / -1; width: 100%; } }
.player[data-view="letters"] .lg-hint, .player[data-view="score"] .lg-hint { display: none; }
.score-svg .chord-sym { fill: var(--gold-hi); font-size: 12px; font-weight: 600; font-family: var(--font); }

/* pédale de résonance */
.score-svg .pedal-txt { fill: var(--muted, #b9ae9c); font: italic 600 10px var(--font); }
.score-svg .pedal-line { stroke: var(--muted, #b9ae9c); stroke-width: 1.2; }
.score-svg .pedal.on .pedal-txt { fill: var(--gold-hi); }
.score-svg .pedal.on .pedal-line { stroke: var(--gold-hi); stroke-width: 1.8; }

.lt-pedal { position: relative; height: 6px; margin-top: 16px; border-radius: 3px; background: rgba(227, 180, 107, 0.07); }
.lt-pedal span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: rgba(227, 180, 107, 0.45); }
.lt-pedal span.start::before { content: "Ped"; position: absolute; left: 0; top: -13px; font-size: 9px; font-weight: 700; letter-spacing: .04em; color: var(--gold); }
.lt-pedal span.on { background: var(--gold-hi); box-shadow: 0 0 8px rgba(247, 216, 153, 0.6); }

/* Couvertures automatiques (administration) */
.cover-edit { display: grid; gap: 10px; }
.cover-canvas { display: block; width: 100%; max-width: 560px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--hair); background: #000; }
.cover-fields { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cover-fields { grid-template-columns: 1fr 1fr; } .cover-fields > :last-child { grid-column: 1 / -1; } }
.admin-row-wrap { display: grid; gap: 8px; }
.admin-cover-panel { display: grid; gap: 12px; }
.admin-cover-panel[hidden] { display: none; }

/* Infos du morceau (administration) */
.info-fields { display: grid; gap: 12px; }
.time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.time-part { display: inline-flex; align-items: center; gap: 6px; }
.time-part .input { width: 84px; }

/* Partition PDF synchronisée */
.pdf-score { display: grid; gap: 10px; margin-top: 8px; min-width: 0; }
.pdf-tools { flex-wrap: wrap; gap: 8px; }
.pdf-pages { position: relative; max-height: 70vh; overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 10px; border: 1px solid var(--hair); display: grid; gap: 6px; -webkit-overflow-scrolling: touch; }
.pdf-pages:empty { min-height: 120px; }
.pdf-page { position: relative; line-height: 0; }
.pdf-canvas { display: block; max-width: none; }
.pdf-hl { position: absolute; border-radius: 6px; background: rgba(240, 190, 90, 0.22); box-shadow: 0 0 0 2px rgba(214, 160, 60, 0.95), 0 0 18px rgba(240, 190, 90, 0.55); pointer-events: none; transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease; }
.pdf-score.expanded { position: fixed; inset: 0; z-index: 60; background: var(--bg, #070608); padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); grid-template-rows: auto 1fr auto; margin: 0; }
.pdf-score.expanded .pdf-pages { max-height: none; height: 100%; }
@media (prefers-reduced-motion: reduce) { .pdf-hl { transition: none; } }

/* Choix : regarder et écouter / jouer avec mon piano */
.learn-choice { display: grid; gap: 10px; padding: 12px 12px 4px; }
.learn-title { margin: 0; font-weight: 500; color: var(--gold-hi); }
.learn-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .learn-cards { grid-template-columns: 1fr; } }
.learn-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--surface)); color: var(--text); cursor: pointer; min-width: 0; }
.learn-card:hover { border-color: var(--line-strong); }
.learn-card strong { display: block; font-weight: 500; font-size: 1rem; }
.learn-card .small { color: var(--text-2); }
.learn-ico { flex: none; color: var(--gold); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); }
.learn-txt { display: grid; gap: 2px; min-width: 0; }
.learn-card[aria-checked="true"] { border-color: var(--gold); box-shadow: var(--glow); background: linear-gradient(160deg, rgba(247,216,153,.12), var(--surface)); }
.learn-card[aria-checked="true"] strong { color: var(--gold-hi); }
.learn-status { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--surface); font-size: .9rem; }
.learn-status.ok { border-color: var(--gold); }
.learn-status p { margin: 0; }
.learn-ok { color: var(--gold-hi); }
.learn-guide { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }
.learn-status .btn { justify-self: start; }

/* bouton son du piano, à côté de la barre de progression */
.seek-wrap .seek { flex: 1; min-width: 0; width: auto; }
.seek-wrap .sound-btn { flex: none; margin-left: 8px; }

/* Logo du site */
.brand-logo { height: 46px; width: auto; display: block; }
@media (max-width: 760px) { .brand-logo { height: 38px; } }
@media (max-width: 560px) { .brand { gap: 6px; } .brand-logo { height: 30px; } .brand .brand-name { font-size: .95rem; } .brand .brand-script { font-size: 1.15rem; } }
@media (max-width: 380px) { .brand-logo { height: 26px; } .brand .brand-name { font-size: .85rem; } .brand .brand-script { font-size: 1rem; } .header-tools { gap: 4px; } }

/* Conseils (texte commun à tous les morceaux), pleine largeur sous le parcours */
.tips-panel .tips-text { margin: 0; max-width: 72ch; line-height: 1.7; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.02rem; color: var(--text-2, #e9dcc2); }

/* Plein écran (surtout téléphone en paysage) : le choix du mode devient une ligne compacte
   pour laisser la place aux notes qui tombent et au clavier. */
.player.is-fs .learn-choice { padding: 6px 10px 0; }
.player.is-fs .learn-title, .player.is-fs .learn-card .small, .player.is-fs .learn-status:empty { display: none; }
.player.is-fs .learn-cards { grid-template-columns: repeat(2, max-content); justify-content: start; gap: 8px; }
.player.is-fs .learn-card { padding: 6px 12px; gap: 8px; }
.player.is-fs .learn-card strong { font-size: .9rem; }
.player.is-fs .learn-ico svg { width: 18px; height: 18px; }
@media (orientation: landscape) and (max-height: 520px) {
  .player.is-fs .player-top { padding: 4px 10px; flex-wrap: nowrap; }
  .player.is-fs .player-top .seg { flex: 1 1 auto; min-width: 0; }
  .player.is-fs .player-top .seg-btn { min-height: 30px; padding: 4px 10px; font-size: .8rem; }
  .player.is-fs .player-top .top-right { flex: none; margin-left: 0; }
  .player.is-fs .player-top .top-right .icon-btn { width: 38px; height: 38px; }
  .player.is-fs .player-top .top-right > :not(button) { display: none; }
  .player.is-fs .transport-row { display: flex; align-items: center; gap: 10px; padding: 4px 10px 8px; }
  .player.is-fs .speed-box { grid-column: auto; margin-left: auto; }
  .player.is-fs .midi-stats { padding: 3px 10px; margin: 0 10px 4px; display: flex; align-items: baseline; gap: 10px; }
  .player.is-fs .midi-stats .small { display: none; }
  .player.is-fs .midi-stats b { font-size: 1.05rem; }
}
/* Plein écran : le sélecteur de vue défile au lieu d'être coupé sur écran étroit */
.player.is-fs .player-top .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.player.is-fs .player-top .seg::-webkit-scrollbar { display: none; }
@media (max-width: 760px) { .player.is-fs .player-top .seg { flex: 1 1 100%; } .player.is-fs .player-top .top-right { margin-left: auto; } }
/* Plein écran en position verticale : les quatre modes tiennent sur une ligne, libellés complets (sur deux lignes au besoin) */
@media (orientation: portrait) {
  .player.is-fs .player-top .seg { flex: 1 1 100%; display: flex; overflow: visible; max-width: 100%; }
  .player.is-fs .player-top .seg-btn { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.15; font-size: .74rem; padding: 6px 4px; text-align: center; justify-content: center; }
  .player.is-fs .player-top .seg-btn .ico { display: block; margin: 0 auto 2px; }
}

/* Plein écran : on masque le choix « Regarder et écouter / À toi de jouer » pour gagner de la place
   (il reste disponible en quittant le plein écran). */
.player.is-fs .learn-choice { display: none; }

/* Page Premium */
.premium-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.premium-plan { border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); min-width: 0; }
.premium-plan h2 { margin: 0 0 4px; font-weight: 500; font-size: 1.25rem; }
.premium-plan .premium-tag { display: block; color: var(--gold); font-size: .8rem; margin-bottom: 16px; }
.premium-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; line-height: 1.4; }
.premium-plan li { display: flex; gap: 10px; }
.premium-plan li .ok { color: var(--gold-hi); flex: none; }
.premium-plan li .no { color: var(--text-3, #6b6073); flex: none; }
.premium-plan li.off { color: var(--text-3, #8e8373); }
.premium-plus { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201,169,106,.25), 0 18px 50px rgba(201,169,106,.08); background: linear-gradient(160deg, rgba(247,216,153,.08), var(--surface)); }
.premium-soon { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px dashed var(--gold); border-radius: 14px; padding: 16px 20px; background: rgba(201,169,106,.06); }
.premium-soon strong { color: var(--gold-hi); font-weight: 500; }
.premium-soon p { margin: 4px 0 0; }
.premium-faq { display: grid; gap: 10px; margin-top: 10px; }
.premium-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--bg-2); }
.premium-faq summary { cursor: pointer; font-size: .95rem; }
.premium-faq details p { margin: 10px 0 0; }
@media (max-width: 760px) { .premium-grid { grid-template-columns: minmax(0, 1fr); } }

/* Fonctions Premium verrouillées */
.pm-lock { position: relative; cursor: default; color: rgba(233, 220, 194, .45) !important; }
.pm-lock > * { opacity: .55; }
.pm-lock::after { content: "✦"; position: absolute; top: -8px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #f7d899, #c9a96a); color: #1a1208; font-size: 12px; line-height: 22px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.55); cursor: pointer; z-index: 3; }
.pm-pop { position: fixed; z-index: 400; background: #f6efe0; color: #1b1409; border-radius: 12px; padding: 10px 14px; font-size: .85rem; box-shadow: 0 10px 30px rgba(0,0,0,.6); display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.pm-pop b { color: #8a6420; font-weight: 600; }
.pm-pop-link { background: #1b1409; color: #f7d899; border-radius: 999px; padding: 5px 12px; font-size: .78rem; text-decoration: none; }

/* Emblème de niveau */
.emblem { position: relative; width: min(250px, 68vw); aspect-ratio: var(--ar); container-type: inline-size; flex: none; }
.emblem img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.emblem-num { position: absolute; left: var(--tx); top: var(--ty); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: .6cqw; pointer-events: none; }
.emblem-num i { font-style: normal; font-size: 4.2cqw; letter-spacing: .2em; color: #e9d29a; font-weight: 500; }
.emblem-num b { font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif; font-variant-numeric: lining-nums; font-weight: 600; font-size: 31cqw; line-height: .9; background: linear-gradient(#fff1c0, #d9a948 60%, #b07c25); -webkit-background-clip: text; background-clip: text; color: transparent; }
.emblem-num[data-d="3"] b { font-size: 22cqw; }

/* Animation dorée (« vidéo » dessinée à partir des notes) */
.song-media.gold { aspect-ratio: auto; background: #070504; }
.gold-view { position: relative; display: flex; flex-direction: column; }
.gold-canvas { display: block; width: 100%; aspect-ratio: 16 / 9; cursor: pointer; background: #070504; }
.gold-view .gold-play { z-index: 2; inset: 0 0 44px 0; }
.gold-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #0b0807; border-top: 1px solid var(--line); }
.gold-toggle { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold-hi); display: grid; place-items: center; flex: none; }
.gold-seek { flex: 1; min-width: 0; accent-color: var(--gold); }
.gold-time { font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--text); min-width: 2.6em; text-align: right; }
.song-media.gold .rec-player { display: none; }
.gold-cover { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; z-index: 1; pointer-events: none; }

/* Éditeur des mains (administrateur) */
.hand-list { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; margin-top: 8px; }
.hand-row { text-align: left; font: inherit; font-size: .85rem; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line, #3a3a3a); background: transparent; color: inherit; cursor: pointer; }
.hand-row.is-blue { border-left: 4px solid #3b8bea; }
.hand-row.is-orange { border-left: 4px solid #e0a13a; }
.hand-row:hover { filter: brightness(1.15); }

/* Menu administrateur : choisir bleu ou orange sur une note */
.hand-menu { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 6; background: var(--surface, #1b1719); color: var(--text, #f3ead8); border: 1px solid var(--line, #3a3a3a); border-radius: 12px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: calc(100% - 32px); }
.hand-menu p { margin: 0 0 8px; }

/* ---------- Apprendre (maquette 2) ---------- */
.learn2 { display: grid; gap: clamp(28px, 5vw, 48px); }
.l2-hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 300px; border: 1px solid var(--line); background: #070608; }
.l2-hero-in { position: relative; padding: clamp(22px, 4vw, 44px); display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) { .l2-hero-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.l2-hero-left { display: grid; gap: 14px; justify-items: start; }
.l2-tips { background: linear-gradient(180deg, #17120e, #0c0a09); border: 1px solid var(--line-strong); border-radius: 18px; padding: 20px 22px; min-width: 0; }
.l2-tips h2 { margin: 0 0 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; color: var(--gold-hi); }
.l2-tips p { margin: 0; font-family: Georgia, "Times New Roman", serif; font-style: italic; line-height: 1.7; color: var(--text-2, #e9dcc2); }
.l2-pill { display: inline-flex; gap: 6px; align-items: center; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold-hi); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; background: rgba(227,180,107,.08); }
.l2-hero h1 { margin: 0; font-size: clamp(1.9rem, 5.4vw, 3.2rem); line-height: 1.08; }
.l2-hero h1 span { color: var(--gold-hi); }
.l2-lead { margin: 0; color: var(--text-2); max-width: 46ch; }
.l2-cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: -8px; }
@media (min-width: 860px) { .l2-cards { grid-template-columns: repeat(3, 1fr); } }
.l2-card { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #17120e, #0c0a09); min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.l2-card.rec { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 28px rgba(227,180,107,.25); }
.l2-badge { position: absolute; z-index: 2; top: 10px; left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 999px; background: linear-gradient(180deg, #2a2016, #14100b); border: 1px solid var(--gold); color: var(--gold-hi); font-size: .78rem; white-space: nowrap; }
.l2-art { aspect-ratio: 420 / 230; overflow: hidden; background: #0a0a14; }
.l2-art svg { display: block; width: 100%; height: 100%; }
.l2-card-body { padding: 16px 18px 20px; text-align: center; }
.l2-card-body h3 { margin: 0 0 6px; font-size: 1.25rem; color: var(--gold-hi); }
.l2-card-body p { margin: 0; color: var(--text-2); font-size: .94rem; }
.l2-steps h2 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.l2-flag { color: var(--gold); }
.l2-sub { margin: 4px 0 22px; color: var(--text-2); }
.l2-line { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: center; }
@media (min-width: 760px) { .l2-line { grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; } .l2-line::before { content: ""; position: absolute; left: 10%; right: 10%; top: 36px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), var(--gold), transparent); opacity: .7; } }
.l2-line li { position: relative; display: grid; justify-items: center; gap: 4px; align-content: start; }
.l2-dot { position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #2a2016, #0d0a08); border: 1.5px solid var(--gold); color: var(--gold-hi); box-shadow: var(--glow); }
.l2-dot i { position: absolute; top: -6px; right: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-style: normal; font-weight: 700; font-size: .78rem; display: grid; place-items: center; }
.l2-ico { display: grid; place-items: center; }
.l2-line strong { margin-top: 8px; font-size: .98rem; }
.l2-cap { color: var(--text-2); font-size: .85rem; max-width: 18ch; }
.l2-cta { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 14px 34px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-hi); text-decoration: none; background: rgba(227,180,107,.06); box-shadow: var(--glow); font-size: 1.1rem; }

/* ---------- Communauté (maquette 2) ---------- */
.cm { display: grid; gap: clamp(24px, 4vw, 40px); }
.cm-svg { display: inline-grid; place-items: center; line-height: 0; }
.cm-hero { position: relative; border-radius: 0; padding-top: 22px; min-height: clamp(200px, 28vw, 270px); display: flex; align-items: flex-start; isolation: isolate; }
.cm-hero::before { content: ""; position: absolute; top: -20px; right: calc(50% - 50vw); bottom: -20px; width: min(62%, 700px); z-index: -1; background: url(../img/communaute-fond.jpg) right center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 45%), linear-gradient(0deg, transparent 8%, #000 55%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 45%), linear-gradient(0deg, transparent 8%, #000 55%); mask-composite: intersect; opacity: .95; }
.cm-hero-txt { display: grid; gap: 6px; justify-items: start; padding-top: 6px; position: relative; }
.cm-badge { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; color: var(--gold-hi); box-shadow: var(--glow); background: radial-gradient(circle at 30% 25%, #2a2016, #0d0a08); }
.cm-hero h1 { margin: 6px 0 0; font-size: clamp(1.9rem, 5.4vw, 3.2rem); line-height: 1.08; font-weight: 500; }
.cm-hero h1 span { color: var(--gold-hi); }
.cm-sub { margin: 0; color: var(--text-2); font-size: clamp(.95rem, 2vw, 1.1rem); }
.cm-swoosh { width: min(340px, 70vw); height: 40px; color: var(--gold); opacity: .8; margin-top: 18px; }
.cm-swoosh svg, .cm-swoosh2 svg { width: 100%; height: 100%; }
.cm-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .cm-grid { grid-template-columns: minmax(0, 1fr) 330px; } }
.cm-main-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 18px; }
.cm-users { color: var(--gold-hi); display: inline-grid; }
.cm-main-head h2 { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 500; }
.cm-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.cm-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: #0d0a08; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.cm-tab[aria-selected="true"]:first-child { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); border-color: var(--gold-hi); box-shadow: var(--glow); font-weight: 600; }
.cm-tab[aria-selected="true"]:not(:first-child) { border-color: var(--gold); box-shadow: var(--glow); }
.cm-dot { width: 14px; height: 14px; border-radius: 50%; background: #2ecc5a; box-shadow: 0 0 8px rgba(46,204,90,.6); }
.cm-feed { display: grid; gap: 16px; }
.cm-post { display: flex; gap: 18px; align-items: center; padding: 16px 20px; border-radius: 20px; border: 1px solid var(--gold); background: linear-gradient(180deg, rgba(40,28,16,.85), rgba(12,9,7,.95)); box-shadow: 0 0 18px rgba(227,180,107,.14), inset 0 0 22px rgba(227,180,107,.05); min-width: 0; color: var(--text); }
.cm-post.done { opacity: .9; }
.cm-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center; color: var(--gold-hi); font-weight: 500; font-size: 1.1rem; background: transparent; }
.cm-post-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cm-post-body strong { overflow-wrap: anywhere; font-size: 1.05rem; font-weight: 500; }
.cm-artist { color: var(--text-2); font-size: .88rem; }
.cm-win { color: var(--gold-hi); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.cm-post.win { border-color: var(--gold-hi); }
.cm-phase { margin: -6px 0 14px; color: var(--text-2); font-size: .9rem; }
.cm-vote:disabled { opacity: .45; cursor: default; }
.cm-vote { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--gold); background: rgba(0,0,0,.35); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.cm-vote .cm-svg { color: var(--gold-hi); }
.cm-vote[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); }
.cm-vote[aria-pressed="true"] .cm-svg { color: var(--gold-ink); }
.cm-post > .cm-svg:last-child { color: var(--text-2); flex: none; }
.cm-side { display: grid; gap: 18px; }
.cm-card { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--gold); background: linear-gradient(180deg, rgba(40,28,16,.85), rgba(12,9,7,.95)); box-shadow: 0 0 22px rgba(227,180,107,.16), inset 0 0 24px rgba(227,180,107,.05); padding: 18px 20px; min-width: 0; }
.cm-card h2 { margin: 0 0 10px; font-size: 1.25rem; font-weight: 500; }
.cm-txt { margin: 0; color: var(--text-2); font-size: .9rem; line-height: 1.55; }
.cm-quote { margin: 16px 0 0; font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; font-style: italic; color: var(--gold-hi); font-size: 1.3rem; line-height: 1.2; text-align: center; text-wrap: balance; }
.cm-socials { display: flex; justify-content: center; gap: 22px; margin-top: 16px; }
.cm-social { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; color: var(--gold-hi); text-decoration: none; }
.cm-tag { margin: 12px 0 0; font-size: 1.4rem; font-weight: 500; position: relative; z-index: 1; }
.cm-swoosh2 { position: absolute; right: 0; bottom: 0; width: 60%; height: 54px; color: var(--gold); opacity: .85; }
.cm-share { padding-bottom: 28px; }
@media (max-width: 640px) {
  .cm-hero::before { width: 100%; opacity: .45; }
  .cm-tabs { margin-left: 0; }
  .cm-post { gap: 12px; padding: 14px; flex-wrap: wrap; }
  .cm-post > .cm-svg:last-child { display: none; }
}

/* Onglet Morceaux : vignette seule, lecture au centre de l'image */
.library-results .card-body { position: absolute; inset: 0; padding: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.library-results .card-title, .library-results .card-artist, .library-results .card-meta, .library-results .card-progress { display: none; }
.library-results .card-play { margin: 0; width: 56px; height: 56px; background: rgba(7,6,8,.55); }

/* Accueil (présentation) : vignette seule, même affichage que l'onglet Morceaux */
.carousel-wrap .card-body { position: absolute; inset: 0; padding: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.carousel-wrap .card-title, .carousel-wrap .card-artist, .carousel-wrap .card-meta, .carousel-wrap .card-progress { display: none; }
.carousel-wrap .card-play { margin: 0; width: 56px; height: 56px; background: rgba(7,6,8,.55); }
.carousel-wrap .carousel { grid-auto-columns: minmax(380px, 1fr); }
