/* Humeur v2 (échantillon validé 02/12). Même cadre que la Boutique (.sv-shop) : haut 76 px, fond crème, marges ≥ 12 px. */
.sv.sv-humeur { background: var(--c); }
.sv-humeur .hm-scene { position: relative; flex: none; height: 176px; overflow: hidden; border-bottom: 2px solid var(--t2); background: var(--co); image-rendering: pixelated; }
.sv-humeur .hm-scene canvas { max-width: none; }
.sv-humeur .sc-piece { z-index: 0; } .sv-humeur .sc-tapis { z-index: 1; } .sv-humeur .sc-pet { z-index: 2; }
.sv-humeur .hm-bulle { position: absolute; left: 8px; right: 8px; top: 6px; min-height: 64px; z-index: 2; pointer-events: none; }
.sv-humeur .hm-bulle::before { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-image: var(--i-bulle) 18 18 23 18 fill / 36px 36px 46px repeat; image-rendering: pixelated; }
.sv-humeur .hm-bulle p { position: relative; margin: 0; padding: 12px 20px 18px; min-height: 64px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 16px/1.25 "Familjen Grotesk", sans-serif; color: var(--t); overflow-wrap: anywhere; }
/* Sous la scène : la pièce de l'animal voilée en crème (même fond que les pages du carnet). */
.sv-humeur .hm-zone { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--c); }
.sv-humeur .cn-fond-piece { z-index: 0; }
.sv-humeur .hm-voile { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(255, 247, 228, .72), rgba(255, 247, 228, .6)); }
.sv-humeur .hm-milieu { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; background: transparent; }
.sv-humeur .hm-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 12px; box-sizing: border-box; background: transparent; overflow-y: auto; overflow-x: hidden; }
.sv-humeur .hm-corps[hidden] { display: none; }
.sv-humeur .hm-corps::-webkit-scrollbar { width: 12px; }
.sv-humeur .hm-corps::-webkit-scrollbar-track { background: var(--co); }
.sv-humeur .hm-corps::-webkit-scrollbar-thumb { background: var(--j); border: 2px solid var(--t2); border-radius: 99px; min-height: 32px; }
.sv-humeur .hm-q { margin: 0; text-align: center; font: 800 20px/24px "Familjen Grotesk", sans-serif; color: var(--t); }
.sv-humeur .hm-note { margin: 0; text-align: center; font-size: 15px; line-height: 18px; color: var(--d); }
.sv-humeur .hm-note[hidden], .sv-humeur .hm-aide[hidden] { display: none; }
.sv-humeur .hm-intro { color: var(--t); font-size: 16px; }
.sv-humeur .hm-sous { margin-top: 4px; font-weight: 700; color: var(--t); }
.sv-humeur .hm-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sv-humeur .hm-m, .sv-humeur .hm-o { appearance: none; font-family: inherit; color: var(--t); cursor: pointer; border: 3px solid var(--t2); border-radius: 16px; background: var(--p); box-shadow: inset 0 -3px 0 var(--c), 0 3px 0 #1e0f0a40; font-weight: 700; }
.sv-humeur .hm-m { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 4px 2px 6px; font-size: 15px; line-height: 17px; min-width: 0; }
.sv-humeur .hm-m img { width: 64px; height: 64px; image-rendering: pixelated; }
.sv-humeur .hm-o img { width: 48px; height: 48px; image-rendering: pixelated; }
.sv-humeur .hm-m[aria-checked="true"] { background: #FFF3C4; box-shadow: 0 0 0 3px var(--j), inset 0 -3px 0 var(--c); }
.sv-humeur .hm-m:hover, .sv-humeur .hm-o:hover { background: var(--jc); }
.sv-humeur .hm-m:active, .sv-humeur .hm-o:active { transform: translateY(2px); box-shadow: none; }
.sv-humeur .hm-o { display: grid; grid-template-columns: 64px 1fr; column-gap: 10px; align-items: center; text-align: left; min-height: 76px; padding: 6px 12px 8px 8px; }
.sv-humeur .hm-o img { justify-self: center; grid-row: 1 / 3; }
.sv-humeur .hm-o b { font-size: 18px; line-height: 21px; align-self: end; }
.sv-humeur .hm-o span { font-weight: 400; font-size: 15px; line-height: 18px; align-self: start; }
.sv-humeur .hm-liste { display: grid; gap: 8px; }
.sv-humeur .hm-calme { flex: none; align-self: center; min-height: 44px; padding: 2px 18px 3px; border: 2px solid var(--ct, var(--d)); border-radius: 99px; background: transparent; font: 700 15px/1.2 "Familjen Grotesk", sans-serif; color: var(--t); cursor: pointer; }
.sv-humeur .hm-calme:hover { background: var(--jc); }
.sv-humeur .hm-aide { margin: auto 0 0; text-align: center; font-size: 14px; line-height: 18px; color: var(--d); }
.sv-humeur .hm-aide b { color: var(--t); border-bottom: 2px solid var(--ct, var(--d)); }
.sv-humeur .hm-resp { position: relative; flex: 1; min-height: 260px; display: grid; place-items: center; }
.sv-humeur .hm-consigne { position: absolute; bottom: 6px; left: 0; right: 0; }
.sv-humeur .hm-rond { width: 200px; height: 200px; border-radius: 50%; border: 4px solid var(--t2); background: var(--j); box-shadow: inset 0 -10px 0 var(--jo), 0 0 0 14px var(--jc), 0 0 0 18px var(--j); animation: hm-gonfle 8s ease-in-out infinite; }
.sv-humeur .hm-rond.fixe { animation: none; transform: scale(.62); transition: none; }
.sv-humeur .hm-rond.fixe.plein { transform: scale(1); }
@keyframes hm-gonfle { 0%, 100% { transform: scale(.62); } 50% { transform: scale(1); } }
.sv-humeur .hm-fin { flex: none; align-self: center; min-height: 48px; padding: 0 22px 2px; border: 2px solid var(--t2); border-radius: 99px; background: var(--j); box-shadow: inset 0 -3px 0 var(--jo), 0 3px 0 #1e0f0a40; font: 700 17px/1 "Familjen Grotesk", sans-serif; color: var(--t); cursor: pointer; }
.sv-humeur .hm-fin:hover { background: var(--jc); }
.sv-humeur .hm-fin:active { transform: translateY(2px); box-shadow: none; }
.sv-humeur textarea { box-sizing: border-box; width: 100%; padding: 10px 12px; border: 3px solid var(--t2); border-radius: 14px; background: var(--p); color: var(--t); font: 400 16px/20px "Familjen Grotesk", sans-serif; resize: none; }
.sv-humeur .hm-passe { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sv-humeur .hm-mot { display: grid; gap: 2px; padding: 8px 12px; border: 2px solid var(--co); border-radius: 14px; background: var(--p); color: var(--t); font-size: 15px; line-height: 18px; overflow-wrap: anywhere; }
.sv-humeur .hm-mot small { color: var(--d); font-size: 14px; }
.sv-humeur .hm-mot.vide { color: var(--d); text-align: center; }
.sv-humeur button:focus-visible, .sv-humeur textarea:focus-visible { outline: 3px solid var(--foc, #B8402A); outline-offset: 2px; }
@media (max-width: 419px) { .sv-humeur .hm-m img { width: 56px; height: 56px; } .sv-humeur .hm-grille { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .sv-humeur .hm-rond { animation: none; transform: scale(.8); } }
.sv-humeur .nr-lu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Texte posé sur la scène de l'animal : petite carte crème (comme les notes du carnet). */
.sv-humeur .hm-note, .sv-humeur .hm-q { align-self: center; padding: 3px 12px 4px; border-radius: 12px; background: #FFF7E4d9; }
/* ───────── ECRANS (03/12, A6 A17) : boutons pastille DA partout, « Valider », message propre à chaque humeur ───────── */
.sv-humeur .hm-fin.hm-ph { background: var(--p); box-shadow: inset 0 -3px 0 var(--c), 0 3px 0 #1e0f0a40; }
.sv-humeur .hm-fin.hm-ph:hover { background: var(--jc); }
.sv-humeur .hm-fin:disabled { background: var(--co); border-color: var(--t2); box-shadow: inset 0 3px 0 #1e0f0a1f; color: var(--t); cursor: default; opacity: 1; } /* revue 03/12 #1 : bouton enfoncé mais lisible (plus de voile) */
.sv-humeur .hm-fin:disabled:hover { background: var(--co); }
.sv-humeur .hm-choisie { color: var(--t); font-weight: 700; }
.sv-humeur .hm-merci { margin: 0; padding: 12px 16px 14px; border: 2px solid var(--t2); border-radius: 16px; background: var(--p); box-shadow: inset 0 -3px 0 var(--c), 0 2px 0 #1e0f0a40; text-align: center; font: 400 17px/22px "Familjen Grotesk", sans-serif; color: var(--t); overflow-wrap: anywhere; }
.sv-humeur .hm-fin[hidden] { display: none; }
.sv-humeur .hm-note, .sv-humeur .hm-q { border: 2px solid var(--t2); background: var(--p); }
.sv-humeur .hm-q { padding: 6px 14px 7px; }
.sv-humeur .hm-note:not(.hm-choisie):not(.hm-intro) { color: var(--t); }
.sv-humeur .hm-m { min-height: 88px; }
.sv-humeur [data-vue="choix"] { gap: 6px; }
@media (max-height: 660px) {
  .sv-humeur .hm-m { min-height: 74px; gap: 2px; } .sv-humeur .hm-m img { width: 44px; height: 44px; }
  .sv-humeur .hm-corps { padding: 8px 14px 10px; gap: 6px; }
  .sv-humeur .hm-q { font-size: 18px; line-height: 20px; padding: 3px 12px 4px; }
  .sv-humeur .hm-fin { min-height: 42px; }
}

/* E2 (04/12), retour l’auteur : « plus grand », compagnon au milieu et loin de la ligne, il réagit à l'humeur.
   La scène passe à 232 px (pieds à 200, cf. mood.js) ; la fenêtre est plus haute, donc plus de réduction sur téléphone.
   §0e : la question est une étiquette (petites capitales, pas une pilule), l'aide est un texte simple, « Valider » un rectangle pleine largeur. */
.sv-humeur .hm-scene { height: 232px; }
.sv-humeur .hm-m { min-height: 116px; padding-left: 2px; padding-right: 2px; font-size: 14px; line-height: 18px; overflow-wrap: normal; word-break: keep-all; }
.sv-humeur .hm-m img { width: 64px; height: 64px; }
.sv-humeur [data-vue="choix"] { gap: 10px; }
.sv-humeur [data-vue="choix"] .hm-q { align-self: flex-start; margin: 2px 0 0 2px; padding: 1px 9px 2px; border-radius: 99px; font: 800 13px/16px "Familjen Grotesk", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--d); border: 0; background: #FFF7E4d9; }
.sv-humeur .hm-choisie { align-self: stretch; padding: 0; border: 0; background: transparent; border-radius: 0; font-size: 15px; }
.sv-humeur .hm-fin { align-self: stretch; border-radius: var(--rayon-bouton, 12px); }
@media (max-width: 419px) { .sv-humeur .hm-m { min-height: 116px; } .sv-humeur .hm-m img { width: 64px; height: 64px; } }
/* E2 04/12, retour l’auteur (« l'encart est vraiment très petit », « petites bulles de conversation ») : scène 300 px, compagnon ×3
   (son dessin ×2 agrandi 1,5 fois : pixels entiers), il parle dans une petite bulle de BD près de sa tête (css/bulle-bd.css). */
.sv-humeur .hm-scene { height: 300px; }
.sv-humeur .hm-scene .sc-pet, .sv-humeur .hm-scene .sc-tapis { transform: scale(1.5); transform-origin: 50% 100%; }
.sv-humeur .hm-scene .bd-bulle { z-index: 4; }
/* E2 04/12 (coordinateur : « trou vide sous Valider », le défaut refusé sur l'accueil) : la grille prend la hauteur libre
   (les tuiles grandissent), « Valider » est collé au bas avec 12 px de marge, à toute hauteur de fenêtre. */
.sv-humeur [data-vue="choix"] .hm-grille { flex: 1 0 auto; grid-auto-rows: 1fr; }
.sv-humeur [data-vue="choix"] .hm-m { min-height: 116px; height: 100%; box-sizing: border-box; }
.sv-humeur [data-vue="choix"] { padding-bottom: 12px; }
@media (max-height: 660px) { .sv-humeur [data-vue="choix"] .hm-m { min-height: 74px; } }
/* E2 04/12 (coordinateur) : fenêtre basse (470×520) : la scène rétrécit pour que les 6 humeurs et « Valider » tiennent sans défiler.
   Le décor et lui descendent de --hm-dy (pieds toujours en bas), lui seul se décale de --hm-dx (mood.js, viser). */
.sv-humeur .hm-scene > canvas { translate: 0 var(--hm-dy, 0px); }
.sv-humeur .hm-scene > canvas.sc-pet, .sv-humeur .hm-scene > canvas.sc-tapis { translate: var(--hm-dx, 0px) var(--hm-dy, 0px); }
@media (max-height: 600px) {
  .sv-humeur .hm-scene { height: auto; flex: 1 1 0; min-height: 150px; }
  .sv-humeur .hm-zone { flex: 0 1 auto; }
  .sv-humeur [data-vue="choix"] { gap: 6px; padding: 8px 12px 10px; }
  .sv-humeur [data-vue="choix"] .hm-grille { flex: none; grid-auto-rows: auto; gap: 6px; }
  .sv-humeur [data-vue="choix"] .hm-m { min-height: 52px; height: auto; gap: 1px; padding: 3px 2px 4px; }
  .sv-humeur [data-vue="choix"] .hm-m img { width: 28px; height: 28px; }
  /* l'aide sous la grille reste lue (role=status) mais ne prend plus de place : « Valider » dit déjà quoi faire */
  .sv-humeur [data-vue="choix"] .hm-choisie { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sv-humeur [data-vue="choix"] .hm-fin { min-height: 40px; }
}
