/* =========================================================================
   PlayInstru — feuille de style
   Tailles de texte en rem : elles suivent le réglage « Taille du texte »
   (attribut data-size sur <html>) et le zoom du navigateur.
   Couleurs vérifiées : texte ≥ 4,5:1, contours des contrôles ≥ 3:1 (RGAA 3.2 / 3.3).
   ========================================================================= */

@font-face {
  font-family: 'PlayInstru Music';
  src: url('../fonts/playinstru-music.woff2') format('woff2');
  font-display: block;
}

/* ---------- jetons de couleur ---------- */
:root {
  --bg: #eef0ec;
  --paper: #fbfbf8;
  --ink: #1a1c20;
  --muted: #5e6360;
  --line: #d3d6d0; /* séparateurs décoratifs */
  --ctl: #80857f; /* contour des contrôles (≥ 3:1) */
  --brass: #8a5e0f;
  --brass-ink: #fff;
  --brass-soft: #f2e6cb;
  --ok: #2e7a57;
  --bad: #c23b2a;
  --focus: #8a5e0f;
  --staff-w: 1.1;
  --shadow: 0 1px 2px rgb(20 24 20 / 6%), 0 8px 24px rgb(20 24 20 / 6%);
  --serif: 'Instrument Serif', georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', roboto, sans-serif;
  --music: 'PlayInstru Music', 'Noto Music', 'Bravura', 'Segoe UI Symbol', 'Apple Symbols', serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --paper: #1b1d21;
    --ink: #eceae4;
    --muted: #a7a9a4;
    --line: #30333a;
    --ctl: #73787f;
    --brass: #e0ae4e;
    --brass-ink: #1a1408;
    --brass-soft: #3a301c;
    --ok: #5dbb8b;
    --bad: #f07563;
    --focus: #e0ae4e;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);

    color-scheme: dark;
  }
}

/* contraste renforcé (réglage) */
:root[data-contrast='high'] {
  --bg: #fff;
  --paper: #fff;
  --ink: #000;
  --muted: #33373a;
  --line: #55595c;
  --ctl: #000;
  --brass: #6b4705;
  --brass-soft: #f5e3bd;
  --ok: #1d5c3f;
  --bad: #a3241a;
  --focus: #000;
  --staff-w: 1.6;
  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root[data-contrast='high'] {
    --bg: #000;
    --paper: #0b0b0b;
    --ink: #fff;
    --muted: #d6d6d0;
    --line: #9a9a96;
    --ctl: #fff;
    --brass: #f5c25a;
    --brass-ink: #000;
    --brass-soft: #3d2f10;
    --ok: #7be0a8;
    --bad: #ff8a7a;
    --focus: #fff;
  }
}

/* taille du texte (réglage) */
:root[data-size='l'] {
  font-size: 112.5%;
}

:root[data-size='xl'] {
  font-size: 125%;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

html {
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  touch-action: manipulation;
}

:focus-visible,
input:focus-visible + .sw {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* lien d'évitement : visible seulement au clavier */
.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---------- mise en page ---------- */
.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 55rem;
  margin: 0 auto;
  padding: 0.625rem 1rem 1rem;
  gap: 0.75rem;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
}

.stage:focus {
  outline: none;
}

/* barre du haut */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  margin-right: auto;
  padding: 0;
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand i {
  color: var(--brass);
}

.brand svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  color: var(--muted);
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--ctl);
  border-radius: 999px;
}

.seg button {
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.seg button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  background: var(--paper);
  border: 1px solid var(--ctl);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.iconbtn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
}

.iconbtn.go {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--brass-ink);
}

.iconbtn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* indicateurs */
.metrics {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.metrics b {
  margin-right: 0.2rem;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.metrics .streak b {
  color: var(--brass);
}

.metrics .spacer {
  margin-left: auto;
}

/* ---------- carte principale : portée ---------- */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.stagerow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.staffwrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(170px, 34vh, 300px);
}

#staff {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(170px, 36vh, 320px);
}

