/*! Corsaires ! — © 2026, Chrysopam — tous droits réservés */
.bete-chien { position: absolute; z-index: 3; aspect-ratio: 220 / 198; pointer-events: none; transform-origin: 50% 100%; }
.bete-chien.mire { transform: scaleX(-1); }
.bete-chien > i { position: absolute; inset: 0; background: url(interface/bete_chien_anim.png?v=5bc8de1d) 0 0 / 2900% 200% no-repeat;
  background-position-x: calc(var(--k, 0) * 100% / 28); background-position-y: 0; transform-origin: 50% 96%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); }
.bete-chien.vieux > i { background-position-y: 100%; }
.bete-chien.nuit > i { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5)) brightness(.74) saturate(.88); }
.bete-chien.vivant { pointer-events: auto; cursor: var(--c-main, pointer); }
.bete-chien.respire:not(.anim) > i { animation: bta-souffle 4.2s step-end infinite; }
.bete-chien.respire.yeux:not(.anim) > i { animation-name: bta-souffle-yeux; }
.bete-chien.dort:not(.anim) > i { animation: bta-dort 5.6s step-end infinite; }
.bete-chien.b-flaire:not(.anim):not(.dort) > i { animation: bta-flaire 6.5s step-end infinite; }
.bete-chien.b-gratte:not(.anim) > i { animation: bta-gratte 3s step-end infinite; }
.bete-chien.gronde > i { animation: bta-grogne .16s step-end infinite, bt-tremble .12s steps(2) infinite; }
.bete-chien.b-dos > i { animation: bt-roule .5s steps(2) 4; }
.bete-chien.dort::after { content: ''; position: absolute; left: 10%; top: 4%; width: 12%; aspect-ratio: 1; background: url(interface/bete_z.png?v=4dbc57e5) center / contain no-repeat;
  image-rendering: pixelated; opacity: 0; animation: bta-z 3.6s ease-in-out infinite; }
@keyframes bta-souffle { 0% { background-position-x: calc(0 * 100% / 28); } 50% { background-position-x: calc(12 * 100% / 28); } }
@keyframes bta-souffle-yeux { 0% { background-position-x: calc(1 * 100% / 28); } 50% { background-position-x: calc(13 * 100% / 28); } }
@keyframes bta-dort { 0% { background-position-x: calc(1 * 100% / 28); } 55% { background-position-x: calc(13 * 100% / 28); } }
@keyframes bta-flaire { 0% { background-position-x: calc(0 * 100% / 28); } 50% { background-position-x: calc(16 * 100% / 28); } 66% { background-position-x: calc(0 * 100% / 28); } 74% { background-position-x: calc(16 * 100% / 28); } 86% { background-position-x: calc(0 * 100% / 28); } }
@keyframes bta-gratte { 0% { background-position-x: calc(21 * 100% / 28); } 12% { background-position-x: calc(22 * 100% / 28); } 22% { background-position-x: calc(23 * 100% / 28); } 32% { background-position-x: calc(24 * 100% / 28); }
  42% { background-position-x: calc(23 * 100% / 28); } 52% { background-position-x: calc(24 * 100% / 28); } 62% { background-position-x: calc(23 * 100% / 28); } 72% { background-position-x: calc(24 * 100% / 28); } 84% { background-position-x: calc(22 * 100% / 28); } 94% { background-position-x: calc(21 * 100% / 28); } }
@keyframes bta-grogne { 0% { background-position-x: calc(8 * 100% / 28); } 50% { background-position-x: calc(9 * 100% / 28); } }
@keyframes bta-z { 0% { opacity: 0; transform: translate(0, 0) scale(.7); } 25% { opacity: .95; } 100% { opacity: 0; transform: translate(-40%, -90%) scale(1); } }
@keyframes bt-repos { 0% { background-position-x: calc(100% / 11); } 70% { background-position-x: calc(200% / 11); } 73% { background-position-x: calc(300% / 11); }
  76% { background-position-x: calc(200% / 11); } 79% { background-position-x: calc(300% / 11); } 82% { background-position-x: calc(200% / 11); } 85%, 100% { background-position-x: calc(100% / 11); } }
