/* V423 — trois options, présentes dans le menu sur téléphone et dans l’en-tête sur PC. */
.strategy-menu-note{font-size:.76em;font-weight:600;opacity:.85;margin-left:auto;text-align:right;}
#strategies-overlay{position:fixed;inset:0;z-index:11000;display:flex;align-items:center;justify-content:center;padding:20px;background:#082a49b8;backdrop-filter:blur(5px);}
#strategies-overlay .strategy-card{box-sizing:border-box;width:min(880px,100%);max-height:calc(100dvh - 40px);display:flex;flex-direction:column;overflow:hidden;border:1px solid #a6cdec;border-top:5px solid #ffc928;border-radius:24px;background:#f4faff;color:#16364e;box-shadow:0 18px 70px #001f4c66;}
.strategy-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px 14px;background:linear-gradient(160deg,#fff,#e8f4ff);border-bottom:1px solid #c5ddef;flex-shrink:0;}
.strategy-eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#35617c;}
#strategies-title{margin:3px 0 0;font-size:25px;color:#123c64;line-height:1.2;}
#strategies-close{width:44px;height:44px;min-width:44px;padding:0;display:grid;place-items:center;flex:none;border:1px solid #aac6df;border-radius:50%;background:#fff;color:#123c64;box-shadow:none;font-size:26px;}
.strategy-content{overflow:auto;overscroll-behavior:contain;min-height:0;padding:18px 24px 24px;line-height:1.5;}
.strategy-content p{margin:0 0 14px;}
.strategy-content button,.strategy-content select{font:inherit;min-height:44px;}
.strategy-content button{white-space:normal;}
.strategy-content .strategy-main-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #c38a0a;border-radius:14px;padding:11px 18px;background:linear-gradient(#ffe075,#ffc526);color:#3d2c00;font-weight:800;box-shadow:0 3px 0 #b98512;}
.strategy-content .strategy-secondary{border:1px solid #aecce4;border-radius:12px;padding:9px 14px;background:#fff;color:#143d5d;box-shadow:0 2px 0 #bcd2e4;font-weight:700;}
.strategy-content button:disabled{opacity:1;cursor:not-allowed;background:#e2eaf0;color:#526572;border-color:#b6c8d4;box-shadow:none;}
.strategy-content :is(button,select):focus-visible,#strategies-close:focus-visible{outline:3px solid #1265c8;outline-offset:3px;}
.strategy-message{padding:14px 16px;border-radius:16px;border:1px solid #b4d0e7;background:#e6f2ff;color:#163e60;margin:12px 0;}
.strategy-message[data-kind="success"]{background:#e6f5e9;border-color:#94bc9c;color:#17482a;}
.strategy-message[data-kind="error"]{background:#fff0ef;border-color:#dba39e;color:#792b25;}
.strategy-result-title{font-size:22px;line-height:1.3;font-weight:800;display:block;margin-bottom:6px;}
.strategy-fine{font-size:13px;color:#3b5a70;}
.strategy-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0;}
.strategy-counter{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.strategy-openings{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;}
.strategy-opening{display:inline-flex;gap:8px;align-items:center;padding:7px 12px;border-radius:10px;background:#fff4cc;color:#5b3d00;border:1px solid #d6ac45;font-weight:800;}
.strategy-board{--strategy-size:11;display:grid;grid-template-columns:repeat(var(--strategy-size),minmax(0,1fr));gap:3px;max-width:520px;width:100%;box-sizing:border-box;padding:8px;background:#b4d8dc;border:2px solid #648f97;border-radius:18px;aspect-ratio:1;margin:16px auto;}
.strategy-board .strategy-cell{display:flex;align-items:center;justify-content:center;aspect-ratio:1;min-width:0;min-height:0;padding:0;border:1px solid #bacdd1;border-radius:6px;background:#edf3f5;color:#1c3947;box-shadow:inset 0 1px 2px #809eaa38;font-size:clamp(10px,2.5vw,20px);font-weight:800;position:relative;}
.strategy-board .strategy-cell--tile{background:linear-gradient(150deg,#ffe57e,#ffd44e 60%,#f4b82c);border-color:#c28a1a;color:#38230b;box-shadow:inset 0 1px 1px #fff6c5,0 2px 0 #9d7c31;font-size:clamp(13px,3.4vw,25px);}
.strategy-board .strategy-cell--new{outline:2px solid #1c65b1;outline-offset:-2px;}
.strategy-board .strategy-cell--blank::after{content:'?';font-size:8px;position:absolute;bottom:0;right:2px;}
.strategy-board .strategy-cell--MT{background:#663f93;border-color:#4a267a;color:#fff;}
.strategy-board .strategy-cell--MD{background:#b4322a;border-color:#8b1a15;color:#fff;}
.strategy-board .strategy-cell--LT{background:#23783a;border-color:#195b2b;color:#fff;}
.strategy-board .strategy-cell--LD{background:#076fa5;border-color:#07597d;color:#fff;}
.strategy-board .strategy-cell--opening{outline:3px solid #ffdf45;outline-offset:0;z-index:1;}
.strategy-replay-label{text-align:center;font-weight:800;margin:10px 0 0;}
.strategy-selector{display:flex;align-items:center;gap:12px;margin:12px 0;flex-wrap:wrap;}
.strategy-selector select{flex:1;min-width:180px;max-width:100%;padding:8px;background:#fff;color:#16364e;border:1px solid #94b6d1;border-radius:10px;}
.strategy-rack{display:flex;gap:5px;justify-content:center;flex-wrap:nowrap;}.strategy-rack.strategy-joker-choices{flex-wrap:wrap;}
.strategy-rack .strategy-letter{display:inline-flex;align-items:center;justify-content:center;flex:0 1 44px;padding:0;width:44px;height:48px;min-width:0;border:1px solid #a97b20;border-radius:9px;background:linear-gradient(#ffe88c,#ffc93d);color:#39270a;font-size:25px;font-weight:800;box-shadow:0 3px 0 #aa812b;}
.strategy-rack .strategy-letter[aria-pressed="true"]{outline:3px solid #0869bd;outline-offset:2px;transform:translateY(-3px);}
.strategy-rack .strategy-letter:disabled{background:#e2eaf0;color:#697c87;border-color:#b8cbd2;box-shadow:none;}
.strategy-notebook{padding:12px 14px;background:#fff;border:1px solid #c0d5e4;border-radius:14px;margin:12px 0;}
.strategy-notebook h3{font-size:16px;margin:0 0 8px;color:#173f5e;}
.strategy-notebook ul{list-style:none;padding:0;margin:0;display:flex;gap:7px;flex-wrap:wrap;}
.strategy-notebook li{padding:3px 8px;border-radius:7px;background:#fff0b8;color:#523e06;font-size:13px;font-weight:800;}
@media(min-width:861px){
 #view-game .game-topbar{height:auto;min-height:58px;grid-template-columns:1fr auto 1fr;grid-template-areas:"left brand right";gap:6px 8px;padding-bottom:7px;}
 #view-game .game-topbar .game-top-left{grid-area:left;}
 #view-game .game-topbar .game-brand-mini{grid-area:brand;}
 #view-game .game-topbar .game-top-right{grid-area:right;}
 #view-game.game-zoom .game-topbar{grid-template-areas:"left" "right";grid-template-columns:1fr;height:auto;}
}
@media(max-width:860px){
 #strategies-overlay{padding:12px;}
 #strategies-overlay .strategy-card{max-height:calc(100dvh - 24px);border-radius:22px;}
 .strategy-header{padding:15px 16px 12px;}
 #strategies-title{font-size:23px;}
 .strategy-content{padding:16px;}
 .strategy-board{gap:2px;padding:5px;border-radius:12px;}
 .strategy-board .strategy-cell{border-radius:4px;}
 .strategy-menu-note{max-width:45%;font-size:12px;}
}
@media(max-width:360px){.strategy-content{padding:12px;}.strategy-rack{gap:4px;}.strategy-rack .strategy-letter{width:35px;min-width:30px;height:44px;font-size:23px;}.strategy-header{padding:12px;}.strategy-board{gap:1px;}}
@media(prefers-reduced-motion:reduce){.strategy-content *{animation:none!important;transition:none!important;}}
@media(forced-colors:active){#strategies-overlay .strategy-card,.strategy-message,.strategy-notebook{background:Canvas;color:CanvasText;border-color:CanvasText;}.strategy-content button,.strategy-board .strategy-cell{background:ButtonFace!important;color:ButtonText!important;border-color:ButtonText!important;}.strategy-board .strategy-cell--new,.strategy-board .strategy-cell--opening{outline-color:Highlight;}}
/* V433 — un plateau compact et deux vues, sans pavé hypothétique. */
.strategy-summary{border-radius:14px;background:#e5f2fc;padding:12px 15px;margin-bottom:12px;}
.strategy-summary p{margin:5px 0 0;font-size:14px;}
.strategy-tabs{display:flex;gap:8px;}
.strategy-tabs button{flex:1;font-size:14px;}
.strategy-tabs button[aria-pressed="true"]{background:#155fae;color:white;border-color:#155fae;box-shadow:none;}
.strategy-board-label{text-align:center;font-weight:700;font-size:14px;margin:12px 0 4px!important;}
.strategy-board{max-width:400px;margin:8px auto 12px;gap:2px;padding:5px;border-radius:12px;}
.strategy-board .strategy-cell--opening{outline:2px solid #f19d2d;box-shadow:0 0 6px #f5bc55;}
.strategy-board .strategy-cell--safe{background:#b0edce!important;color:#176648!important;border-color:#2c9d6a!important;outline:2px solid #35b47f;box-shadow:0 0 10px #4bc98c;z-index:2;}
.strategy-details{margin:12px 0;font-size:14px;}
.strategy-details summary{cursor:pointer;font-weight:700;padding:8px 0;}
.strategy-details .strategy-openings{gap:5px;}
.strategy-opening{font-size:13px;padding:5px 9px;}
.strategy-temperature{padding:26px 12px;text-align:center;}
.strategy-temperature-label{font-size:36px;display:block;color:#155ca0;margin-bottom:12px;}
.strategy-temperature-meter{position:relative;height:22px;border-radius:20px;background:linear-gradient(90deg,#52b5ec,#94d0a4,#f4cf45,#f47d36,#e93a2c);margin:28px 0 16px;}
.strategy-temperature-meter>span{position:absolute;top:-6px;bottom:-6px;width:7px;transform:translateX(-50%);border:2px solid white;background:#163f63;border-radius:7px;box-shadow:0 1px 5px #163f63;}
/* V434 — réception plein écran du chant et de la danse. */
dialog.cocorico-backdrop{position:fixed;inset:0;z-index:12000;box-sizing:border-box;margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0;padding:clamp(16px,4vw,40px);overflow:auto;color:#fff1bc;background:radial-gradient(ellipse at 50% 42%,#217e81 0%,#124e61 45%,#062f46 100%);overscroll-behavior:contain;}
dialog.cocorico-backdrop[open]{display:grid;place-items:center;}
.cocorico-backdrop::backdrop{background:#062f46;}
.cocorico-card{width:min(680px,100%);box-sizing:border-box;text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px;}
.cocorico-card strong{font-size:clamp(36px,8vw,70px);line-height:1.15;color:#ffdc67;text-shadow:0 3px 0 #403813,0 0 32px #ffd44b55;}
.cocorico-stage{width:min(100%,460px);height:min(58dvh,520px);min-height:140px;position:relative;display:grid;place-items:center;isolation:isolate;}
.cocorico-stage::before{content:'';position:absolute;inset:8%;border-radius:50%;background:radial-gradient(#ffde8c55,transparent 68%);}
.cocorico-stage::after{content:'';position:absolute;bottom:1%;width:48%;height:15px;border-radius:50%;background:#031e3799;filter:blur(5px);animation:coco-shadow .6s ease-in-out infinite alternate;}
.cocorico-stage img{position:absolute;inset:0;pointer-events:none;display:block;width:100%;height:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 10px 8px #03253980);animation:coco-dance 1.2s ease-in-out infinite;z-index:1;}
.cocorico-note{position:absolute;top:25%;font-size:clamp(42px,10vw,86px);color:#ffdc67;animation:coco-notes 1.2s ease-in-out infinite alternate;}
.cocorico-note--left{left:1%;transform:rotate(-15deg);}.cocorico-note--right{right:1%;top:48%;animation-delay:.4s;}
.cocorico-card .cocorico-close{position:fixed;right:max(16px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));width:48px;height:48px;min-height:48px;border-radius:50%;background:#ffffffee;color:#174465;padding:0;border:1px solid #a3bed1;box-shadow:none;font-size:30px;z-index:3;}
.cocorico-card .strategy-secondary{position:relative;z-index:2;min-height:48px;border:1px solid #e7bd58;border-radius:14px;background:#fff0bb;padding:10px 20px;color:#153b51;font:inherit;font-weight:700;}
.cocorico-card button:focus-visible{outline:3px solid #ffde65;outline-offset:4px;}
@keyframes coco-dance{0%,100%{transform:translateX(-4%) rotate(-9deg)}25%{transform:translate(4%,-7%) rotate(8deg)}50%{transform:translateX(7%) rotate(10deg)}75%{transform:translate(-2%,-9%) rotate(-9deg)}}
@keyframes coco-shadow{to{transform:scaleX(.7);opacity:.4;}}
@keyframes coco-notes{to{translate:0 -20px;opacity:.45;}}
@media(max-height:480px) and (min-width:600px){.cocorico-card{display:grid;grid-template-columns:1fr 1fr;column-gap:20px;}.cocorico-stage{grid-column:1;grid-row:1/3;height:76dvh;}.cocorico-card strong{font-size:40px;}.cocorico-card .strategy-secondary{justify-self:center;align-self:start;}}
@media(max-width:600px){#strategies-overlay{padding:10px;}#strategies-overlay .strategy-card{max-height:calc(100dvh - 20px);border-radius:20px;}.strategy-header{padding:12px 16px;}#strategies-title{font-size:23px;}.strategy-content{padding:12px 16px 18px;line-height:1.4;}.strategy-content .strategy-main-button{display:flex;width:100%;}.strategy-board{max-width:320px;}.strategy-board .strategy-cell{font-size:11px;}.strategy-board .strategy-cell--tile{font-size:17px;}.strategy-fine{font-size:12px;}.strategy-message{padding:10px 12px;font-size:14px;}.strategy-tabs button{padding:8px 6px;font-size:13px;}}
@media(prefers-reduced-motion:reduce){.cocorico-stage *,.cocorico-stage::after{animation:none!important;}}

:root[data-a11y-reducemotion="on"] .cocorico-stage *,:root[data-a11y-reducemotion="on"] .cocorico-stage::after{animation:none!important;}
@media(min-width:861px){
 #view-game.game-zoom .game-top-left{box-sizing:border-box;padding-right:54px;}
}