:root[data-size='l'] #staff {
  max-height: clamp(200px, 42vh, 380px);
}

:root[data-size='xl'] #staff {
  max-height: clamp(220px, 48vh, 440px);
}

#staff .l {
  stroke: var(--ink);
  stroke-width: var(--staff-w);
}

#staff .ledger {
  stroke: var(--ink);
  stroke-width: calc(var(--staff-w) + 0.2);
}

#staff .clef,
#staff .acc {
  fill: var(--ink);
  font-family: var(--music);
}

#staff .head {
  fill: var(--ink);
}

#staff .hole {
  fill: var(--paper);
}

#staff g.past .head,
#staff g.past .acc {
  fill: var(--muted);
  opacity: 0.6;
}

#staff g.past .ledger {
  stroke: var(--muted);
  opacity: 0.6;
}

#staff g.past.bad .head,
#staff g.past.bad .acc {
  fill: var(--bad);
  opacity: 0.9;
}

#staff g.cur .head,
#staff g.cur .acc,
#staff .caret {
  fill: var(--brass);
}

#staff g.cur .ledger {
  stroke: var(--brass);
}

#staff g.flash-bad .head,
#staff g.flash-bad .acc {
  fill: var(--bad);
}

#staff g.flash-ok .head,
#staff g.flash-ok .acc {
  fill: var(--ok);
}

#staff .reveal {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--bad);
}

.shake {
  animation: shake 0.32s;
}

@keyframes shake {
  20% {
    transform: translateX(-5px);
  }

  40% {
    transform: translateX(5px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(2px);
  }
}

.chronobar {
  height: 6px;
  overflow: hidden;
  background: var(--line);
  border-radius: 6px;
}

.chronobar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brass);
  transform-origin: left;
}

/* retour après réponse */
.fb {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.25rem;
  padding-top: 0.625rem;
  border-top: 1px dashed var(--line);
}

.fb-name {
  min-width: 5.25rem;
  font-family: var(--serif);
  font-size: 1.875rem;
  line-height: 1;
}

.fb-name.ok {
  color: var(--ok);
}

.fb-name.bad {
  color: var(--bad);
}

.fb-mark {
  font-family: var(--sans);
  font-size: 0.6em;
  font-weight: 700;
  margin-right: 0.2em;
  vertical-align: 0.15em;
}

.fb-meta {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
}

.fb-meta strong {
  font-weight: 600;
  color: var(--ink);
}