@keyframes bt-souffle { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.03); } }
@keyframes bt-queue { from { background-position-x: calc(200% / 11); } to { background-position-x: calc(400% / 11); } }
@keyframes bt-gratte { 0% { background-position-x: calc(400% / 11); } 7% { background-position-x: calc(500% / 11); } 14% { background-position-x: calc(400% / 11); }
  21% { background-position-x: calc(500% / 11); } 28% { background-position-x: calc(400% / 11); } 35% { background-position-x: calc(500% / 11); } 42% { background-position-x: calc(400% / 11); }
  49%, 100% { background-position-x: calc(500% / 11); } }
@keyframes bt-grogne { from { background-position-x: calc(800% / 11); } to { background-position-x: calc(1000% / 11); } }
@keyframes bt-tremble { from { transform: translateX(-.8%); } to { transform: translateX(.8%); } }
@keyframes bt-saute { from { transform: translateY(0); } to { transform: translateY(-9%); } }
@keyframes bt-roule { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.jour > .bete-chien.bt-port { z-index: 1; }
.bt-bulle.bt-porte { z-index: 7; transform: none; animation: bt-porte .25s ease-out both; }
.bt-bulle.bt-porte::after { display: none; }
.bt-bulle.bt-porte.part { animation: bt-porte-part .25s ease-in forwards; }
@keyframes bt-porte { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bt-porte-part { to { opacity: 0; transform: translateY(-6px); } }
.bete-chien.bt-scene { z-index: 1; }
.bord-scene .bete-chien.bt-bord { z-index: 3; }
.bt-bulle { position: absolute; z-index: 6; display: flex; align-items: flex-start; gap: .55em; max-width: 21em; padding: .55em .8em .6em .6em; background: #f7eedb; color: #2b1a0e;
  border: 2px solid #7a5631; border-radius: 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); font: italic 400 15px/1.35 Alegreya, 'Palatino Linotype', Georgia, serif;
  cursor: var(--c-main, pointer); transform: translate(-12%, -100%); animation: bt-entre .25s ease-out both; }
.bt-bulle::after { content: ''; position: absolute; left: 16%; bottom: -9px; width: 14px; height: 14px; background: #f7eedb; border-right: 2px solid #7a5631; border-bottom: 2px solid #7a5631; transform: rotate(45deg); }
.bt-bulle b { display: block; font-style: normal; font-weight: 700; font-size: 13px; color: #6e1610; margin-bottom: .1em; }
.bt-bulle .bt-visage { flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid #b8893d; background: #3a2412; }
.bt-bulle .bt-visage img { width: 100%; height: 100%; object-fit: cover; }
.bt-bulle:hover { border-color: #b8893d; }
@keyframes bt-entre { from { opacity: 0; transform: translate(-12%, -92%); } to { opacity: 1; transform: translate(-12%, -100%); } }
#menu-bureau .bete-chien.bt-bureau { z-index: 2; }
#dp .bete-chien.bt-duel { z-index: 2; }
.cp-bete.cp-chien.bt-coupe { width: 12.5%; aspect-ratio: 220 / 198; transform: translateY(-32%); }
.cp-bete.cp-chien.bt-coupe > img { display: none; }
.cp-bete.cp-chien .bete-chien { position: absolute; inset: 0; width: 100%; }
.cp-bete.cp-baleine.bt-mer { z-index: 2; }
.cp-bete.cp-baleine.bt-mer img { filter: drop-shadow(0 1px 1px rgba(10, 20, 40, .55)) brightness(.9) saturate(.85); }
#bt-puces { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(5, 8, 20, .72);
  opacity: 0; transition: opacity .25s ease; }
#bt-puces.ouvert { opacity: 1; }
#bt-puces .pz-cadre { position: relative; width: min(94vw, calc(90vh * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; border: 4px solid #6b4426;
  box-shadow: 0 0 0 3px #2a1a0e, 0 24px 70px rgba(0, 0, 0, .8); transform: scale(.96); transition: transform .25s ease; container-type: inline-size; }
#bt-puces.ouvert .pz-cadre { transform: scale(1); }
#bt-puces .pz-cadre > img.illu { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#bt-puces .pz-chien { position: absolute; left: 41%; top: 41.5%; width: 34cqw; aspect-ratio: 632 / 569; }
#bt-puces .pz-chien > i { position: absolute; inset: 0; background: url(interface/bete_chien_grand.png?v=38e80d77) 0 0 / 1200% 100% no-repeat; background-position-x: calc(100% / 11);
  transform-origin: 50% 96%; filter: drop-shadow(0 10px 8px rgba(40, 20, 5, .45)); }
#bt-puces .pz-chien.gratte > i { animation: bt-gratte 2.6s step-end infinite; }
#bt-puces .pz-chien.repos > i { animation: bt-souffle 3s ease-in-out infinite; }
#bt-puces .pz-chien.queue > i { animation: bt-queue var(--v, .5s) steps(2) infinite; }
#bt-puces .pz-chien.vieux.repos > i { background-position-x: 100%; }
#bt-puces .pz-chien.vieux.queue > i { background-position-x: calc(1000% / 11); animation: bt-roule var(--v, .5s) steps(2) infinite; }
#bt-puces .pz-chien.dos > i { background-position-x: calc(700% / 11); animation: bt-roule .45s steps(2) 6; }
#bt-puces .pz-puce { position: absolute; width: 2.6cqw; aspect-ratio: 57 / 44; margin: -1.3cqw 0 0 -1.3cqw; padding: 0; border: 0; background: url(interface/bete_puce.png?v=8e1ab899) center / contain no-repeat;
  cursor: none; animation: pz-saute .5s steps(2) infinite alternate; }
#bt-puces .pz-puce.saut { background-image: url(interface/bete_puce_saut.png?v=78a9f138); }
#bt-puces .pz-puce::before { content: ''; position: absolute; inset: -1.6cqw; }   
#bt-puces .pz-puce.part { animation: pz-part .25s ease-in forwards; pointer-events: none; }
@keyframes pz-saute { from { transform: translateY(0); } to { transform: translateY(-.7cqw); } }
@keyframes pz-part { to { transform: translate(var(--dx, 3cqw), -5cqw) scale(.6); opacity: 0; } }
#bt-puces .pz-eclat { position: absolute; width: 5cqw; aspect-ratio: 118 / 110; margin: -2.5cqw 0 0 -2.5cqw; background: url(interface/bete_etincelle.png?v=5b0366fa) center / contain no-repeat;
  pointer-events: none; animation: pz-eclat .45s ease-out forwards; }
@keyframes pz-eclat { from { transform: scale(.4) rotate(0); opacity: 1; } to { transform: scale(1.2) rotate(25deg); opacity: 0; } }
#bt-puces .pz-peigne { position: absolute; left: 0; top: 0; width: 6.5cqw; aspect-ratio: 154 / 150; background: url(interface/bete_peigne.png?v=15ee8e4a) center / contain no-repeat;
  pointer-events: none; z-index: 5; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); }
