/* Style Nomki : planche v4 validée par l’auteur (identite/ui/00-planche-de-style). Cadres en image (1 pixel = 2 px), boutons en CSS.
   Les anciens jetons (--c-...) sont rebranchés ici sur les couleurs de l'animal : tous les écrans changent d'habit sans changer de contenu. */
@font-face { font-family: "Familjen Grotesk"; src: url("../assets/fonts/FamiljenGrotesk-VF.ttf"); font-weight: 400 700; }
:root, [data-animal] {
  --ct: color-mix(in srgb, var(--d) 55%, var(--jo)); /* contour clair des pilules, validé par l’auteur (02/12) */
  --ok: #33734A; --err: #A52A3B; --err-fond: #FDE6E0; --foc: #B8402A; --ina: #EFE2CE; --ina-t: #6F543D; --ina-b: #AE9272;
  --c-screen: var(--p); --c-screen-2: var(--p); --c-ink: var(--t); --c-ink-2: var(--d); --c-line: var(--co); --c-line-strong: var(--ct);
  --c-card: var(--c); --c-card-2: var(--p); --c-band: var(--j); --c-lcd-off: transparent; --c-accent: var(--j); --c-accent-ink: var(--t);
  --c-good: var(--ok); --c-warn: var(--t); --c-star: var(--t); --c-focus: var(--foc); --c-focus-halo: #FFF8EA;
  --c-page: #F6E7CF; --c-page-ink: var(--t); --c-page-ink-2: var(--d);
  --bw: 3px; --r-lcd: 14px; --r-s: 14px; --r-m: 20px; --r-l: 20px;
}
:root {
  color-scheme: light;
  --font-display: "Familjen Grotesk", sans-serif; --font-body: "Familjen Grotesk", sans-serif; --font-ui: var(--font-body); --font-mono: var(--font-body);
  --fs-xs: .9375rem; --fs-s: .9375rem; --fs-m: 1.125rem; --fs-l: 1.125rem; --fs-xl: 1.5rem; --fs-xxl: 1.5rem;
}
:root[data-theme] { color-scheme: light; }
html { font-size: 16px !important; font-weight: 600; }
:root[data-bigtext="on"] { font-size: 19px !important; }

/* icônes 24 px : x1 ou x2, jamais entre les deux */
.ni { display: inline-grid; width: 24px; height: 24px; flex: none; }
.ni.x2 { width: 48px; height: 48px; }
.ni img { grid-area: 1 / 1; display: block; max-width: none; image-rendering: pixelated; }
.ni .survol { visibility: hidden; }
button:hover:not(:disabled):not([aria-disabled="true"]) .ni .survol, button:focus-visible .ni .survol { visibility: visible; }
button:hover:not(:disabled):not([aria-disabled="true"]) .ni .normal, button:focus-visible .ni .normal { visibility: hidden; }

