.collective-tool {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    color: var(--text-strong, #1e293b);
}
body:has([data-collective-mode='council']) #fab-menu {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: fit-content;
    margin: 1rem 2rem 1rem auto;
}
body:has([data-collective-mode='council']) .plume-fab-companion {
    display: none !important;
}
.collective-tool h1 {
    margin: 0.8rem 0;
    font-size: clamp(2rem, 5vw, 3rem);
}
.collective-intro {
    font-size: 1.15rem;
    line-height: 1.7;
}
.collective-note {
    padding: 1rem 1.2rem;
    border-left: 4px solid #6366f1;
    background: var(--surface-alt, #eef2ff);
    line-height: 1.65;
    border-radius: 8px;
}
.collective-controls,
.collective-tool #collective-results {
    background: var(--surface, #fff);
    border: 1px solid var(--surface-border, #e2e8f0);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.4rem 0;
}
.collective-controls label {
    display: block;
    font-weight: 700;
    margin: 0.9rem 0 0.4rem;
}
.collective-controls input,
.collective-controls textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.8rem;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    color: inherit;
    background: var(--surface, #fff);
    font: inherit;
    margin-bottom: 1rem;
}
.collective-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}
.collective-tool button {
    min-height: 44px;
}
.collective-tool [hidden] {
    display: none !important;
}
.collective-count-row {
    margin: 1rem 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.collective-count-head {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.collective-count-head label {
    font-weight: 700;
    flex: 1;
    min-width: 130px;
}
.collective-count-head input {
    width: 90px;
    padding: 0.5rem;
    font: inherit;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    color: inherit;
    background: var(--surface, #fff);
}
.collective-count-bar {
    height: 20px;
    background: #e0e7ff;
    border-radius: 8px;
    margin: 0.6rem 0;
    overflow: hidden;
}
.collective-count-fill {
    height: 100%;
    background: #4f46e5;
    transition: width 0.15s;
}
.collective-count-percent {
    font-variant-numeric: tabular-nums;
}
.council-item {
    border-top: 1px solid #cbd5e1;
    padding: 1rem 0;
}
.collective-paper {
    display: none;
}
.collective-tool:fullscreen {
    max-width: none;
    overflow: auto;
    background: var(--surface, #fff);
    box-sizing: border-box;
}
.collective-tool button:focus-visible,
.collective-tool a:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}
@media screen and (max-width: 600px) {
    .collective-controls {
        padding: 1rem;
    }
    .collective-actions {
        flex-direction: column;
    }
}
@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }
    body > * {
        display: none !important;
    }
    body main,
    body #main-content,
    body .main-content,
    body .content-wrapper {
        display: block !important;
    }
    #flash-container,
    .flash-session-container,
    .session-banner {
        display: none !important;
    }
    .collective-tool {
        padding: 0;
        color: #000;
        max-width: none;
    }
    .collective-tool > :not(.collective-paper) {
        display: none !important;
    }
    .collective-tool .collective-paper {
        display: block !important;
    }
    #collective-paper,
    #collective-paper :is(p, th, td) {
        color: #172554 !important;
    }
    .collective-print-brand {
        margin: 0 0 4mm !important;
    }
    .collective-print-foot {
        margin: 4mm 0 0 !important;
    }
    .collective-print-frame > thead {
        display: table-header-group;
    }
    .collective-print-frame > tfoot {
        display: table-footer-group;
    }
    .collective-print-frame > :is(thead, tbody, tfoot) > tr > td {
        border: 0;
        padding: 0;
    }
    .collective-paper table {
        border-collapse: collapse;
        width: 100%;
        table-layout: fixed;
    }
    .collective-paper th,
    .collective-paper td {
        border: 1px solid #777;
        padding: 8px;
        text-align: left;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
    .collective-ballot-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .collective-ballot {
        border: 1px dashed #555;
        padding: 1rem;
        break-inside: avoid;
    }
    .collective-ballot p {
        margin: 0.6rem 0;
    }
}
.spectacle-adventures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.spectacle-adventure {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: var(--bg-card, #fff);
    color: var(--text-color, #172554);
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.spectacle-adventure:hover {
    border-color: #6366f1;
    box-shadow: 0 3px 16px #6366f133;
}
.spectacle-emoji {
    font-size: 2.5rem;
}
.spectacle-stage {
    background: linear-gradient(135deg, #172554, #4c1d95);
    color: #fff;
    padding: clamp(1rem, 4vw, 3rem);
    border-radius: 1rem;
    min-height: 50vh;
}
.spectacle-stage h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}
.spectacle-stage p {
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    line-height: 1.6;
}
.spectacle-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}
.spectacle-options button {
    white-space: normal;
    text-align: left;
    font-size: 1.15rem;
}
.spectacle-stage:fullscreen {
    overflow: auto;
    border-radius: 0;
    padding: 3rem;
}
.collective-controls select {
    min-height: 44px;
    padding: 0.5rem;
    font: inherit;
}

/* Sondage : un atelier de lecture des données, utilisable en projection. */
.collective-tool[data-collective-mode='poll'] {
    max-width: 1120px;
    color: #25334b;
}
.poll-hero {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: center;
    padding: clamp(24px, 4vw, 46px);
    border-radius: 28px;
    background:
        radial-gradient(ellipse at 95% 0%, #7c3aed, transparent 60%),
        linear-gradient(135deg, #172554, #3730a3);
    color: #fff;
    box-shadow: 0 18px 45px #312e8126;
}
.poll-hero h1 {
    color: #fff;
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    line-height: 1.15;
    margin: 10px 0 18px;
    letter-spacing: -0.04em;
}
.poll-hero h1 span {
    color: #99f6e4;
}
.poll-hero p {
    max-width: 640px;
    line-height: 1.6;
    margin: 0;
}
.poll-eyebrow {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ddd6fe;
}
.poll-illustration {
    width: 100%;
}
.poll-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    padding: 18px 8px;
    list-style: none;
}
.poll-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 650;
}
.poll-steps b {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ede9fe;
    color: #5b21b6;
}
[data-collective-mode='poll'] .collective-controls {
    border: 1px solid #ddd6fe;
    padding: 26px;
    border-radius: 22px;
    background: #fff;
}
[data-collective-mode='poll'] h2 {
    font-size: 1.4rem;
    margin: 0 0 12px;
}
.poll-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}
.poll-presets button,
.poll-investigation button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #c4b5fd;
    background: #f5f3ff;
    color: #4c1d95;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}
.poll-presets button:hover,
.poll-investigation button:hover {
    background: #ede9fe;
}
[data-collective-mode='poll'] #collective-results {
    margin-top: 26px;
    border-radius: 22px;
    border: 1px solid #99f6e4;
    padding: 26px;
    background: #fff;
}
[data-collective-mode='poll'] .collective-count-row {
    background: #f8fafc;
    padding: 16px;
    border-radius: 14px;
    border: 0;
}
[data-collective-mode='poll'] .collective-count-fill {
    background: linear-gradient(90deg, #0f766e, #14b8a6);
    transition: width 0.5s ease;
}
[data-collective-mode='poll'] .collective-count-row:nth-child(3n + 2) .collective-count-fill {
    background: linear-gradient(90deg, #6d28d9, #a78bfa);
}
[data-collective-mode='poll'] .collective-count-row:nth-child(3n) .collective-count-fill {
    background: linear-gradient(90deg, #b45309, #fbbf24);
}
[data-collective-mode='poll'] #collective-total {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f766e;
}
.poll-scale {
    font-size: 0.85rem;
    color: #475569;
}
.poll-investigation {
    margin-top: 24px;
    padding: 22px;
    background: #f5f3ff;
    border-radius: 18px;
    border-left: 4px solid #7c3aed;
}
.poll-investigation h3 {
    color: #4c1d95;
    margin: 0 0 10px;
}
.poll-investigation button:disabled {
    opacity: 0.55;
    cursor: default;
}
#poll-analysis {
    padding-top: 10px;
    line-height: 1.8;
}
.poll-teacher {
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
}
.poll-teacher summary {
    cursor: pointer;
    font-weight: 700;
    min-height: 30px;
}
.poll-levels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 12px;
}
.poll-levels b {
    display: block;
    color: #5b21b6;
    margin-bottom: 8px;
}
[data-collective-mode='poll'] :focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 4px;
}
@media (max-width: 650px) {
    .poll-hero {
        grid-template-columns: 1fr;
    }
    .poll-illustration {
        display: none;
    }
    .poll-levels {
        grid-template-columns: 1fr;
        gap: 0;
    }
    [data-collective-mode='poll'] .collective-controls,
    [data-collective-mode='poll'] #collective-results {
        padding: 16px;
    }
}
@media (prefers-reduced-motion: reduce) {
    [data-collective-mode='poll'] .collective-count-fill {
        transition: none;
    }
}
@media print {
    .poll-hero,
    .poll-steps,
    .poll-teacher {
        display: none !important;
    }
}
[data-theme='dark'] [data-collective-mode='poll'] {
    color: #e2e8f0;
}
[data-theme='dark'] [data-collective-mode='poll'] .collective-controls,
[data-theme='dark'] [data-collective-mode='poll'] #collective-results,
[data-theme='dark'] .poll-teacher {
    background: #1e293b;
    border-color: #475569;
}
[data-theme='dark'] [data-collective-mode='poll'] .collective-count-row {
    background: #0f172a;
}
[data-theme='dark'] .poll-investigation {
    background: #312e81;
}
[data-theme='dark'] .poll-investigation h3,
[data-theme='dark'] .poll-levels b {
    color: #ddd6fe;
}
[data-theme='dark'] .poll-scale {
    color: #cbd5e1;
}
[data-theme='dark'] [data-collective-mode='poll'] #collective-total {
    color: #5eead4;
}
[data-collective-mode='poll'] .collective-count-head button {
    min-width: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #312e81;
    font-size: 1.3rem;
    cursor: pointer;
}
@media (max-width: 500px) {
    [data-collective-mode='poll'] .collective-count-head {
        display: grid;
        grid-template-columns: 44px minmax(65px, 1fr) 44px;
        gap: 8px;
    }
    [data-collective-mode='poll'] .collective-count-head label {
        grid-column: 1/-1;
        min-width: 0;
    }
    [data-collective-mode='poll'] .collective-count-head input {
        width: 100%;
        min-width: 0;
    }
}

