/*! Corsaires ! — © 2026, Chrysopam — tous droits réservés */
html #modal:not(.accueil) > #modal-box:has(> .bord-scene) { width: 100vw !important; max-width: none; height: 100vh; max-height: none !important; padding: 0 !important; overflow: hidden;
  border: 0 !important; border-image: none !important; border-radius: 0 !important; background: #0b1a2a !important; box-shadow: none !important; }
html #modal-box > .bord-scene { --k: min(1vw, 1.778vh); --or: #e8c46a; --encre: #2b1a0e; position: absolute; inset: 0; padding: 0 !important; margin: 0; border: 0 !important;
  border-image: none !important; overflow: hidden; background: #0b1a2a !important; color: #f3e6c8; font-family: Alegreya, 'Palatino Linotype', Georgia, serif; user-select: none; }
.bord-scene .bd-mer { position: absolute; inset: 0; background: linear-gradient(180deg, #2c3e66 0%, #b9785a 26%, #e3a872 36%, #3a6c88 44%, #1d4562 62%, #0b2236 100%); }
.bord-scene.heure-jour .bd-mer { background: linear-gradient(180deg, #5f93c4 0%, #8fb9d8 22%, #cfe0e4 36%, #4a86a6 44%, #22567a 62%, #0b2236 100%); }
.bord-scene.heure-nuit .bd-mer { background: linear-gradient(180deg, #070d1e 0%, #14213f 24%, #26385e 36%, #1a3550 44%, #0f2840 62%, #061420 100%); }
.bord-scene .bd-mer::after { content: ''; position: absolute; left: 0; right: -440px; top: 40%; bottom: 0; background: url(../illustrations/regate_mer_tuile.png) 0 0 / 220px 220px repeat;
  mix-blend-mode: overlay; opacity: .55; animation: bd-houle 26s linear infinite; }
.bord-scene .bd-houle { position: absolute; left: 0; right: -360px; bottom: 0; height: 6vh; pointer-events: none; z-index: 1;
  background: url(../illustrations/regate_mer_tuile.png) 0 0 / 180px 120px repeat-x, linear-gradient(180deg, rgba(29, 69, 98, 0), rgba(18, 52, 78, .82) 40%, #0b2236);
  background-blend-mode: overlay, normal; opacity: .9; animation: bd-houle-avant 9s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%); mask-image: linear-gradient(180deg, transparent 0, #000 45%); }
@keyframes bd-houle { from { translate: 0 0; } to { translate: -440px 0; } }
@keyframes bd-houle-avant { from { translate: 0 0; } to { translate: -360px 0; } }
.bord-scene .bd-coupe { position: absolute; left: 50%; top: 46%; width: min(90vw, calc(82vh * 1920 / 1072)); aspect-ratio: 1920 / 1072; transform: translate(-50%, -50%);
  transform-origin: 50% 70%; animation: bd-roulis 7.5s ease-in-out infinite; z-index: 2; }
@keyframes bd-roulis { 0%, 100% { transform: translate(-50%, -50%) rotate(-.32deg); } 50% { transform: translate(-50%, calc(-50% + .45vh)) rotate(.32deg); } }
.bord-scene .bd-peinture { position: absolute; inset: 0; border-radius: calc(.5 * var(--k)); overflow: hidden;
  box-shadow: 0 1.2vh 3vh rgba(0, 0, 0, .55), 0 0 0 1px rgba(20, 10, 4, .6); }
.bord-scene .bd-img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; pointer-events: none; }
.bord-scene .bd-img.bd-img-ciel { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 11%, transparent 17%); mask-image: linear-gradient(180deg, #000 0, #000 11%, transparent 17%); }
.bord-scene .bd-pieces { position: absolute; inset: 0; }
.bord-scene .bd-piece { all: unset; position: absolute; box-sizing: border-box; cursor: pointer; }
.bord-scene .bd-piece::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; mix-blend-mode: screen;
  background: radial-gradient(ellipse 62% 70% at 50% 58%, rgba(255, 214, 150, .40), rgba(255, 190, 110, .16) 55%, rgba(255, 180, 90, 0) 82%); }
.bord-scene .bd-piece:hover::before, .bord-scene .bd-piece:focus-visible::before { opacity: 1; }
.bord-scene .bd-piece.choisie::before { opacity: 1; background: radial-gradient(ellipse 66% 74% at 50% 58%, rgba(255, 226, 170, .5), rgba(255, 200, 120, .2) 58%, rgba(255, 190, 100, 0) 85%); }
.bord-scene .bd-piece.allumee::before { background: radial-gradient(ellipse 64% 72% at 50% 60%, rgba(255, 196, 96, .55), rgba(255, 170, 70, .22) 55%, rgba(255, 160, 60, 0) 84%);
  animation: bd-lueur 2.6s ease-in-out infinite; }
.bord-scene .bd-piece.allumee:hover::before, .bord-scene .bd-piece.allumee.choisie::before { animation-duration: 1.6s; }
@keyframes bd-lueur { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.bord-scene .bd-etiq { position: absolute; left: calc(.6 * var(--k)); top: calc(-1.1 * var(--k)); display: none; flex-direction: column; white-space: nowrap; z-index: 5;
  padding: calc(.35 * var(--k)) calc(1.1 * var(--k)) calc(.4 * var(--k)) calc(3.6 * var(--k)); color: var(--encre); font-size: max(13px, calc(1.12 * var(--k))); line-height: 1.15;
  border: solid transparent; border-width: calc(.5 * var(--k)) calc(.6 * var(--k)) calc(.5 * var(--k)) calc(3.2 * var(--k));
  border-image: url(interface/gazette_etiquette.png?v=b7afc647) 14 18 14 118 fill / calc(.5 * var(--k)) calc(.6 * var(--k)) calc(.5 * var(--k)) calc(3.2 * var(--k));
  padding-left: calc(1.3 * var(--k)); transform: rotate(-1.2deg); transform-origin: 0 50%; filter: drop-shadow(1px 3px 2px rgba(0, 0, 0, .55)); pointer-events: none; }
.bord-scene .bd-piece.haut .bd-etiq { top: calc(.8 * var(--k)); }
.bord-scene .bd-piece:nth-child(2n) .bd-etiq { transform: rotate(.9deg); }
.bord-scene .bd-piece:nth-child(3n) .bd-etiq { transform: rotate(-.4deg); }
.bord-scene .bd-etiq b { font-weight: 700; }
.bord-scene .bd-etiq i { font-style: italic; color: #7a2e0e; font-size: .92em; }
.bord-scene .bd-piece:hover .bd-etiq, .bord-scene .bd-piece:focus-visible .bd-etiq, .bord-scene .bd-piece.allumee .bd-etiq, .bord-scene .bd-piece.choisie .bd-etiq { display: flex; }
.bord-scene .bd-piece.allumee .bd-etiq, .bord-scene .bd-piece.choisie .bd-etiq { pointer-events: auto; cursor: inherit; }
.bord-scene .bd-piece:hover, .bord-scene .bd-piece.choisie { z-index: 4; }
.bord-scene[data-navire="sloop"] .bd-piece[data-piece="cabine"] .bd-etiq { top: 26%; }
.bord-scene[data-navire="galion"] .bd-piece[data-piece="cabine"] .bd-etiq, .bord-scene[data-navire="fregate"] .bd-piece[data-piece="conseil"] .bd-etiq { top: calc(5.5 * var(--k)); }
.bord-scene .bd-titre { position: absolute; left: calc(2.4 * var(--k)); top: calc(1.6 * var(--k)); z-index: 6; font-family: var(--titre); color: var(--or); font-size: calc(3.2 * var(--k)); line-height: 1;
  padding: calc(.3 * var(--k)) calc(1.6 * var(--k)) calc(.5 * var(--k)) calc(.6 * var(--k)); margin-left: calc(-.6 * var(--k)); pointer-events: none;
  text-shadow: 0 3px 0 #000, 2px 2px 0 #000, -1px -1px 0 #000, 0 0 14px rgba(0, 0, 0, .95);
  background: radial-gradient(ellipse at 35% 55%, rgba(9, 10, 18, .62), rgba(9, 10, 18, .32) 58%, transparent 78%); }
.bord-scene .bd-titre small { display: block; margin-top: calc(.4 * var(--k)); font-family: Alegreya, Georgia, serif; font-style: italic; font-size: max(14px, calc(1.2 * var(--k))); color: #f1e2bd; text-shadow: 1px 1px 0 #000, 0 0 8px #000; }
.bord-scene .bd-fermer { all: unset; position: absolute; right: calc(1.6 * var(--k)); top: calc(1.4 * var(--k)); width: calc(4.6 * var(--k)); min-width: 44px; aspect-ratio: 1; cursor: pointer; z-index: 7;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); transition: transform .15s; }
.bord-scene .bd-fermer img { width: 100%; height: 100%; display: block; }
.bord-scene .bd-fermer:hover { transform: scale(1.07) rotate(-4deg); }
.bord-scene .bd-saynete { position: absolute; left: 50%; bottom: calc(1.4 * var(--k)); transform: translateX(-50%); z-index: 6; width: min(78vw, calc(90 * var(--k))); display: flex; justify-content: center; }
.bord-scene .bd-ruban { all: unset; cursor: pointer; box-sizing: border-box; max-width: 100%; color: #2a1a0c; font-family: Alegreya, 'Palatino Linotype', Georgia, serif; font-style: normal; font-weight: 500;
  font-size: max(17px, calc(1.5 * var(--k))); line-height: 1.3; text-align: center;
  border: solid transparent; border-width: calc(1 * var(--k)) calc(2.6 * var(--k)); border-image: url(interface/ui_parchemin.png?v=2b289dfd) 22 36 22 36 fill / calc(1 * var(--k)) calc(2.6 * var(--k));
  background: radial-gradient(ellipse 58% 70% at 50% 50%, rgba(244, 228, 192, .96), rgba(240, 222, 184, .82) 62%, rgba(236, 216, 176, 0) 100%) padding-box;
  padding: calc(.2 * var(--k)) calc(.8 * var(--k)); transform: rotate(-.5deg); filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .55)); transition: transform .15s; }
.bord-scene .bd-ruban > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.bord-scene .bd-ruban:hover { transform: rotate(0) translateY(-2px); }
.bord-scene .bd-panneau { position: absolute; right: calc(1.8 * var(--k)); top: calc(8.5 * var(--k)); width: calc(27 * var(--k)); min-width: 300px; max-height: calc(100vh - 16 * var(--k)); z-index: 8;
  box-sizing: border-box; padding: calc(1.5 * var(--k)) calc(1.6 * var(--k)) calc(1.4 * var(--k)); overflow: hidden; color: var(--encre); font-size: max(14px, calc(1.12 * var(--k))); line-height: 1.35;
  background: url(interface/ui_papier.png?v=66fa38b6) center / 256px 256px, #ead7ae; border: calc(.45 * var(--k)) solid #6b4426; border-radius: calc(.5 * var(--k));
  box-shadow: 0 0 0 2px #2a1a0e, 0 calc(1 * var(--k)) calc(2.4 * var(--k)) rgba(0, 0, 0, .65); transform: rotate(.6deg); animation: bd-pose .22s ease-out; }
.bord-scene .bd-panneau.gauche { right: auto; left: calc(1.8 * var(--k)); top: calc(10 * var(--k)); transform: rotate(-.6deg); }
.bord-scene .bd-panneau.cache { display: none; }
@keyframes bd-pose { from { opacity: 0; translate: 0 calc(1 * var(--k)); } to { opacity: 1; translate: 0 0; } }
html #modal-box > .bord-scene .bd-panneau h3 { margin: 0 0 calc(.5 * var(--k)); font-family: var(--titre); font-weight: 400; color: #5b1d0d; font-size: calc(2.3 * var(--k)); line-height: 1; }
.bord-scene .bd-pan-fermer { all: unset; position: absolute; right: calc(.8 * var(--k)); top: calc(.5 * var(--k)); cursor: pointer; color: #6b4426; font-size: calc(1.6 * var(--k)); line-height: 1; }
.bord-scene .bd-pan-fermer:hover { color: #9b2a0e; }
html #modal-box > .bord-scene .bd-panneau p { margin: 0 0 calc(.6 * var(--k)); }
.bord-scene .bd-etat { color: #3d2614; }
.bord-scene .bd-resultat { padding: calc(.4 * var(--k)) calc(.7 * var(--k)); background: rgba(255, 238, 190, .55); border-radius: calc(.3 * var(--k)); box-shadow: inset 0 0 0 1px rgba(122, 86, 49, .45); }
.bord-scene .bd-mot { font-style: italic; color: #4b2a12; border-left: 3px solid #b08a4a; padding-left: calc(.8 * var(--k)); }
.bord-scene .bd-panneau .bien { color: #2f6a1e; }
.bord-scene .bd-gestes { display: flex; flex-direction: column; gap: calc(.55 * var(--k)); margin-top: calc(.8 * var(--k)); }
.bord-scene .bd-geste { all: unset; box-sizing: border-box; position: relative; display: flex; align-items: center; gap: calc(.9 * var(--k)); cursor: pointer;
  min-height: calc(5.4 * var(--k)); padding: calc(1.25 * var(--k)) calc(1.4 * var(--k)) calc(.75 * var(--k)) calc(1.3 * var(--k));
  background: url(interface/canon_plaque_tir.png?v=abd4ab83) center / 100% 100% no-repeat; color: #f3e6c8; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); transition: transform .12s, filter .12s; }
.bord-scene .bd-geste:nth-child(2n) { transform: rotate(-.6deg); }
.bord-scene .bd-geste:nth-child(2n+1) { transform: rotate(.4deg); }
.bord-scene .bd-geste:hover:not([disabled]), .bord-scene .bd-geste:focus-visible { transform: rotate(0) translateY(-2px); filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .55)) brightness(1.1); }
.bord-scene .bd-geste:active:not([disabled]) { transform: translateY(1px); }
.bord-scene .bd-geste img { width: calc(3.4 * var(--k)); height: calc(3.4 * var(--k)); object-fit: contain; flex: none; filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, .5)); }
.bord-scene .bd-geste b { display: block; color: #f6d77e; font-size: max(14px, calc(1.2 * var(--k))); font-weight: 700; line-height: 1.1; text-shadow: 1px 1px 0 #000; }
.bord-scene .bd-geste small { display: block; color: #e8d6ae; font-size: max(12px, calc(.95 * var(--k))); line-height: 1.2; }
.bord-scene .bd-geste[disabled] { cursor: default; filter: grayscale(.65) brightness(.78); }
.bord-scene .bd-geste.fait { filter: grayscale(.4) brightness(.72); }
.bord-scene .bd-geste.appel { animation: bd-appel 1.8s ease-in-out infinite; }
@keyframes bd-appel { 0%, 100% { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); } 50% { filter: drop-shadow(0 0 calc(1 * var(--k)) rgba(255, 210, 110, .95)) brightness(1.08); } }
.bord-scene .bd-livret { margin-top: calc(.8 * var(--k)); max-height: 40vh; overflow: auto; font-size: max(12px, calc(.95 * var(--k))); }
.bord-scene .bd-livret table { width: 100%; border-collapse: collapse; }
.bord-scene .bd-livret td, .bord-scene .bd-livret th { padding: 1px 4px; border-bottom: 1px solid rgba(107, 68, 38, .3); text-align: left; }
.bord-bouton { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; width: 100%; justify-content: center; position: relative; }
.bord-bouton img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, .45)); }
.bord-bouton.allume { box-shadow: 0 0 0 2px rgba(232, 196, 106, .8), 0 0 12px rgba(232, 196, 106, .7); animation: bd-appel 1.8s ease-in-out infinite; }
.bord-bouton .bord-pastille { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-width: 18px; height: 18px; border-radius: 9px; background: #b23a12; color: #fff;
  font-style: normal; font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #e8c46a; }
.liens-accueil .lien .lien-icone img { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
  .bord-scene .bd-coupe, .bord-scene .bd-mer::after, .bord-scene .bd-houle { animation: none; }
  .bord-scene .bd-piece.allumee::before, .bord-scene .bd-geste.appel, .bord-bouton.allume { animation-duration: 4s; }
}
.bord-scene .bd-geste .bd-jeton { flex: 0 0 auto; margin-left: auto; width: calc(2.4 * var(--k)); height: calc(2.4 * var(--k)); display: grid; place-items: center;
  background: url(interface/comptoir_jeton_laiton.png?v=8db10f3b) center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.bord-scene .bd-geste .bd-jeton img { width: 58%; height: 58%; object-fit: contain; }
