/* Palette Soft Summer : taupes, roses poudrés, contrastes doux.
   Volontairement pas de blanc pur ni de noir pur — moins agressif à l'œil. */

:root {
  --fond: #f7f4f3;
  --surface: #fffdfc;
  --encre: #3a3238;
  --encre-douce: #7d7278;
  --ligne: #e9e2e0;
  --accent: #a97e8b;
  --accent-fond: #f1e7e9;
  --energie: #9aa88f;
  --douleur: #c39098;
  --humeur: #9a95b5;
  --danger: #a8646c;
  --rayon: 18px;
  --ombre: 0 1px 2px rgba(58, 50, 56, .04), 0 8px 24px rgba(58, 50, 56, .05);
  /* dégradés & lueurs — le petit côté « juicy », dans la palette soft summer */
  --degrade: linear-gradient(145deg, #bf8f9c, #a97e8b);
  --degrade-bonus: linear-gradient(145deg, #a79fc2, #b98a97);
  --lueur: rgba(169, 126, 139, .30);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #191518;
    --surface: #221d21;
    --encre: #ece4e7;
    --encre-douce: #9a8e94;
    --ligne: #322b30;
    --accent: #c79ba6;
    --accent-fond: #2e252a;
    --energie: #8fa085;
    --douleur: #b8858e;
    --humeur: #918cab;
    --danger: #c08088;
    --ombre: none;
    --degrade: linear-gradient(145deg, #d7a7b3, #c79ba6);
    --degrade-bonus: linear-gradient(145deg, #a8a1c6, #c79ba6);
    --lueur: rgba(199, 155, 166, .26);
  }
}

* { box-sizing: border-box; }

/* app « fixe » : pas de zoom double-tap, pas d'auto-agrandissement du texte iOS */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Sans ça, les `display: flex` plus bas écrasent le display:none implicite
   de l'attribut [hidden] et les vues masquées restent visibles. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
/* Lueur douce en haut : donne du relief sans agresser (elle transparaît derrière les entêtes). */
body::before {
  content: ''; position: fixed; z-index: -1; pointer-events: none;
  left: 50%; top: 0; transform: translateX(-50%);
  width: 140%; max-width: 720px; height: 340px;
  background: radial-gradient(60% 100% at 50% 0, var(--lueur), transparent 72%);
}

/* Les champs de formulaire n'héritent NI de la police NI de la couleur du texte :
   sans cette ligne, ils gardent le noir par défaut du navigateur — invisible en mode sombre. */
button, input, textarea, select { font: inherit; color: inherit; }

/* ---------- Structure ---------- */

.app { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

.vue {
  padding: 0 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entete { margin: 8px 0 4px; padding-right: 46px; }   /* place pour le rouage */
.entete-reglages { display: flex; align-items: center; justify-content: space-between; padding-right: 0; }
.date { margin: 0 0 6px; color: var(--encre-douce); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.salut { margin: 0; font-size: 25px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; }
.sous-titre { margin: 10px 0 0; color: var(--encre-douce); font-size: 14px; }

.carte {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carte-titre { margin: 0; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.carte-note { font-weight: 400; font-size: 13px; color: var(--encre-douce); }

.aide { margin: -4px 2px 2px; font-size: 12.5px; color: var(--encre-douce); text-align: center; }
.aide.alerte { color: var(--accent); }
.aide-bloc { text-align: left; margin: 0; line-height: 1.55; }
.version { text-align: center; color: var(--encre-douce); font-size: 12px; margin: 4px 0 8px; }

/* ---------- Boutons ---------- */

.btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  /* ressort doux : le bouton « respire » au relâchement */
  transition: transform .22s cubic-bezier(.34, 1.4, .5, 1), background .18s ease, box-shadow .2s ease;
  min-height: 48px;
}
.btn:active { transform: scale(.94); }

.btn-plein { background: var(--degrade); color: #fffdfc;
  box-shadow: 0 10px 22px -12px var(--lueur), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-plein:active { box-shadow: 0 6px 14px -10px var(--lueur), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-doux { background: linear-gradient(145deg, var(--accent-fond), color-mix(in srgb, var(--accent) 15%, var(--surface))); color: var(--accent);
  box-shadow: 0 6px 16px -13px var(--lueur); }
.btn-fantome { background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent) 6%, var(--surface))); color: var(--encre-douce); border-color: var(--ligne); }
.btn-danger { color: var(--danger); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions-solo { display: grid; }   /* un seul bouton, pleine largeur */

/* Santé est l'onglet d'accueil : on le veut sans scroll (hors cadre = oublié).
   Compaction douce, limitée à cet onglet pour ne pas serrer les autres. */
#vue-sante { gap: 11px; }
#vue-sante .carte { padding: 15px 18px; }
#vue-sante .compteur { padding: 11px 6px 10px; }
#vue-sante .entete { margin: 4px 0 2px; }

/* Rouage fixe en haut à droite : ouvre les réglages depuis n'importe quel onglet. */
.bouton-rouage {
  position: fixed; z-index: 6;
  top: calc(env(safe-area-inset-top) + 14px); right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--ligne); background: var(--surface); color: var(--encre-douce);
  font-size: 19px; line-height: 1; cursor: pointer; box-shadow: var(--ombre);
}
.bouton-rouage.cache { display: none; }   /* masqué quand on EST dans les réglages */

.btn-fermer {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 50%; border: 1px solid var(--ligne);
  background: transparent; color: var(--encre-douce);
  font-size: 17px; line-height: 1; cursor: pointer;
}

.btn-rond {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%; border: none;
  background: linear-gradient(145deg, var(--accent-fond), color-mix(in srgb, var(--accent) 15%, var(--surface))); color: var(--accent);
  box-shadow: 0 6px 16px -13px var(--lueur);
  font-size: 22px; line-height: 1; cursor: pointer;
}

/* ---------- Compteurs ---------- */

.compteurs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* ---------- Jauge d'eau ---------- */

.jauge { position: relative; height: 12px; border-radius: 999px; background: var(--ligne); }
.jauge-remplie {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--degrade); transition: width .55s cubic-bezier(.34, 1.2, .5, 1);
}
/* Repère discret : où tu devrais en être à cette heure-ci. */
.jauge-repere {
  position: absolute; top: -4px; height: 20px; width: 2px;
  background: var(--encre); opacity: .4; border-radius: 1px;
  transition: left .3s ease;
}
.eau-etat { margin: 0; font-size: 14px; color: var(--encre-douce); }
.eau-etat.atteint { color: var(--accent); }
/* Le seuil d'assise est franchi : la carte se signale sans crier. */
#carte-session.depasse { background: var(--accent-fond); border-color: transparent; }
.eau-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.eau-actions .btn-fantome { min-width: 58px; font-size: 20px; padding: 0; }

/* ---------- Chips (repas) ---------- */

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: transform .12s ease, border-color .2s ease, background .2s ease;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.chip:active { transform: scale(.96); }
.chip-icone { font-size: 19px; line-height: 1; }
.chip-nom { font-size: 12.5px; color: var(--encre-douce); }
.chip.coche { background: var(--accent-fond); border-color: var(--accent); }
.chip.coche .chip-nom { color: var(--accent); }

/* Carte repliable : on garde le titre + le compteur visibles, on replie le reste.
   Objectif « sans scroll » — hors cadre = oublié. */
.repliable-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; background: none; border: none; padding: 0; cursor: pointer; text-align: left;
}
.repliable-tete .carte-titre { margin: 0; flex: 1; }
.chevron { color: var(--encre-douce); font-size: 13px; transition: transform .2s ease; }
.carte-repliable.replie .repliable-corps { display: none; }
.carte-repliable:not(.replie) .chevron { transform: rotate(180deg); }

/* Médocs : pastilles qui s'adaptent à la longueur du nom, sur plusieurs lignes. */
/* Classe et non id : sinon la spécificité écrase le display:none du repli. */
.medocs-groupes { display: flex; flex-direction: column; gap: 14px; }
.medoc-groupe { display: flex; flex-direction: column; gap: 8px; }
.medoc-moment { margin: 0; font-size: 13px; color: var(--encre-douce); }
.chips-flow { display: flex; flex-wrap: wrap; }
.chips-flow .chip { flex-direction: row; padding: 10px 14px; }
.chips-flow .chip-nom { font-size: 14px; color: var(--encre); }
.chips-flow .chip.coche .chip-nom { color: var(--accent); }

/* Annotations sous le graphe du journal. */
#journal-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.note-item { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; }
.note-item b { flex: 0 0 auto; color: var(--accent); font-weight: 600; }
.note-item span { color: var(--encre-douce); }

.compteur {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
  transition: transform .12s ease, border-color .2s ease;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;   /* sinon iOS ouvre son menu sur l'appui long */
}
.compteur:active { transform: scale(.96); }
.compteur.atteint { border-color: var(--accent); }
.compteur-icone { font-size: 19px; }
.compteur-valeur { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.compteur-nom { font-size: 11px; color: var(--encre-douce); }

/* ---------- Hyperfocus ---------- */

#carte-focus { background: var(--accent-fond); border-color: transparent; align-items: center; text-align: center; }
.focus-titre { margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.focus-reste { margin: 0; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Tâches ---------- */

.taches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.taches:empty { display: none; }

.tache { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.tache + .tache { border-top: 1px solid var(--ligne); }
.tache-case {
  width: 24px; height: 24px; flex: 0 0 24px;
  border: 1.5px solid var(--ligne); border-radius: 8px;
  background: transparent; cursor: pointer; padding: 0;
  display: grid; place-items: center; font-size: 13px; color: transparent;
}
.tache.faite .tache-case { background: var(--accent); border-color: var(--accent); color: #fffdfc; }
.tache-texte { flex: 1; font-size: 15px; }
.tache.faite .tache-texte { color: var(--encre-douce); text-decoration: line-through; }
.tache-suppr { background: none; border: none; color: var(--encre-douce); font-size: 18px; cursor: pointer; padding: 4px 6px; }

.tache-ajout { display: flex; gap: 10px; align-items: center; }
.tache-ajout input {
  flex: 1; min-width: 0;
  background: var(--fond); border: 1px solid var(--ligne);
  border-radius: 12px; padding: 12px 14px;
}
.tache-ajout input::placeholder { color: var(--encre-douce); }
.tache-ajout input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ---------- Détente ---------- */

.detente { margin: 0; font-size: 16px; line-height: 1.55; color: var(--encre); }
.detente-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Muscu ---------- */

.muscu { display: flex; align-items: center; gap: 10px; }
.muscu i {
  flex: 1; height: 9px; border-radius: 999px;
  background: var(--ligne); transition: background .3s ease, transform .3s cubic-bezier(.34, 1.5, .5, 1);
}
.muscu i.ok { background: var(--degrade); }
/* au-delà de l'objectif : les bonus, dans une teinte à part + une petite lueur « récompense » */
.muscu i.bonus { background: var(--degrade-bonus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--humeur) 22%, transparent); }
.pts-plus { flex: none; align-self: center; font-size: 12px; font-weight: 600;
  color: var(--accent); font-variant-numeric: tabular-nums; }
.pts-plus.discret { color: var(--encre-douce); font-weight: 500; }

/* ---------- Journal ---------- */

.echelle { display: flex; flex-direction: column; gap: 8px; }
.echelle-nom { margin: 0; font-size: 14px; font-weight: 500; }
.echelle-boutons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.echelle-boutons button {
  border: 1px solid var(--ligne); background: transparent;
  border-radius: 12px; padding: 13px 0; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.echelle-boutons button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fffdfc; }

#graphe svg { width: 100%; height: auto; display: block; }
.legende { display: flex; gap: 16px; font-size: 12.5px; color: var(--encre-douce); }
/* Pastilles en classes plutôt qu'en style="" : la CSP interdit les styles inline. */
.legende i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.legende .p-energie { background: var(--energie); }
.legende .p-douleur { background: var(--douleur); }
.legende .p-humeur { background: var(--humeur); }

/* ---------- Réglages ---------- */

.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segments button {
  border: 1px solid var(--ligne); background: transparent;
  border-radius: 12px; padding: 13px 0; cursor: pointer;
}
.segments button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fffdfc; }

.ligne { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 15px; }
.ligne input[type="text"] { width: 160px; text-align: left; }
.ligne input {
  width: 82px; text-align: center;
  background: var(--fond); border: 1px solid var(--ligne);
  border-radius: 12px; padding: 11px 8px;
}

.champ { display: flex; flex-direction: column; gap: 7px; }
.champ > label { font-size: 13.5px; color: var(--encre-douce); }
.champ-compte { margin: -2px 2px 0; font-size: 12px; color: var(--encre-douce); }

.ajout-rapide { display: flex; gap: 10px; align-items: center; }
.ajout-rapide input {
  flex: 1; min-width: 0;
  background: var(--fond); border: 1px solid var(--ligne);
  border-radius: 12px; padding: 12px 14px;
}
.ajout-rapide input::placeholder { color: var(--encre-douce); }
.ajout-rapide input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.champ textarea {
  width: 100%; resize: vertical; min-height: 96px;
  background: var(--fond); border: 1px solid var(--ligne);
  border-radius: 12px; padding: 12px 14px;
  font: inherit; line-height: 1.5;
  color: var(--encre);                 /* explicite : ceinture et bretelles */
  -webkit-text-fill-color: var(--encre); /* Safari iOS ignore parfois `color` seul */
}
.champ textarea::placeholder { color: var(--encre-douce); }
.champ textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

#bloc-restauration { display: flex; flex-direction: column; gap: 10px; }
#bloc-restauration textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.fichier { display: block; text-align: center; }   /* un <label> qui a l'allure d'un bouton */

/* ---------- Onglets ---------- */

.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--ligne);
  padding-bottom: env(safe-area-inset-bottom);
}
.onglets button {
  background: none; border: none; cursor: pointer;
  padding: 11px 0 9px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; color: var(--encre-douce);
}
.onglets button span { font-size: 19px; line-height: 1; }
.onglets button.actif { color: var(--accent); }

/* ---------- Feuille de choix ---------- */

.feuille { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; }
.feuille-fond { position: absolute; inset: 0; background: rgba(30, 24, 28, .38); }
.feuille-corps {
  position: relative; width: 100%; max-width: 560px; margin: 0 auto;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  animation: monte .26s cubic-bezier(.2, .8, .3, 1);
}
@keyframes monte { from { transform: translateY(100%); } }
.poignee { width: 38px; height: 4px; border-radius: 999px; background: var(--ligne); margin: 0 auto 6px; }

.choix-pauses { display: flex; flex-direction: column; gap: 8px; }
.choix-pause {
  display: flex; align-items: center; gap: 14px;
  background: var(--fond); border: 1px solid var(--ligne);
  border-radius: 14px; padding: 15px 16px; cursor: pointer; text-align: left;
}
.choix-pause b { font-weight: 500; font-size: 15.5px; }
.choix-pause em { font-style: normal; color: var(--encre-douce); font-size: 13.5px; margin-left: auto; }
.choix-pause span:first-child { font-size: 21px; }

/* ---------- Séance guidée ---------- */

.seance {
  position: fixed; inset: 0; z-index: 30;
  background: var(--fond);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px 28px calc(32px + env(safe-area-inset-bottom)); text-align: center;
}
.seance-fermer {
  position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 18px;
  background: none; border: none; font-size: 22px; color: var(--encre-douce); cursor: pointer; padding: 8px;
}
.seance-compte { margin: 0; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.seance-anneau { position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.seance-anneau svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau-fond { fill: none; stroke: var(--ligne); stroke-width: 5; }
.anneau-jauge {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1s linear;
}
.seance-secondes { font-size: 46px; font-weight: 300; font-variant-numeric: tabular-nums; }
.seance-label { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.seance-detail { margin: 0; max-width: 22em; color: var(--encre-douce); font-size: 15.5px; line-height: 1.55; }

/* ---------- Guide muscu ---------- */

.muscu-player {
  position: fixed; inset: 0; z-index: 30;
  background: var(--fond);
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom));
}
.muscu-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.muscu-tete .seance-fermer { position: static; padding: 4px 8px 4px 0; }
.muscu-progres { flex: 1; height: 6px; border-radius: 999px; background: var(--ligne); }
.muscu-progres-remplie { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .35s ease; }

.muscu-corps { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.muscu-surtitre { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.muscu-serie { margin: 0 0 8px; font-size: 14px; color: var(--accent); font-weight: 600; }
.muscu-titre { margin: 0 0 14px; font-size: 27px; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; }
.muscu-aide { margin: 0 0 14px; color: var(--encre-douce); font-size: 14.5px; line-height: 1.5; }

.muscu-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.muscu-badge {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: 999px; padding: 8px 15px; font-size: 15px; font-weight: 500;
}
.muscu-badge-charge { background: var(--accent-fond); border-color: transparent; color: var(--accent); }
.muscu-badge:empty { display: none; }

.muscu-voir { width: 100%; margin-bottom: 14px; }
.muscu-technique { display: flex; flex-direction: column; gap: 12px; }
.muscu-technique p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--encre); }
.muscu-technique b { color: var(--encre-douce); font-weight: 600; }
.muscu-pieges { padding: 12px 14px; background: var(--accent-fond); border-radius: 12px; }

.muscu-ech { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.muscu-ech li { padding: 12px 0; }
.muscu-ech li + li { border-top: 1px solid var(--ligne); }
.muscu-ech b { display: block; font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.muscu-ech span { color: var(--encre-douce); font-size: 14px; line-height: 1.5; }

.muscu-repos-temps { margin: 24px 0 10px; font-size: 56px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muscu-regle {
  margin: 22px 0 0; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px;
  font-size: 14.5px; line-height: 1.55; color: var(--encre-douce);
}

#muscu-notes {
  width: 100%; resize: vertical; min-height: 84px;
  background: var(--fond); border: 1px solid var(--ligne); border-radius: 12px;
  padding: 12px 14px; font: inherit; line-height: 1.5;
  color: var(--encre); -webkit-text-fill-color: var(--encre);
}
#muscu-notes:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.muscu-pied { display: flex; gap: 10px; padding-top: 16px; }
.muscu-pied .btn { flex: 1; }
.muscu-pied .btn-fantome { flex: 0 0 auto; min-width: 96px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; z-index: 40;
  left: 50%; transform: translateX(-50%);
  bottom: calc(92px + env(safe-area-inset-bottom));
  background: var(--encre); color: var(--fond);
  padding: 12px 20px; border-radius: 999px;
  font-size: 14.5px; max-width: min(88vw, 420px); text-align: center;
  animation: apparait .22s ease;
}
@keyframes apparait { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Célébration : pulsation d'un liseré accent + très léger gonflement. Plus
   visible qu'avant (tu l'avais à peine remarquée) mais toujours calme, lente,
   une seule fois — profil HSP, rien de vif. */
@keyframes celebre {
  0% { box-shadow: var(--ombre); border-color: var(--ligne); transform: scale(1); }
  30% { box-shadow: 0 0 0 4px var(--accent-fond), 0 16px 40px var(--lueur); border-color: var(--accent); transform: scale(1.035); }
  55% { transform: scale(.992); }
  100% { box-shadow: var(--ombre); border-color: var(--ligne); transform: scale(1); }
}
.celebre { animation: celebre 1.1s cubic-bezier(.34, 1.3, .5, 1); }

/* Pop : micro-retour visuel à chaque interaction (verre ajouté, case cochée…).
   Rebond léger — juste de quoi sentir que le geste a « pris », sans être vif. */
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  70% { transform: scale(.96); }
  100% { transform: scale(1); }
}
.pop { animation: pop .4s cubic-bezier(.34, 1.56, .64, 1); }

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