/* ══════════════════════════════════════════════
   style.css — Design system commun
   Intervalles Musicaux
   ══════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────── */
:root {
  --clr-bg:        #f4f6fb;
  --clr-surface:   #ffffff;
  --clr-border:    #e2e8f0;
  --clr-text:      #1e293b;
  --clr-muted:     #64748b;
  --clr-accent:    #6366f1;          /* indigo */
  --clr-accent-dk: #4f46e5;
  --clr-accent-lt: #eef2ff;
  --clr-success:   #10b981;
  --clr-warn:      #f59e0b;

  --nav-h:   60px;
  --radius:  .75rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06), 0 2px 10px rgba(0,0,0,.05);
  --shadow:    0 4px 20px rgba(0,0,0,.09);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.13);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  padding-top: var(--nav-h);
}
a { color: inherit; }
img { max-width: 100%; }
.text-accent { color: var(--clr-accent); }

/* ══════════════════════════════════════════════
   NAVIGATION COMMUNE
   ══════════════════════════════════════════════ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
}

.app-nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--clr-border);
}

/* Brand */
.app-brand {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.app-brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--clr-accent), #818cf8);
  border-radius: .55rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.app-brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -.01em;
}

/* Liens desktop */
.app-nav-links {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: .25rem;
  align-items: center;
  margin-left: auto;
}
.app-nav-link {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem;
  border-radius: .5rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--clr-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.app-nav-link i { font-size: .95rem; }
.app-nav-link:hover { background: var(--clr-bg); color: var(--clr-text); }
.app-nav-link.is-active {
  background: var(--clr-accent-lt);
  color: var(--clr-accent-dk);
}

/* Burger */
.app-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
  margin-left: auto;
  border-radius: .4rem;
}
.app-nav-burger span {
  display: block;
  height: 2px; width: 100%;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.app-nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-nav-burger.is-open span:nth-child(2) { opacity: 0; }
.app-nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer mobile — conteneur (styles de base) */
.app-nav-drawer {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: .6rem .9rem 1rem;
  z-index: 999;
  box-shadow: 0 16px 40px rgba(0,0,0,.1);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .22s cubic-bezier(.22,.68,0,1.2), opacity .18s;
  pointer-events: none;
}
.app-nav-drawer.is-open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .app-nav-links  { display: none; }
  .app-nav-burger { display: flex; }
  .app-nav-drawer.is-open { display: flex; }
}

/* ══════════════════════════════════════════════
   PAGE HEADER (remplace l'ancien .hero)
   ══════════════════════════════════════════════ */
.page-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #1e40af 100%);
  color: #fff;
  padding: 2.8rem 1.5rem 2.2rem;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 .4rem;
  letter-spacing: -.02em;
}
.page-header p { margin: 0; opacity: .65; font-size: .95rem; }

/* ══════════════════════════════════════════════
   CARDS GÉNÉRIQUES
   ══════════════════════════════════════════════ */
.card-app {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-app-header {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--clr-border);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--clr-muted);
  display: flex; align-items: center; gap: .5rem;
}

/* ══════════════════════════════════════════════
   INTERVALLES — CARTES COLORÉES
   ══════════════════════════════════════════════ */
.interval-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
  border: none;
}
.interval-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.interval-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  opacity: .6;
}
.interval-semitones { font-size: .72rem; opacity: .5; }

