:root {
  --fond: #f6efe6;
  --surface: #fffaf3;
  --surface-2: #efe3d3;
  --texte: #2a1a12;
  --texte-doux: #6e5848;
  --bord: #e2d3bf;
  --abricot: #d9772b;
  --abricot-fort: #b85d16;
  --bois: #8a4b25;
  --juste: #2f8f5b;
  --proche: #c99a12;
  --loin: #c2452d;
  --ombre: 0 1px 2px rgb(60 30 10 / .06), 0 4px 16px rgb(60 30 10 / .06);
  --trou-ferme: #1d120c;
  --trou-ouvert: #fffaf3;
  --corps-duduk: #e9c9a8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #1a110c;
    --surface: #251812;
    --surface-2: #33231a;
    --texte: #f4e8dc;
    --texte-doux: #b9a493;
    --bord: #3f2c21;
    --abricot: #f0934a;
    --abricot-fort: #ffab66;
    --bois: #d18a5a;
    --juste: #4fc184;
    --proche: #e6bc3c;
    --loin: #ec6a4f;
    --ombre: none;
    --corps-duduk: #b9875f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #1a110c; --surface: #251812; --surface-2: #33231a; --texte: #f4e8dc; --texte-doux: #b9a493;
  --bord: #3f2c21; --abricot: #f0934a; --abricot-fort: #ffab66; --bois: #d18a5a;
  --juste: #4fc184; --proche: #e6bc3c; --loin: #ec6a4f; --ombre: none; --corps-duduk: #b9875f; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
h2 { font-size: 1.05rem; margin: 0 0 .4rem; }

.entete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 6px;
}
.marque { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.logo { width: 26px; height: 26px; border-radius: 7px; background: url(/icon-192.png) center/cover; }
.puce {
  border: 1px solid var(--bord); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: .85rem; color: var(--texte-doux); cursor: pointer;
}

.choix-duduk {
  display: flex; gap: 6px; overflow-x: auto; padding: 6px 16px 10px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.choix-duduk::-webkit-scrollbar { display: none; }
.choix-duduk button {
  flex: none; scroll-snap-align: center;
  border: 1px solid var(--bord); background: var(--surface); border-radius: 999px;
  padding: 7px 14px; font-size: .92rem; cursor: pointer; white-space: nowrap;
}
.choix-duduk button[aria-checked="true"] { background: var(--abricot); border-color: var(--abricot); color: #fff; font-weight: 600; }

main { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 18px;
  padding: 16px; margin-bottom: 14px; box-shadow: var(--ombre);
}
.titre-carte { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.titre-carte h2 { margin: 0; }
.aide { color: var(--texte-doux); font-size: .88rem; margin: .4rem 0; }

.btn {
  border: 1px solid var(--bord); background: var(--surface-2); border-radius: 12px;
  padding: 11px 16px; cursor: pointer; font-weight: 600; min-height: 44px;
}
.btn.principal { background: var(--abricot); border-color: var(--abricot); color: #fff; }
.btn.petit { padding: 8px 12px; min-height: 38px; font-size: .9rem; }
.btn.rond { width: 48px; height: 48px; border-radius: 50%; padding: 0; font-size: 1.4rem; }
.btn:disabled { opacity: .4; cursor: default; }
.lien { border: 0; background: none; color: var(--abricot-fort); text-decoration: underline; cursor: pointer; padding: 4px; font-size: .88rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions .btn { flex: 1 1 auto; }
.actions.colonne { flex-direction: column; }
.ligne { display: flex; gap: 8px; align-items: center; }

/* Accordeur */
.accordeur { text-align: center; }
.note-jouee .nom, .dam-note .nom { font-size: 3.4rem; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.note-jouee .sous, .dam-note .sous { color: var(--texte-doux); font-size: .9rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cadran { width: 100%; max-width: 340px; display: block; margin: 6px auto 0; }
.cadran .zone-juste { fill: color-mix(in srgb, var(--juste) 18%, transparent); }
.cadran .grad { stroke: var(--texte-doux); stroke-width: 1.5; opacity: .5; }
.cadran .grad.fort { stroke-width: 2.5; opacity: .9; }
.cadran .grad-txt, .grad-txt { fill: var(--texte-doux); font-size: 11px; }
.cadran .aiguille { stroke: var(--texte-doux); stroke-width: 4; stroke-linecap: round; transition: stroke .2s; }
.cadran .pivot { fill: var(--texte); }
.cadran[data-etat="juste"] .aiguille { stroke: var(--juste); }
.cadran[data-etat="proche"] .aiguille { stroke: var(--proche); }
.cadran[data-etat="loin"] .aiguille { stroke: var(--loin); }
.cadran[data-etat="repos"] .aiguille { stroke: var(--bord); }
.ecart { font-weight: 650; font-size: 1.05rem; min-height: 1.5em; font-variant-numeric: tabular-nums; }
.ecart[data-etat="juste"] { color: var(--juste); }
.ecart[data-etat="proche"] { color: var(--proche); }
.ecart[data-etat="loin"] { color: var(--loin); }
.duo { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; }
.portee { width: 58%; max-width: 220px; }
.doigte { width: 26%; max-width: 100px; }
.ligne-portee { stroke: var(--texte); stroke-width: 1.2; }
.cle { fill: var(--texte); font-size: 62px; font-family: "Noto Music", "Bravura", serif; }
.cle-8 { fill: var(--texte); font-size: 11px; font-weight: 700; }
.tete { fill: var(--texte); }
.hampe { stroke: var(--texte); stroke-width: 1.6; }
.alteration { fill: var(--texte); font-size: 22px; }
.doigte .corps { fill: var(--corps-duduk); stroke: var(--bois); stroke-width: 1.5; }
.doigte .anche { fill: var(--proche); opacity: .7; }
.doigte .trou { fill: var(--trou-ouvert); stroke: #6b3d1f; stroke-width: 1.8; }
.doigte .trou.plein { fill: var(--trou-ferme); stroke: var(--bois); }
.doigte .leg { fill: var(--texte-doux); font-size: 11px; }
.doigte .leg.fort { fill: var(--abricot-fort); font-weight: 700; }
.doigte .point-interro { fill: var(--abricot-fort); font-size: 42px; font-weight: 800; }
.etat-etalon { font-size: .88rem; color: var(--texte-doux); margin: 8px 0 0; }

.carte-justesse { width: 100%; display: block; }
.carte-justesse .axe { stroke: var(--texte-doux); stroke-width: 1; opacity: .6; }
.carte-justesse .axe.pointille { stroke-dasharray: 3 4; opacity: .35; }
.carte-justesse .nom-note { fill: var(--texte); font-size: 11px; }
.carte-justesse .val { fill: var(--texte-doux); font-size: 10px; font-variant-numeric: tabular-nums; }
.carte-justesse .vide { fill: var(--bord); }
.barre.juste { fill: var(--juste); }
.barre.proche { fill: var(--proche); }
.barre.loin { fill: var(--loin); }

/* Dam */
.dam { text-align: center; }
.lecture {
  width: 150px; height: 150px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--abricot); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; margin: 4px auto 14px;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--abricot) 40%, transparent);
}
.lecture .lbl { font-size: .85rem; font-weight: 600; }
.icone-lecture { width: 0; height: 0; border-left: 30px solid #fff; border-top: 19px solid transparent; border-bottom: 19px solid transparent; margin-left: 8px; }
.lecture[aria-pressed="true"] { animation: souffle 4s ease-in-out infinite; background: var(--abricot-fort); }
.lecture[aria-pressed="true"] .icone-lecture { border: 0; width: 30px; height: 30px; background: #fff; border-radius: 4px; margin: 0; }
@keyframes souffle { 50% { transform: scale(1.04); box-shadow: 0 6px 36px color-mix(in srgb, var(--abricot) 60%, transparent); } }
@media (prefers-reduced-motion: reduce) { .lecture[aria-pressed="true"] { animation: none; } }
.dam-note { margin-bottom: 12px; }
.notes-gamme { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; margin-bottom: 10px; }
.notes-gamme button {
  border: 1px solid var(--bord); background: var(--surface-2); border-radius: 10px;
  padding: 8px 2px; cursor: pointer; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.notes-gamme button small { font-size: .65rem; color: var(--texte-doux); }
.notes-gamme button[aria-checked="true"] { background: var(--abricot); border-color: var(--abricot); color: #fff; font-weight: 700; }
.notes-gamme button[aria-checked="true"] small { color: #fff; }
.dam .ligne { justify-content: center; margin-bottom: 12px; }

.segment { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; margin: 10px 0; }
.segment button { flex: 1; border: 0; background: none; padding: 9px 4px; border-radius: 9px; cursor: pointer; font-size: .9rem; min-height: 40px; }
.segment button[aria-pressed="true"] { background: var(--surface); font-weight: 650; box-shadow: var(--ombre); color: var(--abricot-fort); }

.curseur { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; margin: 14px 0 4px; text-align: left; font-size: .92rem; }
.curseur .bornes { grid-column: 2; display: flex; justify-content: space-between; font-size: .75rem; color: var(--texte-doux); margin-top: -6px; }
input[type="range"] { width: 100%; accent-color: var(--abricot); }

/* Métronome */
.tempo { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 10px 0; }
.bpm { text-align: center; }
.bpm span { font-size: 2.6rem; font-weight: 750; font-variant-numeric: tabular-nums; display: block; line-height: 1; }
.bpm small { color: var(--texte-doux); font-size: .78rem; }
.pulsations { display: flex; justify-content: center; gap: 10px; margin: 14px 0; min-height: 16px; }
.pulsations span { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--bord); transition: background .05s; }
.pulsations span:first-child { width: 18px; height: 18px; margin-top: -2px; }
.pulsations span.actif { background: var(--abricot); border-color: var(--abricot); }
.metro .btn:not(.rond) { width: 100%; }
.interrupteur { width: 52px; height: 30px; border-radius: 999px; border: 0; background: var(--surface-2); position: relative; cursor: pointer; box-shadow: inset 0 0 0 1px var(--bord); }
.interrupteur span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.interrupteur[aria-checked="true"] { background: var(--abricot); }
.interrupteur[aria-checked="true"] span { transform: translateX(22px); }

/* Tableau des doigtés */
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--texte-doux); margin: 10px 0; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.pastille { width: 14px; height: 14px; border-radius: 50%; border: 1.8px solid #6b3d1f; background: var(--trou-ouvert); display: inline-block; }
.pastille.pleine { background: var(--trou-ferme); border-color: var(--bois); }
.pastille.demi { background: linear-gradient(90deg, var(--trou-ferme) 50%, var(--trou-ouvert) 50%); border-color: var(--bois); }
.bascule { display: flex; align-items: center; gap: 8px; font-size: .92rem; margin: 6px 0; cursor: pointer; }
.bascule input { width: 20px; height: 20px; accent-color: var(--abricot); }
.tableau-doigtes { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 8px; }
.case-doigte {
  border: 1px solid var(--bord); background: var(--surface-2); border-radius: 14px; padding: 8px 6px 10px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.case-doigte.chroma { background: transparent; border-style: dashed; }
.case-doigte .doigte { width: 64px; max-width: none; }
.case-doigte .portee { width: 100%; max-width: none; height: 52px; }
.case-doigte strong { font-size: 1.15rem; }
.case-doigte small { color: var(--texte-doux); font-size: .72rem; line-height: 1.25; }
.case-doigte.joue { border-color: var(--abricot); box-shadow: 0 0 0 2px var(--abricot); }

/* Parcours */
.compteur { color: var(--texte-doux); font-size: .88rem; font-variant-numeric: tabular-nums; }
.continuer { width: 100%; margin: 10px 0 4px; text-align: left; }
.chapitre { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); margin: 18px 0 6px; }
.lecons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ligne-lecon {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--bord); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-height: 56px;
}
.ligne-lecon .txt { flex: 1; display: flex; flex-direction: column; }
.ligne-lecon small { color: var(--texte-doux); font-size: .78rem; }
.ligne-lecon .chevron { color: var(--texte-doux); font-size: 1.4rem; }
.pastille-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--surface); border: 1px solid var(--bord); }
.ligne-lecon.faite .pastille-num { background: var(--juste); border-color: var(--juste); color: #fff; }
.ligne-lecon.suivante { border-color: var(--abricot); box-shadow: 0 0 0 1px var(--abricot); }
.repli summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; }
.repli summary::-webkit-details-marker { display: none; }
.repli summary h2 { margin: 0; }
.repli summary h2::after { content: ' ›'; color: var(--texte-doux); }
.repli[open] summary h2::after { content: ' ⌄'; }

/* Leçon */
.retour { margin: 0 0 8px; font-size: .95rem; text-decoration: none; }
.surtitre { color: var(--abricot-fort); font-size: .8rem; font-weight: 650; margin: 0; text-transform: uppercase; letter-spacing: .05em; }
.titre-lecon { font-size: 1.35rem; margin: 2px 0 8px; }
.tableau-doigtes.compact { grid-template-columns: repeat(auto-fill, minmax(100px, 130px)); }
.exo { padding: 0; overflow: hidden; }
.exo-tete { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 0; background: none; padding: 14px 16px; cursor: pointer; }
.exo-tete .num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--surface-2); }
.exo-tete .consigne { flex: 1; font-size: .95rem; }
.exo-tete .coche { color: var(--juste); font-weight: 800; visibility: hidden; }
.exo[data-etat="attente"] .exo-tete { opacity: .6; }
.exo[data-etat="actif"] .exo-tete .num, .exo[data-etat="fini-ouvert"] .exo-tete .num { background: var(--abricot); color: #fff; }
.exo[data-etat="fini"] .coche, .exo[data-etat="fini-ouvert"] .coche { visibility: visible; }
.exo[data-etat="fini"] .exo-tete .num { background: var(--juste); color: #fff; }
.exo[data-etat="passe"] .exo-tete { opacity: .6; }
.exo-corps:not(:empty) { padding: 0 16px 16px; }
.exo-cible { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 10px; }
.doigte.mini { width: 54px; }
.cible-nom { display: flex; flex-direction: column; align-items: flex-start; }
.cible-nom strong { font-size: 2.4rem; line-height: 1; }
.cible-nom small { color: var(--texte-doux); }
.suite-notes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.suite-notes span { border: 1px solid var(--bord); border-radius: 10px; padding: 8px 12px; font-weight: 650; background: var(--surface-2); min-width: 48px; text-align: center; }
.suite-notes span.en-cours { background: var(--abricot); border-color: var(--abricot); color: #fff; transform: scale(1.08); }
.suite-notes span.faite { background: color-mix(in srgb, var(--juste) 20%, var(--surface)); border-color: var(--juste); color: var(--juste); }
.exo-jauge { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.exo-jauge div { height: 100%; width: 0; background: var(--juste); transition: width .12s linear; }
.exo-retour { text-align: center; min-height: 1.5em; margin: 10px 0 0; font-weight: 600; }
.exo-retour[data-etat="juste"] { color: var(--juste); }
.exo-retour[data-etat="loin"] { color: var(--loin); }
.portee-defile { overflow-x: auto; margin: 6px -16px 4px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.portee-phrase { height: 132px; display: block; }
.chiffrage { fill: var(--texte); font-size: 17px; font-weight: 800; font-family: Georgia, serif; }
.barre-mesure { stroke: var(--texte); stroke-width: 1.2; }
.barre-mesure.finale { stroke-width: 4; }
.tete.creuse { fill: var(--surface); stroke: var(--texte); stroke-width: 1.8; }
.crochet, .silence-trait { fill: none; stroke: var(--texte); stroke-width: 2; }
.silence { fill: var(--texte); }
.alteration.petite { font-size: 18px; }
.note-phrase.en-cours .tete, .note-phrase.en-cours .silence { fill: var(--abricot); }
.note-phrase.en-cours .tete.creuse { fill: var(--surface); stroke: var(--abricot); }
.note-phrase.en-cours .hampe, .note-phrase.en-cours .crochet { stroke: var(--abricot); }
.note-phrase.reussie .tete { fill: var(--juste); }
.note-phrase.reussie .tete.creuse { fill: var(--surface); stroke: var(--juste); }
.note-phrase.ratee .tete { fill: var(--loin); }
.note-phrase.ratee .tete.creuse { fill: var(--surface); stroke: var(--loin); }
.tempo.petit { margin: 4px 0; }
.tempo.petit .bpm span { font-size: 1.8rem; }
.phrase .lien { display: block; margin: 8px auto 0; }
.fin-lecon { text-align: center; }
.fin-lecon .btn { width: 100%; }

/* Jouer */
.grille-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 10px 0; }
.grille-choix button { border: 1px solid var(--bord); background: var(--surface-2); border-radius: 10px; padding: 9px 4px; cursor: pointer; min-height: 44px; font-size: .9rem; }
.grille-choix button[aria-checked="true"] { background: var(--abricot); border-color: var(--abricot); color: #fff; font-weight: 650; }
.centre { text-align: center; justify-content: center; }
#pb-pas { flex-wrap: wrap; gap: 6px; }
#pb-pas span { width: 12px; height: 12px; }
#pb-pas span:first-child { width: 12px; height: 12px; margin: 0; }
#pb-pas span.grave { width: 16px; height: 16px; margin-top: -2px; }
#pb-pas span.vide { opacity: .35; }
.liste-prises { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.puce.choisie { border-color: var(--abricot); color: var(--abricot-fort); font-weight: 650; }
.prise { margin-top: 8px; }
.courbe { width: 100%; display: block; background: var(--surface-2); border-radius: 12px; cursor: pointer; }
.lecteur { width: 100%; margin-top: 8px; }
.onde { width: 100%; display: block; background: var(--surface-2); border-radius: 12px; cursor: pointer; margin: 8px 0 4px; }
.btn.fichier { display: inline-flex; align-items: center; justify-content: center; width: 100%; margin-top: 8px; }

/* Tuiles du parcours, oreille, répertoire */
.tuiles { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0 4px; }
.tuile { text-align: left; border: 1px solid var(--bord); background: var(--surface-2); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 56px; }
.tuile small { color: var(--texte-doux); font-size: .8rem; }
.tuile.accent { border-color: var(--abricot); background: color-mix(in srgb, var(--abricot) 12%, var(--surface)); }
@media (min-width: 520px) { .tuiles { grid-template-columns: repeat(3, 1fr); } }
.suite-notes span.ratee { background: color-mix(in srgb, var(--loin) 18%, var(--surface)); border-color: var(--loin); color: var(--loin); }
.or-score { text-align: center; color: var(--texte-doux); font-size: .9rem; }
.ed-ligne { gap: 12px; }
.ed-ligne .champ { flex: 1; margin: 6px 0; }
.ed-durees button { font-size: 1.25rem; font-family: "Noto Music", serif; }
.ed-texte { margin: 14px 0 4px; }
.ed-texte summary { cursor: pointer; color: var(--texte-doux); font-size: .9rem; }
.ed-texte textarea { width: 100%; font: 14px/1.4 ui-monospace, monospace; background: var(--surface-2); color: var(--texte); border: 1px solid var(--bord); border-radius: 10px; padding: 8px; }
code { background: var(--surface-2); border-radius: 4px; padding: 0 4px; }
.lien.danger { color: var(--loin); display: block; margin: 12px auto 0; }
.editeur .notes-gamme button[aria-checked="true"] { background: var(--abricot); border-color: var(--abricot); color: #fff; }
.editeur .ligne { flex-wrap: wrap; }

/* Soin */
.fiche { border-top: 1px solid var(--bord); padding: 10px 0; }
.fiche summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; }
.fiche summary::-webkit-details-marker { display: none; }
.fiche summary::after { content: '›'; color: var(--texte-doux); }
.fiche[open] summary::after { content: '⌄'; }
.fiche p { margin: .5rem 0; font-size: .95rem; }
.carte-anche { border: 1px solid var(--bord); border-radius: 14px; padding: 12px; margin: 10px 0; background: var(--surface-2); }
.carte-anche.active { border-color: var(--abricot); box-shadow: 0 0 0 1px var(--abricot); }
.anche-tete { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.carte-anche .aide, .anche-mesure { margin: 4px 0; }
.carte-anche .champ { margin: 8px 0; }
.carte-anche textarea, .ajout-anche input { font: inherit; width: 100%; background: var(--surface); color: var(--texte); border: 1px solid var(--bord); border-radius: 10px; padding: 8px; }
.ajout-anche .ligne input { flex: 1; min-height: 40px; }
.evolution { width: 100%; height: 60px; display: block; }
.evolution .axe { stroke: var(--bord); stroke-dasharray: 3 3; }
.evolution .trace { fill: none; stroke: var(--abricot); stroke-width: 2; }
.evolution .pt { fill: var(--abricot-fort); }
.evolution .pt.juste { fill: var(--juste); }
.vide-txt { color: var(--texte-doux); font-style: italic; }

/* À venir */
.bientot p { color: var(--texte-doux); }
.etiquette { display: inline-block; background: var(--surface-2); color: var(--abricot-fort); border-radius: 999px; padding: 4px 10px; font-size: .8rem; font-weight: 650; }

/* Onglets */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--bord);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.onglets button {
  flex: 1; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .7rem; color: var(--texte-doux); padding: 4px 0; min-height: 50px;
}
.onglets svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.onglets button[aria-current] { color: var(--abricot-fort); font-weight: 650; }

/* Fenêtres */
dialog {
  border: 1px solid var(--bord); border-radius: 18px; background: var(--surface); color: var(--texte);
  padding: 20px; width: min(440px, calc(100vw - 32px));
}
dialog::backdrop { background: rgb(20 10 5 / .5); }
.champ { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; font-size: .92rem; }
.champ select, .champ input {
  font: inherit; color: var(--texte); background: var(--surface-2); border: 1px solid var(--bord);
  border-radius: 10px; padding: 10px; min-height: 44px; width: 100%;
}
.champ .ligne input { width: 110px; }
.jauge-etalon { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 14px 0 8px; }
.jauge-etalon div { height: 100%; width: 0; background: var(--abricot); transition: width .1s; }
.et-mesure { text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.sous-titre { font-weight: 650; font-size: .92rem; margin: 14px 0 4px; }