.valves {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.valves .dots {
  display: inline-flex;
  gap: 5px;
}

.valves .dot {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.valves .dot.on {
  background: var(--ink);
}

.valves small {
  margin-left: 3px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.replay {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--ctl);
  border-radius: 50%;
}

.replay svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* résultat du défi 60 s */
.result {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem;
  text-align: center;
  background: color-mix(in oklab, var(--paper) 96%, transparent);
  border-radius: 18px;
}

.result h2 {
  font-size: 1.75rem;
}

.result .big {
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 0.9;
  color: var(--brass);
}

.result p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.result .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

/* ---------- clarinette : exemple à gauche, doigté cliquable à droite ---------- */
.clcol {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clsvg svg {
  display: block;
  width: auto;
  height: clamp(170px, 30vh, 250px);
  user-select: none;
  touch-action: manipulation;
}

.clres {
  display: flex;
  gap: 2px;
}

.app.clmode .clcol.fing .clsvg svg {
  height: clamp(240px, 44vh, 360px);
}

.app.clmode .clcol.fing .clres svg {
  height: clamp(200px, 36vh, 300px);
}

.cld .rail,
.cld .deco {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.cld .deco.f {
  fill: var(--paper);
}

.cld .k .sh {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.6;
  transition: fill 0.12s;
}

.cld .k .hit {
  fill: transparent;
  stroke: none;
}

.cld.in .k {
  cursor: pointer;
}

@media (hover: hover) {
  .cld.in .k:hover .sh {
    fill: var(--brass-soft);
  }
}

.cld .k.on .sh {
  fill: var(--ink);
}

.cld.in .k.on .sh {
  fill: var(--brass);
  stroke: var(--brass);
}

.cld .k.extra .sh {
  fill: var(--bad);
  stroke: var(--bad);
}

.cld .k:focus {
  outline: none;
}

.cld .k:focus-visible .sh {
  stroke: var(--focus);
  stroke-width: 3.5;
}

.cld.ghost {
  opacity: 0.35;
}

/* ---------- zone de réponse ---------- */
.pad {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.accrow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
}

.accrow button {
  min-height: 2.75rem;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--ctl);
  border-radius: 12px;
  font-family: var(--music);
  font-size: 2.125rem;
  line-height: 1;
}

.accrow button[aria-pressed='true'] {
  background: var(--brass-soft);
  border: 2px solid var(--brass);
  color: var(--ink);
}

.notes {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
}

.key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 4.25rem;
  background: var(--paper);
  border: 1px solid var(--ctl);
  border-radius: 14px;
  box-shadow: 0 2px 0 var(--line);
  transition: transform 0.06s;
}

.key:active {
  transform: translateY(2px);
  box-shadow: none;
}

.key .n {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
}

.key .k {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.key.ok {
  background: color-mix(in oklab, var(--ok) 18%, var(--paper));
  border: 2px solid var(--ok);
}

.key.bad {
  background: color-mix(in oklab, var(--bad) 18%, var(--paper));
  border: 2px solid var(--bad);
}

.fing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.pistons {
  display: flex;
  justify-content: center;
  gap: 1.125rem;
}

.piston {
  display: grid;
  place-items: center;
  width: 4.875rem;
  height: 4.875rem;
  background: var(--paper);
  border: 2px solid var(--ctl);
  border-radius: 50%;
  box-shadow: inset 0 -6px 0 var(--line);
  font-family: var(--serif);
  font-size: 1.875rem;
  transition: transform 0.06s;
}

.piston[aria-pressed='true'] {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--brass-ink);
  box-shadow: inset 0 4px 0 rgb(0 0 0 / 18%);
  transform: translateY(3px);
}

.validate {
  width: 100%;
  max-width: 21.25rem;
  min-height: 3.25rem;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.hint {
  margin: 0;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--muted);
}

@media (hover: none) {
  .desk {
    display: none;
  }
}

/* ---------- panneaux latéraux (réglages, progrès) ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgb(10 12 14 / 45%);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  width: min(26rem, 100%);
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.125rem
    calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  background: var(--paper);
  border-left: 1px solid var(--ctl);
}

.drawer .dhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer h2 {
  font-size: 1.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > .lab {
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.opts {
  display: grid;
  gap: 0.375rem;
}

.opts.c2 {
  grid-template-columns: 1fr 1fr;
}

.opts.c3 {
  grid-template-columns: repeat(3, 1fr);
}

.opt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  text-align: left;
  border: 1px solid var(--ctl);
  border-radius: 12px;
}

.opt b {
  font-size: 0.875rem;
  font-weight: 600;
}

.opt small {
  font-size: 0.8125rem;
  color: var(--muted);
}

.opts.c3 .opt {
  align-items: center;
  text-align: center;
}

.opt[aria-pressed='true'] {
  background: var(--brass-soft);
  border: 2px solid var(--brass);
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.switch span small {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sw {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 1.625rem;
  background: var(--paper);
  border: 2px solid var(--ctl);
  border-radius: 1rem;
  transition: background 0.15s;
}

.sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--ctl);
  border-radius: 50%;
  transition: transform 0.15s;
}

.switch input:checked + .sw {
  background: var(--brass);
  border-color: var(--brass);
}

.switch input:checked + .sw::after {
  background: var(--brass-ink);
  transform: translateX(1.125rem);
}

.sum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.sum div {
  padding: 0.625rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.sum b {
  display: block;
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sum small {
  font-size: 0.8125rem;
  color: var(--muted);
}

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.375rem;
}

.chip {
  padding: 0.45rem 0.25rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.25;
}

.chip b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.chip small {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.chip.seen {
  border-color: transparent;
}

.legend {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.danger {
  min-height: 2.75rem;
  padding: 0.5rem 0;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bad);
}

.confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.confirm button {
  min-height: 2.75rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--ctl);
  border-radius: 10px;
  font-weight: 600;
}

.confirm .yes {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

/* ---------- écran de choix de l'instrument ---------- */
.chooser {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem
    calc(env(safe-area-inset-bottom, 0px) + 1rem);
  background: var(--bg);
}

.chooser-in {
  width: 100%;
  max-width: 35rem;
  text-align: center;
}

.chooser-title {
  font-size: 2.75rem;
  line-height: 1;
}

.chooser-title i {
  color: var(--brass);
}

.chooser p {
  margin: 0.5rem 0 1.375rem;
  color: var(--muted);
}

.insts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.inst {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.375rem 0.75rem 1.125rem;
  background: var(--paper);
  border: 1px solid var(--ctl);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.06s;
}

.inst:active {
  transform: translateY(2px);
}

.inst.last {
  border: 2px solid var(--brass);
}

.inst svg {
  width: 7.5rem;
  height: 3.75rem;
  margin-bottom: 0.5rem;
  color: var(--brass);
}

.inst b {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.1;
}

.inst small {
  font-size: 0.8125rem;
  color: var(--muted);
}

.inst .kbd {
  position: absolute;
  top: 0.625rem;
  right: 0.75rem;
  padding: 1px 6px;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--ctl);
  border-radius: 6px;
}

/* ---------- adaptations ---------- */
@media (width >= 700px) {
  .app {
    padding-top: 1.125rem;
  }

  .pad,
  .app.clmode .pad {
    margin-top: 0.25rem;
  }
}

@media (width <= 520px) {
  .brand {
    font-size: 1.375rem;
  }

  /* libellé masqué visuellement mais lu par les lecteurs d'écran */
  .iconbtn .lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .key {
    min-height: 3.875rem;
  }

  .key .n {
    font-size: 1.3125rem;
  }

  .piston {
    width: 4.375rem;
    height: 4.375rem;
  }

  .stagerow {
    gap: 0.25rem;
  }

  .clsvg svg {
    height: clamp(150px, 26vh, 210px);
  }

  .app.clmode .clcol.fing .clsvg svg {
    height: clamp(240px, 40vh, 320px);
  }

  .app.clmode .clcol.fing .clres svg {
    height: clamp(170px, 30vh, 250px);
  }

  .app.clview .fb-name {
    min-width: 0;
    font-size: 1.625rem;
  }
}

/* grand texte sur téléphone : la portée passe au-dessus des deux clarinettes, en pleine largeur */
@media (width <= 520px) {
  :root[data-size] .app.clview .stagerow {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-around;
    row-gap: 0.5rem;
  }

  :root[data-size] .app.clview .staffwrap {
    grid-column: 1 / -1;
    order: -1;
    min-height: 0;
  }
}

@media (width <= 420px) {
  .insts {
    grid-template-columns: 1fr;
  }

  .inst {
    flex-flow: row wrap;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-align: left;
  }

  .inst svg {
    width: 5.25rem;
    height: 2.625rem;
    margin: 0;
  }

  .inst b {
    font-size: 1.25rem;
  }
}

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

/* ---------- pied de page ---------- */
.foot {
  padding-top: 0.5rem;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--muted);
}

.foot p {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 0;
}

/* logo j6n à la suite du texte, à sa hauteur */
.foot-logo {
  width: auto;
  height: 1.9em;
  color: var(--ink);
}