/* Conseil : préparation puis conduite des échanges, sans suivi individuel. */
.council-hero {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 24px;
    align-items: center;
    padding: clamp(24px, 4vw, 42px);
    border-radius: 28px;
    background:
        radial-gradient(ellipse at 100% 0, #0f766e, transparent 65%),
        linear-gradient(135deg, #134e4a, #164e63);
    color: #fff;
}
.council-hero h1 {
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.16;
    letter-spacing: -0.03em;
}
.council-hero h1 span {
    color: #99f6e4;
}
.council-hero p {
    line-height: 1.65;
}
.council-eyebrow {
    color: #ccfbf1;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}
.council-hero svg {
    width: 100%;
}
.council-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    list-style: none;
    padding: 16px 4px;
}
.council-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.council-steps b {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ccfbf1;
    color: #115e59;
}
.council-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 20px 0 12px;
}
.council-presets button,
.council-stage button {
    border: 1px solid #99f6e4;
    border-radius: 12px;
    padding: 10px 14px;
    background: #f0fdfa;
    color: #115e59;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.council-help {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-soft, #475569);
}
[data-collective-mode='council'] .council-item {
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #99f6e4;
    border-left: 5px solid #0f766e;
    border-radius: 16px;
    background: var(--surface-alt, #f8fafc);
}
.council-item h3 {
    margin: 0 0 12px;
    color: var(--text-strong, #134e4a);
    font-size: 1.2rem;
}
.council-item .council-field-hint {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-soft, #475569);
}
#council-count {
    display: inline-block;
    padding: 10px;
    color: var(--text-soft, #475569);
}
.council-stage {
    margin: 24px 0;
    padding: clamp(20px, 4vw, 40px);
    border-radius: 24px;
    background: linear-gradient(135deg, #134e4a, #164e63);
    color: #fff;
    min-height: 460px;
}
.council-stage-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.council-stage-head p {
    color: #99f6e4;
    font-weight: 700;
}
.council-stage h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.35;
    margin: 24px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.council-phases {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.council-phases button {
    background: transparent;
    color: #fff;
}
.council-phases button[aria-pressed='true'] {
    background: #ccfbf1;
    color: #134e4a;
}
#council-prompt {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.6;
}
.council-stage-answer {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 1.2rem;
    line-height: 1.65;
    background: #ffffff12;
    border-left: 4px solid #5eead4;
    padding: 16px;
    border-radius: 10px;
}
.council-stage-answer:empty {
    display: none;
}
.council-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
}
.council-stage button:disabled {
    opacity: 0.45;
    cursor: default;
}
.council-guide {
    border: 1px solid var(--surface-border, #cbd5e1);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    background: var(--surface, #fff);
    line-height: 1.6;
}
.council-guide summary {
    cursor: pointer;
    font-weight: 700;
    min-height: 30px;
}
.council-role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.council-role-grid b {
    display: block;
    color: var(--text-strong, #115e59);
    margin-bottom: 6px;
}
@media screen {
    [data-collective-mode='council'].council-presenting
        > :not(.council-stage):not(.collective-actions) {
        display: none;
    }
    [data-collective-mode='council'].council-presenting .collective-actions {
        margin-top: 16px;
    }
}
@media (max-width: 650px) {
    .council-hero {
        grid-template-columns: 1fr;
    }
    .council-hero svg {
        display: none;
    }
    .council-role-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    [data-collective-mode='council'] .council-item {
        padding: 14px;
    }
    .council-phases {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .council-navigation {
        flex-wrap: wrap;
    }
}
@media (prefers-reduced-motion: reduce) {
    [data-collective-mode='council'] * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
@media print {
    .council-stage,
    .council-guide,
    .council-hero,
    .council-steps {
        display: none !important;
    }
}
