/* CÅ“ur de Levens â€” direction artistique inspirÃ©e de la boÃ®te imprimÃ©e.
   Aucune modification de l'image du plateau ni des coordonnÃ©es des pions. */
:root{--cdl-ink:#06101f;--cdl-blue:#0a2240;--cdl-blue-2:#12365a;--cdl-gold:#d5a953;--cdl-light-gold:#f8dc94;--cdl-cream:#f6e7c4;--cdl-line:#b1843e}
body{background:radial-gradient(ellipse at 50% -20%,#173a60 0%,#08182c 55%,#020711 100%);color:var(--cdl-cream);font-family:Georgia,"Times New Roman",serif}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;opacity:.16;background:repeating-linear-gradient(105deg,transparent 0 26px,#d8ad6520 27px 28px,transparent 29px 65px)}
main{max-width:1040px;margin:18px auto;padding:16px}
main>header{position:relative;padding:22px 20px 18px;border:1px solid #bb8d43;border-radius:14px;background:linear-gradient(135deg,#0c2443d9,#09192dd9);box-shadow:inset 0 0 0 3px #d3a74c1b,0 15px 36px #0007}
main>header::before,main>header::after{content:"â§";position:absolute;top:8px;color:var(--cdl-gold);font-size:30px}
main>header::before{left:14px}main>header::after{right:14px;transform:scaleX(-1)}
main>header h1{font-size:clamp(34px,5vw,60px);line-height:1.06;margin:5px 0;color:#ffde86;font-style:italic;text-shadow:0 2px 1px #4d240a,0 0 16px #df9e4a44}
main>header small{font-size:11px;letter-spacing:.27em;color:#d3b679}
main>header p{font-style:italic;margin:6px 0;color:#c9d4df}
section{background:linear-gradient(140deg,#0d2949f7,#081729f9);border:1px solid var(--cdl-line);box-shadow:inset 0 0 0 3px #d4a95b18,0 16px 42px #0009;border-radius:17px}
section h2{font-size:clamp(24px,3vw,36px);font-style:italic;text-shadow:0 2px 10px #0008}
section h3{color:var(--cdl-light-gold);font-weight:normal;font-size:21px}
section p{line-height:1.55}
button{background:linear-gradient(180deg,#f5d989,#c9943c 76%,#b77a2e);border:1px solid #ffe7a5;border-radius:9px;box-shadow:inset 0 1px 1px #fff8,0 3px 9px #0006;color:#172336;font-family:Georgia,"Times New Roman",serif;font-size:15px;transition:transform .15s,filter .15s,box-shadow .15s}
button:hover{transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 5px 18px #d6a44b44}
button:disabled{opacity:.48;cursor:not-allowed;transform:none}
input,select{border:1px solid #cba052;background:#061b33;color:#fff2d3;box-shadow:inset 0 2px 8px #0006}
input:focus,select:focus{outline:2px solid #efc76b;outline-offset:2px}
#auth,#lobby,#queue,#match{max-width:950px;margin:20px auto}
#auth{max-width:550px}
#auth button{min-width:160px}
#resume-panel{background:linear-gradient(135deg,#294c61,#11253c);box-shadow:inset 0 0 0 2px #d7ac5c2b}
.v3-themes{gap:18px}
.v3-theme{border:2px solid #9c783d;background:#071729;box-shadow:0 12px 24px #0007;overflow:hidden}
.v3-theme img{aspect-ratio:16/9;filter:saturate(.95);transition:transform .3s}
.v3-theme:hover img{transform:scale(1.035)}
.v3-theme.selected{border:3px solid #f9d783;box-shadow:0 0 0 3px #b4894966,0 0 30px #e5b75b55}
.v3-theme strong{background:linear-gradient(180deg,#153554,#081a31);color:#f9dc98;font-size:19px;font-style:italic;padding:12px}
#solo-config,#online-config{border:1px solid #a77e40;border-radius:12px;padding:16px;margin:16px 0;background:#071c32aa}
#queue #countdown{font-size:24px;color:#f9d783}
#game{border-color:#b98d43;background:linear-gradient(135deg,#081b30,#071324)}
#game .game-tabs{border-bottom:1px solid #b68a4a;padding-bottom:10px}
#game .game-tabs button{border:1px solid #a98248;background:#0c2b4b;color:#f5d795}
#game .game-tabs button.active{background:linear-gradient(#f5d98b,#bf8b3c);color:#17243a}
#game-pane-board #game-status{padding:10px;border:1px solid #ac884c;border-radius:9px;background:#0b2541}
#game-pane-board #game-players .seat{background:#122e49;border-color:#b48d4f}
#game-pane-board #game-players .seat.filled{background:#204f48;border-color:#d3ad67}
#game-pane-board #dice-visual .die{border:2px solid #e8c880;box-shadow:0 5px 12px #000a}
#game-pane-board #location-actions:not([hidden]){background:linear-gradient(135deg,#153957,#0a1f35);border:2px solid #d5ab64}
#game-pane-cards #deduction-panel,#game-pane-cards #cards-panel{background:#0c263f;border:1px solid #ae8748;border-radius:12px;padding:14px}
.private-card{border-color:#e4bd72;box-shadow:0 8px 22px #0009}
.clue-modal-content{border:3px double #e9c77f;background:linear-gradient(145deg,#143453,#07182e);box-shadow:0 0 0 5px #102941,0 18px 70px #000e}
#verdict-panel{margin-top:18px;border-top:1px solid #ba904c;padding-top:15px}
#verdict-panel h3{color:#f7d38b}
#message{font-weight:700}
.cdl-opening[hidden]{display:none!important}
.cdl-opening{position:fixed;inset:0;z-index:9000;background:#030b17;display:grid;place-items:center;padding:18px}
.cdl-opening-scene{position:relative;width:min(1100px,100%);min-height:min(680px,92dvh);display:grid;place-items:center;overflow:hidden;border:3px double #d5aa59;border-radius:14px;box-shadow:0 0 0 8px #0b223a,0 0 65px #000e;background:linear-gradient(180deg,#07183155,#06101cbd),url('/ui/mystere') center/cover no-repeat}
.cdl-opening-scene::after{content:"";position:absolute;inset:12px;border:1px solid #e2b55a70;border-radius:7px;pointer-events:none}
.cdl-opening-copy{position:relative;z-index:1;text-align:center;padding:32px 20px;max-width:740px;border-radius:20px;background:radial-gradient(ellipse,#071629de,#07162975 70%,transparent)}
.cdl-opening-copy h2{font-style:italic;font-size:clamp(48px,8vw,98px);line-height:.95;color:#ffdf91;margin:20px 0;text-shadow:0 3px 3px #271002,0 0 22px #e5b65c88}
.cdl-opening-copy h2 em{display:block;font-size:1.14em}
.cdl-opening-copy p{font-size:clamp(16px,2vw,23px);font-style:italic;color:#fff2d5}
.cdl-eyebrow{letter-spacing:.33em;color:#e6c98a;font-size:12px}
#cdl-enter{font-size:18px;padding:15px 30px;margin-top:28px}
.cdl-opening.is-closing{animation:cdlFade .55s forwards}@keyframes cdlFade{to{opacity:0;visibility:hidden}}
@media(max-width:700px){main{padding:8px}section{padding:15px}#auth button{min-width:0}.cdl-opening-scene{min-height:80dvh}.cdl-opening-copy{padding:22px 12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

.cdl-finale[hidden]{display:none!important}
.cdl-finale{position:fixed;inset:0;z-index:8500;display:grid;place-items:center;padding:18px;background:radial-gradient(ellipse at center,#092545d9,#010711f5),url('/ui/mystere') center/cover}
.cdl-finale-inner{width:min(640px,100%);text-align:center;border:3px double #e3b86d;border-radius:16px;padding:clamp(24px,5vw,55px);background:linear-gradient(135deg,#112f4df5,#071527f8);box-shadow:0 0 0 6px #0c223c,0 20px 65px #000c}
.cdl-finale-inner h2{font-size:clamp(38px,6vw,70px);font-style:italic;line-height:1.05;color:#f9d98c;text-shadow:0 4px 12px #000;margin:25px 0}
.cdl-finale-inner p{font-size:20px;line-height:1.6;color:#f8e9c8}
.cdl-finale-inner button{margin:10px}

#board-numbers{position:absolute;inset:0;pointer-events:none;z-index:2}
#board-numbers[hidden]{display:none!important}
.board-number{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:clamp(11px,1.25vw,19px);height:clamp(11px,1.25vw,19px);border:1px solid #e4bb69;border-radius:50%;background:#06182bdc;color:#ffe29a;font:700 clamp(7px,.75vw,11px) system-ui,sans-serif;line-height:1;text-shadow:0 1px 2px #000;box-shadow:0 1px 4px #000b}
.board-number.current{background:#e2a846;color:#092138;border:2px solid #fff2c9;z-index:4;transform:translate(-50%,-50%) scale(1.45)}
.board-number.possible{background:#1f805a;color:#fff;border:2px solid #e6f9b5;z-index:3;transform:translate(-50%,-50%) scale(1.25)}
#game-pane-board #toggle-numbers{padding:8px 12px;font-size:13px}

/* Carrousel des univers V3 â€” illustrations originales, aucun changement du plateau */
.v3-theme-carousel{display:grid;grid-template-columns:46px minmax(0,1fr) 46px;gap:8px;align-items:center;margin:18px 0 6px}
.v3-carousel-viewport{overflow:hidden;border-radius:16px;box-shadow:0 12px 36px #0009}
.v3-theme-carousel .v3-themes{display:flex;gap:0;margin:0;transition:transform .4s cubic-bezier(.2,.75,.25,1)}
.v3-theme-carousel .v3-theme{flex:0 0 100%;width:100%;margin:0;min-width:0;display:flex;flex-direction:column;border:2px solid #b98a47;border-radius:14px;background:linear-gradient(#09223c,#061427);transform:none!important}
.v3-theme-carousel .v3-theme img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.v3-theme-carousel .v3-theme strong{font-size:clamp(21px,3vw,32px);font-style:italic;padding:14px 12px 5px;background:transparent}
.v3-theme-carousel .v3-theme span{display:block;padding:0 12px 18px;font-size:15px;color:#d9c8a5}
.v3-theme-carousel .v3-theme.selected{box-shadow:inset 0 0 0 3px #e8c47455;border:2px solid #f0ce83}
.v3-theme-carousel .v3-theme:hover img{transform:none}
.v3-carousel-arrow{height:70px;width:46px;margin:0;padding:0;font-size:27px;border-radius:12px;background:linear-gradient(#f7da90,#b78539)}
.v3-carousel-bottom{display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;margin:12px 0 18px}
#theme-indicator{color:#f3d18d;font-weight:bold;letter-spacing:3px}
#theme-confirm{padding:12px 22px;font-size:17px}
#theme-confirm.confirmed{background:linear-gradient(#d2efbe,#6baf73)}
@media(max-width:600px){.v3-theme-carousel{grid-template-columns:32px minmax(0,1fr) 32px;gap:3px}.v3-carousel-arrow{width:32px;height:56px;font-size:20px}.v3-theme-carousel .v3-theme span{font-size:13px}.v3-theme-carousel .v3-theme strong{font-size:22px}}
@media(prefers-reduced-motion:reduce){.v3-theme-carousel .v3-themes{transition:none}}

/* Accueil en deux coffrets compacts, inspirÃ© du fond de la boÃ®te imprimÃ©e */
body:has(#lobby:not([hidden])){background:#030c19}
body:has(#lobby:not([hidden]))::before{position:fixed;inset:0;content:"";z-index:-1;opacity:1;background:linear-gradient(90deg,#170f0bdf 0%,#061324dc 12%,#061324dc 88%,#170f0bdf 100%),url('/ui/mystere') center center/cover fixed no-repeat}
body:has(#lobby:not([hidden])) main{max-width:1320px;width:calc(100% - 20px);margin:8px auto;padding:8px}
body:has(#lobby:not([hidden])) main>header{padding:8px 15px;margin:0 0 8px;text-align:center}
body:has(#lobby:not([hidden])) main>header h1{font-size:clamp(27px,3vw,38px);margin:0}
body:has(#lobby:not([hidden])) main>header p{display:none}
#lobby{max-width:none;margin:0;padding:12px 16px;background:linear-gradient(135deg,#061528ef,#0b2340ef),url('/ui/mystere') center/cover;border:2px solid #c69a52}
#lobby>h2{font-size:clamp(19px,2vw,26px);margin:0 0 8px;text-align:center}
#lobby #resume-panel{margin:0 0 10px;padding:8px 12px}
#lobby #resume-panel h3{font-size:17px;margin:0}
#lobby #resume-panel p{margin:3px 0}
.cdl-setup-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr);gap:14px;align-items:stretch}
.cdl-setup-box{min-width:0;border:2px solid #bf9655;border-radius:14px;padding:12px;background:linear-gradient(135deg,#09213af5,#07182df7);box-shadow:inset 0 0 0 3px #e2b86c22,0 10px 28px #0008}
.cdl-setup-box>h3{margin:0 0 9px;font-size:clamp(18px,2vw,24px);font-style:italic;text-align:center}
.cdl-setup-theme{display:flex;flex-direction:column;justify-content:flex-start}
.cdl-setup-theme .v3-theme-carousel{margin:0;grid-template-columns:34px minmax(0,1fr) 34px;gap:5px}
.cdl-setup-theme .v3-carousel-arrow{width:34px;height:54px;font-size:20px}
.cdl-setup-theme .v3-carousel-viewport{max-width:100%;box-shadow:0 5px 16px #0008}
.cdl-setup-theme .v3-theme-carousel .v3-theme img{height:clamp(150px,24vh,230px);aspect-ratio:auto;object-fit:cover}
.cdl-setup-theme .v3-theme-carousel .v3-theme strong{font-size:clamp(17px,1.7vw,22px);padding:7px 8px 2px}
.cdl-setup-theme .v3-theme-carousel .v3-theme span{font-size:12px;padding:0 8px 8px}
.cdl-setup-theme .v3-carousel-bottom{margin:8px 0 0;gap:12px}
.cdl-setup-theme #theme-confirm{padding:8px 12px;font-size:14px}
.cdl-mode-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.cdl-setup-options{display:flex;flex-direction:column;gap:8px}
.cdl-setup-options>label{display:block;margin:0;font-size:14px}
.cdl-setup-options select{display:block;width:100%;margin-top:4px;padding:9px}
.cdl-setup-options #solo-config,.cdl-setup-options #online-config{margin:0;padding:10px;background:#071b32cc}
.cdl-setup-options #solo-config h3,.cdl-setup-options #online-config h3{font-size:17px;margin:0 0 6px}
.cdl-setup-options #solo-config button,.cdl-setup-options #online-config button{width:100%;margin-top:9px;padding:10px}
.cdl-setup-options .v3-note{font-size:11px;line-height:1.3;margin:0;color:#c1b69c}
.cdl-setup-options #logout{align-self:flex-end;padding:6px 12px;font-size:12px}
body:has(#lobby:not([hidden])) main>footer{font-size:10px;padding:4px}
@media(max-width:760px){.cdl-setup-grid{grid-template-columns:1fr}.cdl-setup-theme .v3-theme-carousel .v3-theme img{height:190px}#lobby{padding:10px}body:has(#lobby:not([hidden])) main{width:calc(100% - 10px)}}
@media(min-width:761px) and (max-height:760px){.cdl-setup-theme .v3-theme-carousel .v3-theme img{height:clamp(125px,20vh,170px)}.cdl-setup-options{gap:5px}.cdl-setup-box{padding:9px}}

/* Main privÃ©e en Ã©ventail sous le plateau, inspirÃ©e de la belote */
#game-pane-board #cdl-hand-tray{grid-column:1;grid-row:15;position:relative;min-width:0;max-width:100%;margin:0!important;padding:7px 8px 3px;border:1px solid #caa15b;border-radius:12px;background:linear-gradient(180deg,#123656,#07182d);box-shadow:inset 0 0 0 2px #dfba7020,0 8px 20px #0007}
#game-pane-board #cdl-hand-tray[hidden]{display:none!important}
.cdl-hand-caption{display:flex;align-items:center;justify-content:space-between;gap:7px;flex-wrap:wrap;font-size:13px;color:#f7d98c}
.cdl-hand-caption strong{font-size:15px}
.cdl-hand-caption button{font-size:11px;padding:4px 9px}
.cdl-hand-fan{height:124px;display:flex;align-items:flex-start;justify-content:center;padding:10px 14px 0;overflow:visible;position:relative;isolation:isolate}
.cdl-fan-card{position:relative;flex:0 1 70px;min-width:0;width:70px;height:105px;padding:3px;margin:0 -5px;border:2px solid #d9b46d;border-radius:8px;background:#122b43;box-shadow:0 4px 9px #0009;transform:translateY(var(--card-offset)) rotate(var(--card-rotation));transform-origin:center 135%;transition:transform .2s,box-shadow .2s;overflow:hidden;cursor:pointer}
.cdl-fan-card:hover,.cdl-fan-card:focus-visible{transform:translateY(-25px) rotate(0deg) scale(1.2);z-index:100!important;box-shadow:0 9px 24px #000e;outline:2px solid #ffdc8c}
.cdl-fan-card img{display:block;width:100%;height:79px;object-fit:cover;border-radius:4px}
.cdl-fan-card span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:9px;line-height:16px;color:#ffe4a7;text-align:center}
.cdl-hand-viewer{position:fixed;inset:0;z-index:9500;display:grid;place-items:center;padding:16px;background:#000c}
.cdl-hand-viewer-content{max-height:95dvh;overflow:auto;width:min(440px,95vw);padding:18px;border:3px double #e4bf76;border-radius:15px;text-align:center;background:linear-gradient(135deg,#173c59,#061628);box-shadow:0 18px 60px #000c}
.cdl-hand-viewer-content h2{font-size:25px;color:#ffe09a;margin:0 0 12px}
.cdl-hand-viewer-content img{display:block;max-width:100%;max-height:64dvh;object-fit:contain;margin:auto}
.cdl-hand-viewer-content p{font-style:italic;color:#e8d5ac}
@media(max-width:900px){#game-pane-board #cdl-hand-tray{grid-row:auto;grid-column:1}.cdl-hand-fan{height:115px}.cdl-fan-card{flex-basis:65px;width:65px;height:100px}.cdl-fan-card img{height:75px}}
@media(max-width:480px){.cdl-hand-fan{padding-left:4px;padding-right:4px;height:105px}.cdl-fan-card{flex-basis:53px;width:53px;height:87px;margin:0 -4px}.cdl-fan-card img{height:63px}.cdl-fan-card span{font-size:8px}}

/* Mode jeu plein Ã©cran adaptatif â€” plateau intact, aucun scroll global */
html:has(#game:not([hidden])),body:has(#game:not([hidden])){height:100%;min-height:100%;overflow:hidden}
body:has(#game:not([hidden])){margin:0;padding:0;background:#061326}
body:has(#game:not([hidden])) main{box-sizing:border-box;width:100vw;max-width:none;height:100dvh;min-height:0;margin:0;padding:5px 9px;overflow:hidden}
body:has(#game:not([hidden])) main>header,body:has(#game:not([hidden])) main>footer{display:none!important}
body:has(#game:not([hidden])) #message{position:fixed;bottom:4px;right:14px;max-width:45vw;z-index:20;margin:0;padding:3px 9px;font-size:12px;pointer-events:none}
#game:not([hidden]){box-sizing:border-box;width:100%;height:calc(100dvh - 10px);min-height:0;max-height:none;margin:0;padding:7px 12px;overflow:hidden;display:flex;flex-direction:column;gap:5px}
#game:not([hidden]) .game-tabs{flex:0 0 auto;margin:0;padding:0 0 6px;min-height:34px}
#game:not([hidden]) .game-tabs button{padding:7px 12px;font-size:13px}
#game:not([hidden]) #game-pane-board:not([hidden]){display:grid;flex:1 1 auto;min-height:0;overflow:hidden;grid-template-columns:minmax(0,1.65fr) minmax(300px,.9fr);grid-template-rows:minmax(0,1fr) auto;gap:6px 12px;align-content:stretch;align-items:start}
#game-pane-board #board-stage{grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:center!important;width:auto!important;max-width:100%!important;max-height:100%!important;height:auto!important;min-height:0!important;overflow:hidden}
#game-pane-board #board-stage>img{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:calc(100dvh - 205px)!important;object-fit:contain}
#game-pane-board #cdl-hand-tray{grid-column:1!important;grid-row:2!important;align-self:end!important;max-height:145px;min-height:0;padding:5px 8px!important}
#game-pane-board .cdl-hand-fan{height:108px;padding-top:5px}
#game-pane-board .cdl-fan-card{height:94px;flex-basis:64px;width:64px}
#game-pane-board .cdl-fan-card img{height:68px}
#game-pane-board> :not(#board-stage):not(#cdl-hand-tray){grid-column:2!important;grid-row:auto!important;max-width:100%;margin:0!important}
#game-pane-board #toggle-numbers,#game-pane-board #board-compare,#game-pane-board #tv-mode{display:none!important}
#game-pane-board #game-status{padding:5px 9px;font-size:14px;line-height:1.3}
#game-pane-board #game-players{gap:4px}
#game-pane-board #game-players .seat{padding:3px 6px;font-size:11px}
#game-pane-board #dice-visual{gap:8px}
#game-pane-board #dice-visual .die{width:38px;height:38px;font-size:32px}
#game-pane-board #dice-result{font-size:13px}
#game-pane-board #direction-choices:not(:empty){gap:6px;padding:7px}
#game-pane-board #direction-choices .v3-direction-card{min-height:80px;max-width:none;flex-basis:100px;padding:6px;gap:3px}
#game-pane-board #direction-choices .v3-direction-icon{font-size:20px}
#game-pane-board #direction-choices .v3-direction-card strong{font-size:12px}
#game-pane-board #direction-choices .v3-direction-card small{font-size:11px}
#game-pane-board #location-actions:not([hidden]){padding:7px}
#game-pane-board #location-actions button{padding:7px 9px;font-size:12px}
#game-pane-board #game-roll,#game-pane-board #refresh-game,#game-pane-board #leave-game,#game-pane-board #game-stay{padding:7px 10px;font-size:12px;min-height:0}
#game-pane-board #game-end-turn[hidden],#game-pane-board #game-stay[hidden]{display:none!important}
#game-pane-board #refresh-game{display:none!important}
#game-pane-board #leave-game{opacity:.8}
#game:not([hidden]) #game-pane-cards:not([hidden]){flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;align-content:start}
#game-pane-cards #private-hand .private-card-grid{grid-template-columns:repeat(auto-fill,minmax(115px,1fr))}
#game-pane-cards #private-hand .private-card{min-height:160px}
#game-pane-cards #private-hand .private-card-art{max-height:105px}
@media(max-width:850px){html:has(#game:not([hidden])),body:has(#game:not([hidden])){overflow:auto;height:auto}body:has(#game:not([hidden])) main{height:auto;min-height:100dvh;overflow:visible}#game:not([hidden]){height:auto;min-height:100dvh;overflow:visible}#game:not([hidden]) #game-pane-board:not([hidden]){grid-template-columns:1fr;grid-template-rows:auto auto;overflow:visible}#game-pane-board #board-stage{grid-column:1!important;grid-row:1!important}#game-pane-board #cdl-hand-tray{grid-column:1!important;grid-row:2!important}#game-pane-board> :not(#board-stage):not(#cdl-hand-tray){grid-column:1!important}#game-pane-board #board-stage>img{max-height:55dvh!important}}
@media(min-width:851px) and (max-height:650px){#game-pane-board #board-stage>img{max-height:calc(100dvh - 170px)!important}#game-pane-board #cdl-hand-tray{max-height:110px}#game-pane-board .cdl-hand-fan{height:77px}#game-pane-board .cdl-fan-card{height:70px;flex-basis:51px}#game-pane-board .cdl-fan-card img{height:48px}}

/* Colonne de commandes fixe, indÃ©pendante du plateau */
#game:not([hidden]) #game-pane-board:not([hidden]){grid-template-rows:minmax(0,1fr) auto}
#game-pane-board #cdl-game-sidebar{grid-column:2!important;grid-row:1 / span 2!important;display:flex;flex-direction:column;gap:7px;min-height:0;max-height:100%;overflow-y:auto;overflow-x:hidden;padding:2px 4px 2px 0;scrollbar-width:thin;scrollbar-color:#9c7741 #08192b}
#game-pane-board #cdl-game-sidebar>*{flex:0 0 auto;margin:0!important;max-width:100%}
#game-pane-board #cdl-game-sidebar #toggle-numbers,#game-pane-board #cdl-game-sidebar #board-compare,#game-pane-board #cdl-game-sidebar #tv-mode,#game-pane-board #cdl-game-sidebar #refresh-game{display:none!important}
#game-pane-board #cdl-game-sidebar #game-status{order:0}
#game-pane-board #cdl-game-sidebar #game-players{order:1}
#game-pane-board #cdl-game-sidebar #dice-visual{order:2}
#game-pane-board #cdl-game-sidebar #dice-result{order:3}
#game-pane-board #cdl-game-sidebar #direction-choices{order:4}
#game-pane-board #cdl-game-sidebar #event-choices,#game-pane-board #cdl-game-sidebar #event-stay-choices,#game-pane-board #cdl-game-sidebar #event-show-choices,#game-pane-board #cdl-game-sidebar #clue-target-choices{order:5}
#game-pane-board #cdl-game-sidebar #event-status{order:6}
#game-pane-board #cdl-game-sidebar #location-actions{order:7}
#game-pane-board #cdl-game-sidebar #game-stay,#game-pane-board #cdl-game-sidebar #game-roll{order:8}
#game-pane-board #cdl-game-sidebar #game-end-turn{order:9}
#game-pane-board #cdl-game-sidebar #leave-game{order:10}
#game-pane-board #cdl-game-sidebar #direction-choices:empty,#game-pane-board #cdl-game-sidebar #event-choices:empty,#game-pane-board #cdl-game-sidebar #event-stay-choices:empty,#game-pane-board #cdl-game-sidebar #event-show-choices:empty,#game-pane-board #cdl-game-sidebar #clue-target-choices:empty,#game-pane-board #cdl-game-sidebar #event-status:empty{display:none!important}
#game-pane-board #cdl-game-sidebar #leave-game{margin-top:auto!important}
@media(max-width:850px){#game-pane-board #cdl-game-sidebar{grid-column:1!important;grid-row:3!important;max-height:none;overflow:visible}}

/* Correction largeur rÃ©elle : l'ancien #game max-width:1100px limitait l'interface */
body:has(#game:not([hidden])) #game{max-width:none!important;width:100%!important;min-width:0!important}
body:has(#game:not([hidden])) main{max-width:none!important;width:100vw!important;margin:0!important}
#game:not([hidden]) #game-pane-board:not([hidden]){width:100%;grid-template-columns:minmax(0,1.9fr) minmax(350px,.85fr);column-gap:16px}
#game-pane-board #board-stage{justify-self:center!important;align-self:center!important}
#game-pane-board #board-stage>img{max-height:calc(100dvh - 185px)!important}
#game-pane-board #cdl-hand-tray{width:min(100%,950px);justify-self:center!important}
#game-pane-board #cdl-game-sidebar{width:100%;padding:5px 8px;border:1px solid #99763e;border-radius:12px;background:linear-gradient(160deg,#0d2944,#061529);box-shadow:inset 0 0 0 2px #d5ad5b15}
#game-pane-board .cdl-hand-fan{height:112px}
#game-pane-board .cdl-fan-card{flex-basis:72px;width:72px;height:99px}
#game-pane-board .cdl-fan-card img{height:73px}
@media(min-width:851px) and (max-height:740px){#game-pane-board #board-stage>img{max-height:calc(100dvh - 165px)!important}#game-pane-board .cdl-hand-fan{height:85px}#game-pane-board .cdl-fan-card{flex-basis:56px;width:56px;height:76px}#game-pane-board .cdl-fan-card img{height:52px}}
@media(max-width:850px){#game:not([hidden]) #game-pane-board:not([hidden]){grid-template-columns:1fr}#game-pane-board #cdl-game-sidebar{grid-column:1!important;grid-row:3!important}}

/* Correctif anti-rognage : le plateau entier doit toujours tenir au-dessus de la main */
#game:not([hidden]) #game-pane-board:not([hidden]){grid-template-rows:minmax(0,1fr) 145px!important;align-items:stretch!important}
#game-pane-board #board-stage{box-sizing:border-box!important;grid-row:1!important;align-self:center!important;justify-self:center!important;max-height:100%!important;max-width:100%!important;overflow:visible!important}
#game-pane-board #board-stage>img{display:block!important;width:auto!important;height:auto!important;max-height:min(calc(100dvh - 245px),100%)!important;max-width:100%!important;object-fit:contain!important}
#game-pane-board #cdl-hand-tray{grid-row:2!important;max-height:145px!important;align-self:center!important}
#game-pane-board #cdl-game-sidebar{grid-row:1 / span 2!important}
@media(min-width:851px) and (max-height:750px){#game:not([hidden]) #game-pane-board:not([hidden]){grid-template-rows:minmax(0,1fr) 115px!important}#game-pane-board #board-stage>img{max-height:calc(100dvh - 200px)!important}#game-pane-board #cdl-hand-tray{max-height:115px!important}}
@media(max-width:850px){#game:not([hidden]) #game-pane-board:not([hidden]){grid-template-rows:auto auto auto!important}#game-pane-board #board-stage>img{max-height:55dvh!important}#game-pane-board #cdl-game-sidebar{grid-row:3!important}}

/* PRIORITÃ‰ : plateau complet 4:3, jamais rognÃ©, avec bande main rÃ©servÃ©e */
@media(min-width:851px){
 #game:not([hidden]) #game-pane-board:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(310px,.45fr)!important;grid-template-rows:minmax(0,1fr) 132px!important;min-height:0!important;overflow:hidden!important}
 #game-pane-board #board-stage{grid-column:1!important;grid-row:1!important;box-sizing:border-box!important;position:relative!important;display:block!important;aspect-ratio:4/3!important;width:min(100%,calc((100dvh - 230px)*4/3))!important;height:auto!important;max-width:100%!important;max-height:100%!important;min-height:0!important;margin:auto!important;align-self:center!important;justify-self:center!important;overflow:hidden!important}
 #game-pane-board #board-stage>img{display:block!important;position:relative!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:fill!important;margin:0!important}
 #game-pane-board #cdl-hand-tray{grid-column:1!important;grid-row:2!important;max-height:132px!important;width:min(100%,950px)!important;align-self:center!important;justify-self:center!important}
 #game-pane-board #cdl-game-sidebar{grid-column:2!important;grid-row:1/span 2!important}
 #game-pane-board .board-note{display:none!important}
}
@media(min-width:851px) and (max-height:720px){
 #game:not([hidden]) #game-pane-board:not([hidden]){grid-template-rows:minmax(0,1fr) 105px!important}
 #game-pane-board #board-stage{width:min(100%,calc((100dvh - 190px)*4/3))!important}
 #game-pane-board #cdl-hand-tray{max-height:105px!important}
}

/* Deux dÃ©s 3D CSS â€” mÃªmes rÃ©sultats que le moteur de jeu */
#game-pane-board #cdl-game-sidebar #dice-visual{display:flex;align-items:center;justify-content:center;gap:22px;min-height:80px;perspective:700px;overflow:visible;padding:13px 8px}
#game-pane-board #cdl-game-sidebar .cdl-die3d-slot{--die-size:49px;display:block!important;position:relative!important;width:var(--die-size)!important;height:var(--die-size)!important;flex:0 0 var(--die-size);background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;perspective:600px;overflow:visible!important;font-size:0!important}
.cdl-die3d-cube{position:absolute;inset:0;display:block;transform-style:preserve-3d;transition:transform .85s cubic-bezier(.12,.7,.25,1.1);filter:drop-shadow(4px 7px 5px #0009)}
.cdl-die3d-face{position:absolute;inset:0;display:block;border:2px solid #d6cbb3;border-radius:9px;background:linear-gradient(135deg,#fffdf2,#ece6d4);box-shadow:inset -5px -5px 10px #9c998b77,inset 3px 3px 6px #fff;backface-visibility:hidden;transform-style:preserve-3d}
.cdl-die3d-face i{position:absolute;width:18%;height:18%;border-radius:50%;background:radial-gradient(circle at 35% 30%,#38434b,#071423 70%);box-shadow:inset 1px 2px 3px #000b;transform:translate(-50%,-50%)}
.cdl-die3d-face.face-1{transform:translateZ(calc(var(--die-size) / 2))}
.cdl-die3d-face.face-2{transform:rotateY(90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-die3d-face.face-3{transform:rotateX(90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-die3d-face.face-4{transform:rotateX(-90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-die3d-face.face-5{transform:rotateY(-90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-die3d-face.face-6{transform:rotateY(180deg) translateZ(calc(var(--die-size) / 2))}
.cdl-die-empty{opacity:.7}
.cdl-die-empty .cdl-die3d-cube{transform:rotateX(-24deg) rotateY(-30deg)!important}
.cdl-die-rolling .cdl-die3d-cube{animation:cdlDiceRoll .85s ease-out}
@keyframes cdlDiceRoll{0%{filter:drop-shadow(0 12px 4px #0008);translate:0 -15px;scale:.9}45%{translate:0 -25px;scale:1.12}70%{translate:0 -4px;scale:.96}100%{translate:0 0;scale:1}}
@media(max-height:700px){#game-pane-board #cdl-game-sidebar .cdl-die3d-slot{--die-size:40px}#game-pane-board #cdl-game-sidebar #dice-visual{min-height:60px;padding:7px}}
@media(prefers-reduced-motion:reduce){.cdl-die-rolling .cdl-die3d-cube{animation:none}}

/* DÃ©s 3D : slots sÃ©parÃ©s, sans superposition, valeurs visibles */
#game-pane-board #cdl-game-sidebar #dice-visual{display:flex!important;flex-direction:row!important;justify-content:center!important;align-items:center!important;gap:34px!important;min-height:105px!important;overflow:visible!important;padding:12px 14px 25px!important}
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-die3d-slot{--die-size:54px;display:block!important;position:relative!important;flex:0 0 54px!important;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;max-width:54px!important;max-height:54px!important;margin:0!important;padding:0!important;overflow:visible!important;transform:none!important;perspective:420px!important;isolation:isolate}
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-die3d-cube{position:absolute!important;inset:0!important;width:54px!important;height:54px!important;transform-style:preserve-3d!important;backface-visibility:visible!important}
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-die3d-face{width:54px!important;height:54px!important;display:block!important;backface-visibility:hidden!important}
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-die3d-face i{display:block!important}
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-die-value{position:absolute;left:50%;top:60px;transform:translateX(-50%);display:block;color:#ffe5a6;font:700 13px Georgia,serif;text-align:center;min-width:20px;text-shadow:0 2px 3px #000}
@media(max-height:700px){#game-pane-board #cdl-game-sidebar #dice-visual{min-height:95px!important;padding:8px 12px 23px!important}}

#game-pane-board #cdl-game-sidebar .cdl-die3d-slot .cdl-real-die{position:absolute;left:50%;top:50%;width:84px;height:84px;transform:translate(-50%,-50%);z-index:5;pointer-events:none}
#game-pane-board #cdl-game-sidebar .cdl-die3d-slot .cdl-real-die[hidden]{display:none!important}
#game-pane-board #cdl-game-sidebar .cdl-die3d-slot.cdl-glb-spinning .cdl-die3d-cube{visibility:hidden!important}

/* DÃ©s Unreal Android reproduits dans le navigateur : deux cubes indÃ©pendants */
#game-pane-board #cdl-game-sidebar #dice-visual{display:flex!important;align-items:center!important;justify-content:center!important;gap:34px!important;min-height:115px!important;overflow:visible!important;padding:12px 10px 28px!important}
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-android-die{
 --die-size:58px;display:block!important;position:relative!important;
 width:58px!important;height:58px!important;flex:0 0 58px!important;
 min-width:58px!important;min-height:58px!important;max-width:58px!important;max-height:58px!important;
 padding:0!important;margin:0!important;border:0!important;background:none!important;
 box-shadow:none!important;border-radius:0!important;overflow:visible!important;
 perspective:550px!important;isolation:isolate;font-size:0!important
}
.cdl-android-cube{position:absolute;inset:0;display:block;transform-style:preserve-3d;
 transform:rotateX(-16deg) rotateY(-24deg);filter:drop-shadow(5px 8px 4px #0009)}
.cdl-android-face{position:absolute;inset:0;display:block;width:100%;height:100%;
 border:2px solid #cfc8b8;border-radius:10px;
 background:linear-gradient(135deg,#fffef8,#e5ddc9);
 box-shadow:inset 2px 2px 5px #fff,inset -5px -6px 9px #aaa18c77;
 backface-visibility:hidden}
.cdl-android-face i{position:absolute;width:17%;height:17%;display:block;border-radius:50%;
 transform:translate(-50%,-50%);background:radial-gradient(circle at 30% 25%,#3e4448,#09111b 75%);
 box-shadow:inset 1px 2px 2px #0008}
.cdl-android-face-0{transform:translateZ(calc(var(--die-size) / 2))}
.cdl-android-face-1{transform:rotateY(180deg) translateZ(calc(var(--die-size) / 2))}
.cdl-android-face-2{transform:rotateY(-90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-android-face-3{transform:rotateY(90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-android-face-4{transform:rotateX(90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-android-face-5{transform:rotateX(-90deg) translateZ(calc(var(--die-size) / 2))}
.cdl-android-value{position:absolute;top:65px;left:50%;transform:translateX(-50%);
 color:#ffe3a1;font:bold 14px Georgia,serif;text-shadow:0 2px 3px #000}
.cdl-android-waiting{opacity:.75}
.cdl-android-rolling{animation:cdlAndroidRoll 1.15s cubic-bezier(.18,.67,.24,1) both}
@keyframes cdlAndroidRoll{
 0%{transform:translateY(-12px) rotateX(700deg) rotateY(540deg) rotateZ(90deg)}
 60%{transform:translateY(-21px) rotateX(260deg) rotateY(210deg) rotateZ(40deg)}
 83%{transform:translateY(0) rotateX(-25deg) rotateY(-30deg)}
 100%{transform:translateY(0) rotateX(-16deg) rotateY(-24deg)}
}
#game-pane-board #cdl-game-sidebar #cdl-die-import{display:none!important}
@media(prefers-reduced-motion:reduce){.cdl-android-rolling{animation:none}}

/* Rendu Three.js : vÃ©ritable volume, ombres et perspective */
#game-pane-board #cdl-game-sidebar #dice-visual .cdl-android-die{width:100px!important;height:100px!important;flex:0 0 100px!important;min-width:100px!important;min-height:100px!important;max-width:100px!important;max-height:100px!important}
#game-pane-board #cdl-game-sidebar #dice-visual{gap:16px!important;min-height:137px!important;padding:5px 5px 22px!important}
#game-pane-board #cdl-game-sidebar .cdl-three-canvas{display:block!important;position:absolute;inset:0;width:100px!important;height:100px!important;z-index:8;pointer-events:none}
#game-pane-board #cdl-game-sidebar .cdl-android-die .cdl-android-cube[hidden]{display:none!important}
#game-pane-board #cdl-game-sidebar .cdl-android-value{top:99px!important;z-index:9}

/* CinÃ©matique d'entrÃ©e dans les lieux : n'altÃ¨re pas le plateau */
.cdl-entrance[hidden]{display:none!important}
.cdl-entrance{position:fixed;inset:0;z-index:9998;background:#020c19e8;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(7px)}
.cdl-entrance-scene{position:relative;width:min(92vw,960px);height:min(78vh,610px);overflow:hidden;border:2px solid #d8ad57;border-radius:18px;background:linear-gradient(160deg,#203d57,#091b2e);box-shadow:0 20px 70px #000c}
.cdl-entrance-visual{position:absolute;inset:0;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;background:linear-gradient(#173a5d 0%,#496e7b 50%,#4a5141 51%,#202a29 100%);animation:cdl-approach 2.5s ease-out both}
.cdl-entrance-facade{position:absolute;bottom:0;width:min(70%,550px);height:82%;background:linear-gradient(105deg,#d4c5a3,#a98e69);border:8px solid #87745d;box-shadow:0 0 45px #0008;display:flex;align-items:flex-end;justify-content:space-around;padding:0 8%}
.cdl-entrance-roof{position:absolute;bottom:100%;left:-10%;width:120%;height:14%;background:repeating-linear-gradient(15deg,#9b5038 0 22px,#7e3c31 23px 28px);clip-path:polygon(0 100%,50% 0,100% 100%)}
.cdl-entrance-window{width:22%;height:32%;margin-bottom:24%;background:linear-gradient(145deg,#1a3145,#50768a);border:8px solid #b8a17b;box-shadow:inset 0 0 0 3px #493827}
.cdl-entrance-door{width:32%;height:65%;background:linear-gradient(90deg,#422c1e,#765037,#382619);border:10px solid #9a7b52;border-radius:45% 45% 0 0;position:relative;transform-origin:left center}
.cdl-entrance-handle{position:absolute;right:14%;top:55%;width:9px;height:9px;border-radius:50%;background:#e9c776}
.cdl-entrance-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#122238}
.cdl-entrance-content{position:absolute;left:0;right:0;bottom:0;padding:28px 32px 22px;color:#fff;background:linear-gradient(transparent,#061322ed 22%,#061322 100%);text-align:center}
.cdl-entrance-kicker{font:700 12px Georgia,serif;letter-spacing:.15em;color:#e7c77f}
.cdl-entrance-content h2{font:700 clamp(23px,4vw,37px) Georgia,serif;margin:8px 0;color:#ffdf94}
.cdl-entrance-content p{font-size:13px;margin:0 0 14px;color:#e0e7eb}
.cdl-entrance-content button{border:1px solid #e1b968;border-radius:8px;background:linear-gradient(#f7d98c,#ad792b);color:#142135;font-weight:700;padding:10px 20px;margin:4px;cursor:pointer}
.cdl-entrance-content #cdl-entrance-skip{background:#0d243c;color:#fff}
.cdl-entering .cdl-entrance-visual{animation:cdl-enter-zoom .95s ease-in forwards}
.cdl-entering .cdl-entrance-door{animation:cdl-door-open .7s ease-in forwards}
.cdl-entering .cdl-entrance-content{opacity:0;transition:opacity .2s}
@keyframes cdl-approach{from{transform:scale(.76)}to{transform:scale(1)}}
@keyframes cdl-enter-zoom{from{transform:scale(1)}to{transform:scale(3)}}
@keyframes cdl-door-open{to{transform:perspective(400px) rotateY(-70deg)}}
@media(prefers-reduced-motion:reduce){.cdl-entrance-visual,.cdl-entering .cdl-entrance-visual,.cdl-entering .cdl-entrance-door{animation:none!important}}

/* Ã‰tape 2 : dÃ©cors d'intÃ©rieurs reconstituÃ©s, par catÃ©gorie de lieu */
.cdl-entrance-scene .cdl-interior[hidden]{display:none!important}
.cdl-entrance-scene .cdl-interior{position:absolute;inset:0;overflow:hidden;perspective:750px;background:#9c876c}
.cdl-room-ceiling{position:absolute;inset:0 0 55%;background:linear-gradient(#5e534b,#b9a489);clip-path:polygon(0 0,100% 0,80% 100%,20% 100%)}
.cdl-room-wall{position:absolute;inset:8% 0 22%;display:flex}
.cdl-room-left,.cdl-room-right{width:25%;background:linear-gradient(90deg,#77604c,#c9b49a);clip-path:polygon(0 0,100% 20%,100% 80%,0 100%)}
.cdl-room-right{background:linear-gradient(90deg,#c9b49a,#79624d);clip-path:polygon(0 20%,100% 0,100% 100%,0 80%)}
.cdl-room-back{width:50%;background:linear-gradient(120deg,#d9c5a7,#ae9575);display:flex;align-items:center;justify-content:space-around;box-shadow:inset 0 0 25px #51402e77}
.cdl-room-window{width:17%;height:42%;border:8px solid #73553c;background:linear-gradient(#6ba7c8,#cde1dd);box-shadow:inset 0 0 0 3px #c5aa7c}
.cdl-room-feature{width:43%;height:63%;display:flex;align-items:center;justify-content:center;border:9px solid #896c4b;background:linear-gradient(135deg,#63472f,#b39062)}
.cdl-room-detail{width:72%;height:65%;background:linear-gradient(#d3bc88,#856747);border:5px solid #513d2b}
.cdl-room-floor{position:absolute;inset:68% 0 0;background:repeating-linear-gradient(90deg,#8a644a 0 48px,#684b38 49px 52px);clip-path:polygon(20% 0,80% 0,100% 100%,0 100%);transform:scaleX(1.6)}
.cdl-room-furniture{position:absolute;inset:45% 0 20%;display:flex;justify-content:space-around;align-items:flex-end}
.cdl-room-furniture span{width:18%;height:40%;background:linear-gradient(100deg,#573a28,#a27c53);border:6px solid #3c2b21;box-shadow:5px 8px 14px #0005}
.cdl-room-furniture span:nth-child(2){height:54%;width:24%}
.cdl-entrance-scene[data-room="restaurant"] .cdl-room-furniture span{height:25%;border-radius:50%;box-shadow:0 18px 0 -6px #69412b,0 25px 0 -5px #34231d}
.cdl-entrance-scene[data-room="mairie"] .cdl-room-furniture span{height:33%;background:linear-gradient(#9b7851,#65442f)}
.cdl-entrance-scene[data-room="eglise"] .cdl-room-back{background:linear-gradient(#8c7e6b,#c7b8a3)}
.cdl-entrance-scene[data-room="eglise"] .cdl-room-window{border-radius:50% 50% 0 0;background:linear-gradient(40deg,#2356a3 30%,#b53d43 45%,#e7be56 75%)}
.cdl-entrance-scene[data-room="eglise"] .cdl-room-furniture span{height:18%;width:24%;background:#583d29}
.cdl-entrance-scene[data-room="atelier"] .cdl-room-furniture span{height:28%;background:repeating-linear-gradient(90deg,#7e5436 0 25px,#986d45 26px 29px)}
.cdl-entrance-scene[data-room="commerce"] .cdl-room-furniture span{height:58%;width:16%;background:repeating-linear-gradient(0deg,#947250 0 23px,#523b2b 24px 28px)}
.cdl-entrance-scene[data-room="patrimoine"] .cdl-room-wall{filter:saturate(.65)}
.cdl-entrance-scene.cdl-room-active .cdl-entrance-visual{display:none}
.cdl-entrance-scene.cdl-room-arriving .cdl-interior{animation:cdl-room-approach .9s ease-out both}
@keyframes cdl-room-approach{from{transform:scale(1.55);filter:blur(5px);opacity:.4}to{transform:scale(1);filter:blur(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.cdl-room-arriving .cdl-interior{animation:none!important}}

/* Visite immersive : panorama Ã©quirectangulaire Three.js et vues photo */
#cdl-360-viewer[hidden],#cdl-360-fallback[hidden],#cdl-360-canvas[hidden]{display:none!important}
#cdl-360-viewer{position:fixed;inset:0;z-index:10020;background:#061626;display:flex;flex-direction:column;color:#f4e3bc}
.cdl-360-header,.cdl-360-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 22px;background:#0c2943;border-bottom:1px solid #c9a05d;font:600 15px Georgia,serif}
.cdl-360-footer{border-top:1px solid #c9a05d;border-bottom:0;font-size:12px}
.cdl-360-header button,.cdl-360-footer button{background:linear-gradient(#f5d38b,#ae7c34);border:1px solid #dfb467;border-radius:8px;color:#10213a;padding:9px 16px;font-weight:700;cursor:pointer}
.cdl-360-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#0c1e31}
#cdl-360-canvas,#cdl-360-fallback{position:absolute;inset:0;width:100%;height:100%}
#cdl-360-canvas canvas{width:100%!important;height:100%!important;display:block;touch-action:none;cursor:grab}
#cdl-360-fallback{display:flex;align-items:center;justify-content:center}
#cdl-360-fallback img{max-width:100%;max-height:100%;object-fit:contain}
#cdl-entrance-360:not([hidden]){background:linear-gradient(#b6d9e8,#4c95b1);color:#09273a}

/* Secours hors ligne : galerie des panoramas disponible mÃªme sans Three.js */
#cdl-360-fallback-viewer[hidden]{display:none!important}
#cdl-360-fallback-viewer{position:fixed;inset:0;z-index:10015;background:#07182a;display:flex;flex-direction:column;color:#ffe5aa}
.cdl-360-fb-head,.cdl-360-fb-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 20px;background:#102e49;border-bottom:1px solid #b99355}
.cdl-360-fb-head button,.cdl-360-fb-controls button{padding:10px 18px;border:1px solid #e5c17d;border-radius:8px;background:#cba458;color:#122238;font-weight:700;cursor:pointer}
.cdl-360-fb-scene{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.cdl-360-fb-scene img{display:block;max-width:100%;max-height:100%;object-fit:contain;touch-action:none;cursor:grab}
.cdl-360-hotspots{position:absolute;z-index:4;left:50%;bottom:90px;transform:translateX(-50%);display:flex;gap:18px}
.cdl-360-hotspots button{padding:12px 20px;border:1px solid #efce86;border-radius:20px;background:#102f4ce6;color:#fff1c6;box-shadow:0 5px 18px #0009;font-weight:700;cursor:pointer}
#location-360-direct{background:linear-gradient(#c9e5f2,#579dbb);color:#102739;font-weight:700}

/* Correctif : le plateau 3D doit avoir une hauteur explicite. */
#game-pane-board #board-stage.board-3d-active{height:min(calc(100dvh - 230px),calc(100vw * .75))!important;min-height:320px!important;aspect-ratio:4/3!important;overflow:hidden!important}
#game-pane-board #board-stage.board-3d-active #board-3d-scene{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
#game-pane-board #board-3d-controls{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px!important}
#game-pane-board #board-3d-controls button,#game-pane-board #board-3d-controls select{width:auto!important;min-width:44px!important;flex:0 1 auto!important;white-space:normal!important}
@media(max-width:850px){#game-pane-board #board-stage.board-3d-active{height:min(55dvh,calc(100vw * .75))!important;min-height:220px!important}}

/* Vue 3D prioritaire : aucune carte ne doit recouvrir la scÃ¨ne. */
@media(min-width:851px){
 #game-pane-board:has(#board-stage.board-3d-active) #board-stage.board-3d-active{height:min(68dvh,570px)!important;min-height:400px!important;max-height:none!important;align-self:start!important;grid-row:1!important}
 #game-pane-board:has(#board-stage.board-3d-active) #cdl-hand-tray{position:relative!important;grid-column:1!important;grid-row:2!important;align-self:end!important;z-index:1!important}
 #game-pane-board:has(#board-stage.board-3d-active) #cdl-game-sidebar{overflow-y:auto!important;min-height:0!important}
}

/* En vue 3D, la main reste accessible dans l'onglet Cartes, sans recouvrir le plateau. */
#game-pane-board:has(#board-stage.board-3d-active) #cdl-hand-tray{display:none!important}

/* Finitions de la colonne d'exploration 3D : commandes compactes et lisibles. */
#game-pane-board #board-3d-landmarks{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:6px!important;justify-content:center!important;align-items:center!important;margin:6px 0!important;padding:0!important}
#game-pane-board #board-3d-landmarks[hidden]{display:none!important}
#game-pane-board #board-3d-landmarks button{flex:1 1 130px!important;width:auto!important;max-width:100%!important;min-width:0!important;min-height:38px!important;margin:0!important;padding:6px 9px!important;font-size:12px!important;line-height:1.25!important;white-space:normal!important}
#game-pane-board #board-3d-explorer{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:8px!important;margin:8px 0!important;padding:0!important}
#game-pane-board #board-3d-explorer[hidden]{display:none!important}
#game-pane-board #board-3d-explorer label{display:block!important;flex:1 0 100%!important;text-align:center!important;line-height:1.3!important;margin:3px 0!important}
#game-pane-board #board-3d-explorer select{flex:1 1 100%!important;min-width:0!important;width:100%!important}
#game-pane-board #board-3d-explorer button{flex:1 1 130px!important;min-width:0!important;width:auto!important;min-height:40px!important;font-size:12px!important}
#game-pane-board #board-3d-controls{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:6px!important;margin:8px 0!important;padding:0!important}
#game-pane-board #board-3d-controls[hidden]{display:none!important}
#game-pane-board #board-3d-controls button,#game-pane-board #board-3d-controls select{flex:0 1 auto!important;min-width:42px!important;min-height:40px!important;width:auto!important;max-width:100%!important;padding:7px 10px!important;font-size:12px!important;line-height:1.3!important;margin:0!important}

/* Bouton 3D compact, et sÃ©lection des indices directement sur la main. */
#game-pane-board #board-3d-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;justify-self:center!important;width:auto!important;max-width:230px!important;height:auto!important;min-height:38px!important;padding:7px 14px!important;margin:5px auto!important;font-size:12px!important;line-height:1.2!important;border-radius:8px!important;flex:none!important}
#cdl-hand-action-note:not([hidden]){display:block!important;margin:0 0 4px!important;padding:4px 9px!important;border:1px solid #e6b962;border-radius:7px;background:#2d3c45;color:#ffe3a4;font-size:12px;font-weight:700;text-align:center}
#cdl-hand-fan .cdl-fan-card.cdl-fan-selectable{outline:3px solid #ffe276!important;outline-offset:2px;box-shadow:0 0 14px #f4cb55!important;filter:brightness(1.15);cursor:pointer}
#cdl-hand-fan .cdl-fan-card.cdl-fan-selectable:focus-visible{outline:4px solid white!important}

/* Main de cartes disponible sous le plateau, y compris pendant une visite 3D. */
@media(min-width:851px){
 #game:not([hidden]) #game-pane-board:has(#board-stage.board-3d-active){grid-template-rows:minmax(0,1fr) 120px!important}
 #game-pane-board:has(#board-stage.board-3d-active) #cdl-hand-tray:not([hidden]){display:block!important;grid-column:1!important;grid-row:2!important;position:relative!important;align-self:end!important;justify-self:center!important;width:100%!important;max-width:100%!important;max-height:120px!important;z-index:1!important}
 #game-pane-board:has(#board-stage.board-3d-active) #board-stage.board-3d-active{height:min(calc(100dvh - 250px),calc(100vw * .75))!important;min-height:280px!important}
}

/* Ancrage absolu : le carrousel ne remonte plus par-dessus le plateau 3D. */
@media(min-width:851px){
 #game-pane-board:has(#board-stage.board-3d-active){position:relative!important}
 #game-pane-board:has(#board-stage.board-3d-active) #cdl-hand-tray:not([hidden]){position:absolute!important;left:0!important;bottom:0!important;top:auto!important;right:auto!important;width:calc(100% - 390px)!important;max-width:calc(100% - 390px)!important;height:115px!important;max-height:115px!important;z-index:2!important}
 #game-pane-board:has(#board-stage.board-3d-active) #board-stage.board-3d-active{height:min(calc(100dvh - 280px),calc(100vw * .75))!important;max-height:calc(100dvh - 280px)!important;min-height:260px!important}
}

/* Commande 2D/3D placÃ©e dans la barre des cartes : ne prend aucune colonne du jeu. */
#cdl-hand-tray .cdl-hand-caption{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:6px!important}
#cdl-hand-tray #board-3d-toggle{display:inline-flex!important;position:static!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;align-self:center!important;min-width:0!important;width:auto!important;max-width:none!important;height:30px!important;min-height:30px!important;margin:0!important;padding:4px 10px!important;border-radius:7px!important;font-size:11px!important;line-height:1.2!important;white-space:nowrap!important}
#game-pane-board #board-3d-toggle{grid-column:auto!important;grid-row:auto!important}
#game-pane-board #cdl-game-sidebar{overflow-y:auto!important;overscroll-behavior:contain!important;min-height:0!important;scrollbar-width:thin!important}

/* Options 3D repliÃ©es par dÃ©faut : les commandes ne chevauchent plus les actions. */
#game-pane-board #board-3d-options{display:block!important;grid-column:2!important;grid-row:auto!important;max-width:100%!important;margin:4px 0!important;padding:0!important;border:1px solid #bd9755;border-radius:8px;background:#0d2840}
#game-pane-board #board-3d-options[hidden]{display:none!important}
#game-pane-board #board-3d-options>summary{cursor:pointer;padding:9px 12px;font-size:12px;font-weight:700;color:#ffe1a0;list-style-position:inside}
#game-pane-board #board-3d-options:not([open]) #board-3d-controls{display:none!important}
#game-pane-board #board-3d-options[open] #board-3d-controls{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:8px!important;margin:0!important}
#game-pane-board #board-3d-explorer{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
#game-pane-board #board-3d-explorer button{flex:1 1 140px!important;min-width:0!important;max-width:100%!important}
#game-pane-board #board-3d-explorer select{flex:1 1 100%!important}

/* Regroupement rÃ©el des visites et de l'exploration DANS les options 3D. */
#game-pane-board #board-3d-options:not([open]) #board-3d-landmarks,
#game-pane-board #board-3d-options:not([open]) #board-3d-explorer,
#game-pane-board #board-3d-options:not([open]) #board-3d-controls{display:none!important}
#game-pane-board #board-3d-options[open] #board-3d-landmarks{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin:8px!important}
#game-pane-board #board-3d-options[open] #board-3d-explorer{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:8px!important}
#game-pane-board #board-3d-options[open] #board-3d-explorer label{flex:1 0 100%!important;margin:0!important}
#game-pane-board #board-3d-options[open] #board-3d-explorer select{flex:1 0 100%!important;width:100%!important}
#game-pane-board #board-3d-options[open] #board-3d-explorer button{flex:1 1 130px!important;min-width:0!important;min-height:38px!important}
#game-pane-board #board-3d-options[open]{max-height:48dvh!important;overflow-y:auto!important}

/* Main alignee sur la largeur exacte du plateau 2D (desktop). */
@media (min-width:851px){
 #game-pane-board:not(:has(#board-stage.board-3d-active)) #cdl-hand-tray{
  box-sizing:border-box!important;
  width:min(100%,calc((100dvh - 230px)*4/3))!important;
  max-width:100%!important;
  justify-self:center!important;
 }
}
@media (min-width:851px) and (max-height:720px){
 #game-pane-board:not(:has(#board-stage.board-3d-active)) #cdl-hand-tray{
  width:min(100%,calc((100dvh - 190px)*4/3))!important;
 }
}

/* Vue 3D : la main prend exactement la largeur du cadre du plateau, pas de la colonne entiere. */
@media (min-width:851px){
 #game-pane-board:has(#board-stage.board-3d-active) #cdl-hand-tray:not([hidden]){
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  width:min(calc(100% - 390px),calc((100dvh - 230px)*4/3))!important;
  max-width:calc(100% - 390px)!important;
  box-sizing:border-box!important;
 }
}

/* Alignement exact : la main et le plateau 3D partagent le centre de la colonne de jeu. */
@media(min-width:851px){
 #game-pane-board:has(#board-stage.board-3d-active) #cdl-hand-tray:not([hidden]){
  left:calc((100% - 390px - min(100% - 390px, (100dvh - 230px)*4/3))/2)!important;
  transform:none!important;
 }
}

.cdl-fan-card .cdl-card-art-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:73px;border-radius:4px;background:linear-gradient(145deg,#163954,#07192d);color:#e9c780;font-size:36px;line-height:1;}
@media(min-width:851px) and (max-height:740px){.cdl-fan-card .cdl-card-art-fallback{height:52px;font-size:27px}}

/* Barre Patrimoine : memes positions 2D/3D que l'Intrigue */
#game-pane-board #cdl-hand-tray.cdl-patrimoine-tray:not([hidden]){display:block!important}
#cdl-hand-tray.cdl-patrimoine-tray .cdl-patrimoine-empty{margin:8px auto;text-align:center;font-size:12px;color:#e6c78a}
#cdl-hand-tray.cdl-patrimoine-tray #cdl-hand-fan{display:flex;align-items:center;justify-content:center;gap:4px;overflow-x:auto}
#cdl-hand-tray.cdl-patrimoine-tray .cdl-fan-card{flex:0 0 66px;transform:none!important;min-width:56px}