/* Couleurs par intervalle */
.ic-seconde  { background: #fff0f3; color: #c9184a; border-top: 3px solid #c9184a; }
.ic-tierce   { background: #fff8f0; color: #b45309; border-top: 3px solid #f59e0b; }
.ic-quarte   { background: #f0fdf4; color: #065f46; border-top: 3px solid #10b981; }
.ic-quinte   { background: #eff6ff; color: #1e40af; border-top: 3px solid #3b82f6; }
.ic-sixte    { background: #f5f3ff; color: #4c1d95; border-top: 3px solid #7c3aed; }
.ic-septieme { background: #fdf2f8; color: #831843; border-top: 3px solid #ec4899; }
.ic-octave   { background: #f8fafc; color: #1e293b; border-top: 3px solid #64748b; }

/* ══════════════════════════════════════════════
   BOUTONS DE NOTES (cercle)
   ══════════════════════════════════════════════ */
.note-btn {
  width: 48px; height: 48px;
  font-weight: 700; font-size: .9rem;
  border-radius: 50%; padding: 0;
  transition: transform .15s;
}
.note-btn:hover { transform: scale(1.1); }

/* ══════════════════════════════════════════════
   BOUTONS MODES (tableau / quiz / import)
   ══════════════════════════════════════════════ */
.mode-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: .4rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.mode-tab {
  flex: 1 1 130px;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem .8rem;
  border-radius: .6rem;
  font-size: .85rem; font-weight: 600;
  border: none; cursor: pointer;
  background: transparent;
  color: var(--clr-muted);
  transition: background .15s, color .15s, box-shadow .15s;
}
.mode-tab:hover { background: var(--clr-bg); color: var(--clr-text); }
.mode-tab.is-active {
  background: var(--clr-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.mode-tab i { font-size: 1rem; }

/* ══════════════════════════════════════════════
   QUIZ
   ══════════════════════════════════════════════ */
.quiz-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
}
.quiz-question   { font-size: 1.1rem; font-weight: 700; }
.quiz-choices .btn { min-width: 110px; font-weight: 600; }
.quiz-result     { font-size: 1rem; min-height: 1.5rem; }
.score-badge {
  font-size: 1rem; font-weight: 800;
  background: var(--clr-accent);
  color: #fff;
  border-radius: 2rem;
  padding: .25rem 1rem;
}
.quiz-progress-wrap {
  position: relative;
  padding-top: 22px;
}
.quiz-progress-guitar {
  position: absolute;
  top: 0;
  left: 0%;
  transform: translateX(-50%);
  font-size: 1.15rem;
  line-height: 1;
  transition: left .35s ease;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
#q-explain:empty { display: none; }
.quiz-explain-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: .3rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--clr-border);
}
.quiz-explain-note-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}
.quiz-explain-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: .2rem .55rem;
  border-radius: .5rem;
  background: var(--clr-accent-lt);
  color: var(--clr-accent-dk);
  font-weight: 800;
  font-size: .9rem;
}
.quiz-explain-note.is-target {
  background: #d1fae5;
  color: #065f46;
  box-shadow: 0 0 0 2px #10b98155;
}
.quiz-explain-note-deg {
  font-size: .62rem;
  font-weight: 700;
  color: var(--clr-muted);
  white-space: nowrap;
}
.quiz-explain-hop {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: #adb5bd;
  font-size: .68rem;
  margin-top: .4rem;
}
.quiz-explain-steplabel {
  font-weight: 700;
  color: #e67e22;
  white-space: nowrap;
}
.quiz-explain-summary {
  text-align: center;
  color: var(--clr-muted);
  font-size: .85rem;
  margin-top: .6rem;
}

/* ══════════════════════════════════════════════
   COMPARAISON
   ══════════════════════════════════════════════ */
.compare-note-btn {
  height: 40px; font-weight: 700; font-size: .9rem;
  border-radius: 2rem; padding: 0 1rem;
}
.cmp-table th, .cmp-table td { vertical-align: middle; white-space: nowrap; }
.cmp-cell-diff   { background: #fef9c3 !important; font-weight: 700; }
.cmp-cell-unique { background: #fde8e8 !important; font-weight: 700; color: #b91c1c; }
.cmp-row-label   { font-weight: 700; font-size: .82rem; }
.cmp-legend      { font-size: .75rem; }

/* ══════════════════════════════════════════════
   GAMME BUTTONS (sélecteur de gamme)
   ══════════════════════════════════════════════ */
.gamme-btn {
  font-weight: 600;
  font-size: .85rem;
  border-radius: .5rem;
}

/* ══════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════ */
.landing-hero {
  min-height: calc(100vh - var(--nav-h));
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative; overflow: hidden;
}
.landing-hero::before, .landing-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.landing-hero::before {
  width: 550px; height: 550px; background: radial-gradient(#6366f1, transparent 70%);
  top: -160px; left: -160px; opacity: .18;
}
.landing-hero::after {
  width: 400px; height: 400px; background: radial-gradient(#3b82f6, transparent 70%);
  bottom: -120px; right: -120px; opacity: .15;
}

.landing-kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: #c4b5fd;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem 1rem; border-radius: 2rem;
  backdrop-filter: blur(4px);
  margin-bottom: 1.5rem;
}
.landing-title {
  font-size: clamp(2.2rem, 8vw, 4.2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0 0 1.2rem;
}
.landing-title em {
  font-style: normal;
  background: linear-gradient(90deg, #a5b4fc, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-lead {
  color: rgba(255,255,255,.6);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.landing-cta-group { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--clr-accent);
  color: #fff !important;
  border: none;
  padding: .75rem 2rem;
  border-radius: 2rem;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,.5); }
.btn-hero-secondary {
  background: rgba(255,255,255,.1);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.25);
  padding: .75rem 2rem;
  border-radius: 2rem;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background .15s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.18); }

/* Notes flottantes */
.float-note {
  position: absolute; pointer-events: none;
  font-size: 2.5rem; color: rgba(255,255,255,.06);
  animation: floatNote 8s ease-in-out infinite;
  user-select: none;
}
@keyframes floatNote {
  0%,100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-28px) rotate(8deg); }
}

/* Landing compacte (une seule fenêtre, tous les outils accessibles d'un coup) */
.landing-hero-compact { padding: 4.5rem 1.5rem 1.75rem; }
.landing-hero-compact .landing-title { font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: .6rem; }
.landing-hero-compact .landing-lead { margin: 0 auto 1.6rem; font-size: 1rem; max-width: 460px; }
.landing-quiz-count {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 auto 1.4rem;
  padding: .4rem .9rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 2rem;
  color: #e5e7eb !important;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.landing-quiz-count:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
  transform: translateY(-1px);
  color: #fff !important;
}
.landing-quiz-count i { color: #a5b4fc; }
.tool-groups-label {
  width: 100%;
  text-align: center;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin: .7rem 0 .05rem;
}
.tool-groups-label:first-child { margin-top: 0; }
.tool-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem .5rem;
  max-width: 760px;
  margin: 0 auto;
}
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: .6rem;
  color: #e5e7eb !important;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .15s, transform .15s, border-color .15s;
}
.tool-pill:hover { background: rgba(255,255,255,.17); border-color: rgba(255,255,255,.32); transform: translateY(-2px); color: #fff !important; }
.tool-pill i { font-size: .95rem; color: var(--pill-color, #a5b4fc); }

/* Features section */
.features-section { padding: 5rem 0; background: var(--clr-bg); }
.section-label {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  background: var(--clr-accent-lt);
  padding: .25rem .75rem;
  border-radius: 2rem;
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--clr-text);
  margin: 0 0 .5rem;
}
.section-sub { color: var(--clr-muted); margin: 0 auto; max-width: 440px; }

.feature-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  text-decoration: none; color: inherit;
  display: block; height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card:hover::after { transform: scaleX(1); }

.feature-card.fc-table   { color: #c9184a; }
.feature-card.fc-quiz    { color: #1d4ed8; }
.feature-card.fc-compare { color: #065f46; }
.feature-card.fc-import  { color: #6d28d9; }
.feature-card.fc-rythme  { color: #0369a1; }

.feature-card h5 { color: var(--clr-text); font-weight: 800; font-size: 1.05rem; margin-bottom: .3rem; }
.feature-card p  { color: var(--clr-muted); font-size: .88rem; margin: 0 0 1rem; }
.feature-card .fc-link { font-size: .82rem; font-weight: 700; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: .85rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.1rem;
  background: currentColor;
}
.feature-icon i { color: #fff; }

/* Interval preview strip */
.strip-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e40af 100%);
  padding: 4rem 1rem;
}
.strip-card {
  border-radius: var(--radius);
  padding: .9rem .7rem;
  text-align: center;
  flex: 1 1 80px;
  opacity: 0;
  animation: fadeUp .5s ease forwards;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Footer */
.app-footer {
  background: #0f0c29;
  color: rgba(255,255,255,.38);
  font-size: .8rem;
  padding: 1.8rem 1rem;
  text-align: center;
}
.app-footer a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .15s;
}
.app-footer a:hover { color: rgba(255,255,255,.85); }
.app-footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .6rem; }

/* ══════════════════════════════════════════════
   PAGE RYTHME — Compositeur & palette
   ══════════════════════════════════════════════ */

/* Symboles cliquables dans les tableaux */
.symbol { font-size: 1.6rem; cursor: pointer; transition: color .15s; }
.symbol:hover { color: var(--clr-accent); }

/* Palette de notes/silences */
.palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.palette-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 6px 10px;
  border: 2px solid var(--clr-border); border-radius: var(--radius);
  background: var(--clr-bg); transition: all .15s; user-select: none;
}
.palette-item:hover { border-color: var(--clr-accent); background: var(--clr-accent-lt); }
.palette-item .p-symbol { font-size: 2rem; line-height: 1; }
.palette-item .p-name, .palette-item .p-dur { font-size: .65rem; color: var(--clr-muted); white-space: nowrap; }
.palette-item.selected {
  border-color: var(--clr-accent); background: var(--clr-accent-lt);
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
}
.palette-item[draggable=true] { cursor: grab; }
.palette-item[draggable=true]:active { cursor: grabbing; opacity: .7; }

/* Portée combinée */
.combo-wrap {
  position: relative;
  background: var(--clr-surface);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 20px 15px 10px 85px;
  overflow-x: auto;
}
.combo-staff { position: relative; height: 170px; min-width: 200px; cursor: crosshair; }
.combo-staff .sline { position: absolute; left: 0; right: 0; height: 1px; background: #333; pointer-events: none; }
.combo-clef { position: absolute; left: -72px; top: 2px; font-size: 5.5rem; line-height: 1; color: #333; pointer-events: none; z-index: 1; }
.combo-timesig { position: absolute; left: -45px; top: 15px; font-size: 2.2rem; font-weight: 900; line-height: .95; color: #333; pointer-events: none; text-align: center; z-index: 5; }
.combo-guides { position: absolute; right: -5px; top: 0; pointer-events: none; z-index: 1; }
.combo-guide { position: absolute; right: 0; font-size: .5rem; color: #ccc; transform: translateY(-50%); white-space: nowrap; }
.combo-guide.on-line { color: #bbb; }
.combo-ghost { position: absolute; width: 22px; height: 15px; background: rgba(99,102,241,.3); border-radius: 50%; transform: translate(-50%,-50%) rotate(-20deg); pointer-events: none; display: none; z-index: 5; }
.combo-note { position: absolute; cursor: pointer; z-index: 10; }
.combo-note:hover .cn-sym { filter: drop-shadow(0 0 4px rgba(220,53,69,.6)); }
.cn-sym { font-size: 3.2rem; line-height: 1; color: #333; }
.cn-silence { font-size: 2.2rem; line-height: 1; color: #333; }
.cn-info { position: absolute; text-align: center; white-space: nowrap; font-size: .55rem; line-height: 1.2; width: 60px; left: -19px; }
.cn-info .ci-pitch { color: var(--clr-accent); font-weight: 700; display: block; }
.cn-info .ci-dur { color: var(--clr-muted); display: block; }
.cn-ledger { position: absolute; width: 34px; height: 2px; background: #333; left: -6px; }
.combo-placeholder { position: absolute; top: 45%; left: 50%; transform: translate(-50%,-50%); color: #aaa; font-size: .85rem; pointer-events: none; }
.combo-highlight { animation: cflash .3s; }
@keyframes cflash { 0%,100%{filter:none} 50%{filter:brightness(1.5) drop-shadow(0 0 6px var(--clr-accent))} }
.combo-barline { position: absolute; top: 20px; width: 2px; height: 81px; background: #333; pointer-events: none; z-index: 3; }
.combo-measure-n { position: absolute; top: -14px; font-size:.55rem; color:#aaa; pointer-events: none; }

/* Barre d'outils rythme */
.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.toolbar-row label { font-size: .75rem; font-weight: 600; color: var(--clr-muted); }
.toolbar-row select, .toolbar-row input[type=range] { font-size: .8rem; }

/* ══════════════════════════════════════════════
   NAV DROPDOWN — Design professionnel
   ══════════════════════════════════════════════ */

/* ── Déclencheur ─────────────────────────────── */
.app-nav-dropdown { position: relative; list-style: none; }

.app-nav-dropdown-btn {
  position: relative;
  display: flex; align-items: center; gap: .38rem;
  padding: .42rem .8rem;
  border-radius: .55rem;
  font-size: .875rem; font-weight: 600;
  color: var(--clr-muted);
  background: none; border: none; cursor: pointer;
  transition: background .14s, color .14s;
  white-space: nowrap;
  /* indicateur actif */
  border-bottom: 2px solid transparent;
}
.app-nav-dropdown-btn .chevron {
  font-size: .65rem; margin-left: .08rem;
  opacity: .55; transition: transform .22s cubic-bezier(.22,.68,0,1.2), opacity .14s;
}
.app-nav-dropdown-btn:hover { background: var(--clr-bg); color: var(--clr-text); }
.app-nav-dropdown-btn:hover .chevron { opacity: 1; }

.app-nav-dropdown.has-active .app-nav-dropdown-btn {
  color: var(--dd-color, var(--clr-accent));
  font-weight: 700;
}
/* Trait coloré sous le bouton quand actif */
.app-nav-dropdown.has-active .app-nav-dropdown-btn::after {
  content: '';
  position: absolute; left: .8rem; right: .8rem; bottom: -1px;
  height: 2.5px; border-radius: 2px;
  background: var(--dd-color, var(--clr-accent));
}

.app-nav-dropdown.is-open .app-nav-dropdown-btn,
.app-nav-dropdown:focus-within .app-nav-dropdown-btn {
  background: var(--clr-bg); color: var(--clr-text);
}
.app-nav-dropdown.is-open .chevron,
.app-nav-dropdown:focus-within .chevron { transform: rotate(180deg); opacity: 1; }

/* ── Panneau dropdown ────────────────────────── */
.app-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%; transform: translateX(-50%) translateY(-6px) scale(.97);
  min-width: 220px;
  background: var(--clr-surface);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0,0,0,.06), 0 24px 56px rgba(0,0,0,.12);
  list-style: none; margin: 0;
  padding: .55rem;
  z-index: 1100;
  /* bande colorée en haut */
  overflow: hidden;
  /* transition au lieu de display toggle */
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s cubic-bezier(.22,.68,0,1.2),
              transform .18s cubic-bezier(.22,.68,0,1.2),
              visibility .18s;
}
/* Accent coloré top */
.app-nav-dropdown-menu::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--dd-color, var(--clr-accent));
  margin: -.55rem -.55rem .5rem;
  border-radius: 1rem 1rem 0 0;
}
.app-nav-dropdown:hover .app-nav-dropdown-menu,
.app-nav-dropdown.is-open .app-nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* En-tête interne (label de section) */
.dd-menu-header {
  list-style: none;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--dd-color, var(--clr-accent));
  padding: .15rem .7rem .5rem;
}

/* ── Items ───────────────────────────────────── */
.app-nav-dropdown-menu > li:not(.dd-menu-header) { list-style: none; }

.app-nav-dropdown-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem .65rem;
  border-radius: .6rem;
  font-size: .875rem; font-weight: 600;
  color: var(--clr-text);
  text-decoration: none;
  transition: background .12s;
  white-space: nowrap;
}
/* Badge icône */
.dd-icon {
  width: 30px; height: 30px; border-radius: .5rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  background: var(--clr-bg); color: var(--clr-muted);
  transition: background .12s, color .12s;
}
.app-nav-dropdown-item:hover { background: var(--clr-bg); }
.app-nav-dropdown-item:hover .dd-icon {
  background: var(--dd-color, var(--clr-accent)); color: #fff;
}
.app-nav-dropdown-item.is-active {
  background: var(--clr-bg);
}
.app-nav-dropdown-item.is-active .dd-icon {
  background: var(--dd-color, var(--clr-accent)); color: #fff;
}
.app-nav-dropdown-item.is-active > span:last-child {
  color: var(--dd-color, var(--clr-accent)); font-weight: 700;
}

/* ── Drawer mobile ───────────────────────────── */
.app-nav-drawer-group { }
.app-nav-drawer-group + .app-nav-drawer-group {
  border-top: 1px solid var(--clr-border);
  margin-top: .25rem; padding-top: .25rem;
}

.app-nav-drawer-group-btn {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .65rem .6rem; border-radius: .6rem;
  font-weight: 700; font-size: .9rem;
  color: var(--clr-muted); background: none; border: none;
  cursor: pointer; text-align: left;
  transition: background .14s, color .14s;
}
.app-nav-drawer-group-btn .dg-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--dd-color, var(--clr-accent)); opacity: .6;
}
.app-nav-drawer-group-btn .chevron {
  margin-left: auto; font-size: .7rem;
  transition: transform .22s cubic-bezier(.22,.68,0,1.2);
}
.app-nav-drawer-group-btn.is-open { color: var(--clr-text); }
.app-nav-drawer-group-btn.is-open .dg-dot { opacity: 1; }
.app-nav-drawer-group-btn.is-open .chevron { transform: rotate(180deg); }

.app-nav-drawer-group-items { display: none; padding: .1rem 0 .5rem .2rem; }
.app-nav-drawer-group-items.is-open { display: block; }

/* Liens dans le drawer utilisent aussi dd-icon */
.app-nav-drawer .dd-icon {
  width: 28px; height: 28px; border-radius: .45rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  background: var(--clr-bg); color: var(--clr-muted);
  transition: background .12s, color .12s;
}
.app-nav-drawer-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .6rem;
  border-radius: .55rem;
  font-weight: 600; font-size: .9rem;
  color: var(--clr-muted);
  text-decoration: none;
  transition: background .13s, color .13s;
}
.app-nav-drawer-link:hover { background: var(--clr-bg); color: var(--clr-text); }
.app-nav-drawer-link:hover .dd-icon { background: var(--dd-color, var(--clr-accent)); color: #fff; }
.app-nav-drawer-link.is-active { color: var(--dd-color, var(--clr-accent)); font-weight: 700; }
.app-nav-drawer-link.is-active .dd-icon { background: var(--dd-color, var(--clr-accent)); color: #fff; }

/* ══════════════════════════════════════════════
   COMMUN — Contrôles réutilisables (multi-pages)
   ══════════════════════════════════════════════ */

/* ── Bouton option pilule ────────────────────── */
.opt-btn {
  padding: .35rem .9rem; border-radius: 2rem; font-size: .82rem; font-weight: 600;
  border: 2px solid var(--clr-border); background: var(--clr-surface);
  color: var(--clr-muted); cursor: pointer; transition: all .15s;
}
.opt-btn.active, .opt-btn:hover {
  border-color: var(--clr-accent); background: var(--clr-accent-lt); color: var(--clr-accent-dk);
}

/* ── Mode toggle (radio binaire) ─────────────── */
.mode-toggle {
  display: flex; border: 2px solid var(--clr-border); border-radius: 2rem;
  overflow: hidden; background: var(--clr-surface);
}
.mode-toggle button {
  flex: 1; padding: .4rem 1.1rem; border: none; background: none;
  font-weight: 700; font-size: .83rem; color: var(--clr-muted); cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.mode-toggle button.active { background: var(--clr-accent); color: #fff; }

/* ── Info bar (bandeau contexte) ─────────────── */
.info-bar {
  background: var(--clr-surface); border: 2px solid var(--clr-border);
  border-radius: 1rem; padding: .65rem 1.2rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
}
.info-divider { width: 1px; height: 36px; background: var(--clr-border); flex-shrink: 0; }

/* ── Manche (canvas) ─────────────────────────── */
#fretboard-wrap { overflow-x: auto; }
#fretboard { display: block; width: 100%; max-width: 1600px; height: auto; }
.fretboard-wrap { overflow-x: auto; padding-bottom: 8px; }
.fretboard-wrap #fretboard {
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  min-width: 780px;
}
.fretboard-crosshair #fretboard { cursor: crosshair; }

/* ── Boutons navigation position ─────────────── */
.nav-pos-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--clr-border);
  background: var(--clr-surface); cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; font-weight: 900; color: var(--clr-muted);
  transition: all .13s;
}
.nav-pos-btn:hover  { border-color: var(--clr-accent); color: var(--clr-accent); transform: scale(1.1); }
.nav-pos-btn:disabled { opacity: .35; cursor: default; transform: none; }

/* ── Mini cartes doigtés (pos-card) ──────────── */
.pos-card {
  border: 2px solid var(--clr-border); border-radius: 1.1rem;
  background: var(--clr-surface); transition: all .15s; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; padding: .65rem .65rem .5rem;
}
.pos-card:hover  { transform: translateY(-3px); box-shadow: var(--shadow); }
.pos-card.active { border-width: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.pos-card canvas { display: block; }
.pos-card-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .72rem; font-weight: 800; margin-bottom: .3rem;
}
.pos-card-label {
  font-size: .7rem; font-weight: 700; color: var(--clr-muted);
  text-align: center; margin-top: .4rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 115px;
}

/* ── Puce degré (deg-chip) ───────────────────── */
.deg-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .72rem;
  border-radius: 2rem; border: 2px solid; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .14s;
}
.deg-chip:hover { transform: translateY(-2px); }
.deg-chip.active { color: #fff !important; }
.deg-chip.characteristic { outline: 2px solid; outline-offset: 1px; }
.dc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Titre de section secondaire ─────────────── */
.section-title-sm {
  font-size: 1rem; font-weight: 800; color: var(--clr-text);
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem;
}

/* ── Tab "Tous" commun ───────────────────────── */
#tab-all.active { background: var(--clr-accent); border-color: var(--clr-accent); color: #fff; }

/* ══════════════════════════════════════════════
   GAMMES — Styles spécifiques
   ══════════════════════════════════════════════ */
.info-scale-name { font-size: 1.6rem; font-weight: 900; color: var(--clr-accent); line-height: 1; }
.info-scale-sub  { font-size: .78rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: .07em; }

.pos-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .72rem;
  border-radius: 2rem; border: 2px solid; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .14s; background: var(--clr-bg);
}
.pos-chip:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.pos-chip.active { color: #fff !important; }
.pos-chip-swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.box-card {
  border: 2px solid var(--clr-border); border-radius: 1.1rem;
  background: var(--clr-surface); transition: all .15s;
  cursor: pointer; display: flex; flex-direction: column; align-items: center;
  padding: .65rem .65rem .5rem;
}
.box-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.box-card.active { border-width: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.box-card canvas { display: block; }
.box-card-label { font-size: .7rem; font-weight: 700; color: var(--clr-muted); text-align: center; margin-top: .4rem; }
.box-card-num {
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: .72rem; font-weight: 800; margin-bottom: .3rem;
}

.str-legend { display: flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; }
.str-swatch  { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   MODES — Styles spécifiques
   ══════════════════════════════════════════════ */
/* Tabs degrés (mode-deg-tabs / mode-deg-tab) — remplace mode-tab dans ce contexte */
.mode-deg-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.mode-deg-tab {
  display: flex; flex-direction: column; align-items: center;
  padding: .45rem .9rem; border-radius: .85rem; border: 2px solid var(--clr-border);
  background: var(--clr-surface); cursor: pointer; transition: all .15s;
  min-width: 80px; text-align: center;
}
.mode-deg-tab .mt-name  { font-weight: 800; font-size: .84rem; color: var(--clr-text); line-height: 1; }
.mode-deg-tab .mt-root  { font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.mode-deg-tab .mt-char  { font-size: .62rem; color: var(--clr-muted); font-style: italic; margin-top: .1rem; }
.mode-deg-tab.active    { border-width: 2.5px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.mode-deg-tab.active .mt-name { color: #fff; }
.mode-deg-tab.active .mt-char { color: rgba(255,255,255,.7); }
.mode-deg-tab:hover:not(.active) { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.1); }
.mode-deg-tab#tab-all { flex-direction: row; gap: .4rem; align-items: center; padding: .45rem 1rem; min-width: auto; }

.info-mode-name { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.info-mode-sub  { font-size: .78rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: .07em; }

.mode-legend-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .72rem;
  border-radius: 2rem; border: 2px solid; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .14s;
}
.mode-legend-chip:hover { transform: translateY(-2px); }
.mode-legend-chip.active { color: #fff !important; }
.mlc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.mode-card {
  border: 2px solid var(--clr-border); border-radius: 1.1rem;
  background: var(--clr-surface); transition: all .15s;
  cursor: pointer; padding: .65rem .65rem .5rem;
  display: flex; flex-direction: column; align-items: center;
}
.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mode-card.active { border-width: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.mc-badge {
  height: 22px; padding: 0 .75rem; border-radius: 2rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .7rem; font-weight: 800; margin-bottom: .35rem; white-space: nowrap;
}
.mc-root  { font-size: 1.1rem; font-weight: 900; line-height: 1.1; }
.mc-label { font-size: .65rem; font-weight: 700; color: var(--clr-muted); text-align: center; margin-top: .3rem; }

.compare-table { font-size: .8rem; width: 100%; border-collapse: collapse; }
.compare-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  padding: .45rem .6rem; border-bottom: 2px solid var(--clr-border); color: var(--clr-muted); }
.compare-table td { padding: .4rem .6rem; border-bottom: 1px solid var(--clr-border); vertical-align: middle; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: var(--clr-accent-lt); }
.ct-mode-name { font-weight: 800; }
.ct-deg { display: inline-block; padding: .12rem .38rem; border-radius: .4rem;
  font-weight: 700; font-size: .74rem; border: 1.5px solid; }
.ct-deg.altered { outline: 2px solid gold; outline-offset: 1px; }

/* ══════════════════════════════════════════════
   POSITIONS — Styles spécifiques
   ══════════════════════════════════════════════ */
.chord-btn {
  min-width: 58px; padding: .45rem .8rem; border-radius: .75rem; font-size: .9rem;
  font-weight: 800; border: 2px solid var(--clr-border); background: var(--clr-surface);
  color: var(--clr-text); cursor: pointer; transition: all .15s; text-align: center; line-height: 1.1;
}
.chord-btn small { display: block; font-size: .65rem; font-weight: 600;
  color: var(--clr-muted); text-transform: uppercase; letter-spacing: .05em; }
.chord-btn.active {
  border-color: var(--clr-accent); background: var(--clr-accent);
  color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.chord-btn.active small { color: rgba(255,255,255,.75); }
.chord-btn:hover:not(.active) { border-color: var(--clr-accent); transform: translateY(-2px); }

.type-btn {
  padding: .25rem .75rem; border-radius: 2rem; font-size: .76rem; font-weight: 700;
  border: 2px solid var(--clr-border); background: var(--clr-surface);
  color: var(--clr-muted); cursor: pointer; transition: all .12s;
}
.type-btn.active { border-color: var(--clr-accent); background: var(--clr-accent-lt); color: var(--clr-accent-dk); }

.pos-legend-chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem;
  border-radius: 2rem; border: 2px solid; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .14s; background: var(--clr-bg);
}
.pos-legend-chip:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.pos-legend-chip.active { color: #fff !important; }
.pos-legend-swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.info-chord-name { font-size: 1.8rem; font-weight: 900; color: var(--clr-accent); line-height: 1; }
.info-chord-type { font-size: .8rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: .07em; }
.info-pos-name   { font-size: .92rem; font-weight: 700; color: var(--clr-text); }
.info-pos-idx    { font-size: .78rem; color: var(--clr-muted); }

/* ══════════════════════════════════════════════
   PROGRESSIONS — Styles spécifiques
   ══════════════════════════════════════════════ */
.prog-table { border-collapse: separate; border-spacing: 0; }
.prog-table th {
  font-weight: 700; font-size: .78rem; text-align: center;
  letter-spacing: .05em; text-transform: uppercase;
  color: #fff; padding: .55rem .5rem; position: sticky; top: 0;
}
.prog-table td {
  text-align: center; font-size: .92rem; font-weight: 600;
  vertical-align: middle; padding: .5rem .6rem; white-space: nowrap;
}
.prog-table td.key-cell {
  font-size: .97rem; font-weight: 800;
  color: var(--clr-accent); background: var(--clr-accent-lt);
  border-right: 2px solid var(--clr-border); cursor: default;
}
.prog-table td.chord-cell { cursor: pointer; transition: background .12s, transform .1s; }
.prog-table td.chord-cell:hover { background: var(--clr-accent-lt) !important; outline: 2px solid var(--clr-accent); outline-offset: -2px; }
.prog-table td.t-maj  { background: rgba( 99,102,241,.07); }
.prog-table td.t-min  { background: rgba(  6,182,212,.07); }
.prog-table td.t-dim  { background: rgba(239, 68, 68,.07); color: #ef4444; }
.prog-table td.t-maj7 { background: rgba( 99,102,241,.13); }
.prog-table td.t-min7 { background: rgba(  6,182,212,.13); }
.prog-table td.t-dom  { background: rgba(245,158, 11,.10); color: #92400e; }

.deg-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: .6rem .85rem; border-radius: .85rem;
  border: 2px solid var(--clr-border); background: var(--clr-surface);
  cursor: pointer; transition: all .15s; min-width: 68px; gap: .18rem;
  box-shadow: var(--shadow-sm);
}
.deg-btn:hover {
  border-color: var(--clr-accent); background: var(--clr-accent-lt);
  transform: translateY(-2px); box-shadow: 0 5px 14px rgba(99,102,241,.22);
}
.deg-btn .deg-label { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.deg-btn .chord-name { font-size: 1rem; font-weight: 800; color: var(--clr-text); }

#sequence-area {
  min-height: 62px; border: 2px dashed var(--clr-border);
  border-radius: 1rem; padding: .7rem 1rem;
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  background: var(--clr-bg); transition: border-color .2s;
}
#sequence-area.dragover { border-color: var(--clr-accent); background: var(--clr-accent-lt); }

.seq-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .8rem; border-radius: 2rem;
  color: #fff; font-weight: 700; font-size: .88rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); transition: transform .1s;
}
.seq-chip .deg-sm { font-size: .68rem; opacity: .8; font-weight: 600; }
.seq-chip .rm-btn { background: none; border: none; color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1; padding: 0 0 0 .15rem; cursor: pointer; }
.seq-chip .rm-btn:hover { color: #fff; }

@keyframes chip-pulse {
  0%   { transform: scale(1);    box-shadow: 0 2px 8px rgba(0,0,0,.18); }
  40%  { transform: scale(1.18); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
  100% { transform: scale(1);    box-shadow: 0 2px 8px rgba(0,0,0,.18); }
}
.seq-chip.playing { animation: chip-pulse .45s ease; }

.mood-card {
  border: 2px solid var(--clr-border); border-radius: 1.25rem;
  background: var(--clr-surface); padding: 1.1rem 1.15rem 1rem;
  cursor: pointer; transition: all .18s; height: 100%; display: flex; flex-direction: column;
}
.mood-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--clr-accent); }
.mood-icon {
  width: 42px; height: 42px; border-radius: .85rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff; margin-bottom: .65rem; flex-shrink: 0;
}
.mood-emotion  { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--clr-muted); margin-bottom: .2rem; }
.mood-prog     { font-size: .95rem; font-weight: 800; color: var(--clr-text); margin-bottom: .35rem; }
.mood-chords   { font-size: .8rem; font-weight: 700; color: var(--clr-accent-dk); margin-top: auto; }
.mood-load-hint { font-size: .72rem; color: var(--clr-muted); margin-top: .4rem; }

#prog-fretboard { display: block; width: 100%; max-width: 1600px; height: auto; }
.fb-nav-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--clr-border); background: var(--clr-surface);
  cursor: pointer; font-size: 1.1rem; font-weight: 900; color: var(--clr-muted);
  transition: all .13s; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fb-nav-btn:hover { border-color: var(--clr-accent); color: var(--clr-accent); }
.fb-nav-btn:disabled { opacity: .35; cursor: default; }
.fb-dot {
  width: 10px; height: 10px; border-radius: 50%; cursor: pointer;
  transition: all .13s; flex-shrink: 0; border: 2px solid transparent;
}
.fb-dot:hover { transform: scale(1.3); }
.fb-dot.active { width: 13px; height: 13px; border-color: rgba(0,0,0,.25); }

/* ══════════════════════════════════════════════
   TRIADES — Styles spécifiques
   ══════════════════════════════════════════════ */
.deg-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.deg-tab {
  display: flex; flex-direction: column; align-items: center;
  padding: .45rem .9rem; border-radius: .85rem; border: 2px solid var(--clr-border);
  background: var(--clr-surface); cursor: pointer; transition: all .15s;
  min-width: 70px; text-align: center;
}
.deg-tab .dt-roman { font-weight: 900; font-size: 1.1rem; line-height: 1; font-style: italic; }
.deg-tab .dt-chord { font-weight: 800; font-size: .85rem; line-height: 1.3; }
.deg-tab .dt-qual  { font-size: .62rem; color: var(--clr-muted); margin-top: .1rem; }
.deg-tab.active    { border-width: 2.5px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.deg-tab.active .dt-roman, .deg-tab.active .dt-chord { color: #fff; }
.deg-tab.active .dt-qual { color: rgba(255,255,255,.7); }
.deg-tab:hover:not(.active) { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.1); }

.info-chord-sub { font-size: .78rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: .07em; }
.note-chip {
  display: inline-block; padding: .18rem .52rem; border-radius: .5rem;
  font-size: .82rem; font-weight: 700; border: 1.5px solid;
}
.info-pos-txt { font-size: .82rem; font-weight: 700; color: var(--clr-text); }
.info-pos-sub { font-size: .72rem; color: var(--clr-muted); }

.triad-table { font-size: .82rem; width: 100%; border-collapse: collapse; }
.triad-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  padding: .45rem .7rem; border-bottom: 2px solid var(--clr-border); color: var(--clr-muted); }
.triad-table td { padding: .4rem .7rem; border-bottom: 1px solid var(--clr-border); vertical-align: middle; }
.triad-table tr:last-child td { border-bottom: none; }
.triad-table tr:hover td { background: var(--clr-accent-lt); cursor: pointer; }
.tt-roman { font-weight: 900; font-size: 1rem; font-style: italic; }
.tt-name  { font-weight: 800; }
.tt-note  { display: inline-block; padding: .12rem .42rem; border-radius: .4rem; font-weight: 700; font-size: .78rem; border: 1.5px solid; }
.tt-fn    { font-size: .75rem; color: var(--clr-muted); }

.voicing-grid        { display: flex; flex-direction: column; gap: 1rem; }
.voicing-row         { background: var(--clr-surface); border: 2px solid var(--clr-border); border-radius: 1rem; padding: 1rem 1.1rem; transition: border-color .15s; }
.voicing-row-header  { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .8rem; }
.voicing-row-title   { font-weight: 800; font-size: .92rem; }
.voicing-row-sub     { font-size: .75rem; color: var(--clr-muted); }
.voicing-cards-row   { display: flex; flex-wrap: wrap; gap: .8rem; }
.voicing-card        { border: 2px solid var(--clr-border); border-radius: .85rem; background: var(--clr-bg); cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; padding: .55rem .6rem .45rem; }
.voicing-card:hover  { transform: translateY(-3px); box-shadow: var(--shadow); }
.voicing-card.active { border-width: 2.5px; }
.voicing-card-lbl    { font-size: .67rem; font-weight: 700; color: var(--clr-muted); text-align: center; margin-top: .3rem; }
.inv-badge           { display: inline-block; padding: .1rem .42rem; border-radius: .35rem; font-size: .64rem; font-weight: 800; margin-bottom: .28rem; white-space: nowrap; }

/* ══════════════════════════════════════════════
   QUINTES — Styles spécifiques
   ══════════════════════════════════════════════ */
#wheel-wrap    { display: flex; justify-content: center; align-items: center; }
#circle-canvas { cursor: pointer; max-width: 100%; height: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.15)); }

.info-panel { background: var(--clr-surface); border: 2px solid var(--clr-border); border-radius: 1.25rem; padding: 1.4rem 1.6rem; min-height: 130px; transition: border-color .2s; box-shadow: var(--shadow-sm); }
.info-panel.active { border-color: var(--clr-accent); }
.key-name { font-size: 2.4rem; font-weight: 900; color: var(--clr-accent); letter-spacing: -.03em; line-height: 1; }
.key-sub  { font-size: .85rem; color: var(--clr-muted); line-height: 1.9; }
.key-sub strong { color: var(--clr-text); }

.deg-pill {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: .4rem .6rem; border-radius: .7rem;
  border: 2px solid var(--clr-border); background: var(--clr-bg); gap: .12rem;
  cursor: pointer; transition: all .15s; min-width: 52px;
}
.deg-pill:hover { border-color: var(--clr-accent); background: var(--clr-accent-lt); transform: translateY(-2px); }
.deg-pill .dp-deg   { font-size: .65rem; font-weight: 700; letter-spacing: .06em; color: var(--clr-muted); text-transform: uppercase; }
.deg-pill .dp-chord { font-size: .92rem; font-weight: 800; color: var(--clr-text); }

.legend-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; vertical-align: middle; }

.neighbor-chip {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: .35rem .7rem; border-radius: .65rem; min-width: 58px;
  border: 2px solid var(--clr-border); background: var(--clr-bg);
  font-size: .78rem; cursor: pointer; transition: all .14s;
}
.neighbor-chip:hover { border-color: var(--clr-accent); background: var(--clr-accent-lt); transform: translateY(-2px); }
.neighbor-chip .nc-label { font-size: .6rem; color: var(--clr-muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.neighbor-chip .nc-key   { font-size: .9rem; font-weight: 800; color: var(--clr-text); }

/* ══════════════════════════════════════════════
   DÉTECTEUR D'ACCORD — Styles spécifiques
   ══════════════════════════════════════════════ */
.result-panel {
  background: var(--clr-surface); border: 2px solid var(--clr-border);
  border-radius: 1.25rem; padding: 1.4rem 1.6rem;
  min-height: 110px; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  box-shadow: var(--shadow-sm); transition: border-color .2s;
}
.result-panel.has-result { border-color: var(--clr-accent); }

.accord-name { font-size: 2.6rem; font-weight: 900; color: var(--clr-accent); line-height: 1; letter-spacing: -.02em; min-width: 90px; }
.accord-sub  { font-size: .82rem; color: var(--clr-muted); line-height: 1.8; }
.accord-sub strong { color: var(--clr-text); }

.note-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.note-chips .note-chip {
  display: inline-flex; align-items: center; gap: .28rem;
  padding: .28rem .7rem; border-radius: 2rem;
  font-size: .8rem; font-weight: 700; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: pointer;
  transition: opacity .12s, transform .1s;
  border: none;
}
.note-chips .note-chip:hover { opacity: .8; transform: scale(.96); }
.note-chips .note-chip .rm { font-size: .85rem; opacity: .7; }

.sugg-badge {
  display: inline-block; margin: .2rem .2rem 0 0;
  padding: .22rem .65rem; border-radius: 2rem; font-size: .75rem; font-weight: 700;
  border: 2px solid var(--clr-border); background: var(--clr-bg); color: var(--clr-text);
  cursor: pointer; transition: all .12s;
}
.sugg-badge:hover { border-color: var(--clr-accent); background: var(--clr-accent-lt); color: var(--clr-accent-dk); }
.sugg-badge.best  { border-color: var(--clr-accent); background: var(--clr-accent); color: #fff; }

@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }
.ping-anim { animation: ping .35s ease-out forwards; }

.cbox-wrap {
  position: relative; cursor: pointer; border-radius: .75rem;
  border: 2px solid var(--clr-border); background: #fdfcf9;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.cbox-wrap:hover { border-color: var(--clr-accent); transform: translateY(-3px); box-shadow: 0 6px 18px rgba(99,102,241,.22); }
.cbox-wrap.active-box { border-color: var(--clr-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.3); }
.cbox-canvas { display: block; }
.cbox-foot { display: flex; justify-content: center; gap: .35rem; padding: .3rem 0 .4rem; background: rgba(0,0,0,.028); border-top: 1px solid var(--clr-border); }
.cbox-btn  { width: 24px; height: 24px; border-radius: 50%; border: none; font-size: .72rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity .12s, transform .1s; }
.cbox-btn:hover { opacity: .85; transform: scale(1.12); }

/* ══════════════════════════════════════════════
   GUITARE — Styles spécifiques
   ══════════════════════════════════════════════ */
.note-display {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg); padding: 1rem 1.5rem;
  min-height: 72px; flex-wrap: wrap;
}
.note-badge  { font-size: 2.2rem; font-weight: 900; color: var(--clr-accent); line-height: 1; min-width: 60px; text-align: center; }
.note-detail { font-size: .85rem; color: var(--clr-muted); line-height: 1.6; }
.note-detail strong { color: var(--clr-text); }
.legend-dot  { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: middle; }
