/* Le header validé est conservé. Le tableau et sa palette sont limités à l’écran. */
@media screen {
    body.oc-app {
        --oc-ink: #302b42;
        --oc-muted: #686476;
        --oc-line: #e5e1e9;
        --oc-surface: #fff;
        --oc-soft: #f5f1fa;
        --oc-purple: #6945b7;
        --board: #153d35;
        --chalk: #f5f4e8;
        --chalk-muted: #bfd0c5;
        --sun: #ffdb79;
        color: var(--oc-ink);
        background: #f8f8f6;
        font-family: Inter, system-ui, sans-serif;
    }
    body.oc-app :focus-visible {
        outline: 3px solid #9e7ce5 !important;
        outline-offset: 3px;
    }
    body.oc-app .oc-header {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 10px 0;
        border-bottom: 1px solid var(--oc-line);
        background: rgba(255, 255, 255, 0.96);
    }
    body.oc-app .oc-header .header-inner {
        max-width: 1420px;
        gap: 16px;
    }
    body.oc-app .oc-header .logo {
        min-width: 0;
        gap: 10px;
    }
    body.oc-app .oc-brand-logo {
        display: block;
        width: 50px;
        height: 44px;
        object-fit: contain;
    }
    body.oc-app .oc-brand-copy strong,
    body.oc-app .oc-brand-copy small {
        display: block;
    }
    body.oc-app .oc-brand-copy strong {
        color: var(--oc-ink);
        font-size: 0.95rem;
        line-height: 1.2;
    }
    body.oc-app .oc-brand-copy small {
        margin-top: 3px;
        color: var(--oc-muted);
        font-size: 0.7rem;
    }
    body.oc-app .oc-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }
    body.oc-app .oc-header-actions a,
    body.oc-app .oc-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 9px 14px;
        border: 1px solid var(--oc-line);
        border-radius: 12px;
        background: var(--oc-surface);
        color: var(--oc-ink);
        font:
            700 0.8rem/1.2 Inter,
            sans-serif;
        text-decoration: none;
        cursor: pointer;
    }
    body.oc-app .oc-icon-btn {
        min-width: 44px;
        padding: 9px;
    }
    body.oc-app .oc-icon-btn svg {
        width: 20px;
        height: 20px;
    }

    body.oc-app .oc-workspace {
        display: grid;
        grid-template-columns: 284px minmax(0, 1fr);
        align-items: start;
        min-height: calc(100dvh - 65px);
        background: var(--board);
    }
    body.oc-app .oc-stage {
        min-width: 0;
        min-height: calc(100dvh - 65px);
        padding: 30px clamp(22px, 3.3vw, 60px) 35px;
        color: var(--chalk);
        background-image:
            radial-gradient(ellipse at 80% 0%, #2e65564a, transparent 60%),
            repeating-linear-gradient(
                0deg,
                transparent,
                transparent 39px,
                #f8ffec05 39px,
                #f8ffec05 40px
            );
    }
    body.oc-app .oc-catalog {
        position: sticky;
        top: 65px;
        max-height: calc(100dvh - 65px);
        overflow-y: auto;
        padding: 23px 16px 100px;
        background: #f7f6f0;
        color: #243e35;
        border-right: 1px solid #183d31;
        scrollbar-width: thin;
        scrollbar-color: #b1bdb3 transparent;
    }
    body.oc-app .oc-catalog-heading h2 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 1.02rem;
        letter-spacing: -0.03em;
        color: #213d32;
    }
    body.oc-app .oc-tool-count {
        display: inline-grid;
        place-items: center;
        min-width: 30px;
        height: 25px;
        background: #e5e9df;
        color: #4d6355;
        border-radius: 6px;
        font-size: 0.7rem;
        letter-spacing: 0;
    }
    body.oc-app .oc-catalog-heading p {
        margin: 5px 0 18px;
        color: #59675c;
        font-size: 0.72rem;
        line-height: 1.5;
    }
    body.oc-app .oc-search {
        position: relative;
        margin-bottom: 14px;
    }
    body.oc-app .oc-search > svg {
        position: absolute;
        left: 12px;
        top: 13px;
        width: 18px;
        height: 18px;
        color: #637369;
        pointer-events: none;
    }
    body.oc-app .oc-search input {
        width: 100%;
        min-height: 44px;
        padding: 10px 10px 10px 38px;
        border: 1px solid #cad2c6;
        border-radius: 8px;
        background: #fff;
        color: #213d32;
        font:
            500 0.75rem Inter,
            sans-serif;
    }
    body.oc-app .oc-search input::placeholder {
        color: #657367;
        opacity: 1;
    }
    body.oc-app .oc-filters {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
        margin-bottom: 17px;
    }
    body.oc-app .oc-filters button {
        min-height: 35px;
        padding: 7px 10px;
        border-radius: 6px;
        border: 1px solid transparent;
        background: transparent;
        color: #56675c;
        font:
            650 0.7rem Inter,
            sans-serif;
        cursor: pointer;
    }
    body.oc-app .oc-filters button[aria-pressed='true'] {
        background: #214b3b;
        color: #fff;
        border-color: #214b3b;
    }
    body.oc-app .tool-selector {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 0;
        margin: 0;
        max-width: none;
    }
    body.oc-app .tool-btn {
        min-width: 0;
        min-height: 73px;
        padding: 10px 7px;
        gap: 7px;
        border: 1px solid #d9dfd3;
        border-radius: 9px;
        background: #fffefa;
        box-shadow: none;
        transition: border-color 0.15s;
    }
    body.oc-app .tool-btn::before {
        display: none;
    }
    body.oc-app .tool-btn:hover {
        background: #e9f0e5;
        border-color: #809c86;
        transform: none;
        box-shadow: none;
    }
    body.oc-app .tool-btn .icon {
        display: grid;
        place-items: center;
        width: 27px;
        height: 27px;
        filter: none;
        font-size: 20px;
        color: #2e7455;
        transform: none;
    }
    body.oc-app .tool-btn .icon svg {
        width: 25px;
        height: 25px;
    }
    body.oc-app .tool-btn[data-oc-category='temps'] .icon {
        color: #246b9a;
    }
    body.oc-app .tool-btn[data-oc-category='participer'] .icon {
        color: #a35924;
    }
    body.oc-app .tool-btn[data-oc-category='apprendre'] .icon {
        color: #65499d;
    }
    body.oc-app .tool-btn .label {
        transition: none;
        font:
            650 0.7rem/1.25 Inter,
            sans-serif;
        color: #2e4337;
        overflow-wrap: anywhere;
    }
    body.oc-app .tool-btn.active {
        background: #214b3b;
        border-color: #214b3b;
        transform: none;
        box-shadow: none;
    }
    body.oc-app .tool-btn.active .label {
        color: #fff;
    }
    body.oc-app .tool-btn.active .icon {
        color: #ffdb79;
        animation: none;
    }
    body.oc-app .tool-btn.active::after {
        background: #ffdb79;
        color: #214b3b;
        width: 15px;
        height: 15px;
        top: 5px;
        right: 5px;
        font-size: 9px;
        animation: none;
    }
    body.oc-app .tool-btn[hidden],
    body.oc-app #oc-results-note[hidden],
    body.oc-app .oc-session-bar[hidden] {
        display: none !important;
    }
    body.oc-app .oc-results-note {
        margin: 15px 0;
        color: #4f6357;
        font-size: 0.75rem;
        line-height: 1.5;
    }
    body.oc-app .oc-resources {
        display: flex;
        gap: 9px 12px;
        flex-wrap: wrap;
        margin-top: 24px;
        padding-top: 18px;
        border-top: 1px solid #d1d8cb;
    }
    body.oc-app .oc-resources > span {
        flex-basis: 100%;
        color: #667263;
        text-transform: uppercase;
        font-size: 0.58rem;
        font-weight: 750;
        letter-spacing: 0.1em;
    }
    body.oc-app .oc-resources a {
        color: #365d42;
        font-size: 0.7rem;
        font-weight: 650;
        text-decoration: none;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
    }
    body.oc-app .oc-welcome {
        display: grid;
        gap: 0;
        padding: 0;
        margin: 0;
        text-align: left;
        color: var(--chalk);
    }
    body.oc-app .oc-board-heading {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        padding-bottom: 28px;
        border-bottom: 1px solid #9ec8ac38;
    }
    body.oc-app .oc-board-kicker {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #d5e3d7;
    }
    body.oc-app .oc-board-kicker > span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #8ed5aa;
        box-shadow: 0 0 0 4px #8ed5aa19;
    }
    body.oc-app .oc-board-note {
        color: #c2d3c4;
        font:
            500 1.35rem Caveat,
            cursive;
        transform: rotate(-3deg);
    }
    body.oc-app .oc-board-intro {
        padding: 34px 0 28px;
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 28px;
        align-items: end;
    }
    body.oc-app .oc-welcome h1 {
        margin: 0;
        color: var(--chalk);
        font:
            750 clamp(2.8rem, 4.4vw, 4.8rem)/1.04 Inter,
            sans-serif;
        letter-spacing: -0.065em;
    }
    body.oc-app .oc-welcome h1 em {
        display: inline-block;
        color: var(--sun);
        font:
            650 1.35em/0.8 Caveat,
            cursive;
        letter-spacing: -0.04em;
        padding-right: 0.12em;
    }
    body.oc-app .oc-welcome .oc-board-intro p {
        margin: 0 0 5px;
        max-width: 340px;
        color: #c4d6c8;
        font-size: 0.88rem;
        line-height: 1.8;
    }
    body.oc-app .oc-start-heading {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        margin: 20px 0 15px;
    }
    body.oc-app .oc-start-heading h2 {
        color: #e8eddf;
        font:
            600 1.45rem Caveat,
            cursive;
    }
    body.oc-app .oc-start-heading > span {
        font-size: 0.67rem;
        color: #bed1c3;
    }
    body.oc-app .oc-quickstarts {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }
    body.oc-app .oc-preset {
        min-width: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid #7da18a70;
        border-radius: 14px;
        color: #f6f5e9;
        background: #ffffff09;
        text-align: left;
        cursor: pointer;
        font: inherit;
        box-shadow: 0 12px 30px #09251d38;
        transition:
            border-color 0.18s,
            transform 0.18s;
    }
    body.oc-app .oc-preset:hover {
        border-color: #ffdb79;
        transform: translateY(-4px);
    }
    body.oc-app .oc-preset-preview {
        height: clamp(175px, 16vw, 230px);
        display: flex;
        position: relative;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    body.oc-app .oc-preset-morning .oc-preset-preview {
        background: #f6cb5d;
        color: #294839;
        flex-direction: column;
    }
    body.oc-app .oc-mini-sun {
        position: absolute;
        top: 12px;
        right: 18px;
        font:
            500 3rem/1 Inter,
            sans-serif;
        color: #695121;
    }
    body.oc-app .oc-mini-hello {
        font:
            700 clamp(2rem, 3.1vw, 3.2rem)/0.95 Caveat,
            cursive;
        text-align: center;
        transform: rotate(-6deg);
    }
    body.oc-app .oc-mini-rule {
        width: 45%;
        height: 3px;
        border-radius: 50%;
        background: #496144;
        margin-top: 16px;
        transform: rotate(-5deg);
    }
    body.oc-app .oc-preset-work .oc-preset-preview {
        background: #e5eee3;
        color: #224b3a;
        gap: 7px;
        flex-direction: column;
    }
    body.oc-app .oc-mini-timer {
        position: relative;
        display: grid;
        place-items: center;
        width: 115px;
        height: 115px;
    }
    body.oc-app .oc-mini-timer svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
        fill: none;
        stroke-width: 7px;
    }
    body.oc-app .oc-mini-timer circle:first-child {
        stroke: #c6d6c6;
    }
    body.oc-app .oc-mini-timer circle:last-child {
        stroke: #33785a;
        stroke-dasharray: 218 302;
        stroke-linecap: round;
    }
    body.oc-app .oc-mini-timer b {
        font-size: 1.85rem;
        font-weight: 750;
        letter-spacing: -0.08em;
    }
    body.oc-app .oc-mini-work-label {
        font:
            600 1.4rem Caveat,
            cursive;
    }
    body.oc-app .oc-preset-team .oc-preset-preview {
        background: #b8ccef;
        color: #243b63;
        flex-direction: column;
    }
    body.oc-app .oc-mini-score {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0 12px;
    }
    body.oc-app .oc-mini-score > span {
        display: grid;
        text-align: center;
    }
    body.oc-app .oc-mini-score small {
        font-size: 0.58rem;
        font-weight: 650;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        margin-bottom: 5px;
    }
    body.oc-app .oc-mini-score b {
        font-size: clamp(2rem, 3.5vw, 3.4rem);
        letter-spacing: -0.07em;
        line-height: 1;
    }
    body.oc-app .oc-mini-score i {
        font-size: 1.6rem;
        font-style: normal;
        padding-top: 12px;
    }
    body.oc-app .oc-mini-score-note {
        margin-top: 15px;
        font:
            600 1.25rem Caveat,
            cursive;
    }
    body.oc-app .oc-preset-caption {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
        padding: 19px 15px;
    }
    body.oc-app .oc-preset strong,
    body.oc-app .oc-preset small {
        display: block;
    }
    body.oc-app .oc-preset strong {
        color: #f7f4e5;
        font-size: 0.8rem;
        line-height: 1.25;
    }
    body.oc-app .oc-preset-caption small {
        color: #c2d4c6;
        font-size: 0.6rem;
        margin-top: 7px;
        line-height: 1.5;
    }
    body.oc-app .oc-preset-arrow {
        display: grid;
        flex: 0 0 30px;
        place-items: center;
        width: 30px;
        height: 30px;
        border: 1px solid #9cbc9b55;
        border-radius: 50%;
        font-size: 1.1rem;
        color: #ffdb79;
    }
    body.oc-app .oc-board-bottom {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        align-items: center;
        margin-top: 28px;
        padding-top: 20px;
        border-top: 1px solid #9ec8ac38;
        color: #b9cfbd;
    }
    body.oc-app .oc-board-bottom > span:first-child {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 0.8rem;
        line-height: 1.5;
    }
    body.oc-app .oc-board-bottom svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    body.oc-app .oc-chalks {
        display: flex;
        gap: 7px;
        padding-right: 10px;
        transform: rotate(-3deg);
    }
    body.oc-app .oc-chalks i {
        display: block;
        width: 34px;
        height: 7px;
        background: #f1eddb;
        border-radius: 2px;
        box-shadow: 1px 3px 0 #0b211e40;
    }
    body.oc-app .oc-chalks i:nth-child(2) {
        background: #f7ce6a;
        width: 25px;
    }
    body.oc-app .oc-chalks i:nth-child(3) {
        background: #a9c5e9;
        width: 28px;
    }
    body.oc-app .oc-session-bar {
        scroll-margin-top: 85px;
        position: sticky;
        top: 75px;
        z-index: 90;
        display: flex;
        gap: 13px;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 14px;
        margin: 0 0 23px;
        border: 1px solid #628977;
        border-radius: 12px;
        background: #10382fef;
        color: #f3f3e4;
        box-shadow: 0 12px 25px #0b221c35;
    }
    body.oc-app .oc-session-heading {
        display: flex;
        align-items: baseline;
        gap: 8px;
        font-size: 0.8rem;
    }
    body.oc-app .oc-session-heading > span {
        font-size: 0.65rem;
        color: #b9cfbd;
    }
    body.oc-app .oc-active-tray {
        display: flex;
        gap: 6px;
        flex: 1 1 220px;
        min-width: 0;
        overflow-x: auto;
        padding: 4px;
    }
    body.oc-app .oc-active-chip {
        display: flex;
        align-items: center;
        gap: 7px;
        flex-shrink: 0;
        border: 1px solid #668b76;
        border-radius: 7px;
        padding: 9px;
        min-height: 42px;
        background: #224e40;
        color: #f6f3e6;
        font:
            650 0.72rem Inter,
            sans-serif;
        cursor: pointer;
    }
    body.oc-app .oc-active-chip svg {
        width: 17px;
        height: 17px;
        color: #ffdb79;
    }
    body.oc-app .oc-session-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }
    body.oc-app .oc-button {
        min-height: 44px;
        padding: 10px 12px;
        border: 1px solid #8aac99;
        border-radius: 7px;
        background: transparent;
        color: #f2f0e4;
        font:
            700 0.7rem/1.3 Inter,
            sans-serif;
        cursor: pointer;
    }
    body.oc-app .oc-button-primary {
        background: #ffdb79;
        color: #284532;
        border-color: #ffdb79;
    }
    body.oc-app .oc-canvas {
        padding: 0;
    }
    body.oc-app .oc-canvas > .container {
        padding: 0;
        max-width: none;
    }
    body.oc-app .oc-canvas p.local-content-tools {
        position: static;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        box-sizing: border-box;
        width: fit-content;
        max-width: 100%;
        margin: 14px 0 20px;
        padding: 10px 14px;
        border: 1px solid #afd2b536;
        border-radius: 10px;
        background: #ffffff07;
        color: #dcebdd;
        box-shadow: none;
        font:
            500 0.875rem/1.5 Inter,
            system-ui,
            sans-serif;
    }
    body.oc-app .oc-canvas p.local-content-tools:not(:empty)::before {
        content: '';
        flex: 0 0 8px;
        width: 8px;
        height: 8px;
        margin-top: 5px;
        border: 2px solid #b9cfbd;
        border-radius: 50%;
    }
    body.oc-app .oc-canvas .section:not(.fullscreen-mode) > .card {
        border: 1px solid #7fa28b;
        border-radius: 15px;
        box-shadow: 0 14px 35px #061e1840;
        background: #fffefa;
    }
    body.oc-app .oc-canvas .card-header {
        gap: 12px;
        flex-wrap: wrap;
        background: #e8eddf;
        color: #284c36;
        border-bottom: 1px solid #d2dcc9;
    }
    body.oc-app .oc-canvas .section:not(.fullscreen-mode) .card-header {
        padding: 14px 18px;
    }
    body.oc-app .oc-canvas .card-header h2 {
        font-size: 1.08rem;
    }
    body.oc-app .oc-canvas .card-header p {
        font-size: 0.75rem;
        opacity: 1;
        margin-top: 3px;
    }
    body.oc-app .oc-canvas .card-header .header-actions {
        gap: 5px;
        flex-shrink: 0;
    }
    body.oc-app .oc-canvas .card-header .header-btn {
        min-width: 44px;
        min-height: 44px;
        background: #ffffffb0;
        color: inherit;
        border: 1px solid #b8cbb4;
        border-radius: 8px;
    }
    body.oc-app .oc-canvas .card-header:is(.purple, .violet, .yellow) {
        background: #e6e9f6;
        color: #3d497a;
    }
    body.oc-app .oc-canvas .card-header:is(.red, .rose, .orange, .amber) {
        background: #fae5bc;
        color: #78501e;
    }
    body.oc-app .oc-canvas .card-header:is(.sky, .cyan, .pink) {
        background: #d9eaf0;
        color: #2a576b;
    }
    body.oc-app .oc-canvas .form-input,
    body.oc-app .oc-canvas .btn {
        min-height: 44px;
    }
    body.oc-app .oc-canvas .section:not(.fullscreen-mode) .card-body {
        padding: 21px;
    }
    body.oc-app .oc-canvas .btn:is(.btn-indigo, .btn-purple) {
        background: #42589c;
        color: #fff;
    }
    body.oc-app .oc-canvas .btn:is(.btn-green, .btn-teal) {
        background: #246d48;
        color: #fff;
    }
    body.oc-app .oc-canvas .btn:is(.btn-orange, .btn-amber) {
        background: #99571e;
        color: #fff;
    }
    body.oc-app .oc-canvas .btn:is(.btn-cyan, .btn-pink, .btn-red) {
        background: #385f87;
        color: #fff;
    }
    body.oc-app .oc-canvas .placeholder,
    body.oc-app .oc-canvas .parole-display.empty .name {
        color: #625b70;
    }
    body.oc-app .oc-canvas .team-card .name {
        background: #00000040;
        padding: 5px 8px;
        border-radius: 8px;
    }
    body.oc-app .oc-canvas [data-action='removeResponsabilite'] {
        color: #625b70 !important;
    }
    body.oc-app .oc-canvas .dice-count-btn.active,
    body.oc-app .oc-canvas .dice-type-btn.active {
        background: #97501f;
        border-color: #97501f;
        color: #fff;
    }
    body.oc-app .oc-canvas .text-size-btn.active {
        background: #42589c;
        border-color: #42589c;
    }
    body.oc-app .oc-workspace :focus-visible {
        outline-color: #cf9d28 !important;
    }
    body.oc-app .oc-stage :focus-visible {
        outline-color: #ffdb79 !important;
    }
    body.oc-app .oc-sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    body.oc-app .oc-skip {
        position: absolute;
        top: -100px;
        left: 16px;
        z-index: 1000;
        padding: 12px;
        background: #fff;
        color: #302b42;
        border-radius: 8px;
    }
    body.oc-app .oc-skip:focus {
        top: 75px;
    }
    body.oc-app[data-oc-catalog='hidden'] .oc-catalog {
        display: none;
    }
    body.oc-app[data-oc-catalog='hidden'] .oc-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    body.oc-app[data-oc-focus='true'] .oc-header,
    body.oc-app[data-oc-focus='true'] .oc-welcome,
    body.oc-app[data-oc-focus='true'] .oc-catalog,
    body.oc-app[data-oc-focus='true'] .oc-resources,
    body.oc-app[data-oc-focus='true'] footer {
        display: none !important;
    }
    body.oc-app[data-oc-focus='true'] .oc-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    body.oc-app[data-oc-focus='true'] .oc-stage {
        padding-top: 12px;
    }
    body.oc-app[data-oc-focus='true'] .oc-session-bar {
        top: 0;
    }
    body.oc-app .footer {
        margin: 0;
        padding: 20px 16px;
        color: #b9cfbd;
        border-color: #7da18a38;
        font-size: 0.7rem;
        background: #10382f;
    }
    body.oc-app .footer a {
        color: #e7dfb1 !important;
    }
    [data-theme='dark'] body.oc-app {
        --oc-ink: #f2edf8;
        --oc-muted: #c4bccc;
        --oc-line: #4d4357;
        --oc-surface: #292431;
        --oc-soft: #383044;
        --board: #0e2824;
        background: #161722 !important;
    }
    [data-theme='dark'] body.oc-app .oc-header {
        background: #25212d !important;
        border-color: var(--oc-line) !important;
    }
    [data-theme='dark'] body.oc-app .oc-header-actions a,
    [data-theme='dark'] body.oc-app .oc-icon-btn {
        background: var(--oc-surface) !important;
        color: var(--oc-ink) !important;
    }

    [data-theme='dark'] body.oc-app .oc-catalog {
        background: #142d27;
        color: #e0e9d9;
        border-color: #3a5d4a;
    }
    [data-theme='dark'] body.oc-app .oc-catalog-heading h2 {
        color: #e8eddf;
    }
    [data-theme='dark'] body.oc-app .oc-catalog-heading p,
    [data-theme='dark'] body.oc-app .oc-results-note {
        color: #b9cbbd;
    }
    [data-theme='dark'] body.oc-app .oc-search input {
        background: #0d241f !important;
        color: #e6eddf !important;
        border-color: #587460 !important;
    }
    [data-theme='dark'] body.oc-app .oc-search input::placeholder {
        color: #bcccbc;
    }
    [data-theme='dark'] body.oc-app .oc-search > svg {
        color: #bcccbc;
    }
    [data-theme='dark'] body.oc-app .oc-tool-count {
        background: #2f4c39;
        color: #e5eddc;
    }
    [data-theme='dark'] body.oc-app .oc-filters button {
        color: #c8d8c9;
    }
    [data-theme='dark'] body.oc-app .oc-filters button[aria-pressed='true'] {
        background: #e1ce91;
        color: #243e2c;
        border-color: #e1ce91;
    }
    [data-theme='dark'] body.oc-app .tool-btn {
        background: #1c382d !important;
        border-color: #45624c !important;
    }
    [data-theme='dark'] body.oc-app .tool-btn .label {
        color: #eef1e6 !important;
    }
    [data-theme='dark'] body.oc-app .tool-btn .icon {
        color: #b9d7a7;
    }
    [data-theme='dark'] body.oc-app .tool-btn[data-oc-category='temps'] .icon {
        color: #a7cce9;
    }
    [data-theme='dark'] body.oc-app .tool-btn[data-oc-category='participer'] .icon {
        color: #f3c28b;
    }
    [data-theme='dark'] body.oc-app .tool-btn[data-oc-category='apprendre'] .icon {
        color: #d0bff4;
    }
    [data-theme='dark'] body.oc-app .tool-btn.active {
        background: #46613b !important;
        border-color: #eadc9c !important;
    }
    [data-theme='dark'] body.oc-app .oc-resources {
        border-color: #4d6851;
    }
    [data-theme='dark'] body.oc-app .oc-resources > span,
    [data-theme='dark'] body.oc-app .oc-resources a {
        color: #c6d8b9;
    }
    [data-theme='dark'] body.oc-app .oc-canvas .section:not(.fullscreen-mode) > .card {
        background: #142f28 !important;
        border-color: #68886c;
    }
    [data-theme='dark'] body.oc-app .oc-canvas .card-header {
        background: #25483a !important;
        color: #e9eddf !important;
        border-color: #56755b;
    }
    [data-theme='dark'] body.oc-app .oc-canvas .card-header .header-btn {
        background: #335340;
        border-color: #708b70;
    }
    [data-theme='dark']
        body.oc-app
        .oc-canvas
        :is(
            .timer-time,
            .chrono-display,
            .date-full,
            .numeration-total:not(.hidden-answer),
            .tables-question,
            .tables-score,
            .ligne-custom span
        ) {
        color: #f5f4e8;
    }
    [data-theme='dark']
        body.oc-app
        .oc-canvas
        :is(
            .form-label,
            .tool-session-note,
            .chrono-ms,
            .points-controls > span,
            .podium-inputs label,
            #qr-input-label
        ),
    [data-theme='dark'] body.oc-app .oc-canvas label:not(.radio-option) {
        color: #c1d4c1 !important;
    }
    [data-theme='dark'] body.oc-app .oc-canvas .radio-option,
    [data-theme='dark'] body.oc-app .oc-canvas .chrono-lap {
        background: #294937 !important;
        color: #edf1e5;
        border-color: #678568;
    }
    [data-theme='dark'] body.oc-app .oc-canvas .points-table :is(th, td) {
        background: #294937;
        color: #edf1e5;
        border-color: #678568;
    }
    /* Navigation TBI : commande basse, grande cible, zone séparée en projection. */
    body.oc-app {
        --oc-return-space: 96px;
    }
    body.oc-app[data-oc-session='active'] .oc-stage {
        padding-bottom: 130px;
    }
    body.oc-app .oc-filters button {
        min-height: 44px;
        font-size: 0.8rem;
    }
    body.oc-app .tool-btn {
        min-height: 92px;
    }
    body.oc-app .tool-btn .icon,
    body.oc-app .tool-btn .icon svg {
        width: 30px;
        height: 30px;
    }
    body.oc-app .tool-btn .label {
        font-size: 0.86rem;
    }
    body.oc-app .oc-button {
        min-height: 56px;
        font-size: 0.84rem;
    }
    body.oc-app .oc-active-chip {
        min-height: 52px;
        font-size: 0.82rem;
    }
    body.oc-app .oc-canvas .card-header .header-btn {
        min-width: 56px;
        min-height: 56px;
    }
    body.oc-app .oc-canvas .btn,
    body.oc-app .oc-canvas .form-input {
        min-height: 56px;
    }
    body.oc-app .timer-preset {
        min-height: 52px;
        font-size: 1rem;
    }
    body.oc-app {
        --oc-header-space: 65px;
    }
    body.oc-app[data-oc-session='active'] {
        overflow: hidden;
    }
    body.oc-app[data-oc-session='active'] .oc-workspace {
        height: calc(100dvh - var(--oc-header-space) - var(--oc-return-space));
        min-height: 0;
    }
    body.oc-app[data-oc-session='active'] .oc-stage {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        padding-bottom: 30px;
    }
    body.oc-app[data-oc-session='active'] .oc-catalog {
        height: 100%;
        max-height: 100%;
        top: 0;
        padding-bottom: 24px;
    }
    body.oc-app[data-oc-session='active'] .oc-session-bar {
        top: 0;
    }
    body.oc-app[data-oc-session='active'] .footer {
        display: none;
    }
    body.oc-app[data-oc-session='active']:not([data-oc-fullscreen='true']) > .local-tools-nav {
        z-index: 10021;
    }
    body.oc-app .oc-return-dock {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        z-index: 10020;
        height: var(--oc-return-space);
        padding: 12px max(20px, env(safe-area-inset-right)) 12px
            max(20px, env(safe-area-inset-left));
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: #10382f;
        border-top: 1px solid #93b19a;
    }
    body.oc-app .oc-return-dock[hidden] {
        display: none !important;
    }
    body.oc-app .oc-return-dock button {
        display: inline-flex;
        gap: 14px;
        align-items: center;
        justify-content: center;
        min-height: 64px;
        padding: 15px 22px;
        border: 2px solid #f7e9b5;
        border-radius: 14px;
        background: #ffdb79;
        color: #203e2e;
        box-shadow: 0 5px 22px #071f1b5c;
        font:
            750 1rem/1.3 Inter,
            sans-serif;
        cursor: pointer;
    }
    body.oc-app .oc-return-dock svg {
        width: 27px;
        height: 27px;
        flex-shrink: 0;
    }
    body.oc-app .oc-return-dock button:focus-visible {
        outline-color: #fff !important;
        outline-offset: 4px;
    }
    body.oc-app[data-oc-fullscreen='true'] .section.fullscreen-mode {
        bottom: var(--oc-return-space);
    }
    @media (max-width: 760px) {
        body.oc-app {
            --oc-return-space: 174px;
        }
        body.oc-app .oc-return-dock {
            align-items: flex-start;
        }
        body.oc-app .oc-return-dock button {
            min-height: 60px;
            padding: 13px 15px;
            font-size: 0.88rem;
        }
        body.oc-app[data-oc-fullscreen='true'] {
            --oc-return-space: 88px;
        }
        body.oc-app[data-oc-fullscreen='true'] .oc-return-dock {
            align-items: center;
        }
        body.oc-app[data-oc-session='active'] .oc-workspace {
            overflow-y: auto;
        }
        body.oc-app[data-oc-session='active'] .oc-stage {
            flex: 0 0 auto;
            height: auto;
            overflow: visible;
            padding-bottom: 30px;
        }
        body.oc-app[data-oc-session='active'] .oc-catalog {
            flex: 0 0 auto;
            height: auto;
            max-height: none;
        }
    }
    @media (max-height: 600px) {
        body.oc-app:not([data-oc-fullscreen='true']) .oc-session-bar {
            position: static;
        }
        body.oc-app[data-oc-fullscreen='true'] {
            --oc-return-space: 80px;
        }
        body.oc-app .oc-return-dock button {
            min-height: 56px;
            padding-top: 11px;
            padding-bottom: 11px;
        }
    }
    @media (min-width: 1200px) {
        body.oc-app[data-oc-catalog='hidden'] .oc-canvas > .container,
        body.oc-app[data-oc-focus='true'] .oc-canvas > .container {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 22px;
            align-items: start;
        }
        body.oc-app .oc-canvas .section {
            min-width: 0;
        }
        body.oc-app[data-oc-catalog='hidden'] .oc-canvas .section,
        body.oc-app[data-oc-focus='true'] .oc-canvas .section {
            grid-column: 1/-1;
            margin-bottom: 0;
        }
        body.oc-app[data-oc-catalog='hidden']
            .oc-canvas
            .section:is(
                #timer,
                #chrono,
                #date,
                #horloge,
                #consignes,
                #feu,
                #son,
                #score,
                #podium,
                #vote,
                #nombre,
                #lettre
            ),
        body.oc-app[data-oc-focus='true']
            .oc-canvas
            .section:is(
                #timer,
                #chrono,
                #date,
                #horloge,
                #consignes,
                #feu,
                #son,
                #score,
                #podium,
                #vote,
                #nombre,
                #lettre
            ) {
            grid-column: auto;
        }
        body.oc-app[data-oc-catalog='hidden'] .oc-canvas .section:not(.fullscreen-mode) .grid-2,
        body.oc-app[data-oc-focus='true'] .oc-canvas .section:not(.fullscreen-mode) .grid-2 {
            grid-template-columns: minmax(0, 1fr);
            gap: 12px;
        }
        body.oc-app[data-oc-catalog='hidden']
            .oc-canvas
            .section:not(.fullscreen-mode)
            .timer-container,
        body.oc-app[data-oc-focus='true']
            .oc-canvas
            .section:not(.fullscreen-mode)
            .timer-container {
            width: 190px;
            height: 190px;
            margin-bottom: 8px;
        }
    }
    @media (min-width: 761px) and (max-width: 1100px) {
        body.oc-app:not([data-oc-catalog='hidden']):not([data-oc-focus='true']) .oc-canvas .grid-2 {
            grid-template-columns: minmax(0, 1fr);
        }
    }
    @media (max-width: 1100px) {
        body.oc-app .oc-workspace {
            grid-template-columns: 250px minmax(0, 1fr);
        }
        body.oc-app .oc-board-intro {
            grid-template-columns: 1fr;
            gap: 22px;
        }
        body.oc-app .oc-board-note {
            display: none;
        }
        body.oc-app .oc-quickstarts {
            grid-template-columns: 1fr;
        }
        body.oc-app .oc-preset {
            display: grid;
            grid-template-columns: 130px minmax(0, 1fr);
        }
        body.oc-app .oc-preset-preview {
            height: 130px;
        }
        body.oc-app .oc-mini-timer {
            width: 86px;
            height: 86px;
        }
        body.oc-app .oc-mini-timer b {
            font-size: 1.5rem;
        }
        body.oc-app .oc-mini-work-label {
            display: none;
        }
        body.oc-app .oc-mini-score {
            gap: 8px;
        }
        body.oc-app .oc-mini-score b {
            font-size: 2rem;
        }
        body.oc-app .oc-mini-score small {
            font-size: 0.5rem;
        }
        body.oc-app .oc-mini-score-note {
            display: none;
        }
        body.oc-app .oc-mini-sun {
            font-size: 2rem;
            top: 5px;
            right: 8px;
        }
        body.oc-app .oc-mini-hello {
            font-size: 2rem;
        }
    }
    body.oc-app .oc-catalog {
        scroll-margin-top: 85px;
    }
    body.oc-app .oc-canvas .section {
        scroll-margin-top: 170px;
    }
    @media (max-width: 760px) {
        body.oc-app .oc-workspace {
            display: flex;
            flex-direction: column;
        }
        body.oc-app .oc-stage {
            order: 0;
            width: 100%;
            padding: 25px 20px 30px;
            min-height: 0;
        }
        body.oc-app .oc-catalog {
            order: 1;
            position: static;
            max-height: none;
            width: 100%;
            border: 0;
            padding: 24px 20px 100px;
        }
        /* Le catalogue arrive avant la scène dans le HTML, mais s’affiche après
           elle sur mobile. Attendre que l’accueil soit parsé évite de peindre
           brièvement le catalogue en haut puis de le déplacer sous l’accueil.
           Aucun état JavaScript n’est requis ; l’ordre clavier reste inchangé. */
        body.oc-app .oc-workspace:not(:has(> .oc-stage > .oc-session-bar)) .oc-catalog {
            visibility: hidden;
        }
        body.oc-app .oc-catalog-heading {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            align-items: center;
            flex-wrap: wrap;
        }
        body.oc-app .oc-search {
            width: 100%;
        }
        body.oc-app .oc-filters {
            gap: 6px;
        }
        body.oc-app .oc-filters button {
            min-height: 44px;
            padding: 9px 11px;
        }
        body.oc-app .tool-selector {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
        body.oc-app .oc-board-heading {
            padding-bottom: 20px;
        }
        body.oc-app .oc-board-intro {
            display: block;
            padding: 23px 0 10px;
        }
        body.oc-app .oc-welcome h1 {
            font-size: clamp(2.7rem, 9vw, 3.7rem);
        }
        body.oc-app .oc-board-intro p {
            margin-top: 19px !important;
            font-size: 0.78rem !important;
        }
        body.oc-app .oc-start-heading {
            align-items: center;
        }
        body.oc-app .oc-start-heading > span {
            font-size: 0.6rem;
            max-width: 110px;
            line-height: 1.5;
            text-align: right;
        }
        body.oc-app .oc-quickstarts {
            gap: 10px;
        }
        body.oc-app .oc-preset {
            grid-template-columns: 100px minmax(0, 1fr);
            border-radius: 10px;
        }
        body.oc-app .oc-preset-preview {
            height: 112px;
        }
        body.oc-app .oc-mini-hello {
            font-size: 1.5rem;
        }
        body.oc-app .oc-mini-sun {
            display: none;
        }
        body.oc-app .oc-mini-rule {
            margin-top: 8px;
        }
        body.oc-app .oc-canvas .section {
            scroll-margin-top: 265px;
        }
        body.oc-app .oc-mini-score {
            gap: 6px;
            padding: 0 8px;
        }
        body.oc-app .oc-mini-score b {
            font-size: 1.7rem;
        }
        body.oc-app .oc-mini-score small {
            font-size: 0.43rem;
            letter-spacing: 0;
        }
        body.oc-app .oc-preset-caption {
            padding: 14px;
        }
        body.oc-app .oc-preset strong {
            font-size: 0.76rem;
        }
        body.oc-app .oc-preset-caption small {
            font-size: 0.58rem;
        }
        body.oc-app .oc-preset-arrow {
            flex-basis: 25px;
            width: 25px;
            height: 25px;
        }
        body.oc-app .oc-board-bottom {
            margin-top: 20px;
        }
        body.oc-app .oc-chalks {
            display: none;
        }
        body.oc-app .oc-session-bar {
            top: 66px;
            padding: 10px;
            margin-bottom: 17px;
        }
        body.oc-app .oc-active-tray {
            flex-basis: 100%;
        }
        body.oc-app .oc-canvas .section:not(.fullscreen-mode) .card-body {
            padding: 16px;
        }
        body.oc-app .oc-canvas .section:not(.fullscreen-mode) .card-header {
            padding: 13px 15px;
        }
        body.oc-app .oc-canvas .card-header h2 {
            font-size: 1rem;
        }
    }
    @media (max-width: 480px) {
        body.oc-app .oc-brand-copy small {
            display: none;
        }
        body.oc-app .oc-brand-copy strong {
            font-size: 0.8rem;
        }
        body.oc-app .oc-brand-logo {
            width: 36px;
            height: 36px;
        }
        body.oc-app .oc-header-actions {
            gap: 4px;
        }
        body.oc-app .oc-header-actions a {
            padding: 8px;
            font-size: 0.72rem;
        }

        body.oc-app .oc-session-bar {
            top: 58px;
        }
        body.oc-app .tool-selector {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }
    @media (max-width: 350px) {
        body.oc-app .oc-stage {
            padding-left: 14px;
            padding-right: 14px;
        }
        body.oc-app .oc-preset {
            grid-template-columns: 80px minmax(0, 1fr);
        }
        body.oc-app .oc-preset-caption {
            padding: 10px;
            gap: 6px;
        }
        body.oc-app .oc-preset-caption small {
            font-size: 0.54rem;
        }
        body.oc-app .oc-mini-hello {
            font-size: 1.3rem;
        }
        body.oc-app .oc-mini-timer {
            width: 67px;
            height: 67px;
        }
        body.oc-app .oc-mini-timer b {
            font-size: 1.15rem;
        }
        body.oc-app .oc-preset-preview {
            height: 103px;
        }
        body.oc-app .oc-mini-score {
            flex-direction: column;
            gap: 2px;
        }
        body.oc-app .oc-mini-score > span {
            display: flex;
            gap: 4px;
            align-items: center;
        }
        body.oc-app .oc-mini-score small {
            margin: 0;
        }
        body.oc-app .oc-mini-score b {
            font-size: 1.2rem;
        }
        body.oc-app .oc-mini-score i {
            display: none;
        }
        body.oc-app .oc-catalog {
            padding-left: 14px;
            padding-right: 14px;
        }
    }
    @media (prefers-reduced-motion: reduce) {
        body.oc-app .tool-btn,
        body.oc-app .tool-btn .icon,
        body.oc-app .tool-btn.active::after,
        body.oc-app .oc-preset {
            transition: none;
            animation: none;
        }
    }
}
@media print {
    body.oc-app .oc-catalog,
    body.oc-app .oc-session-bar,
    body.oc-app .oc-return-dock {
        display: none !important;
    }
}
