/*! Corsaires ! — © 2026, Chrysopam — tous droits réservés */
#tombeau, #midi { position: fixed; inset: 0; z-index: 9800; background: #07060a; opacity: 0; transition: opacity .4s; overflow: hidden; user-select: none; -webkit-user-select: none; }
#tombeau.vu, #midi.vu { opacity: 1; }
.tb-boite, .md-boite { position: absolute; inset: 0; margin: auto; aspect-ratio: 16 / 9; max-width: 100vw; max-height: 100vh; container-type: inline-size; }
.tb-toile, .md-toile { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; cursor: none; touch-action: none; }
.tb-titre, .md-titre { position: absolute; left: 0; right: 0; top: 7%; text-align: center; pointer-events: none; color: #fbf1d6; text-shadow: 0 .2cqw 0 #1a1008, 0 0 1.4cqw rgba(0, 0, 0, .7); transition: opacity 1.2s; }
.tb-titre b, .md-titre b { display: block; font: 4.2cqw/1.1 var(--titre, 'IM Fell English SC', serif); letter-spacing: .03em; }
.tb-titre i, .md-titre i { display: block; margin-top: .6cqw; font: italic 600 1.6cqw/1.2 Alegreya, Georgia, serif; color: #f0d79a; }
.tb-titre.part, .md-titre.part { opacity: 0; }
.tb-parole, .md-parole { position: absolute; left: 1.6%; bottom: 3%; width: min(46%, 640px); display: flex; align-items: flex-end; gap: .8cqw; opacity: 0; transform: translateY(.6cqw); transition: opacity .3s, transform .3s; pointer-events: none; }
.tb-parole.dit, .md-parole.dit { opacity: 1; transform: none; }
.tb-med, .md-med { flex: none; width: 6.4cqw; height: 6.4cqw; display: flex; align-items: center; justify-content: center; background: url(interface/ui_medaillon.png?v=157f5cb8) center / 100% 100% no-repeat; filter: drop-shadow(0 .2cqw .3cqw rgba(0, 0, 0, .7)); }
.tb-med img, .md-med img { width: 78%; height: 78%; border-radius: 50%; object-fit: cover; object-position: 50% 22%; background: #1a2340; }
.tb-med .emoji-seul, .md-med .emoji-seul { font-size: 2.6cqw; }
.tb-cartouche, .md-cartouche { flex: 1; min-width: 0; padding: .5cqw 1.2cqw .7cqw; border-style: solid; border-width: 1cqw; border-image: url(interface/kit_bande.png?v=b51fcec8) 110 fill / 1cqw stretch; filter: drop-shadow(0 .4cqw .8cqw rgba(0, 0, 0, .65)); }
.tb-nom, .md-nom { display: block; font: 1.15cqw/1.1 var(--titre, 'IM Fell English SC', serif); color: #f0c95a; letter-spacing: .03em; }
.tb-txt, .md-txt { margin: .25cqw 0 0; font: italic 600 clamp(17px, 1.5cqw, 30px)/1.34 Alegreya, 'Palatino Linotype', Georgia, serif; color: #fff4d6; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.tb-parole.neuve .tb-cartouche, .md-parole.neuve .md-cartouche { animation: tm-neuve .3s ease-out; }
@keyframes tm-neuve { from { opacity: .3; transform: translateY(.4cqw); } to { opacity: 1; transform: none; } }
.tb-plomb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 4, .62); opacity: 0; pointer-events: none; transition: opacity .35s; cursor: pointer; }
.tb-plomb.vu { opacity: 1; pointer-events: auto; }
.tb-plomb-boite { position: relative; width: 44%; transform: rotate(-2deg) scale(.9); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); filter: drop-shadow(0 1cqw 1.4cqw rgba(0, 0, 0, .7)); }
.tb-plomb.vu .tb-plomb-boite { transform: rotate(-2deg) scale(1); }
.tb-plomb-toile { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; image-rendering: pixelated; }
.tb-plomb-mot { position: absolute; left: 0; right: 0; top: -3.2cqw; text-align: center; font: italic 600 1.7cqw/1 Alegreya, Georgia, serif; color: #e8dcc0; text-shadow: 0 .15cqw 0 #1a1008; }
.tb-choix { position: absolute; left: 0; right: 0; top: 5%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.4cqw 2.4cqw; opacity: 0; pointer-events: none; transform: translateY(1cqw); transition: opacity .4s, transform .4s; }
.tb-choix.vu { opacity: 1; pointer-events: auto; transform: none; }
.tb-choix-mot { flex: 1 0 100%; margin: 0; text-align: center; font: italic 600 1.7cqw/1.2 Alegreya, Georgia, serif; color: #fbf1d6; text-shadow: 0 .15cqw 0 #1a1008, 0 0 .8cqw #000; }
.tb-plaque, .md-plaque { position: relative; padding: .25em 1.1em; border: 11px solid transparent; border-image: url(interface/ui_bouton.png?v=6682903d) 15 fill stretch; background: none;
  font-family: var(--titre, serif); font-size: clamp(17px, 1.9cqw, 34px); color: #f6e7c4; text-shadow: 0 2px 0 #2a1608; cursor: pointer; outline: none;
  transform: rotate(-1.5deg); transition: transform .12s, filter .15s, opacity .2s; }
.tb-plaque + .tb-plaque { transform: rotate(1.2deg); }
.tb-plaque:hover, .tb-plaque:focus-visible, .md-plaque:not([disabled]):hover, .md-plaque:not([disabled]):focus-visible { transform: rotate(0deg) translateY(-3px); filter: brightness(1.14) drop-shadow(0 0 4px rgba(255, 214, 110, .9)); }
.tb-plaque.presse, .md-plaque.presse:not([disabled]) { border-image-source: url(interface/ui_bouton_presse.png?v=8f97ce3e); transform: rotate(-1.5deg) translateY(2px); filter: brightness(.95); }
.md-plaque[disabled] { cursor: default; filter: grayscale(.85) brightness(.6); opacity: .7; }
.tb-passer, .md-passer { position: absolute; top: 2.2%; right: 1.4%; width: clamp(40px, 3.4cqw, 62px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; outline: none; z-index: 3; }
.tb-passer img, .md-passer img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .1s, transform .1s; }
.tb-passer .e0, .md-passer .e0 { opacity: 1; }
.tb-passer:hover .e0, .md-passer:hover .e0 { opacity: 0; }
.tb-passer:hover .e1, .md-passer:hover .e1 { opacity: 1; transform: translateY(-2px); }
.tb-passer:active .e0, .tb-passer:active .e1, .md-passer:active .e0, .md-passer:active .e1 { opacity: 0; }
.tb-passer:active .e2, .md-passer:active .e2 { opacity: 1; transform: translateY(1px); }
.md-pied { position: absolute; right: 4%; bottom: 6%; display: flex; flex-direction: column; align-items: center; gap: 1cqw; }
.md-plaque.appelle:not(:hover) { animation: md-appel 1.3s ease-in-out infinite; }
@keyframes md-appel { 50% { filter: brightness(1.18) drop-shadow(0 0 6px rgba(255, 214, 110, .9)); } }
.md-lecture { padding: .4cqw 1cqw; border-style: solid; border-width: .7cqw; border-image: url(interface/kit_bande.png?v=b51fcec8) 110 fill / .7cqw stretch; font: 700 1.7cqw/1 Alegreya, Georgia, serif; color: #f6e7c4; letter-spacing: .04em; text-align: center; min-width: 9cqw; }
.md-lecture small { display: block; margin-top: .25cqw; font: italic 600 1cqw/1 Alegreya, Georgia, serif; color: #f0c95a; letter-spacing: 0; }
.md-essais { display: flex; gap: .6cqw; }
.md-essais i { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3b0, #f0b030 60%, #a0601a); box-shadow: 0 0 .6cqw rgba(255, 200, 80, .7); transition: opacity .3s, filter .3s; }
.md-essais i.use { opacity: .35; filter: grayscale(1); box-shadow: none; }
.md-essais i.bon { background: radial-gradient(circle at 40% 40%, #e8ffd0, #6cc040 60%, #2a6a1a); }
.md-regle { position: absolute; top: 2.2%; right: 6%; }
.md-regle.rd-icone { width: clamp(36px, 3cqw, 56px); height: clamp(36px, 3cqw, 56px); cursor: pointer; }
.md-regle.rd-icone img { width: 100%; height: 100%; }
.md-table { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s; }
.md-table.vu { opacity: 1; }
.md-table canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.md-table-mot { position: absolute; left: 0; right: 0; top: 4%; text-align: center; font: italic 600 1.9cqw/1.2 Alegreya, Georgia, serif; color: #fbf1d6; text-shadow: 0 .15cqw 0 #1a1008, 0 0 .8cqw #000; }
#tombeau.calme *, #midi.calme * { animation: none !important; transition: none !important; }
