/* Les attributions des joueurs restent facultatives et distinctes des mises. */
#handWizard .hand-participants { min-width:0; margin:16px 0; border:1px solid #4a2d32; border-radius:7px; background:#1e1213; }
#handWizard .hand-participants>summary { cursor:pointer; padding:11px 13px; color:var(--ink); font-size:12px; line-height:1.5; }
#handWizard .hand-participants[open]>summary { border-bottom:1px solid #4a2d32; }
#handWizard .hand-participants-body { min-width:0; padding:13px; }
#handWizard .hand-participants-body>p { margin:0 0 12px; line-height:1.6; }
#handWizard .hand-participants-grid { display:grid; gap:10px; min-width:0; }
#handWizard .hand-participant-row { display:grid; grid-template-columns:75px minmax(0,1fr) minmax(0,1fr); align-items:end; gap:10px; min-width:0; padding:10px 0; border-bottom:1px solid #3f272b; }
#handWizard .hand-participant-position { min-width:0; align-self:center; color:#eacbd0; font-size:12px; line-height:1.5; }
#handWizard .hand-participant-row>label { margin:0; min-width:0; gap:5px; font-size:12px; }
#handWizard .hand-participant-row input,#handWizard .hand-participant-row select { min-width:0; width:100%; height:38px; min-height:38px; margin:0; padding:7px 9px; font-size:12px; }
#handWizard .hand-participant-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-top:13px; }
#handWizard .hand-participant-actions button { min-height:34px; }
#handWizard .hand-participants-body>.hand-participant-status { margin:10px 0 0; }
@media(max-width:500px){
 #handWizard .hand-participant-row { grid-template-columns:58px minmax(0,1fr); gap:8px; }
 #handWizard .hand-participant-position { grid-column:1; grid-row:1/3; font-size:12px; }
 #handWizard .hand-participant-name { grid-column:2; grid-row:1; }
 #handWizard .hand-participant-friend { grid-column:2; grid-row:2; }
 #handWizard .hand-participant-row input,#handWizard .hand-participant-row select { font-size:16px; }
 #handWizard .hand-participant-actions { align-items:stretch; }
 #handWizard .hand-participant-actions>button { flex:1 1 100%; }
}

/* Le rejeu réserve sa hauteur aux sièges : les barres restent dans le flux,
   l’historique se consulte en défilant et aucune commande ne recouvre la table. */