#bt-puces .pz-peigne.pose { left: 77%; top: 74%; pointer-events: auto; cursor: var(--c-main, pointer); animation: pz-appelle 1.2s ease-in-out infinite; }
#bt-puces .pz-peigne.pose:hover { filter: drop-shadow(0 0 10px rgba(255, 220, 140, .95)); }
@keyframes pz-appelle { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(-4deg) translateY(-.5cqw); } }
#bt-puces .pz-cadre.joue { cursor: none; }
#bt-puces .pz-bois { position: absolute; left: 0; right: 0; top: 0; height: 4.6cqw; z-index: 4; background: url(interface/ui_bois_fond.png?v=5dc66c82) 0 0 / 9cqw auto repeat;
  box-shadow: inset 0 -.25cqw 0 rgba(40, 20, 6, .75), inset 0 .2cqw 0 rgba(255, 220, 160, .18), 0 .35cqw .6cqw rgba(0, 0, 0, .45); }
#bt-puces .pz-meche { position: absolute; left: 3%; width: 80%; top: 1.5cqw; height: 1.5cqw; z-index: 5; }
#bt-puces .pz-corde { position: absolute; inset: 0; background: url(interface/bete_meche.png?v=ae01a50e) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 .15cqw .1cqw rgba(0, 0, 0, .5)); }
#bt-puces .pz-rail { position: absolute; inset: 0; pointer-events: none; }
#bt-puces .pz-braise { position: absolute; left: 0; top: -5.44cqw; height: 8.1cqw; aspect-ratio: 253 / 300; margin-left: -.31cqw; background: url(interface/bete_braise.png?v=bdac3cec) center / contain no-repeat;
  opacity: 0; transition: opacity .25s; transform-origin: 4.5% 76.4%; }
