/* Section Jeux (/games/) : hub et Color Gates. Préfixe jcg-. */
.jcg [hidden] { display: none !important; }
.jcg { --jcg-ink: var(--jc-ink, #1c2030); --jcg-soft: var(--jc-bg-soft, #eef2fb); --jcg-blue: var(--jc-blue, #12347e); --jcg-accent: #E8A54B; --jcg-line: #dfe5f1; color: var(--jcg-ink); }
.jcg h1, .jcg h2, .jcg h3 { font-family: var(--jc-font-head, inherit); font-weight: 700; color: var(--jcg-ink); }
.jcg h1 { font-weight: 800; letter-spacing: -.02em; }

/* Pas de colonne latérale : le contenu prend toute la largeur du header (même --jc-page-container). */
body.jc-games-route #content.site-content { display: block !important; }
body.jc-games-route #primary, body.jc-games-route .content-area { grid-column: auto !important; width: 100% !important; }
.jcg-private { margin: 0 0 14px; padding: 8px 12px; border-radius: 8px; background: #fff4dc; border: 1px solid #f0c66b; font-size: 14px; }

.jcg-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; color: #5b6478; }
.jcg-crumbs li + li::before { content: '›'; margin-right: 6px; }
.jcg-crumbs a { color: inherit; }

.jcg-hero { padding: 28px 24px; border-radius: 18px; background: linear-gradient(135deg, #fff7e8 0%, #eef4ff 55%, #f6ecff 100%); margin-bottom: 28px; }
.jcg-hero-game, .jcg-pq-hero { display: flex; align-items: center; gap: 26px; }
.jcg-hero-text { min-width: 0; }
.jcg-hero-picto { flex: 0 0 auto; width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(18, 52, 126, .16)); }
@media (max-width: 760px) { .jcg-hero-game, .jcg-pq-hero { align-items: flex-start; gap: 14px; } .jcg-hero-picto { width: 76px; height: 76px; } }
.jcg-hero h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.jcg-kicker { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: #b06d12; }
.jcg-kicker a { color: inherit; text-decoration: none; }
.jcg-lead { margin: 0; max-width: 760px; font-size: 17px; line-height: 1.6; }
.jcg-hub-hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(180px, 22vw, 250px); column-gap: 28px; align-items: center; }
.jcg-hub-hero__copy { grid-column: 1; grid-row: 1; min-width: 0; }
.jcg-hub-hero__mascot { grid-column: 2; grid-row: 1; display: block; width: 100%; height: auto; }
.jcg-hub-hero .jcg-chips { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .jcg-hub-hero { display: block; }
    .jcg-hub-hero__mascot { float: right; width: 104px; margin: 0 0 12px 14px; }
    .jcg-hub-hero .jcg-chips { clear: both; }
}
.jcg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.jcg-chips a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--jcg-line); color: var(--jcg-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.jcg-chips a:hover { border-color: var(--jcg-accent); }

.jcg-family { margin: 0 0 34px; scroll-margin-top: 90px; }
.jcg-family h2 { margin: 0 0 6px; font-size: 24px; }
.jcg-family-icon { color: var(--jcg-accent); }
.jcg-family > p { margin: 0 0 14px; max-width: 760px; }
.jcg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.jcg-card, .jcg-card:visited, .jcg-card:hover { color: var(--jcg-ink); }
.jcg-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--jcg-line); background: #fff; color: var(--jcg-ink); text-decoration: none; }
.jcg-card h3 { margin: 0; font-size: 18px; }
.jcg-card p { margin: 0; font-size: 14px; line-height: 1.5; flex: 1; }
.jcg-card.is-live { box-shadow: 0 6px 18px rgba(18, 52, 126, .08); transition: transform .15s, box-shadow .15s; }
.jcg-card.is-live:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(18, 52, 126, .14); }
.jcg-card.is-soon { background: var(--jcg-soft); border-style: dashed; }
.jcg-card-meta { font-size: 13px; color: #5b6478; }
.jcg-card-picto { display: block; flex: 0 0 auto; width: 128px; height: 128px; max-width: 100%; object-fit: contain; margin: 0 0 8px; }
.jcg-soon { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; color: #5b6478; }
.jcg-card-art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; width: 64px; height: 64px; margin-bottom: 4px; }
.jcg-card-art i { border-radius: 7px; }
.jcg-card-art i:nth-child(1) { background: #e5484d; } .jcg-card-art i:nth-child(2) { background: #2f7de1; }
.jcg-card-art i:nth-child(3) { background: #f2b705; } .jcg-card-art i:nth-child(4) { background: #2fae66; }

.jcg-btn { display: inline-block; align-self: flex-start; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--jcg-accent); color: #2b1a00; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.jcg-btn:hover { filter: brightness(1.05); }
.jcg-tool { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--jcg-line); background: #fff; color: var(--jcg-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
/* Le thème grise tout <button> au survol et au focus (fond #3f3f3f, texte blanc) : on garde nos couleurs. */
.jcg-tool:hover, .jcg-tool:focus { background: #fff; color: var(--jcg-ink); }
.jcg-btn:hover, .jcg-btn:focus { background: var(--jcg-accent); color: #2b1a00; }
.jcg-close:hover, .jcg-close:focus { background: none; color: var(--jcg-ink); }
.jcg-tool:hover { border-color: var(--jcg-accent); }

/* Le thème impose du blanc aux boutons survolés ou focalisés : garder les
   couleurs des contrôles de jeux, même si sa feuille est chargée après celle-ci. */
.jcg .jcg-btn:is(:hover, :focus, :active) { color: #2b1a00; background: var(--jcg-accent); }
.jcg .jcg-tool:is(:hover, :focus, :active) { color: var(--jcg-ink); background: #fff; border-color: var(--jcg-accent); }
.jcg .jcg-tool[aria-pressed="true"]:is(:hover, :focus, :active) { color: #fff; background: var(--jcg-blue); border-color: var(--jcg-blue); }
.jcg .jcg-pq-choices button:not(:disabled):is(:hover, :focus, :active),
.jcg .jcg-ab-choices button:not(:disabled):is(:hover, :focus, :active) { color: var(--jcg-ink); background: #fffaf0; border-color: var(--jcg-accent); }
.jcg .jcg-pq-modes button:is(:hover, :focus, :active),
.jcg .jcg-ab-filters button:is(:hover, :focus, :active) { color: var(--jcg-ink); background: #fffaf0; border-color: var(--jcg-accent); }
.jcg .jcg-pq-modes button[aria-pressed="true"]:is(:hover, :focus, :active),
.jcg .jcg-ab-filters button[aria-pressed="true"]:is(:hover, :focus, :active) { color: var(--jcg-blue); background: #eaf0ff; border-color: var(--jcg-blue); }
.jcg .jcg-pq-skip:is(:hover, :focus, :active) { color: #4a5368; background: transparent; }

.jcg-text, .jcg-faq, .jcg-more { max-width: 820px; margin: 0 0 30px; line-height: 1.65; }
.jcg-text h2, .jcg-faq h2, .jcg-more h2 { font-size: 24px; margin: 26px 0 10px; }
.jcg-text h3 { font-size: 19px; margin: 18px 0 8px; }
.jcg-faq details { border-bottom: 1px solid var(--jcg-line); padding: 10px 0; }
.jcg-faq summary { cursor: pointer; font-weight: 700; }
.jcg-faq details p { margin: 8px 0 0; }

/* ---------- Color Gates ---------- */
.jcg-cg { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-cg-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.jcg-cg-bar p { margin: 0; }
.jcg-cg-title { font-weight: 700; font-size: 17px; }
.jcg-tier { margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: #e3f5ea; color: #1d6b3e; vertical-align: 2px; }
.jcg-tier[data-tier="2"] { background: #e6efff; color: #1c4fa0; }
.jcg-tier[data-tier="3"] { background: #fff0db; color: #9a5a00; }
.jcg-tier[data-tier="4"] { background: #fde6ea; color: #a3243b; }
.jcg-cg-moves { font-size: 15px; color: #4a5368; }
.jcg-cg-main { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.jcg-cg-stage { display: flex; justify-content: center; min-width: 0; }
.jcg-cg-side { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.jcg-cg-hint { min-height: 2.6em; margin: 0; font-size: 14px; color: #4a5368; }
.jcg-cg-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

.jcg-board { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.jcg-grid { position: absolute; border-radius: 6px; background-color: #fff;
    background-image: linear-gradient(#e7ebf4 1px, transparent 1px), linear-gradient(90deg, #e7ebf4 1px, transparent 1px);
    background-size: var(--cell) var(--cell); box-shadow: inset 0 0 0 2px #cfd6e6; }
.jcg-wall { position: absolute; border-radius: 6px; background: repeating-linear-gradient(45deg, #5d6475 0 6px, #4c5262 6px 12px); }
.jcg-gate { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: #fff; font-size: 11px; line-height: 1; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12); }
.jcg-gate span { text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
.jcg-block { position: absolute; left: 0; top: 0; pointer-events: none; cursor: grab; transition: transform .07s linear; z-index: 2; outline: none; }
.jcg-block.is-drag { cursor: grabbing; z-index: 3; transition: transform .05s linear; }
.jcg-block i { position: absolute; pointer-events: auto; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-style: normal; color: rgba(255, 255, 255, .85); font-size: calc(var(--cell) * .3);
    background: var(--c); background-image: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 45%), repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 3px, transparent 3px 7px);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14); }
.jcg-block:focus-visible i { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), 0 0 0 3px #1c2030; }
.jcg-axis, .jcg-ice { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.jcg-axis { bottom: 2px; font-size: calc(var(--cell) * .34); }
.jcg-ice { top: 50%; transform: translateY(-50%); font-size: calc(var(--cell) * .3); }
.jcg-block.is-frozen i { filter: saturate(.35) brightness(1.15); background-image: linear-gradient(135deg, rgba(220, 240, 255, .75), rgba(180, 215, 245, .55)); }
.jcg-block.is-frozen { cursor: not-allowed; }
.jcg-block.is-out { transition: transform .25s ease-in, opacity .25s ease-in; opacity: 0; }
.jcg-block.is-nudge { animation: jcg-nudge .3s; }
.jcg-block.is-hint i { animation: jcg-pulse .6s 3; }
.jcg-ghost { position: absolute; left: 0; top: 0; border: 3px dashed var(--c); border-radius: 10px; box-sizing: border-box; pointer-events: none; z-index: 1; }
@keyframes jcg-nudge { 25% { margin-left: -4px; } 75% { margin-left: 4px; } }
@keyframes jcg-pulse { 50% { filter: brightness(1.35); } }

.jcg-mandala { width: 100%; max-width: 220px; height: auto; }
.jcg-mandala .m-p { stroke: #2b2f3a; stroke-width: 1.3; transition: fill .4s; }
.jcg-mandala .m-v { stroke: #2b2f3a; stroke-width: .8; fill: none; }
.jcg-mandala .m-ring { fill: none; stroke: #2b2f3a; stroke-width: 1.2; }
.jcg-mandala .m-dot { stroke-dasharray: 2 4; }
.jcg-mandala .is-pop { animation: jcg-pop .5s; transform-origin: center; }
@keyframes jcg-pop { 40% { stroke-width: 3; } }

.jcg-cg-win, .jcg-cg-levels { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; border-radius: 18px; background: rgba(28, 32, 48, .45); }
.jcg-cg-win[hidden], .jcg-cg-levels[hidden] { display: none; }
.jcg-cg-win-box, .jcg-cg-levels-box { position: relative; max-width: 420px; width: 100%; max-height: 100%; overflow: auto; padding: 22px; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.jcg-cg-win-box h2 { margin: 4px 0 8px; }
.jcg-stars { margin: 0; font-size: 34px; color: #f2b705; letter-spacing: 4px; }
.jcg-cg-win-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.jcg-cg-win-actions .jcg-btn { align-self: center; }
.jcg-cg-levels-box { text-align: left; }
.jcg-cg-levels-box h3 { margin: 10px 0 6px; font-size: 16px; }
.jcg-lv { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.jcg-lv button { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; border: 1px solid var(--jcg-line); background: #fff; font-weight: 700; cursor: pointer; color: var(--jcg-ink); }
.jcg-lv button:hover, .jcg-lv button:focus { background: #f6f8fd; color: var(--jcg-ink); }
.jcg-lv button small { min-height: 1.2em; font-size: 11px; color: #f2b705; }
.jcg-lv button.is-solved { background: #f2fbf5; }
.jcg-lv button.is-current { border-color: var(--jcg-accent); box-shadow: 0 0 0 2px var(--jcg-accent); }
.jcg-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 26px; cursor: pointer; color: #5b6478; }

@media (max-width: 760px) {
    .jcg-hero { padding: 20px 16px; }
    .jcg-cg { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-cg-main { grid-template-columns: 1fr; }
    .jcg-cg-side { display: grid; grid-template-columns: 110px 1fr; text-align: left; align-items: center; }
    .jcg-cg-side .jcg-mandala { grid-row: span 2; }
    .jcg-cg-tools { justify-content: flex-start; }
}

/* ---------- Sudoku (classique et couleur) ---------- */
.jcg-switch { margin: 12px 0 0; font-weight: 600; }
.jcg-art-sudoku, .jcg-art-color-sudoku { grid-template-columns: repeat(3, 1fr); gap: 3px; }
.jcg-art-sudoku i { background: #fff !important; box-shadow: inset 0 0 0 1.5px #12347e; border-radius: 4px; }
.jcg-art-color-sudoku i:nth-child(5) { background: #14a3a3; } .jcg-art-color-sudoku i:nth-child(6) { background: #7b52d1; }
.jcg-art-color-sudoku i:nth-child(7) { background: #f2802c; } .jcg-art-color-sudoku i:nth-child(8) { background: #e45aa8; }
.jcg-art-color-sudoku i:nth-child(9) { background: #8a5a3c; }

.jcg-sd { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-sd-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.jcg-sd-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.jcg-sd-levels [aria-pressed="true"], .jcg-tool[aria-pressed="true"] { background: var(--jcg-blue); border-color: var(--jcg-blue); color: #fff; }
.jcg-sd-info { margin: 0; font-size: 15px; color: #4a5368; font-variant-numeric: tabular-nums; }
.jcg-sd-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.jcg-sd-stage { display: flex; justify-content: center; min-width: 0; }
.jcg-sd-grid { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 640px, calc(100vh - 170px)); aspect-ratio: 1; min-width: 270px;
    border: 3px solid #1c2030; border-radius: 8px; overflow: hidden; background: #fff; user-select: none; -webkit-user-select: none; }
.jcg-sd-cell { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-width: 0; padding: 0; margin: 0;
    border: 0; border-right: 1px solid #cfd6e6; border-bottom: 1px solid #cfd6e6; border-radius: 0; background: #fff; color: #2f5fb3;
    font: 600 clamp(16px, 4.2vw, 34px)/1 var(--jc-font-head, sans-serif); cursor: pointer; transition: background .15s; }
.jcg-sd-cell:hover, .jcg-sd-cell:focus { background: #f3f6fc; color: #2f5fb3; }
.jcg-sd-cell:nth-child(9n) { border-right: 0; }
.jcg-sd-cell:nth-child(n+73) { border-bottom: 0; }
.jcg-sd-cell.br { border-right: 2px solid #1c2030; }
.jcg-sd-cell.bb { border-bottom: 2px solid #1c2030; }
.jcg-sd-cell.is-given { color: #1c2030; font-weight: 700; }
.jcg-sd-cell.is-peer { background: #eef3fc; }
.jcg-sd-cell.is-same { background: #dce8ff; }
.jcg-sd-cell.is-sel { background: #ffe7b8; }
.jcg-sd-cell.is-bad { color: #d3243b; background: #fde6ea; }
.jcg-sd-cell:focus-visible { outline: 3px solid var(--jcg-accent); outline-offset: -3px; z-index: 1; }
.jcg-sd-notes { display: grid; grid-template-columns: repeat(3, 1fr); width: 92%; height: 92%; }
.jcg-sd-notes i { display: flex; align-items: center; justify-content: center; font: 500 clamp(8px, 1.4vw, 12px)/1 sans-serif; font-style: normal; color: #5b6478; }

/* Couleur : la case porte la couleur, le chiffre est facultatif. */
.jcg-sd.is-color .jcg-sd-cell.has-v::before { content: ''; position: absolute; inset: 9%; border-radius: 22%; background: var(--c);
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 50%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); transition: inset .5s, border-radius .5s; }
.jcg-sd.is-color .jcg-sd-cell.is-given::before { inset: 4%; border-radius: 12%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.jcg-sd.is-color .jcg-sd-n { position: relative; display: none; color: #fff; font-size: .6em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.jcg-sd.is-color.show-numbers .jcg-sd-n { display: block; }
.jcg-sd.is-color .jcg-sd-cell.is-bad::before { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px #d3243b; }
.jcg-sd.is-color .jcg-sd-notes i.on { width: 62%; height: 62%; margin: auto; border-radius: 50%; }
.jcg-sd.is-color.is-done .jcg-sd-cell { border-color: transparent !important; background: #fff; }
.jcg-sd.is-color.is-done .jcg-sd-cell::before { inset: 0; border-radius: 0; box-shadow: none; }
.jcg-sd.is-color.is-done .jcg-sd-grid { border-color: #fff; box-shadow: 0 12px 30px rgba(18, 52, 126, .18); }

.jcg-sd-side { display: flex; flex-direction: column; gap: 14px; }
.jcg-sd-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jcg-sd-key { aspect-ratio: 1.25; border-radius: 12px; border: 1px solid var(--jcg-line); background: #fff; color: #1c2030; font: 700 26px/1 var(--jc-font-head, sans-serif); cursor: pointer; }
.jcg-sd-key:hover, .jcg-sd-key:focus { background: #fff; color: #1c2030; }
.jcg-sd-key:hover { border-color: var(--jcg-accent); }
.jcg-sd-key.is-used { opacity: .35; }
.jcg-sd.is-notes .jcg-sd-key { font-size: 17px; font-weight: 600; color: #5b6478; }
.jcg-sd.is-color .jcg-sd-key { position: relative; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--jcg-line), inset 0 -4px 0 rgba(0, 0, 0, .15); color: #fff; }
.jcg-sd.is-color .jcg-sd-key span { font-size: 15px; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); opacity: .85; }
.jcg-sd.is-color.is-notes .jcg-sd-key { border-radius: 50%; aspect-ratio: 1; width: 70%; justify-self: center; }
.jcg-sd-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.jcg-sd-tools .jcg-btn { margin-left: auto; }
.jcg-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 15px; }
.jcg-table th, .jcg-table td { padding: 8px 10px; border-bottom: 1px solid var(--jcg-line); text-align: left; vertical-align: top; }
.jcg-table th { background: var(--jcg-soft); }

@media (max-width: 900px) {
    .jcg-sd { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-sd-main { grid-template-columns: 1fr; }
    .jcg-sd-grid { width: 100%; min-width: 0; }
    .jcg-sd-pad { grid-template-columns: repeat(9, 1fr); gap: 4px; }
    .jcg-sd-key { aspect-ratio: .85; font-size: 20px; border-radius: 9px; }
    .jcg-sd.is-color .jcg-sd-key { border-width: 2px; }
    .jcg-sd.is-color.is-notes .jcg-sd-key { width: 100%; }
}

/* Feuille imprimée du sudoku */
@media print {
    html.jcg-printing .jcg-sd-print { margin: 0 auto 14px; border-collapse: collapse; border: 3px solid #000; }
    html.jcg-printing .jcg-sd-print td { width: 1.85cm; height: 1.85cm; border: 1px solid #999; text-align: center; font-size: 26px; font-weight: 700; }
    html.jcg-printing .jcg-sd-print td.br { border-right: 3px solid #000; }
    html.jcg-printing .jcg-sd-print tr td.bb, html.jcg-printing .jcg-sd-print td.bb { border-bottom: 3px solid #000; }
    html.jcg-printing .jcg-sd-print.is-small td { width: .6cm; height: .6cm; font-size: 10px; font-weight: 400; }
    html.jcg-printing .jcg-print h2 { font-size: 14px; margin: 10px 0 6px; }
    html.jcg-printing .jcg-sd-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 8px 0; padding: 0; list-style: none; font-size: 13px; }
    html.jcg-printing .jcg-sd-legend span { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Takuzu pixel art ---------- */
.jcg-tk { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-tk-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.jcg-tk-stage { display: flex; justify-content: center; min-width: 0; }
.jcg-tk-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; width: min(100%, 640px, calc(100vh - 170px)); min-width: 260px; aspect-ratio: 1;
    padding: 4px; border-radius: 10px; background: #c9d1e2; user-select: none; -webkit-user-select: none; }
.jcg-tk-cell { position: relative; aspect-ratio: 1; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 3px; background: #e9edf5; cursor: pointer; transition: background .25s; }
.jcg-tk-cell:hover, .jcg-tk-cell:focus { background: #dde3ef; }
.jcg-tk-cell.v0 { background: var(--tk0, #fff); }
.jcg-tk-cell.v1 { background: var(--tk1, #1c2030); }
.jcg-tk-cell.is-given { cursor: default; }
.jcg-tk-cell.is-given::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: rgba(28, 32, 48, .28); }
.jcg-tk-cell.is-given.v1::after { background: rgba(255, 255, 255, .55); }
.jcg-tk-cell.is-bad { box-shadow: inset 0 0 0 3px #e5484d; }
.jcg-tk-cell.is-sel, .jcg-tk-cell:focus-visible { outline: 3px solid var(--jcg-accent); outline-offset: -1px; z-index: 1; }
.jcg-tk.is-done .jcg-tk-grid { gap: 0; padding: 0; background: #fff; overflow: hidden; box-shadow: 0 12px 30px rgba(18, 52, 126, .18); transition: gap .6s, padding .6s; }
.jcg-tk.is-done .jcg-tk-cell { border-radius: 0; cursor: default; }
.jcg-tk.is-done .jcg-tk-cell::after { display: none; }
.jcg-tk-side { display: flex; flex-direction: column; gap: 12px; }
.jcg-tk-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.jcg-tk-rules li { display: flex; align-items: center; gap: 10px; }
.jcg-tk-mini { display: inline-flex; gap: 2px; flex: none; }
.jcg-tk-mini i { width: 12px; height: 12px; border-radius: 2px; background: var(--tk1, #1c2030); }
.jcg-tk-mini i.b { background: var(--tk0, #fff); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.jcg-tk-mini i.x { background: #e5484d; }
.jcg-tk-pair { margin: 0; font-size: 14px; font-weight: 600; }
.jcg-tk-pair i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.jcg-tk-print { margin: 0 auto 12px; border-collapse: collapse; }
@media print {
    html.jcg-printing .jcg-tk-print td { width: .95cm; height: .95cm; border: 1px solid #555; text-align: center; font-size: 15px; }
    html.jcg-printing .jcg-tk-print.is-art td { width: .8cm; height: .8cm; font-size: 10px; color: #333; }
}
@media (max-width: 900px) {
    .jcg-tk { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-tk-main { grid-template-columns: 1fr; }
    .jcg-tk-grid { width: 100%; min-width: 0; gap: 1px; padding: 2px; }
}

/* ---------- Fil numérique (classique et couleur) ---------- */
.jcg-np { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-np-grid { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(100%, 600px, calc(100vh - 170px)); min-width: 260px; aspect-ratio: 1;
    padding: 6px; border-radius: 12px; background: #d6dcea; touch-action: none; user-select: none; -webkit-user-select: none; }
.jcg-np-cell { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 8px;
    background: #fff; cursor: pointer; transition: background .2s; }
.jcg-np-cell:hover, .jcg-np-cell:focus { background: #f3f6fc; }
.jcg-np-cell.is-on { background: #dbe8ff; }
.jcg-np-num { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 62%; height: 62%; border-radius: 50%;
    background: #1c2030; color: #fff; font: 700 clamp(13px, 2.6vw, 22px)/1 var(--jc-font-head, sans-serif); }
.jcg-np-cell.is-end .jcg-np-num, .jcg-np-cell.is-end::after { box-shadow: 0 0 0 3px var(--jcg-accent); }
.jcg-np-cell.is-end::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; background: #2f7de1; z-index: 1; }
.jcg-np-cell.is-end.has-num::after { display: none; }
.jcg-np-cell.is-hint { animation: jcg-pulse .6s 2; }
.jcg-np-cell:focus-visible { outline: 3px solid var(--jcg-accent); outline-offset: -2px; z-index: 3; }
.jcg-np-line { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); pointer-events: none; z-index: 1; }
.jcg-np-line polyline { fill: none; stroke: #2f7de1; stroke-width: .28; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.jcg-np.is-color .jcg-np-line polyline { stroke: rgba(28, 32, 48, .55); stroke-width: .14; }
.jcg-np.is-color .jcg-np-num { background: rgba(28, 32, 48, .82); }
.jcg-np.is-done .jcg-np-line, .jcg-np.is-done.is-color .jcg-np-num, .jcg-np.is-done .jcg-np-cell::after { opacity: 0; transition: opacity .6s; }
.jcg-np.is-done.is-color .jcg-np-grid { gap: 0; padding: 0; background: #fff; box-shadow: 0 12px 30px rgba(18, 52, 126, .18); }
.jcg-np.is-done.is-color .jcg-np-cell { border-radius: 0; }
.jcg-np.is-done:not(.is-color) .jcg-np-line { opacity: 1; }
.jcg-np-rule, .jcg-np-help { margin: 0; font-size: 14px; line-height: 1.55; }
.jcg-np-help { color: #5b6478; font-size: 13px; }
.jcg-art-number-path, .jcg-art-rainbow-path { grid-template-columns: repeat(3, 1fr); gap: 3px; }
.jcg-art-number-path i { background: #dbe8ff !important; }
.jcg-art-number-path i:is(:nth-child(1), :nth-child(9)) { background: #1c2030 !important; border-radius: 50%; }
.jcg-art-rainbow-path i:nth-child(1) { background: hsl(0, 82%, 56%); } .jcg-art-rainbow-path i:nth-child(2) { background: hsl(30, 82%, 56%); }
.jcg-art-rainbow-path i:nth-child(3) { background: hsl(55, 82%, 56%); } .jcg-art-rainbow-path i:nth-child(6) { background: hsl(100, 82%, 50%); }
.jcg-art-rainbow-path i:nth-child(5) { background: hsl(150, 82%, 45%); } .jcg-art-rainbow-path i:nth-child(4) { background: hsl(190, 82%, 50%); }
.jcg-art-rainbow-path i:nth-child(7) { background: hsl(220, 82%, 56%); } .jcg-art-rainbow-path i:nth-child(8) { background: hsl(255, 82%, 60%); }
.jcg-art-rainbow-path i:nth-child(9) { background: hsl(285, 82%, 56%); }
.jcg-art-color-dominoes { grid-template-columns: 1fr; gap: 2px; width: 34px; padding: 3px; border-radius: 8px; background: #fffbef; box-shadow: inset 0 0 0 1.5px #b9a978; }
.jcg-art-color-dominoes i:nth-child(1) { background: #e5484d !important; } .jcg-art-color-dominoes i:nth-child(2) { background: #2f7de1 !important; }
.jcg-np.is-color .jcg-np-num small { font-size: .9em; font-weight: 800; line-height: 1; color: #fff; -webkit-text-stroke: 3px rgba(28, 32, 48, .75); paint-order: stroke fill; }
.jcg-np-order span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #5b6478; }
.jcg-np-order p { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.jcg-np-order i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); transition: transform .2s, opacity .2s; }
.jcg-np-order i.is-done { opacity: .35; transform: scale(.8); }
.jcg-np-order i.is-next { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1c2030; transform: scale(1.1); }
.jcg-np.is-color .jcg-np-num { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 0 0 3px #fff; }
.jcg-np.is-color .jcg-np-cell.is-on .jcg-np-num { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 0 0 3px rgba(255, 255, 255, .7); }
@media (max-width: 900px) {
    .jcg-np { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-np-grid { width: 100%; min-width: 0; gap: 2px; padding: 4px; }
    .jcg-np-line { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
}
@media print {
    html.jcg-printing .jcg-tk-print.is-path td { width: 1.6cm; height: 1.6cm; font-size: 22px; font-weight: 700; }
}

/* ---------- Mode d'emploi illustré (rules.php) ---------- */
.jcg-guide { margin: 0 0 32px; padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--jcg-line); box-shadow: 0 8px 24px rgba(18, 52, 126, .06); }
.jcg-guide-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.jcg-guide-head h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); }
.jcg-guide h3 { margin: 18px 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: #8a5a12; }
.jcg-guide-principle { margin: 0; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #fff7e8, #eef4ff); font-size: 17px; line-height: 1.55; }
.jcg-guide-principle span { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; background: var(--jcg-accent); color: #2b1a00; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px; }
.jcg-guide-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
.jcg-guide-steps { counter-reset: jcg-step; margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.jcg-guide-steps li { counter-increment: jcg-step; position: relative; padding-left: 46px; }
.jcg-guide-steps li::before { content: counter(jcg-step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--jcg-blue); color: #fff; font: 800 16px/1 var(--jc-font-head, sans-serif); }
.jcg-guide-steps p { margin: 4px 0 8px; line-height: 1.55; }
.jcg-guide-legend { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.jcg-guide-legend li { display: flex; align-items: center; gap: 12px; line-height: 1.45; }
.jcg-guide-tip { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fff4dc; border: 1px solid #f0d08a; }
.jcg-guide-tip > span { font-size: 22px; line-height: 1; }
.jcg-guide-tip p { margin: 0; line-height: 1.55; }
.jcg-guide-example { margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-guide-example figcaption { margin-bottom: 10px; font-size: 16px; }
.jcg-guide-example p { margin: 10px 0 0; line-height: 1.5; font-size: 15px; }
.jcg-demo-pair { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.jcg-demo-arrow { font-size: 26px; font-weight: 800; color: var(--jcg-accent); }

/* Mini-grilles */
.jcg-demo { --s: 38px; display: inline-grid; grid-template-columns: repeat(var(--cols), minmax(var(--s), auto)); gap: 3px; padding: 4px; border-radius: 9px; background: #d6dcea; vertical-align: middle; }
.jcg-demo--sm { --s: 32px; }
.jcg-demo--key, .jcg-demo--mark { --s: 30px; padding: 3px; flex: none; }
.jcg-demo--mark { --s: 26px; }
.jcg-demo-cell { position: relative; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 6px; background: #fff; color: #1c2030;
    font: 800 calc(var(--s) * .48)/1 var(--jc-font-head, sans-serif); }
.jcg-demo-cell.is-gap { background: transparent; }
.jcg-demo-cell.is-ink { background: #fff !important; color: var(--c) !important; text-shadow: none !important; box-shadow: none; font-weight: 900; letter-spacing: .02em; }
.jcg-demo-cell.is-wide { width: auto; min-width: calc(var(--s) * 1.6); padding: 0 6px; font-size: calc(var(--s) * .42); }
.jcg-demo-cell.is-color { background: var(--c); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.jcg-demo-cell.is-stone { background: repeating-linear-gradient(45deg, #5d6475 0 5px, #4c5262 5px 10px); }
.jcg-demo-cell.is-soft { background: #e3ecff; }
.jcg-demo-cell.is-color.is-soft { outline: 3px solid #9cb8f0; outline-offset: -3px; }
.jcg-demo-cell.is-sel { background: #ffe7b8; box-shadow: inset 0 0 0 3px var(--jcg-accent); }
.jcg-demo-cell.is-good { box-shadow: inset 0 0 0 3px #2fae66; }
.jcg-demo-cell.is-good:not(.is-color) { background: #e3f6ea; color: #1d6b3e; }
.jcg-demo-cell.is-hit { box-shadow: inset 0 0 0 3px #d3243b; }
.jcg-demo-cell.is-hit:not(.is-color) { background: #fde6ea; color: #d3243b; }
.jcg-demo-cell.is-hit.is-color { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #d3243b; z-index: 1; }
.jcg-demo-cell.is-hit.is-color::after { content: '✕'; position: absolute; color: #fff; font-size: calc(var(--s) * .5); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.jcg-demo-cell.is-pencil { color: #2f5fb3; }
.jcg-demo-cell.is-given:not(.is-color) { background: #1c2030; color: #fff; border-radius: 50%; transform: scale(.82); }
.jcg-demo-cell.is-given.is-color::after { content: ''; position: absolute; width: 26%; height: 26%; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.jcg-demo-cell.is-path { background: #dbe8ff; color: #2f7de1; }
.jcg-demo-cell.is-dot { background: #fff; box-shadow: none; text-shadow: none; color: transparent; }
.jcg-demo-cell.is-dot::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
[class*="is-gate-"] { background: transparent !important; box-shadow: none !important; }
.jcg-demo-cell.is-gate-r::after { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 32%; border-radius: 4px; }
.jcg-demo-cell.is-gate-red::after { background: #e5484d; } .jcg-demo-cell.is-gate-blue::after { background: #2f7de1; }

@media (max-width: 900px) {
    .jcg-guide { padding: 16px; }
    .jcg-guide-layout { grid-template-columns: 1fr; gap: 6px; }
    .jcg-guide-steps li { padding-left: 42px; }
    .jcg-demo { --s: 32px; } .jcg-demo--sm { --s: 28px; }
}

/* ---------- Color Dominoes (repris de Wordiloo dominoes.css, passé en px et aux couleurs du site) ---------- */
.wl-dm{--wl-dm-ivory:#fffbef;--wl-dm-edge:#b9a978;--wl-dm-felt:#2f6440}
.wl-dm-game{margin-top:16px}
.wl-dm-main{max-width:960px;margin-inline:auto}
.wl-dm-seats{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:10px}
.wl-dm-seat{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;padding:6px 12px;border:2px solid transparent;border-radius:10px;background:#f1f4fa;font-size:15px;transition:border-color .2s,background .2s}
.wl-dm-seat.is-turn{border-color:#E8A54B;background:#fff4dc}
.wl-dm-seat.is-winner{border-color:#2fae66;background:#e3f6ea}
.wl-dm-seat-name{font-weight:700}
.wl-dm-seat-score{color:#5b6478;font-variant-numeric:tabular-nums}
.wl-dm-seat-score b{color:#1c2030;font-family:var(--jc-font-head, sans-serif);font-size:17px}
.wl-dm-seat-hand{display:flex;gap:2px;flex-basis:100%}
.wl-dm-passed{font-style:normal;font-weight:600;font-size:12.5px;padding:1px 6px;border-radius:999px;background:#fff;color:#5b6478}
.wl-dm-mini{width:13px;height:26px}
.wl-dm-back{fill:#1f4d33;stroke:#0f2a1b;stroke-width:2}.wl-dm-back-dot{fill:#7fa66a}

.wl-dm-wrap{position:relative}
.wl-dm-table{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:240px;padding:16px 8px 34px;border-radius:16px;background:radial-gradient(ellipse at 50% 35%,#4f8a5c,var(--wl-dm-felt) 75%);box-shadow:inset 0 0 0 3px #26553a}
.wl-dm-wrap:has(> [data-dm-over]:not([hidden])) .wl-dm-table{min-height:560px}
.wl-dm-board{display:block;width:100%;height:auto;overflow:visible}
.wl-dm-t-body{fill:var(--wl-dm-ivory);stroke:var(--wl-dm-edge);stroke-width:1.5;filter:drop-shadow(1.5px 2.5px 0 rgba(0,0,0,.28))}
.wl-dm-t-line{stroke:#c9b98c;stroke-width:1.6;stroke-linecap:round}
.wl-dm-t.is-last .wl-dm-t-body{fill:#fff1c2;stroke:#ff8a3d;stroke-width:2.5}
.wl-dm-board .wl-dm-t.is-last{animation:wl-dm-in .35s ease-out}
.wl-dm-ghost{cursor:pointer}
.wl-dm-ghost rect{fill:rgba(255,255,255,.18);stroke:#ffd77a;stroke-width:3;stroke-dasharray:7 5;animation:wl-dm-pulse 1.2s ease-in-out infinite}
.wl-dm-ghost text{fill:#fff;font:700 20px var(--jc-font-head, system-ui);pointer-events:none}
.wl-dm-ghost:hover rect{fill:rgba(255,215,122,.35)}
@keyframes wl-dm-pulse{50%{stroke-opacity:.45}}
@keyframes wl-dm-in{from{opacity:0}}
.wl-dm-stock{position:absolute;left:0;right:0;bottom:6px;margin:0;text-align:center;color:#e9f4e3;font-size:13.5px;font-weight:600}

.wl-dm-status{min-height:26px;margin:12px 0 0;text-align:center;font-weight:600}
.wl-dm.is-thinking .wl-dm-status::after{content:"";display:inline-block;width:12px;height:12px;margin-left:6px;vertical-align:-1px;border:2px solid #2f7de1;border-right-color:transparent;border-radius:50%;animation:jcg-spin .8s linear infinite}
.wl-dm-ends{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:10px}
.wl-dm-hand-box{margin-top:12px;padding:10px 12px 14px;border-radius:16px;background:#f1f4fa}
.wl-dm-hand-h{margin:0 0 8px;font-size:16px;text-align:center}
.wl-dm-hand-h span{color:#5b6478;font-weight:500;font-size:14px}
.wl-dm-hand{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;min-height:90px}
.wl-dm-tile{width:48px;height:92px;padding:0;border:0;border-radius:8px;background:none;cursor:pointer;transition:transform .15s,opacity .15s,filter .15s;-webkit-tap-highlight-color:transparent}
.wl-dm-svg{display:block;width:100%;height:100%}
.wl-dm-tile.is-playable{transform:translateY(-6px)}
.wl-dm-tile.is-playable .wl-dm-t-body{stroke:#2f9e5b;stroke-width:3}
.wl-dm-tile.is-dim{opacity:.55;filter:saturate(.6)}
.wl-dm-tile.is-selected{transform:translateY(-12px)}
.wl-dm-tile.is-selected .wl-dm-t-body{fill:#fff1c2;stroke:#ff8a3d;stroke-width:4}
.wl-dm-tile.is-hint .wl-dm-t-body{stroke:#4fb3ff;stroke-width:4}
.wl-dm-tile.is-hint{animation:wl-dm-hop 1s ease-in-out 3}
.wl-dm-tile.is-new .wl-dm-t-body{fill:#eef8ff}
.wl-dm-tile:hover:not(.is-dim){filter:brightness(1.03)}
.wl-dm-tile:focus-visible{outline:3px solid #2f7de1;outline-offset:3px}
@keyframes wl-dm-hop{50%{transform:translateY(-14px)}}
.wl-dm-tools .wl-btn:disabled{opacity:.45;cursor:not-allowed}
.wl-dm-toggle{justify-content:center;margin-top:10px}
.wl-dm-wins{white-space:nowrap}
.wl-dm-wins b{color:#1c2030}
.wl-dm-over-hands{color:#5b6478;font-size:14px}
@media (prefers-reduced-motion:reduce){.wl-dm-ghost rect,.wl-dm-tile.is-hint,.wl-dm-board .wl-dm-t.is-last{animation:none}.wl-dm-tile{transition:none}}
@media (max-width:600px){
    .wl-dm-table{padding:10px 3px 30px;min-height:180px;border-radius:10px}
    .wl-dm-tile{width:39px;height:76px}
    .wl-dm-hand{gap:5px}
    .wl-dm-seat{font-size:13.5px;padding:5px 8px}
    .wl-dm-mini{width:11px;height:22px}
}

.wl-dm-half { stroke: rgba(0, 0, 0, .12); stroke-width: 1; }
.wl-dm-pip { fill: #fff; stroke: rgba(28, 32, 48, .45); stroke-width: 1; }
.wl-dm-ghost-swatch { stroke: #fff; stroke-width: 2; pointer-events: none; }
.wl-dm-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.wl-dm-tile:hover, .wl-dm-tile:focus { background: none; }
.wl-dm-toggle { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 12px; font-size: 15px; cursor: pointer; }
.wl-dm-help { margin: 10px 0 0; text-align: center; font-size: 14px; color: #5b6478; }
.wl-dm-tools { justify-content: center; margin-top: 14px; }
.wl-dm-tools .is-pop { border-color: var(--jcg-accent); background: #fff4dc; }
@keyframes jcg-spin { to { transform: rotate(360deg); } }
.jcg-dm { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-dm-setup { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center; margin-bottom: 14px; }
.jcg-dm-choice { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: #e7ecf6; }
.jcg-dm-opt:hover, .jcg-dm-opt:focus { background: transparent; color: #1c2030; }
.jcg-dm-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: #1c2030; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.jcg-dm-opt.is-on { background: #fff; box-shadow: 0 2px 6px rgba(18, 52, 126, .15); color: var(--jcg-blue); }
.jcg-dm-values { max-width: 320px; }
@media (max-width: 600px) { .jcg-dm { padding: 10px; margin-left: -6px; margin-right: -6px; } .jcg-dm-choice { border-radius: 12px; } .jcg-dm-opt { padding: 4px 10px; min-height: 36px; } }

/* ---------- Coloring Memory ---------- */
.jcg-mm { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-mm .jcg-sd-levels small { font-weight: 500; opacity: .75; }
.jcg-mm-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; width: 100%; margin: 0 auto; }
.jcg-mm-card:hover, .jcg-mm-card:focus { background: none; }
.jcg-mm-card { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; perspective: 800px; }
.jcg-mm-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s; }
.jcg-mm-card.is-open .jcg-mm-inner, .jcg-mm-card.is-found .jcg-mm-inner { transform: rotateY(180deg); }
.jcg-mm-back, .jcg-mm-front { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 4px 10px rgba(18, 52, 126, .14); }
.jcg-mm-back { background: repeating-linear-gradient(135deg, #e5484d 0 12px, #f2802c 12px 24px, #f2c230 24px 36px, #2fae66 36px 48px, #2f7de1 48px 60px, #7b52d1 60px 72px); border: 5px solid #fff; }
.jcg-mm-back::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 clamp(22px, 4vw, 40px)/1 var(--jc-font-head, sans-serif); text-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.jcg-mm-front { transform: rotateY(180deg); display: grid; place-items: center; padding: 6px; background: #fff; border: 2px solid var(--jcg-line); }
.jcg-mm-front img { max-width: 100%; max-height: 100%; object-fit: contain; }
.jcg-mm-card.is-found .jcg-mm-front { border-color: #2fae66; box-shadow: 0 0 0 3px #2fae66; }
.jcg-mm-card:focus-visible { outline: 3px solid var(--jcg-accent); outline-offset: 3px; border-radius: 12px; }
.jcg-mm-msg { text-align: center; margin-top: 12px; }
.jcg-mm-tools { text-align: center; margin-top: 8px; }
.jcg-mm-win { margin-top: 18px; padding: 18px; border-radius: 14px; background: #fff; border: 2px solid #2fae66; text-align: center; }
.jcg-mm-win h2 { margin: 0 0 6px; }
.jcg-mm-win h3 { margin: 16px 0 10px; font-size: 17px; }
.jcg-mm-found { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; text-align: left; }
.jcg-mm-found a { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid var(--jcg-line); background: #fff; color: var(--jcg-ink); font-size: 13px; line-height: 1.3; text-decoration: none; }
.jcg-mm-found a:hover { border-color: var(--jcg-accent); }
.jcg-mm-found img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.jcg-demo-cell.is-back { background: repeating-linear-gradient(135deg, #e5484d 0 5px, #f2c230 5px 10px, #2fae66 10px 15px, #2f7de1 15px 20px); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.jcg-art-coloring-memory { grid-template-columns: repeat(3, 1fr); }
.jcg-art-coloring-memory i { background: repeating-linear-gradient(135deg, #e5484d 0 4px, #f2c230 4px 8px, #2f7de1 8px 12px) !important; }
.jcg-art-coloring-memory i:is(:nth-child(2), :nth-child(6)) { background: #fff !important; box-shadow: inset 0 0 0 2px #2fae66; }
@media (max-width: 600px) { .jcg-mm { padding: 10px; margin-left: -6px; margin-right: -6px; } .jcg-mm-grid { gap: 6px; } .jcg-mm-back { border-width: 3px; } }

/* ---------- Battleship (repris de Wordiloo battleship.css, passé en px et aux couleurs du site) ---------- */
.wl-bn{--wl-bn-sea:#d7eefa;--wl-bn-sea-2:#c4e4f6;--wl-bn-line:#9cc9e3;--wl-bn-ship:#5f7183;--wl-bn-hit:#e2483d;--wl-bn-sunk:#8f2a24;--wl-bn-water:#eef7fc}
.wl-bn [hidden]{display:none!important}
.wl-bn .wl-brain-levels{margin-bottom:18px}
.wl-bn-settings{align-items:center;gap:12px 20px;margin-top:14px}
.wl-bn-settings .wl-chess-choice{border-radius:20px;justify-content:center}
.wl-bn-audio{display:flex;align-items:center;gap:10px;max-width:400px;padding:10px 12px;border:1px solid #dfe5f1;border-radius:14px;background:#eef4fb;text-align:left}
.wl-bn-audio p{margin:0;font-size:12.5px;line-height:1.5;color:#5b6478}
.wl-bn-sound{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:none;min-height:44px;max-width:110px;padding:8px;border:1px solid #dfe5f1;border-radius:10px;background:white;color:#2f5fb3;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.wl-bn-sound[aria-pressed=true]{background:#12347e;color:white}
.wl-bn-sound:focus-visible{outline:3px solid #E8A54B;outline-offset:3px}
.wl-bn-status{min-height:26px;margin:12px auto;max-width:700px;text-align:center;font-weight:600;color:#2f5fb3}
.wl-bn.is-thinking .wl-bn-status::after{content:"";display:inline-block;width:12px;height:12px;margin-left:6px;vertical-align:-1px;border:2px solid #2f5fb3;border-right-color:transparent;border-radius:50%;animation:wl-bn-spin .8s linear infinite}
@keyframes wl-bn-spin{to{transform:rotate(360deg)}}
.wl-bn-h{margin:0 0 8px;font-size:17px;text-align:center}
.wl-bn-left{color:#5b6478;font-weight:500;font-size:14px}

.wl-bn-place{max-width:700px;margin:0 auto 16px;padding:12px;border-radius:16px;background:#eef4fb}
.wl-bn-dock{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:8px}
.wl-bn-dock-ship{display:inline-flex;flex-direction:column;align-items:center;gap:4px;min-height:44px;padding:7px 11px;border:2px solid transparent;border-radius:10px;background:#fff;color:#1c2030;font:inherit;font-weight:600;cursor:pointer}
.wl-bn-dock-ship small{color:#5b6478;font-weight:500}
.wl-bn-dock-ship.is-on{border-color:#E8A54B;background:#fff4dc}
.wl-bn-dock-ship.is-placed:not(.is-on){opacity:.8}
.wl-bn-dock-ship:focus-visible{outline:3px solid #2f5fb3;outline-offset:2px}
.wl-bn-ship-icon{display:block;width:calc(var(--ship-length)*30px);height:40px;max-width:100%;pointer-events:none}
.wl-bn-ship-icon svg{display:block;width:100%;height:100%;overflow:visible}
.wl-bn-tools{flex-wrap:wrap;gap:10px;justify-content:center;margin-top:12px}

.wl-bn-seas{display:grid;gap:20px;align-items:start}
@media (min-width:900px){.wl-bn-seas{grid-template-columns:1fr 1fr}.wl-bn.is-placing .wl-bn-seas{grid-template-columns:minmax(0,520px);justify-content:center}}
.wl-bn-sea{min-width:0}
.wl-bn-wrap{position:relative}
.wl-bn-wrap:has(> [data-bn-over]:not([hidden])) .wl-bn-grid{min-height:340px}
.wl-bn-grid{display:grid;grid-template-columns:18px repeat(var(--bn-size,10),minmax(0,1fr));gap:2px;width:min(100%,520px);margin:0 auto;padding:6px;border-radius:16px;background:var(--wl-bn-line);user-select:none;-webkit-user-select:none}
.wl-bn-corner{display:block}
.wl-bn-label{display:flex;align-items:center;justify-content:center;color:#24506b;font-weight:700;font-size:12px;line-height:1.6}
.wl-bn-cell{position:relative;aspect-ratio:1;min-width:0;padding:0;border:0;border-radius:3px;background:var(--wl-bn-sea);cursor:default;-webkit-tap-highlight-color:transparent}
.wl-bn-cell:focus-visible{outline:3px solid #E8A54B;outline-offset:-3px;z-index:1}
.wl-bn-cell.is-open{cursor:crosshair}
.wl-bn-cell.is-open:hover{background:#fff6d6}
.wl-bn.is-placing .wl-bn-sea--mine .wl-bn-cell{cursor:pointer}

/* Each cell crops the same complete SVG: the hull spans precisely its real cells, in either orientation. */
.wl-bn-cell.is-ship{background:var(--wl-bn-sea)}
.wl-bn-cell>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.wl-bn-cell.is-reveal>svg{opacity:.7}
.wl-bn-cell.is-preview{background:#7cc58f;box-shadow:inset 0 0 0 2px #2f8a4c}
.wl-bn-cell.is-bad{background:#f3b3ad;box-shadow:inset 0 0 0 2px var(--wl-bn-hit)}

/* Tirs. */
.wl-bn-cell.is-miss::after,.wl-bn-cell.is-water::after{content:"";position:absolute;inset:38%;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #7fb6d6}
.wl-bn-cell.is-water{background:var(--wl-bn-water)}
.wl-bn-cell.is-water::after{inset:44%;background:#b9d9eb;box-shadow:none}
.wl-bn-cell.is-hit::after,.wl-bn-cell.is-sunk::after{content:"";position:absolute;inset:22%;border-radius:50%;background:var(--wl-bn-hit);box-shadow:0 0 0 3px rgba(255,255,255,.75)}
.wl-bn-cell.is-hit{animation:wl-bn-boom .4s ease-out}
.wl-bn-cell.is-sunk{background:#c9deeb}
.wl-bn-cell.is-sunk>svg{filter:grayscale(.8) brightness(.75)}
.wl-bn-cell.is-sunk::after{inset:30%;background:#ffb4a8;box-shadow:none}
.wl-bn-cell.is-hint{animation:wl-bn-pulse 1.1s ease-in-out infinite;box-shadow:inset 0 0 0 3px #f2a516}
@keyframes wl-bn-boom{from{transform:scale(1.25)}}
@keyframes wl-bn-pulse{50%{background:#ffe9a8}}
@media (prefers-reduced-motion:reduce){.wl-bn-cell.is-hit,.wl-bn-cell.is-hint{animation:none}}

.wl-bn-fleet{display:flex;flex-wrap:wrap;gap:5px 12px;justify-content:center;margin:10px 0 0;padding:0;list-style:none;font-size:13.5px}
.wl-bn-fleet-item{display:inline-flex;align-items:center;gap:6px}
.wl-bn-fleet-item .wl-bn-ship-icon{width:calc(var(--ship-length)*14px);height:20px}
.wl-bn-fleet-item.is-sunk{color:#5b6478;text-decoration:line-through}
.wl-bn-fleet-item.is-sunk .wl-bn-ship-icon{filter:grayscale(1);opacity:.65}
.wl-bn-wins{white-space:nowrap}
@media (max-width:560px){.wl-bn-grid{padding:3px;gap:1px;grid-template-columns:14px repeat(var(--bn-size,10),minmax(0,1fr))}.wl-bn-label{font-size:10px}.wl-bn-dock-ship{padding:5px 8px}}
/* Keep the ship picker compact enough to use beside the sea on a phone. */
@media (max-width:560px){
    .wl-bn-place{padding:8px;margin-bottom:8px}
    .wl-bn-dock{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
    .wl-bn-dock-ship{min-width:0;gap:2px;padding:5px;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
    .wl-bn-dock-ship small{display:block}
    .wl-bn-dock-ship .wl-bn-ship-icon{height:24px;width:calc(var(--ship-length)*20px)}
    .wl-bn-place .wl-bn-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
    .wl-bn-place .wl-btn{min-width:0;min-height:44px;padding:6px;font-size:12px;justify-content:center}
    .wl-bn-place [data-bn-start]{grid-column:1/-1}
    .wl-bn-status{font-size:13px;line-height:1.5;margin:8px auto}
    .wl-bn.is-placing [data-bn-my-fleet]{display:none}
}

.jcg-bn { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-bn .jcg-dm-setup { align-items: center; }
.jcg-bn [data-bn-sound][aria-pressed=true] { background: #12347e; color: #fff; border-color: #12347e; }
.wl-bn-cell, .wl-bn-cell:hover, .wl-bn-cell:focus { color: inherit; }
.wl-bn-cell:not(.is-open):hover { background: var(--wl-bn-sea); }
.wl-bn-dock-ship:hover, .wl-bn-dock-ship:focus { background: #fff; color: #1c2030; }
.wl-bn-dock-ship.is-on:hover { background: #fff4dc; }
.jcg-bn-sound-help { margin: 0; font-size: 13px; color: #5b6478; }
.jcg-bn [data-bn-print]:disabled { opacity: .5; cursor: not-allowed; }
.jcg-art-battleship { grid-template-columns: repeat(3, 1fr); }
.jcg-art-battleship i { background: #d7eefa !important; }
.jcg-art-battleship i:is(:nth-child(1), :nth-child(2)) { background: #2f7de1 !important; }
.jcg-art-battleship i:nth-child(6) { background: #e5484d !important; }
.jcg-art-battleship i:nth-child(9) { background: #f2c230 !important; }
.jcg-demo-cell.is-sea { background: #d7eefa; color: #2f5fb3; }
.jcg-demo-cell.is-sea.is-hit { background: #fde6ea; color: #d3243b; }
@media print {
    html.jcg-printing .jcg-bn-print-seas { display: flex; gap: .8cm; justify-content: center; }
    html.jcg-printing .jcg-bn-print-sea h2 { font-size: 15px; margin: 0 0 6px; text-align: center; }
    html.jcg-printing .jcg-bn-print-grid { display: grid; grid-template-columns: .5cm repeat(var(--n), 1fr); width: 8.6cm; }
    html.jcg-printing .jcg-bn-print-grid .lbl { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
    html.jcg-printing .jcg-bn-print-grid .cell { position: relative; aspect-ratio: 1; border: .5px solid #888; }
    html.jcg-printing .jcg-bn-print-grid .cell svg { position: absolute; inset: 0; width: 100%; height: 100%; }
    html.jcg-printing .jcg-bn-print-fleet { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; font-size: 12px; }
    html.jcg-printing .jcg-bn-print-icon { display: inline-block; width: calc(var(--len) * .7cm); height: .7cm; vertical-align: middle; }
    html.jcg-printing .jcg-bn-print-icon svg { width: 100%; height: 100%; }
}

/* ---------- Color or Word? (repris de Wordiloo, styles wl-stp-*) ---------- */
.jcg-stp, .jcg-mx { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-stp .jcg-sd-levels small, .jcg-mx .jcg-sd-levels small { font-weight: 500; opacity: .75; }
.jcg-stp .jcg-sd-info label { font-weight: 600; cursor: pointer; }
.jcg-stp-progress { height: 6px; border-radius: 9px; background: #e5e9f2; overflow: hidden; }
.jcg-stp-progress span { display: block; height: 100%; width: 0; background: var(--jcg-accent); transition: width .3s; }
.jcg-stp-rule { text-align: center; font-weight: 800; font-size: 18px; margin: 14px 0 8px; color: #2f5fb3; }
.jcg-stp-rule.is-word { color: #b06d12; }
.jcg-stp-stage { display: grid; place-items: center; min-height: 170px; border-radius: 16px; background: #1f2a36; border: 4px solid #1f2a36; transition: border-color .12s ease; }
.jcg-stp-stage.is-ok { border-color: #2fae66; }
.jcg-stp-stage.is-ko { border-color: #e5484d; animation: jcg-nudge .3s; }
.jcg-stp-word { grid-area: 1 / 1; margin: 0; font-family: var(--jc-font-head, sans-serif); font-weight: 800; font-size: clamp(40px, 11vw, 76px); letter-spacing: .04em; }
.jcg-stp-stage .jcg-btn { grid-area: 1 / 1; font-size: 18px; padding: 12px 26px; }
.jcg-stp-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.jcg-stp-btn:hover, .jcg-stp-btn:focus { background: #fff; color: #1c2030; }
.jcg-stp-btn { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--jcg-line); background: #fff; color: #1c2030; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.jcg-stp-btn:hover:not(:disabled) { border-color: var(--jcg-accent); background: #fffaf0; }
.jcg-stp-btn:disabled { opacity: .55; cursor: default; }
.jcg-stp-sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .2); flex: none; }
.jcg-stp-btn kbd { margin-left: auto; font: inherit; font-size: 12px; color: #5b6478; border: 1px solid var(--jcg-line); border-radius: 4px; padding: 0 5px; }
.jcg-stp-rec { font-weight: 800; color: #2fae66; }
@media (hover: none) { .jcg-stp-btn kbd { display: none; } }
@media (max-width: 600px) { .jcg-stp, .jcg-mx { padding: 10px; margin-left: -6px; margin-right: -6px; } .jcg-stp-answers { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Color Mix ---------- */
.jcg-mx-main { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.jcg-mx-swatches { display: flex; gap: clamp(16px, 5vw, 48px); justify-content: center; margin: 6px 0 0; }
.jcg-mx-swatches figure { margin: 0; text-align: center; }
.jcg-mx-swatches figcaption { margin-top: 8px; font-weight: 700; font-size: 14px; }
.jcg-mx-swatch { display: block; width: clamp(120px, 26vw, 190px); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .12), 0 8px 20px rgba(18, 52, 126, .16); border: 6px solid #fff; transition: background .25s; }
.jcg-mx-swatch.is-bowl.is-empty { background: repeating-conic-gradient(#eef1f7 0 25%, #fff 0 50%) 50% / 24px 24px; }
.jcg-mx-meter { width: min(100%, 420px); height: 12px; border-radius: 9px; background: #e5e9f2; overflow: hidden; }
.jcg-mx-meter span { display: block; height: 100%; width: 0; border-radius: 9px; transition: width .25s, background .25s; }
.jcg-mx-score { margin: 0; font-weight: 800; }
.jcg-mx-pots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.jcg-mx-pot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jcg-mx-add:hover, .jcg-mx-add:focus { background: var(--c); }
.jcg-mx-add { position: relative; width: 74px; height: 74px; padding: 0; border-radius: 18px; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px #c9d1e2, inset 0 -6px 0 rgba(0, 0, 0, .15); cursor: pointer; }
.jcg-mx-add:active:not(:disabled) { transform: scale(.94); }
.jcg-mx-add:disabled { opacity: .5; cursor: default; }
.jcg-mx-drop { position: absolute; left: 50%; top: 14px; width: 22px; height: 28px; margin-left: -11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: rgba(255, 255, 255, .55); }
.jcg-mx-add b { position: absolute; right: -8px; top: -8px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: #1c2030; color: #fff; font-size: 14px; line-height: 26px; }
.jcg-mx-name { font-size: 13px; font-weight: 700; }
.jcg-mx-sub:hover, .jcg-mx-sub:focus { background: #fff; color: #1c2030; }
.jcg-mx-sub { width: 34px; height: 26px; padding: 0; border-radius: 8px; border: 1px solid var(--jcg-line); background: #fff; color: #1c2030; font-size: 18px; line-height: 1; cursor: pointer; }
.jcg-mx-sub:disabled { opacity: .35; cursor: default; }
.jcg-mx-tools { justify-content: center; }
.jcg-mx-msg { text-align: center; min-height: 1.4em; margin: 0; }
.jcg-mx-recipe { margin: 0; color: #5b6478; font-size: 14px; }
.jcg-mx-end { margin-top: 18px; padding: 18px; border-radius: 14px; background: #fff; border: 2px solid #2fae66; text-align: center; }
.jcg-mx-palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 12px 0; padding: 0; list-style: none; }
.jcg-mx-palette li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.jcg-mx-palette span { width: 58px; height: 58px; border-radius: 50%; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 0 0 1px #dfe5f1; }
.jcg-mx-palette small { color: #f2b705; }
@media (max-width: 600px) { .jcg-mx-add { width: 58px; height: 58px; } .jcg-mx-pots { gap: 8px; } }

/* ---------- Color Word Search ---------- */
.jcg-ws { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-ws .jcg-sd-levels small { font-weight: 500; opacity: .75; }
.jcg-ws-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.jcg-ws-stage { display: flex; justify-content: center; min-width: 0; }
.jcg-ws-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(100%, 620px, calc(100vh - 170px)); min-width: 260px; aspect-ratio: 1;
    padding: 6px; border-radius: 12px; background: #d6dcea; touch-action: none; user-select: none; -webkit-user-select: none; }
.jcg-ws-cell { display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; background: #fff; color: #1c2030; font: 700 clamp(12px, 2.4vw, 22px)/1 var(--jc-font-head, sans-serif); cursor: pointer; transition: background .25s, color .25s; }
.jcg-ws-cell.is-light { box-shadow: inset 0 0 0 2px #c9d1e2; }
.jcg-ws-cell.is-path { background: #ffe7b8 !important; color: #1c2030 !important; box-shadow: inset 0 0 0 2px var(--jcg-accent); }
.jcg-ws-cell.is-anchor { box-shadow: inset 0 0 0 3px var(--jcg-accent); }
.jcg-ws-cell.is-hint { animation: jcg-pulse .5s 4; box-shadow: inset 0 0 0 3px var(--jcg-accent); }
.jcg-ws-side h2 { margin: 0 0 10px; font-size: 18px; }
.jcg-ws-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 0 0 12px; padding: 0; list-style: none; font-weight: 700; font-size: 15px; letter-spacing: .03em; }
.jcg-ws-list li { display: flex; align-items: center; gap: 8px; }
.jcg-ws-list li.is-found { color: #8a93a6; text-decoration: line-through; }
.jcg-ws-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px #c9d1e2; }
@media (max-width: 900px) {
    .jcg-ws { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-ws-main { grid-template-columns: 1fr; }
    .jcg-ws-grid { width: 100%; min-width: 0; gap: 2px; padding: 4px; }
    .jcg-ws-list { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 13px; }
}
@media print {
    html.jcg-printing .jcg-ws-print { margin: 0 auto 14px; border-collapse: collapse; }
    html.jcg-printing .jcg-ws-print td { width: .95cm; height: .95cm; border: 1px solid #999; text-align: center; font-size: 17px; font-weight: 700; }
    html.jcg-printing .jcg-ws-print-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
    html.jcg-printing .jcg-ws-print-list span { display: inline-block; width: 18px; height: 18px; margin-right: 6px; border: 2px solid #333; border-radius: 50%; vertical-align: -4px; }
}

/* ---------- Art Timeline ---------- */
.jcg-tl { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-tl .jcg-sd-levels small { font-weight: 500; opacity: .75; }
.jcg-tl-top { margin: 0 0 8px; }
.jcg-tl-q { margin: 16px 0 12px; text-align: center; font: 800 clamp(19px, 2.6vw, 24px)/1.3 var(--jc-font-head, sans-serif); }
.jcg-tl-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; max-width: 760px; margin: 0 auto; }
.jcg-tl-or { font-weight: 800; color: #8a5a12; text-transform: uppercase; }
.jcg-tl-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px 16px; border-radius: 16px; border: 2px solid var(--jcg-line); background: #fff; color: #1c2030; font: inherit; text-align: center; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.jcg-tl-card:hover, .jcg-tl-card:focus { background: #fff; color: #1c2030; }
.jcg-tl-card:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--jcg-accent); box-shadow: 0 10px 22px rgba(18, 52, 126, .14); }
.jcg-tl-card:disabled { cursor: default; }
.jcg-tl-img { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: #eef1f7; }
.jcg-tl-img img { width: 100%; height: 100%; object-fit: cover; }
.jcg-tl-card.is-artist .jcg-tl-img img { object-fit: contain; }
.jcg-tl-kind { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #5b6478; }
.jcg-tl-name { font-size: 17px; line-height: 1.25; }
.jcg-tl-date { min-height: 1.3em; font-weight: 800; color: #2f5fb3; }
.jcg-tl-badge { position: absolute; top: -10px; right: -10px; display: none; padding: 4px 10px; border-radius: 999px; background: #2fae66; color: #fff; font-size: 13px; font-weight: 800; }
.jcg-tl-card.is-first .jcg-tl-badge { display: block; }
.jcg-tl-card.is-good { border-color: #2fae66; box-shadow: 0 0 0 3px rgba(47, 174, 102, .3); }
.jcg-tl-card.is-bad { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .25); }
.jcg-tl-feedback { max-width: 760px; margin: 16px auto 0; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--jcg-line); text-align: center; }
.jcg-tl-verdict { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.jcg-tl-verdict.is-good { color: #1d8a4c; } .jcg-tl-verdict.is-bad { color: #c8303a; }
.jcg-tl-infos { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; text-align: left; font-size: 14px; line-height: 1.5; }
.jcg-tl-end { margin-top: 16px; padding: 18px; border-radius: 14px; background: #fff; border: 2px solid #2fae66; text-align: center; }
.jcg-tl-timeline { position: relative; display: grid; gap: 8px; max-width: 560px; margin: 14px auto; padding: 0 0 0 16px; list-style: none; text-align: left; border-left: 3px solid var(--jcg-accent); }
.jcg-tl-timeline li { display: grid; grid-template-columns: 52px 44px 1fr; align-items: center; gap: 10px; }
.jcg-tl-timeline img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.jcg-tl-timeline small { display: block; color: #5b6478; }
.jcg-tl-year { font-weight: 800; color: #8a5a12; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
    .jcg-tl { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-tl-duel { grid-template-columns: 1fr 1fr; gap: 8px; }
    .jcg-tl-or { display: none; }
    .jcg-tl-name { font-size: 14px; }
}

/* ---------- Color Recall ---------- */
.jcg-rc, .jcg-fl { position: relative; margin: 0 0 34px; padding: 16px; border-radius: 18px; background: #f6f8fd; border: 1px solid var(--jcg-line); }
.jcg-rc .jcg-sd-levels small, .jcg-fl .jcg-sd-levels small { font-weight: 500; opacity: .75; }
.jcg-rc-main, .jcg-fl-main { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.jcg-rc-boards { display: flex; justify-content: center; gap: 18px; min-width: 0; }
.jcg-rc-board { flex: 1 1 0; max-width: 520px; margin: 0; text-align: center; }
.jcg-rc-board figcaption { margin-top: 8px; font-weight: 700; font-size: 14px; }
.jcg-rc-orig { display: none; }
.jcg-rc:has(.jcg-rc-result:not([hidden])) .jcg-rc-orig { display: block; }
.jcg-rc-yours { visibility: hidden; }
.jcg-rc:has(.jcg-rc-result:not([hidden])) .jcg-rc-yours { visibility: visible; }
.jcg-rc-grid, .jcg-fl-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; width: 100%; aspect-ratio: 1; padding: 4px; border-radius: 12px; background: #d6dcea; touch-action: none; user-select: none; -webkit-user-select: none; }
.jcg-rc-cell { position: relative; aspect-ratio: 1; border-radius: 3px; background: #fff; }
.jcg-rc-cell.is-empty { background: repeating-linear-gradient(45deg, #fff 0 4px, #eef1f7 4px 8px); }
.jcg-rc-cell.is-wrong::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 70%; text-shadow: 0 0 2px #000, 0 0 3px #d3243b; }
.jcg-rc.is-painting .jcg-rc-cell { cursor: crosshair; }
.jcg-rc-side { display: flex; flex-direction: column; gap: 12px; }
.jcg-rc-show, .jcg-rc-paint { display: none; flex-direction: column; gap: 10px; }
.jcg-rc.is-showing .jcg-rc-show, .jcg-rc.is-painting .jcg-rc-paint { display: flex; }
.jcg-rc-count { margin: 0; font: 800 34px/1 var(--jc-font-head, sans-serif); text-align: center; }
.jcg-rc-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.jcg-rc-palette button:hover, .jcg-rc-palette button:focus { background: var(--c); }
.jcg-rc-palette button { width: 46px; height: 46px; padding: 0; border-radius: 12px; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px #c9d1e2, inset 0 -4px 0 rgba(0, 0, 0, .14); cursor: pointer; }
.jcg-rc-palette button[aria-pressed=true] { box-shadow: 0 0 0 3px #1c2030; transform: scale(1.08); }
.jcg-rc-filled { margin: 0; font-size: 13px; color: #5b6478; }
.jcg-rc-result { padding: 14px; border-radius: 14px; background: #fff; border: 2px solid #2fae66; text-align: center; }
.jcg-rc-result p { margin: 4px 0; }
.jcg-rc-score { font: 800 32px/1 var(--jc-font-head, sans-serif); }

/* ---------- Color Flood ---------- */
.jcg-fl-stage { display: flex; justify-content: center; min-width: 0; }
.jcg-fl-grid { gap: 0; padding: 0; overflow: hidden; width: min(100%, 600px, calc(100vh - 170px)); min-width: 260px; }
.jcg-fl-cell { aspect-ratio: 1; cursor: pointer; transition: background .25s; }
.jcg-fl-cell.is-mine { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.jcg-fl-side { display: flex; flex-direction: column; gap: 12px; }
.jcg-fl-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jcg-fl-pad button:hover, .jcg-fl-pad button:focus { background: var(--c); }
.jcg-fl-pad button { position: relative; aspect-ratio: 1.3; padding: 0; border-radius: 14px; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px #c9d1e2, inset 0 -5px 0 rgba(0, 0, 0, .15); cursor: pointer; }
.jcg-fl-pad button:disabled { opacity: .35; cursor: default; }
.jcg-fl-pad kbd { position: absolute; right: 6px; bottom: 4px; font: 700 12px/1 sans-serif; color: rgba(255, 255, 255, .85); }
@media (max-width: 900px) {
    .jcg-rc, .jcg-fl { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .jcg-rc-main, .jcg-fl-main { grid-template-columns: 1fr; }
    .jcg-rc-boards { gap: 8px; }
    .jcg-fl-grid { width: 100%; min-width: 0; }
    .jcg-fl-pad { grid-template-columns: repeat(6, 1fr); gap: 6px; }
    .jcg-fl-pad button { aspect-ratio: 1; }
}

/* Lien vers l'autre version (classique / couleur), dans le jeu */
.jcg-other-version { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--jcg-line); font-size: 14px; }
.jcg-other-version a { font-weight: 700; }

/* Cartes des outils de création */
.jcg-art-pixel-art-maker, .jcg-art-takuzu { grid-template-columns: repeat(4, 1fr); gap: 2px; }
.jcg-art-pixel-art-maker i, .jcg-art-takuzu i { border-radius: 2px; background: #f1f3f8 !important; }
.jcg-art-pixel-art-maker i:is(:nth-child(2), :nth-child(3), :nth-child(5), :nth-child(6), :nth-child(7), :nth-child(8), :nth-child(10), :nth-child(11), :nth-child(15)) { background: #e45aa8 !important; }
.jcg-art-pixel-art-maker i:nth-child(6) { background: #f7a8d2 !important; }
.jcg-art-takuzu i:is(:nth-child(1), :nth-child(4), :nth-child(6), :nth-child(7), :nth-child(10), :nth-child(11), :nth-child(13), :nth-child(16)) { background: hsl(185, 68%, 45%) !important; }
.jcg-art-takuzu i:not(:nth-child(1)):not(:nth-child(4)):not(:nth-child(6)):not(:nth-child(7)):not(:nth-child(10)):not(:nth-child(11)):not(:nth-child(13)):not(:nth-child(16)) { background: hsl(350, 75%, 85%) !important; }
.jcg-art-ai-coloring-studio { grid-template-columns: 1fr; }
.jcg-art-ai-coloring-studio i { border-radius: 14px; background: linear-gradient(135deg, #2f7de1, #7b52d1 55%, #e45aa8) !important; }

/* Impression du mandala seul */
.jcg-print { display: none; }
@media print {
    html.jcg-printing body > *:not(.jcg-print) { display: none !important; }
    html.jcg-printing .jcg-print { display: block; text-align: center; font-family: sans-serif; }
    html.jcg-printing .jcg-print h1 { font-size: 20px; margin: 0 0 12px; }
    html.jcg-printing .jcg-print .jcg-mandala { width: 17cm; max-width: none; }
    html.jcg-printing .jcg-print p { font-size: 12px; color: #555; }
}

/* ---------- Who Painted It? ---------- */
.jcg-pq-hero { display:flex; align-items:center; gap:22px; }
.jcg-pq-icon { display:grid; place-items:center; flex:0 0 90px; aspect-ratio:1; border-radius:24px; background:#fff; font-size:50px; }
.jcg-pq-meta { margin:12px 0 0; font-size:14px; color:#5b6478; }
.jcg-pq { padding:24px; margin:0 0 32px; border:1px solid var(--jcg-line); border-radius:20px; background:#f8f9fd; }
.jcg-pq [hidden] { display:none !important; }
.jcg-pq-bar { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; font-size:15px; font-variant-numeric:tabular-nums; }
.jcg-pq-bar > :first-child { font-weight:700; }
.jcg-pq-progress { display:block; appearance:none; width:100%; height:6px; border:0; border-radius:9px; margin:16px 0 24px; overflow:hidden; background:#e5e9f2; accent-color:var(--jcg-accent); }
.jcg-pq-progress::-webkit-progress-bar { background:#e5e9f2; }
.jcg-pq-progress::-webkit-progress-value { background:var(--jcg-accent); transition:width .3s; }
.jcg-pq-intro, .jcg-pq-results { text-align:center; }
.jcg-pq-intro { max-width:620px; margin:20px auto; }
.jcg-pq-intro h2 { margin:8px 0 14px; font-size:28px; }
.jcg-pq-intro p { line-height:1.7; }
.jcg-pq-intro-art { display:block; width:min(240px,65%); height:auto; aspect-ratio:1; object-fit:contain; margin:0 auto 16px; border-radius:24px; }
.jcg-pq-layout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(260px,1fr); gap:32px; align-items:start; }
.jcg-pq-frame { margin:0; }
.jcg-pq-canvas { position:relative; aspect-ratio:1; overflow:hidden; background:#252b38; border:10px solid #b48a51; outline:1px solid #8e6634; outline-offset:-5px; box-shadow:0 8px 24px #1c20301a; }
.jcg-pq-canvas img { display:block; width:100%; height:100%; object-fit:contain; }
.jcg-pq-mask { position:absolute; inset:0; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); }
.jcg-pq-mask span { background:#eee7da; background-image:repeating-linear-gradient(135deg,transparent 0 12px,#b48a5109 12px 13px); border:1px solid #d7cbb6; transition:opacity .5s; }
.jcg-pq-mask .is-open { opacity:0; }
.jcg-pq-frame figcaption { margin:12px 0; text-align:center; font-size:13px; color:#5b6478; }
.jcg-pq-side h2 { font-size:28px; margin:0 0 12px; }
.jcg-pq-value { display:inline-block; padding:6px 12px; border-radius:9px; background:#fff0d6; margin:0; }
.jcg-pq-choices { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:18px 0; }
.jcg-pq-choices button { min-height:64px; padding:12px; border:2px solid var(--jcg-line); border-radius:12px; background:#fff; color:var(--jcg-ink); font-family:inherit; font-size:15px; font-weight:700; line-height:1.4; cursor:pointer; overflow-wrap:anywhere; }
.jcg-pq-choices button:hover:not(:disabled) { border-color:var(--jcg-accent); background:#fffaf0; }
.jcg-pq-choices button:disabled { cursor:default; opacity:.6; }
.jcg-pq-choices button.is-wrong { background:#fff1f1; border-color:#c77a80; color:#842c36; }
.jcg-pq-choices button.is-correct { background:#e5f5e9; border-color:#338952; color:#205e37; opacity:1; }
.jcg-pq-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.jcg-pq-skip { border:0; background:none; color:#5b6478; text-decoration:underline; cursor:pointer; font-size:14px; }
.jcg-pq-skip:disabled { opacity:.5; cursor:default; }
.jcg-pq-status { min-height:3em; font-size:14px; line-height:1.5; margin:16px 0; }
.jcg-pq-feedback { border-top:1px solid var(--jcg-line); padding-top:16px; }
.jcg-pq-feedback h3 { margin:0 0 8px; font-size:21px; }
.jcg-pq-feedback p { line-height:1.65; }
.jcg-pq-feedback a { display:block; font-size:12px; margin-bottom:18px; }
.jcg-pq-total { font-size:36px; font-weight:800; margin:8px 0; }
.jcg-pq-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:14px; margin:24px 0; text-align:left; }
.jcg-pq-gallery a { display:flex; flex-direction:column; gap:8px; padding:10px; border:1px solid var(--jcg-line); border-radius:12px; color:var(--jcg-ink); text-decoration:none; background:white; }
.jcg-pq-gallery img { width:100%; height:140px; object-fit:contain; background:#f2efe8; }
.jcg-pq-gallery strong { font-size:14px; }
.jcg-pq-gallery span, .jcg-pq-gallery small { font-size:12px; }
.jcg-pq-modes { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin:20px 0; }
.jcg-pq-modes button { padding:14px 18px; border:2px solid var(--jcg-line); border-radius:12px; background:white; color:var(--jcg-ink); cursor:pointer; }
.jcg-pq-modes button[aria-pressed="true"] { border-color:var(--jcg-blue); background:#eaf0ff; }
.jcg-pq-modes small { display:block; margin-top:4px; }
.jcg-pq button:focus-visible, .jcg-pq a:focus-visible { outline:3px solid var(--jcg-blue); outline-offset:3px; }
.jcg-art-painters-quiz { border:5px solid #b48a51; box-sizing:border-box; transform:rotate(-4deg); background:#e6d7b8; }
@media(max-width:760px) { .jcg-pq { padding:16px; } .jcg-pq-layout { grid-template-columns:1fr; gap:18px; } .jcg-pq-canvas { max-width:480px; margin:auto; } .jcg-pq-hero { align-items:flex-start; gap:14px; } .jcg-pq-icon { flex-basis:54px; font-size:32px; border-radius:16px; } .jcg-pq-side h2 { font-size:24px; } }
@media(prefers-reduced-motion:reduce) { .jcg-pq-mask span, .jcg-pq-progress::-webkit-progress-value { transition:none; } }

/* ---------- Artist Birth Years ---------- */
.jcg-ab { padding:24px; margin-bottom:32px; border:1px solid var(--jcg-line); border-radius:20px; background:#f8f9fd; }
.jcg-ab .jcg-pq-progress::-webkit-progress-value { transition:none; }
.jcg-ab [hidden] { display:none !important; }
.jcg-ab-filters { display:flex; flex-wrap:wrap; gap:8px; border:0; padding:0; margin:0 0 20px; min-width:0; }
.jcg-ab-filters legend { font-size:14px; font-weight:700; margin:0 0 8px; padding:0; }
.jcg-ab-filters legend small { display:block; font-weight:400; color:#5b6478; margin-top:3px; }
.jcg-ab-levels button { flex:1; min-width:150px; padding:13px 16px; border:2px solid var(--jcg-line); border-radius:12px; background:#fff; color:var(--jcg-ink); text-align:left; cursor:pointer; font:inherit; }
.jcg-ab-levels button small { display:block; font-size:12px; margin-top:3px; }
.jcg-ab button[aria-pressed="true"] { border-color:var(--jcg-blue); background:#eaf0ff; color:var(--jcg-blue); }
.jcg-ab-card { display:grid; grid-template-columns:minmax(240px,340px) minmax(0,1fr); gap:32px; align-items:start; max-width:1040px; margin:24px auto 8px; }
.jcg-ab-portrait { margin:0; min-width:0; }
.jcg-ab-photo { width:100%; aspect-ratio:9/11; display:grid; place-items:center; overflow:hidden; background:#ece7dd; border:6px solid #fff; border-radius:14px; box-shadow:0 6px 22px #1c203014; }
.jcg-ab-photo img { width:100%; height:100%; object-fit:cover; object-position:center 20%; }
.jcg-ab-photo span { color:#8a7045; font-size:52px; font-weight:800; }
.jcg-ab-portrait figcaption { margin-top:12px; font-size:11px; color:#5b6478; line-height:1.6; overflow-wrap:anywhere; }
.jcg-ab-portrait summary { cursor:pointer; font-weight:600; }
.jcg-ab-portrait small { display:block; }
.jcg-ab-question h2 { font-size:30px; margin:0 0 12px; }
.jcg-ab-question > p:not(.jcg-kicker) { font-size:18px; margin:0 0 18px; }
.jcg-ab-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(95px,1fr)); gap:10px; }
.jcg-ab-choices button { min-height:72px; padding:12px 8px; border:2px solid var(--jcg-line); border-radius:12px; background:#fff; color:var(--jcg-ink); font-family:inherit; font-weight:800; font-size:24px; cursor:pointer; font-variant-numeric:tabular-nums; }
.jcg-ab-choices button:hover:not(:disabled) { border-color:var(--jcg-accent); background:#fff8eb; }
.jcg-ab-choices button:disabled { cursor:default; opacity:.6; }
.jcg-ab-choices button.is-correct { border-color:#338952; color:#205e37; background:#e5f5e9; opacity:1; }
.jcg-ab-choices button.is-wrong { border-color:#bd6772; color:#842c36; background:#fff1f1; opacity:1; }
.jcg-ab-feedback { margin-top:22px; border-top:1px solid var(--jcg-line); padding-top:16px; line-height:1.6; }
.jcg-ab-verdict { font-weight:700; }
.jcg-ab-feedback > a { display:block; font-size:12px; margin:0 0 18px; }
.jcg-ab-results { text-align:center; max-width:720px; margin:0 auto; }
.jcg-ab-timeline { list-style:none; padding:0; margin:24px 0; text-align:left; }
.jcg-ab-timeline li { display:grid; grid-template-columns:70px 1fr; gap:6px 16px; padding:14px 18px; border-left:3px solid #d5c3a5; border-bottom:1px solid var(--jcg-line); background:#fff; }
.jcg-ab-timeline li strong { grid-row:span 2; font-size:22px; color:#795b31; }
.jcg-ab-timeline li a { color:var(--jcg-ink); font-weight:700; }
.jcg-ab-timeline li span { font-size:13px; color:#5b6478; }
.jcg-ab-timeline li.is-correct { border-left-color:#338952; }
.jcg-ab button:focus-visible, .jcg-ab a:focus-visible, .jcg-ab summary:focus-visible { outline:3px solid var(--jcg-blue); outline-offset:3px; }
.jcg-art-artist-birth-years { background:#f1e8d8; border-radius:12px; display:grid; place-items:center; font-size:30px; }
.jcg-art-artist-birth-years::after { content:'18?'; color:#795b31; font-weight:800; }
.jcg-art-artist-birth-years i { display:none; }
@media(max-width:600px) { .jcg-ab { padding:16px; } .jcg-ab-card { grid-template-columns:1fr; gap:18px; } .jcg-ab-portrait { width:min(280px,90%); margin:0 auto; } .jcg-ab-question h2, .jcg-ab-question > .jcg-kicker { text-align:center; } .jcg-ab-question h2 { font-size:26px; } .jcg-ab-question > p:not(.jcg-kicker) { text-align:center; font-size:16px; } .jcg-ab-choices { grid-template-columns:repeat(2,minmax(0,1fr)); } .jcg-ab-levels button { min-width:85px; padding:10px 8px; font-size:14px; } .jcg-ab-levels button small { font-size:11px; } }

/* Couleur portée par chaque contrôle ET ses libellés : les styles de boutons
   du thème et des extensions ne doivent pas blanchir strong/small au survol. */
body.jc-games-route .jcg :is(.jcg-pq, .jcg-ab) button {
    color: var(--jcg-control-ink, #1c2030) !important;
    -webkit-text-fill-color: currentColor;
}
body.jc-games-route .jcg :is(.jcg-pq, .jcg-ab) button :is(strong, small, span) {
    color: inherit !important;
    -webkit-text-fill-color: currentColor;
}
body.jc-games-route .jcg :is(.jcg-pq, .jcg-ab) button.jcg-btn { --jcg-control-ink: #2b1a00; }
body.jc-games-route .jcg :is(.jcg-pq, .jcg-ab) button[aria-pressed="true"] { --jcg-control-ink: #12347e; }
body.jc-games-route .jcg :is(.jcg-pq, .jcg-ab) button.is-correct { --jcg-control-ink: #205e37; }
body.jc-games-route .jcg :is(.jcg-pq, .jcg-ab) button.is-wrong { --jcg-control-ink: #842c36; }

/* Artist quiz setup and larger portraits. */
.jcg-ab-setup { max-width:900px; margin:0 auto; }
.jcg-ab-setup > h2 { margin:0 0 12px; font-size:28px; }
.jcg-ab-setup > p { margin:0 0 24px; line-height:1.65; }
.jcg-ab-setup > .jcg-btn { margin-top:4px; }
.jcg-ab-results > .jcg-tool { margin:12px 8px 0; }

/* Compact horizontal activity cards on phones. */
@media (max-width: 640px) {
    .jcg-family .jcg-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .jcg-family .jcg-card {
        display: grid;
        grid-template-columns: clamp(72px, 22vw, 96px) minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 6px;
        padding: 14px;
        align-items: start;
    }
    .jcg-family .jcg-card > :not(.jcg-card-picto) { grid-column: 2; min-width: 0; }
    .jcg-family .jcg-card .jcg-card-picto {
        grid-column: 1;
        grid-row: 1 / span 4;
        align-self: center;
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0;
    }
    .jcg-family .jcg-card h3 { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
    .jcg-family .jcg-card p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        line-height: 1.45;
    }
    .jcg-family .jcg-card .jcg-btn { justify-self: start; padding: 6px 12px; font-size: 13px; }
    .jcg-family .jcg-card .jcg-soon { justify-self: start; }
    .jcg-family .jcg-card-meta { font-size: 12px; line-height: 1.4; }
}