#handWizard.hand-wizard.replay-view {
 display:flex; flex-direction:column; width:min(1180px,97dvw);
 height:min(94dvh,980px); max-height:94dvh; padding:0; overflow:hidden;
}
#handWizard.hand-wizard.replay-view.replay-fullscreen {
 inset:0; width:100dvw; height:100dvh; max-width:none; max-height:100dvh; margin:0;
}
#handWizard.replay-view .wizard-top {
 position:relative; flex:0 0 auto; min-height:58px; padding:9px 14px;
 grid-template-columns:minmax(0,1fr) auto auto; gap:12px;
}
#handWizard.replay-view .wizard-top>div:first-child { min-width:0; padding:0; }
#handWizard.replay-view .wizard-top h2 { font-size:17px; line-height:1.3; margin:0 0 3px; }
#handWizard.replay-view .wizard-top p { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.4; }
#handWizard.replay-view #wizardUnits { grid-column:2; grid-row:1; }
#handWizard.replay-view .wizard-unit { margin:0; gap:7px; }
#handWizard.replay-view .wizard-unit>span { display:none; }
#handWizard.replay-view .wizard-unit .segmented { padding:3px; }
#handWizard.replay-view .wizard-unit .segmented button { min-width:37px; padding:6px 8px; }
#handWizard.replay-view .wizard-header-actions { grid-column:3; grid-row:1; gap:8px; }
#handWizard.replay-view .replay-fullscreen-button { min-height:32px; height:32px; padding:6px 8px; }
#handWizard.replay-view #handViewOptions {
 position:relative; z-index:6; display:flex; flex:0 0 auto; justify-content:space-between;
 align-items:center; gap:12px; min-height:34px; padding:3px 14px;
}
#handWizard.replay-view .hide-hero-toggle { margin:0; gap:7px; font-size:12px; line-height:1.4; }
#handWizard.replay-view .hide-hero-toggle input { width:16px; height:16px; }
#handWizard.replay-view .hand-participants { position:relative; margin:0 0 0 auto; }
#handWizard.replay-view .hand-participants>summary { cursor:pointer; font-size:12px; padding:4px 7px; line-height:1.4; }
#handWizard.replay-view .hand-participants-body {
 position:absolute; top:100%; right:0; z-index:8; width:min(560px,calc(97dvw - 32px));
 max-height:45dvh; overflow:auto; padding:12px; border:1px solid #5a4448;
 border-radius:8px; background:#1f1215; box-shadow:0 12px 35px #0008;
}
#handWizard.replay-view .hand-participant-row { min-width:0; }
#handWizard.replay-view #wizardSteps { flex:0 0 auto; padding:3px 14px; gap:4px; }
#handWizard.replay-view #wizardSteps span { padding:3px 8px; font-size:12px; line-height:1.4; }
#handWizard.replay-view #wizardError:empty { display:none; }
#handWizard.replay-view #wizardBody {
 flex:1 1 auto; min-height:0; padding:0 12px 12px; overflow:auto;
 overscroll-behavior:contain; container-type:size; scroll-padding-top:8px;
}
#handWizard.replay-view .replay-toolbar {
 position:relative; top:auto; z-index:auto; display:grid;
 grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px;
 height:70px; padding:6px 0; margin:0; border-bottom:1px solid #42292d;
 background:transparent;
}
#handWizard.replay-view .replay-controls {
 display:grid; grid-template-columns:auto minmax(90px,1fr) auto;
 align-items:center; gap:8px; min-width:0; margin:0;
}
#handWizard.replay-view .replay-controls>label {
 order:0; display:flex; flex-direction:column; flex-basis:auto; min-width:0;
 gap:2px; margin:0; font-size:12px; line-height:1.4;
}
#handWizard.replay-view .replay-controls input { height:25px; min-height:25px; margin:0; }
#handWizard.replay-view .replay-controls>button { min-height:36px; padding:7px 9px; font-size:12px; }
#handWizard.replay-view .replay-playback { display:flex; flex-wrap:nowrap; margin:0; gap:8px; }
#handWizard.replay-view .replay-playback>button { min-height:36px; padding:7px 11px; font-size:12px; }
#handWizard.replay-view .replay-playback label { gap:5px; font-size:12px; }
#handWizard.replay-view .replay-playback select { width:62px; height:36px; min-height:36px; padding:6px; font-size:12px; }
#handWizard.replay-view .replay-playback>span { display:none; }
#handWizard.replay-view .table-statusbar {
 display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap;
 min-height:24px; height:24px; margin:0; gap:10px; padding:0; font-size:12px; line-height:1.3;
}
#handWizard.replay-view .table-statusbar>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#handWizard.replay-view .table-statusbar>strong { flex:none; font-size:12px; }
#handWizard.replay-view .poker-table-wrap { width:100%; max-width:1150px; margin:0 auto 12px; }
#handWizard.replay-view .poker-table-scene {
 /* Le conteneur est le corps du dialogue, déjà privé de l’en-tête/pied. */
 height:calc(100dvh - 300px); height:calc(100cqh - 102px);
 min-height:0; max-height:780px; border-radius:12px;
}
#handWizard.replay-view .poker-felt { inset:13% 9%; border-width:9px; }
#handWizard.replay-view .table-center { gap:5px; padding:8px; }
#handWizard.replay-view .table-board { margin-top:3px; min-height:39px; gap:4px; flex-wrap:nowrap; }
#handWizard.replay-view .table-board .poker-card { width:28px; height:39px; font-size:15px; }
#handWizard.replay-view .table-pot-value { font-size:25px; }
#handWizard.replay-view .table-potlabel { font-size:12px; }
#handWizard.replay-view .table-street { font-size:12px; }
#handWizard.replay-view .table-seat {
 width:94px; height:auto; min-height:90px; max-height:none; padding:4px;
 gap:2px; border-radius:9px; left:clamp(48px,var(--seat-x),calc(100% - 48px));
 top:clamp(49px,var(--seat-y),calc(100% - 49px));
}
#handWizard.replay-view .seat-player-name { display:block; max-width:100%; height:14px; flex:0 0 14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:14px; }
#handWizard.replay-view .seat-position { max-width:100%; min-height:14px; font-size:12px; line-height:14px; white-space:nowrap; }
#handWizard.replay-view .seat-status { min-height:0; max-height:none; font-size:12px; line-height:14px; }
#handWizard.replay-view .seat-status.checked { padding:1px 5px; font-size:12px; }
#handWizard.replay-view .seat-hole { flex:0 0 26px; min-height:26px; gap:2px; }
#handWizard.replay-view .seat-hole .poker-card { width:19px; height:26px; font-size:12px; }
#handWizard.replay-view .seat-stack { max-width:100%; min-height:11px; font-size:12px; line-height:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#handWizard.replay-view .seat-wager { margin-left:calc(var(--wager-x)*.85); margin-top:calc(var(--wager-y)*.75); }
#handWizard.replay-view .seat-wager-value { padding:2px 4px; font-size:12px; }
#handWizard.replay-view .wager-pile { transform:scale(.8); transform-origin:center; }
#handWizard.replay-view .dealer-button { width:18px; height:18px; font-size:12px; }
#handWizard.replay-view .wizard-footer { position:relative; flex:0 0 auto; padding:8px 14px; }
#handWizard.replay-view .wizard-footer-tools { justify-content:flex-end; flex-wrap:nowrap; gap:8px; }
#handWizard.replay-view .wizard-footer-tools>button { min-height:34px; padding:7px 10px; font-size:12px; }
@media(max-width:700px){
 #handWizard.replay-view .wizard-top { min-height:54px; padding:7px 9px; gap:7px; }
 #handWizard.replay-view .wizard-top h2 { font-size:14px; }
 #handWizard.replay-view .wizard-top p { font-size:12px; }
 #handWizard.replay-view #wizardUnits { grid-column:2; grid-row:1; }
 #handWizard.replay-view .wizard-unit .segmented button { min-width:28px; padding:5px; font-size:12px; }
 #handWizard.replay-view .wizard-header-actions { grid-column:3; grid-row:1; gap:5px; }
 #handWizard.replay-view .replay-fullscreen-button { width:30px; min-height:30px; height:30px; padding:6px; }
 #handWizard.replay-view #handViewOptions { min-height:31px; padding:2px 10px; }
 #handWizard.replay-view #wizardSteps { padding:3px 8px; gap:2px; }
 #handWizard.replay-view #wizardSteps span { padding:3px 5px; font-size:12px; }
 #handWizard.replay-view #wizardBody { padding:0 8px 10px; }
 #handWizard.replay-view .replay-toolbar { grid-template-columns:minmax(0,1fr); grid-template-rows:39px 35px; gap:3px; height:86px; padding:4px 0; }
 #handWizard.replay-view .replay-controls { grid-template-columns:67px minmax(0,1fr) 67px; gap:7px; }
 #handWizard.replay-view .replay-controls>button { min-height:34px; padding:6px 4px; font-size:12px; }
 #handWizard.replay-view .replay-controls>label { order:0; font-size:12px; }
 #handWizard.replay-view .replay-playback { justify-content:flex-end; gap:8px; }
 #handWizard.replay-view .replay-playback>button { min-height:33px; padding:6px 10px; }
 #handWizard.replay-view .replay-playback select { min-height:33px; height:33px; }
 #handWizard.replay-view .table-statusbar { font-size:12px; gap:6px; }
 #handWizard.replay-view .table-statusbar>strong { font-size:12px; }
 #handWizard.replay-view .poker-table-scene { height:calc(100dvh - 310px); height:calc(100cqh - 118px); }
 #handWizard.replay-view .poker-felt { inset:7% 18%; border-width:7px; }
 #handWizard.replay-view .table-board { max-width:145px; gap:3px; min-height:33px; }
 #handWizard.replay-view .table-board .poker-card { width:23px; height:33px; font-size:12px; }
 #handWizard.replay-view .table-pot-value { font-size:22px; }
 #handWizard.replay-view .table-potlabel { font-size:12px; letter-spacing:1px; }
 #handWizard.replay-view .table-street { font-size:12px; }
 #handWizard.replay-view .table-seat { width:68px; height:auto; max-height:none; min-height:80px; padding:4px 2px; gap:2px; left:clamp(36px,var(--mobile-x),calc(100% - 36px)); top:clamp(44px,var(--mobile-y),calc(100% - 44px)); }
 #handWizard.replay-view .seat-player-name { height:14px; flex-basis:14px; font-size:12px; line-height:14px; }
 #handWizard.replay-view .seat-position { min-height:14px; font-size:12px; line-height:14px; }
 #handWizard.replay-view .seat-status { min-height:0; max-height:none; font-size:12px; line-height:14px; }
 #handWizard.replay-view .seat-hole { flex-basis:22px; min-height:22px; }
 #handWizard.replay-view .seat-hole .poker-card { width:16px; height:22px; font-size:12px; }
 #handWizard.replay-view .seat-stack { min-height:10px; font-size:12px; line-height:14px; }
 #handWizard.replay-view .seat-wager { margin-left:calc(var(--mobile-wager-x)*.82); margin-top:calc(var(--mobile-wager-y)*.75); }
 #handWizard.replay-view .seat-wager-value { font-size:12px; }
 #handWizard.replay-view .wizard-footer { padding:7px 8px max(7px,env(safe-area-inset-bottom)); }
 #handWizard.replay-view .wizard-footer-tools>button { min-height:34px; padding:6px 5px; font-size:12px; }
}

#handWizard .training-panel { display:grid; gap:8px; margin:8px 0; padding:12px; border:1px solid #49373a; border-radius:8px; background:#211316; }
#handWizard .training-panel .wizard-footer-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:6px; margin:0; }
#handWizard .training-panel p,#handWizard .training-panel label { margin:0; }
#handWizard .training-panel .wizard-footer-tools>button { flex:0 1 auto; min-height:34px; }
#handWizard .training-panel select { width:auto; max-width:100%; }