#bt-puces .joue .pz-corde { animation: pz-corde var(--d, 20s) steps(200, end) forwards; }
#bt-puces .joue .pz-rail { animation: pz-rail var(--d, 20s) steps(200, end) forwards; }
#bt-puces .joue .pz-braise { opacity: 1; }
#bt-puces .pz-meche.presse .pz-braise { animation: pz-crepite .11s steps(2) infinite; }
#bt-puces .fin .pz-corde { clip-path: inset(0 0 0 100%); }
#bt-puces .fin .pz-braise { opacity: 0; }
@keyframes pz-corde { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes pz-rail { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes pz-crepite { from { transform: scale(1); filter: brightness(1); } to { transform: scale(1.16) rotate(-4deg); filter: brightness(1.35); } }
#bt-puces .pz-cendre { position: absolute; top: .6cqw; width: 1.5cqw; aspect-ratio: 96 / 47; margin-left: -.75cqw; background: url(interface/bete_cendre.png?v=7e58b8c8) center / contain no-repeat;
  animation: pz-cendre .6s ease-in forwards; pointer-events: none; }
@keyframes pz-cendre { from { transform: translateY(0) scale(.5); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(1.9cqw) scale(1); opacity: .9; } }
#bt-puces .pz-compte { position: absolute; z-index: 5; right: 2.2%; top: .75cqw; display: flex; align-items: center; gap: .4cqw; padding: .4cqw 1cqw; border-radius: 2cqw; background: rgba(247, 238, 219, .92);
  border: 2px solid #7a5631; color: #3a2210; font: 700 2.1cqw/1 Alegreya, Georgia, serif; opacity: 0; transition: opacity .25s; }
#bt-puces .pz-compte img { width: 2.4cqw; }
#bt-puces .joue .pz-compte, #bt-puces .fin .pz-compte { opacity: 1; }
#bt-puces .pz-compte.plus { animation: pz-plus .25s ease-out; }
@keyframes pz-plus { 50% { transform: scale(1.18); } }
#bt-puces .pz-mot { position: absolute; left: 3%; bottom: 4%; max-width: 37%; text-align: left; display: flex; gap: 1cqw; align-items: flex-end; padding: 1cqw 1.4cqw; background: #f7eedb; color: #2b1a0e;
  border: 2px solid #7a5631; border-radius: 1cqw; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); font: italic 400 max(15px, 1.45cqw)/1.38 Alegreya, 'Palatino Linotype', Georgia, serif;
  animation: bt-entre-mot .25s ease-out both; }
#bt-puces .pz-mot b { display: block; font-style: normal; font-size: .82em; color: #6e1610; }
#bt-puces .pz-mot .bt-visage { flex: none; width: 5cqw; height: 5cqw; border-radius: 50%; overflow: hidden; border: 2px solid #b8893d; background: #3a2412; }
#bt-puces .pz-mot .bt-visage img { width: 100%; height: 100%; object-fit: cover; }
#bt-puces .pz-effets { display: flex; gap: 1.2cqw; margin-top: .5em; font-style: normal; font-weight: 700; color: #2e5a1c; }
#bt-puces .pz-effets span { display: inline-flex; align-items: center; gap: .3em; }
#bt-puces .pz-effets img { width: 1.9cqw; height: 1.9cqw; object-fit: contain; }
@keyframes bt-entre-mot { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#bt-puces .pz-fermer { position: absolute; right: 1.6%; bottom: 3%; width: 5.2cqw; height: 5.2cqw; padding: 0; border: 0; background: url(interface/sceau_fermer_repos.png?v=f7075058) center / contain no-repeat;
  cursor: var(--c-main, pointer); z-index: 6; }
#bt-puces .pz-fermer:hover { background-image: url(interface/sceau_fermer_survol.png?v=19783679); }
#bt-puces .joue .pz-fermer { display: none; }
.bete-perro { position: absolute; z-index: 4; aspect-ratio: 208 / 300; pointer-events: none; transition: left .25s ease; }
.bete-perro > i { position: absolute; inset: 0; background: url(interface/bete_perroquet.png?v=9d019fcb) 0 0 / 400% 100% no-repeat; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .55)) brightness(.84) saturate(.9); }
.bete-perro.penche > i { animation: bt-penche 2.8s step-end infinite; }
.bete-perro.ecoute > i { background-position-x: calc(100% / 3); }
.bete-perro.parle > i { animation: bt-parle .3s steps(2) 8; }
.bete-perro.parle.fini > i { animation: none; background-position-x: 0; }
@keyframes bt-penche { 0% { background-position-x: 0; } 55%, 100% { background-position-x: calc(100% / 3); } }
@keyframes bt-parle { from { background-position-x: 0; } to { background-position-x: calc(400% / 3); } }   
.bete-perro-mot { position: absolute; z-index: 5; white-space: nowrap; padding: .5em .8em; background: #f7eedb; color: #2b1a0e; border: 2px solid #7a5631; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55); font: italic 700 max(17px, calc(1.3 * var(--k, 12px)))/1.3 Alegreya, 'Palatino Linotype', Georgia, serif; pointer-events: none;
  transform: translate(-100%, -100%); animation: bt-mot .25s ease-out both; }