/* cadres */
.nk-cad { position: absolute; inset: 0; z-index: 0; border: 2px solid transparent; image-rendering: pixelated; border-image-repeat: repeat; pointer-events: none; border-image-source: var(--i-fen); border-image-slice: 18 18 23 18 fill; border-image-width: 36px 36px 46px; }
.nk-o { position: absolute; z-index: -1; display: block; background-size: 100% 100%; image-rendering: pixelated; pointer-events: none; }
.nk-o.dt { transform: scaleX(-1); }
.nk-o.av { z-index: 2; }
.nk-tete { display: inline-block; flex: none; border: 2px solid var(--t2); border-radius: 99px; background-color: var(--c); background-size: 128px 128px; background-repeat: no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 4px var(--p), 0 0 0 6px var(--t2), 0 8px 0 1px #1e0f0a33; }

/* fenêtre : 340 x 460 au plus */
.nk-carte { position: relative; isolation: isolate; box-sizing: border-box; width: 340px; max-width: calc(100vw - 16px); padding: 10px 10px 27px; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; color: var(--t); font: 600 18px/1.35 var(--font-ui); }
.nk-carte > :not(.nk-cad):not(.nk-o) { position: relative; z-index: 1; }
.nk-entete { display: flex; align-items: center; gap: 12px; height: 76px; padding: 0 10px; border-bottom: 2px solid var(--ct); border-radius: 22px 22px 0 0; background: var(--j) var(--i-entete) 0 100% / 336px 88px; image-rendering: pixelated; }
.nk-entete .nk-tete { transform: scale(.88); margin-right: 2px; }
.nk-entete div { flex: 1; min-width: 0; }
.nk-entete strong { display: block; font: 700 24px/1.15 var(--font-display); overflow-wrap: anywhere; }
.nk-entete small { display: inline-block; margin-top: 3px; padding: 1px 10px 2px; border: 2px solid var(--ct); border-radius: 99px; background: var(--p); box-shadow: inset 0 -2px 0 var(--c); font-size: 15px; line-height: 1.3; }

/* boutons : 48 px, rond 44, pastille 94 x 78 */
.nk-b, .nk-carte .dp-close, .desk-back button, .nk-carte .lc-main {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 2px 18px 6px; border: 3px solid var(--ct); border-radius: 99px; color: var(--t);
  background: var(--p); box-shadow: inset 0 3px 0 #fff, inset 0 -5px 0 var(--c), 0 4px 0 #1e0f0a40; font: 700 18px/1.15 var(--font-ui); cursor: pointer; transition: transform .12s, background .12s;
}
.nk-b.p, .nk-carte .lc-main { background: var(--j); box-shadow: inset 0 3px 0 var(--jc), inset 0 -5px 0 var(--jo), 0 4px 0 #1e0f0a40; }
.nk-b:hover, .nk-carte .dp-close:hover, .desk-back button:hover { transform: translateY(-2px); background: var(--c); box-shadow: inset 0 3px 0 #fff, inset 0 -5px 0 var(--co), 0 6px 0 #1e0f0a40; }
.nk-b.p:hover, .nk-carte .lc-main:hover { background: var(--jc); box-shadow: inset 0 3px 0 var(--p), inset 0 -5px 0 var(--j), 0 6px 0 #1e0f0a40; }
.nk-b:active, .nk-carte .dp-close:active, .desk-back button:active { transform: translateY(3px); padding: 5px 18px 3px; background: var(--co); box-shadow: inset 0 4px 0 #1e0f0a1f, 0 1px 0 #1e0f0a40; }
.nk-b.p:active, .nk-carte .lc-main:active { background: var(--jo); box-shadow: inset 0 4px 0 #1e0f0a2b, 0 1px 0 #1e0f0a40; }
.nk-rond { appearance: none; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 3px solid var(--ct); border-radius: 50%; background: var(--p); box-shadow: inset 0 -3px 0 var(--c), 0 3px 0 #1e0f0a40; color: var(--t); cursor: pointer; transition: transform .12s, background .12s; }
.nk-rond:hover { transform: translateY(-2px); background: var(--jc); box-shadow: inset 0 -3px 0 var(--j), 0 5px 0 #1e0f0a40; }
.nk-rond:active { transform: translateY(3px); background: var(--j); box-shadow: inset 0 3px 0 #1e0f0a2b; }
.nk-t { appearance: none; display: inline-grid; grid-template-rows: 46px 18px; justify-items: center; align-content: center; width: 94px; height: 78px; padding: 0 0 6px; border: 3px solid var(--ct); border-radius: 18px; color: var(--t); background: var(--pc); box-shadow: inset 0 3px 0 var(--pl), inset 0 -5px 0 var(--po), 0 4px 0 #1e0f0a40; font: 700 15px/18px var(--font-ui); cursor: pointer; transition: transform .12s, background .12s; }
.nk-t .ni { margin-top: -1px; }
.nk-t:hover:not([aria-disabled="true"]) { transform: translateY(-2px); background: var(--pl); box-shadow: inset 0 3px 0 #fff, inset 0 -5px 0 var(--pc), 0 6px 0 #1e0f0a40; }
.nk-t:active:not([aria-disabled="true"]) { transform: translateY(3px); background: var(--po); box-shadow: inset 0 4px 0 #1e0f0a2b; }
.nk-t[aria-disabled="true"] { cursor: default; background: var(--ina); color: var(--ina-t); border: 3px dashed var(--ina-b); box-shadow: none; }
.nk-t[aria-disabled="true"] .ni { opacity: .45; }
.nk-t.f { --pc: var(--j); --pl: var(--jc); --po: var(--jo); }
.nk-t.nourrir { --pc: #FBD3C1; --pl: #FFE6DB; --po: #F0B298; }
.nk-t.jouer { --pc: #CBE0B6; --pl: #E1F0D3; --po: #A9C78F; }
.nk-t.habiller { --pc: #FBE3A1; --pl: #FFF2CC; --po: #E9C770; }
.nk-t.travailler { --pc: #C6DDEC; --pl: #E0EEF7; --po: #9CC0D8; }
.nk-t.balade { --pc: #D9CBEB; --pl: #EAE1F5; --po: #B9A3D6; }
.nk-t.carnet { --pc: #F8C9CC; --pl: #FDE3E4; --po: #E79AA0; }
.nk-b:focus-visible, .nk-rond:focus-visible, .nk-t:focus-visible, .nk-carte .dp-close:focus-visible, .desk-back button:focus-visible, .nk-carte .dp-chip:focus-visible, .nk-carte [role="tab"]:focus-visible, .nk-curs:focus-visible { outline: 3px solid var(--foc); outline-offset: 2px; box-shadow: 0 0 0 2px #FFF8EA, 0 0 0 8px #FFF8EA; border-radius: 99px; }
.nk-t:focus-visible { border-radius: 18px; }

/* menu du compagnon (environ 458 px avec la houppette) */
.nk-ami { display: grid; grid-template-columns: repeat(3, 94px); justify-content: space-between; align-items: center; margin: 9px 9px 0; padding-bottom: 10px; border-bottom: 3px dotted var(--co); }
.nk-ami[hidden] { display: none; }
.nk-ami p { margin: 0; text-align: center; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.nk-ami .nk-tete { display: block; margin: 5px auto 8px; }
.nk-six { display: grid; grid-template-columns: repeat(3, 94px); justify-content: space-between; gap: 8px 0; margin: 12px 9px 0; }
.nk-pied { display: flex; align-items: center; gap: 10px; padding: 12px 9px 0; }
#m-multi { justify-content: center; width: calc(100% - 18px); margin: 10px 9px 0; }
.nk-cpt { display: flex; align-items: center; gap: 8px; height: 40px; margin-right: auto; padding: 0 14px 0 10px; border: 2px solid var(--ct); border-radius: 99px; background: var(--c); line-height: 1; }

/* curseur : rail de l'animal, sa tête sert de poignée */
.nk-curs { appearance: none; width: 100%; height: 44px; margin: 0; background: none; border: 0; border-radius: 99px; cursor: pointer; }
.nk-curs::-webkit-slider-runnable-track { height: 24px; border: 2px solid transparent; border-image: var(--i-rail) 6 10 6 10 fill / 12px 20px; image-rendering: pixelated; }
.nk-curs::-webkit-slider-thumb { appearance: none; width: 48px; height: 48px; margin-top: -14px; border: 2px solid var(--ct); border-radius: 50%; background: var(--p) var(--i-tete) 50% 35% / 64px 64px no-repeat; image-rendering: pixelated; box-shadow: inset 0 -4px 0 var(--co), 0 4px 0 #1e0f0a40; }
.nk-curs:hover::-webkit-slider-thumb { background-color: var(--jc); }
.nk-curs:active::-webkit-slider-thumb { background-color: var(--c); }


/* démo : règles qui étaient en <style> (CSP sans style en ligne) */
.ho-fermer{display:none!important}
html.demo-hero mm-pet{opacity:0!important;visibility:hidden!important}
html.demo-hero .ho-bulle,html.demo-hero .ho-pensee{visibility:hidden!important}
html.demo-integree,html.demo-integree body,html.demo-integree body.app-body{background:transparent!important;color-scheme:light!important}
/* démo : sur l'accueil, la scène défile avec le reste (sinon elle reste fixe et coupe « Soins du jour » quand on descend vers Sorties) ; en-tête et barre du bas restent en place */
.sv-home{overflow-y:auto!important;overflow-x:hidden!important}
.sv-home .ho-tete{position:sticky!important;top:0;z-index:6}
.sv-home .ho-mi{flex:none!important;overflow:visible!important;min-height:auto!important}
.sv-home .ho-nav{position:sticky!important;bottom:0;z-index:6;margin-top:auto}