.bete-perro-mot::after { content: ''; position: absolute; right: -8px; bottom: 14px; width: 14px; height: 14px; background: #f7eedb; border-right: 2px solid #7a5631; border-top: 2px solid #7a5631; transform: rotate(45deg); }
.bete-perro-mot.dessus { transform: translate(-50%, -100%); animation-name: bt-mot-dessus; }
.bete-perro-mot.dessus::after { right: auto; left: calc(50% - 7px); bottom: -9px; border-top: 0; border-bottom: 2px solid #7a5631; }
@keyframes bt-mot-dessus { from { opacity: 0; transform: translate(-50%, -92%); } to { opacity: 1; transform: translate(-50%, -100%); } }
@keyframes bt-mot { from { opacity: 0; transform: translate(-100%, -92%); } to { opacity: 1; transform: translate(-100%, -100%); } }
@media (prefers-reduced-motion: reduce) {
  .bete-chien > i, .bete-chien::after, .bete-perro > i, #bt-puces .pz-chien > i, #bt-puces .pz-puce, #bt-puces .pz-peigne.pose, .bt-bulle, .bete-perro-mot, #bt-puces .pz-mot,
    #bt-puces .pz-compte.plus, #bt-puces .pz-meche.presse .pz-braise, #bt-puces .pz-cendre { animation: none !important; }
  #bt-puces, #bt-puces .pz-cadre, .bete-perro { transition: none; }
  .bt-bulle.bt-porte, .bt-bulle.bt-porte.part { animation: none !important; }
  .bete-perro.parle > i { background-position-x: calc(200% / 3); }
}
html.sans-ambiance .bete-chien > i, html.sans-ambiance .bete-chien::after, html.sans-ambiance .bete-perro > i, html.sans-ambiance #bt-puces .pz-chien > i, html.sans-ambiance #bt-puces .pz-puce,
html.sans-ambiance #bt-puces .pz-peigne.pose, html.sans-ambiance .bt-bulle, html.sans-ambiance .bete-perro-mot, html.sans-ambiance #bt-puces .pz-mot,
html.sans-ambiance #bt-puces .pz-meche.presse .pz-braise, html.sans-ambiance #bt-puces .pz-cendre { animation: none !important; }
html.sans-ambiance #bt-puces, html.sans-ambiance #bt-puces .pz-cadre, html.sans-ambiance .bete-perro { transition: none; }
html.sans-ambiance .bete-perro.parle > i { background-position-x: calc(200% / 3); }
html #modal-box > .scene-d:not(.doc) .pensee-bulle, html #modal-box > .scene-d:not(.doc) .pensee-bulle::before, html #modal-box > .scene-d:not(.doc) .pensee-bulle::after {
  background: rgba(14, 11, 20, .58); border: 1px dashed rgba(232, 200, 140, .6); }
html #modal-box > .scene-d:not(.doc) .pensee-bulle { color: #f3e6c8; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
html #modal-box > .scene-d:not(.doc) .pensee-bulle small.muet { color: rgba(232, 218, 190, .82); font-size: .92em; }
html #modal-box > .scene-d.doc .pensee-bulle, html #modal-box > .scene-d.doc .pensee-bulle::before, html #modal-box > .scene-d.doc .pensee-bulle::after {
  background: transparent; border: 1px dashed rgba(110, 76, 38, .55); }
html #modal-box > .scene-d.doc .pensee-bulle { color: #3a2210; text-shadow: none; }
html #modal-box > .scene-d.doc .pensee-bulle small.muet { color: #5a4528; }
.bt-aug { margin: .55em 0 0; font-style: italic; }
.bt-aug img.emo { width: 1.25em; height: 1.25em; vertical-align: -.25em; margin-right: .2em; }
