/* Pochette de rentrée : styles limités à cet outil et à ses pages imprimées. */
.pr-app {
    --pr-ink: #30264d;
    --pr-muted: #6c647c;
    --pr-purple: #7453c4;
    --pr-purple-dark: #5839a4;
    --pr-line: #e7e0ef;
    --pr-surface: #fff;
    --pr-soft: #f5f1fc;
    color: var(--pr-ink);
    font-family: Inter, system-ui, sans-serif;
    max-width: 1220px;
    margin: 0 auto;
    padding: 28px 24px 80px;
}
.pr-app *,
.pr-app *::before,
.pr-app *::after {
    box-sizing: border-box;
}
.pr-app :focus-visible {
    outline: 3px solid #a889ed;
    outline-offset: 3px;
}
.pr-breadcrumb {
    display: block;
    color: var(--pr-muted);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 22px;
}
.pr-breadcrumb a {
    color: inherit;
    text-decoration: none;
}
.pr-breadcrumb a:hover {
    color: var(--pr-purple);
    text-decoration: underline;
}
.pr-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    overflow: hidden;
    min-height: 320px;
    padding: clamp(30px, 5vw, 64px);
    border: 1px solid #e8dff6;
    border-radius: 28px;
    background: linear-gradient(125deg, #fbf8ff 0%, #f0e9fc 60%, #fdf5ef 100%);
}
.pr-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 590px;
}
.pr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6647ae;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.pr-eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #9d82df;
}
.pr-hero-copy h1 {
    margin: 15px 0;
    color: #30264d;
    font:
        700 clamp(2.4rem, 4.3vw, 4rem)/1.05 Fredoka,
        Inter,
        sans-serif;
    letter-spacing: -0.035em;
}
.pr-hero-copy h1 em {
    color: #7453c4;
    font-style: normal;
}
.pr-hero-copy p {
    max-width: 510px;
    margin: 0;
    color: #635a72;
    font-size: 1.04rem;
    line-height: 1.7;
}
.pr-hero-art {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
}
.pr-hero-art svg {
    display: block;
    width: min(100%, 450px);
    height: auto;
    filter: drop-shadow(0 18px 25px rgba(78, 53, 120, 0.12));
}
.pr-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 99px;
    background: #eee8fa;
    color: #6547a7;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}
.pr-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0;
    margin: 20px 0 34px;
    list-style: none;
}
.pr-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px 18px;
    border: 1px solid var(--pr-line);
    border-radius: 16px;
    background: var(--pr-surface);
}
.pr-step-number,
.pr-number {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #eee8fa;
    color: #6748b1;
    font-weight: 800;
}
.pr-steps strong,
.pr-steps small {
    display: block;
}
.pr-steps strong {
    font-size: 0.85rem;
}
.pr-steps small {
    margin-top: 3px;
    color: var(--pr-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}
.pr-workspace {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}
.pr-config,
.pr-preview {
    min-width: 0;
    border: 1px solid var(--pr-line);
    border-radius: 22px;
    background: var(--pr-surface);
    box-shadow: 0 12px 35px rgba(57, 41, 85, 0.06);
}
.pr-config {
    padding: clamp(22px, 3vw, 32px);
}
.pr-panel-heading h2,
.pr-preview-heading h2 {
    margin: 0;
    color: var(--pr-ink);
    font:
        600 1.55rem/1.2 Fredoka,
        Inter,
        sans-serif;
    letter-spacing: -0.02em;
}
.pr-panel-heading p {
    margin: 8px 0 0;
    color: var(--pr-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}
.pr-section {
    min-width: 0;
    padding: 24px 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--pr-line);
}
.pr-section legend {
    float: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-bottom: 17px;
    font:
        600 1.06rem/1.3 Fredoka,
        Inter,
        sans-serif;
}
.pr-section legend + * {
    clear: both;
}
.pr-number {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font:
        800 0.8rem/1 Inter,
        sans-serif;
}
.pr-label {
    display: block;
    margin: 12px 0 7px;
    font-size: 0.83rem;
    font-weight: 750;
}
.pr-select,
.pr-textarea,
.pr-app input[type='text'] {
    width: 100%;
    min-width: 0;
    border: 1px solid #dcd4e8;
    border-radius: 11px;
    background: var(--pr-surface);
    color: var(--pr-ink);
    font: inherit;
    font-size: 0.9rem;
}
.pr-select,
.pr-app input[type='text'] {
    min-height: 46px;
    padding: 10px 13px;
}
.pr-textarea {
    display: block;
    min-height: 120px;
    padding: 12px 13px;
    line-height: 1.55;
    resize: vertical;
}
.pr-select:hover,
.pr-textarea:hover,
.pr-app input[type='text']:hover {
    border-color: #a992cf;
}
.pr-hint,
.pr-field-meta {
    color: var(--pr-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}
.pr-hint {
    margin: 7px 0 0;
}
.pr-field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
}
.pr-field-meta output {
    flex: 0 0 auto;
    white-space: nowrap;
}
.pr-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 64px;
    padding: 14px;
    margin-top: 10px;
    border: 1px solid var(--pr-line);
    border-radius: 13px;
    cursor: pointer;
    transition:
        border-color 0.18s,
        background 0.18s;
}
.pr-choice:hover,
.pr-choice:has(input:checked) {
    border-color: #b5a2df;
    background: var(--pr-soft);
}
.pr-choice input {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    accent-color: var(--pr-purple);
}
.pr-choice strong,
.pr-choice small {
    display: block;
}
.pr-choice strong {
    font-size: 0.88rem;
}
.pr-choice small {
    margin-top: 4px;
    color: var(--pr-muted);
    font-size: 0.77rem;
    line-height: 1.4;
}
.pr-summary {
    margin: 24px 0 0;
    padding: 18px;
    border: 1px solid #ebe4f7;
    border-radius: 15px;
    background: var(--pr-soft);
}
.pr-summary ol {
    margin: 10px 0 0;
    padding-left: 20px;
    color: var(--pr-ink);
    font-size: 0.83rem;
    line-height: 1.7;
}
.pr-summary .is-off {
    color: var(--pr-muted);
}
.pr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.pr-primary,
.pr-secondary,
.pr-tabs button {
    min-height: 44px;
    border-radius: 11px;
    font:
        700 0.88rem/1.2 Inter,
        sans-serif;
    cursor: pointer;
}
.pr-primary {
    flex: 1 1 190px;
    padding: 12px 18px;
    border: 1px solid var(--pr-purple);
    color: #fff;
    background: var(--pr-purple);
    box-shadow: 0 5px 14px rgba(116, 83, 196, 0.22);
}
.pr-primary:hover {
    background: var(--pr-purple-dark);
    border-color: var(--pr-purple-dark);
}
.pr-secondary {
    flex: 1 1 130px;
    padding: 12px 16px;
    border: 1px solid #d9cee9;
    color: var(--pr-ink);
    background: var(--pr-surface);
}
.pr-secondary:hover {
    background: var(--pr-soft);
}
.pr-privacy {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    color: var(--pr-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}
.pr-privacy svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #719e8d;
}
.pr-privacy p {
    margin: 0;
}
.pr-preview {
    position: sticky;
    top: 100px;
    overflow: hidden;
}
.pr-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 26px 15px;
}
.pr-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 26px 18px;
    border-radius: 12px;
    background: var(--pr-soft);
}
.pr-tabs button {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 8px;
    border: 0;
    color: var(--pr-muted);
    background: transparent;
    font-size: 0.78rem;
}
.pr-tabs button[aria-selected='true'] {
    color: var(--pr-ink);
    background: var(--pr-surface);
    box-shadow: 0 2px 8px rgba(57, 41, 85, 0.1);
}
.pr-tabs button[hidden] {
    display: none !important;
}
.pr-paper-viewport {
    display: grid;
    place-items: start center;
    padding: 25px clamp(15px, 4vw, 38px);
    background: #eeeaf3;
}
.pr-paper {
    width: 100%;
    max-width: 510px;
    min-height: 620px;
    padding: 7%;
    background: #fff;
    color: #282338;
    box-shadow: 0 8px 24px rgba(48, 38, 77, 0.16);
    font:
        11px/1.4 Arial,
        sans-serif;
    overflow-wrap: anywhere;
}
.pr-paper.lcp-page {
    padding: 7%;
}
.pr-paper h1 {
    font-size: 1.7em;
    line-height: 1.2;
}
.pr-paper h2 {
    font-size: 1.25em;
    line-height: 1.25;
}
.pr-paper p {
    line-height: 1.45;
}
.pr-paper .lcp-cover {
    padding: 9% 7%;
    border: 1px solid #d8cbef;
    border-radius: 12px;
    background: #f6f2fc;
    color: #443565;
    text-align: center;
}
.pr-paper .lcp-cover strong {
    font-size: 0.8em;
    letter-spacing: 0.16em;
}
.pr-paper .lcp-cover h1 {
    margin: 0.55em 0;
    font-family: Fredoka, Arial, sans-serif;
}
.pr-paper .lcp-cover p {
    margin: 0;
}
.pr-paper .lcp-note {
    margin: 24px 0;
    padding: 0 0 0 15px;
    border-left: 3px solid #bba4e3;
    white-space: pre-wrap;
}
.pr-paper .lcp-note h2 {
    margin: 0 0 0.5em;
    white-space: normal;
}
.pr-paper table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.pr-paper th,
.pr-paper td {
    overflow-wrap: anywhere;
}
.pr-paper.lcp-pochette-memo > table {
    margin-bottom: 1em !important;
}
.pr-paper.lcp-pochette-memo td {
    padding: 1em !important;
}
.pr-paper.lcp-pochette-memo td div {
    font-size: 1em !important;
    line-height: 1.45 !important;
}
.pr-paper.lcp-pochette-memo td > div:first-child {
    margin-bottom: 0.5em !important;
}
.pr-paper.lcp-pochette-memo > table:first-of-type td > div:nth-child(2) {
    font-size: 1.5em !important;
}
.pr-paper.lcp-pochette-memo ul {
    padding-left: 1.3em !important;
}
.pr-paper.lcp-pochette-memo li {
    margin-bottom: 0.45em !important;
    line-height: 1.45 !important;
}
.pr-paper.lcp-pochette-memo > div:not([class]) {
    font-size: 0.85em !important;
}
.pr-paper .lcp-challenge {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 18px;
    border-top: 1px solid #ccc3d9;
    border-left: 1px solid #ccc3d9;
}
.pr-paper .lcp-challenge div {
    padding: 9px 2px;
    border-right: 1px solid #ccc3d9;
    border-bottom: 1px solid #ccc3d9;
    text-align: center;
    white-space: pre-line;
}
.pr-preview-empty {
    padding: 40px 20px;
    color: var(--pr-muted);
    text-align: center;
    line-height: 1.5;
}
.pr-preview-caption {
    margin: 0;
    padding: 14px 25px 20px;
    color: var(--pr-muted);
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
}
@media (max-width: 850px) {
    .pr-workspace {
        grid-template-columns: 1fr;
    }
    .pr-preview {
        position: static;
    }
    .pr-hero {
        min-height: 0;
    }
}
@media (max-width: 600px) {
    .pr-app {
        padding: 20px 16px 54px;
    }
    .pr-breadcrumb {
        margin-bottom: 16px;
    }
    .pr-hero {
        grid-template-columns: 1fr;
        padding: 28px 24px 16px;
        border-radius: 21px;
    }
    .pr-hero-copy h1 {
        font-size: clamp(2.2rem, 10vw, 3.2rem);
    }
    .pr-hero-copy p {
        font-size: 0.94rem;
    }
    .pr-hero-art svg {
        max-width: 265px;
        max-height: 180px;
    }
    .pr-steps {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 14px 0 24px;
    }
    .pr-steps li {
        padding: 11px 14px;
    }
    .pr-config {
        padding: 22px 18px;
    }
    .pr-preview-heading {
        padding: 20px 18px 14px;
    }
    .pr-tabs {
        margin: 0 18px 16px;
    }
    .pr-paper-viewport {
        padding: 18px 12px;
    }
    .pr-paper {
        min-height: 0;
        font-size: clamp(8px, 2.6vw, 11px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .pr-app * {
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}
[data-theme='dark'] .pr-app {
    --pr-ink: #f1eafa;
    --pr-muted: #c0b6ce;
    --pr-line: #4b405d;
    --pr-surface: #292334;
    --pr-soft: #39304a;
    --pr-purple: #a98ae9;
    --pr-purple-dark: #9070d5;
}
[data-theme='dark'] .pr-config,
[data-theme='dark'] .pr-preview {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}
[data-theme='dark'] .pr-primary {
    color: #211831;
}
[data-theme='dark'] .pr-choice:hover,
[data-theme='dark'] .pr-choice:has(input:checked) {
    border-color: #a98ae9;
}
[data-theme='dark'] .pr-paper-viewport {
    background: #201b29;
}
[data-theme='dark'] .pr-summary {
    border-color: #514263;
}
[data-theme='dark'] .pr-app .pr-hint a {
    color: #cdb8fa;
}
[data-theme='dark'] .pr-hero {
    background: linear-gradient(125deg, #342946, #3f3058, #413244);
    border-color: #59456f;
}
[data-theme='dark'] .pr-hero-copy h1 {
    color: #f1eafa !important;
}
[data-theme='dark'] .pr-hero-copy h1 em {
    color: #ba9bea;
}
[data-theme='dark'] .pr-hero-copy p {
    color: #d5c9e5;
}
[data-theme='dark'] .pr-eyebrow,
[data-theme='dark'] .pr-breadcrumb a {
    color: #cdb8fa !important;
}
[data-theme='dark'] .pr-app .pr-paper {
    background: #fff !important;
    color: #282338 !important;
}
[data-theme='dark'] .pr-app .pr-paper :is(h1, h2, p) {
    color: #282338 !important;
}
@media print {
    @page oplcPochette {
        size: A4;
        margin: 8mm;
    }
    @page oplcPochette:first {
        margin: 8mm;
    }
    #oplc-collective-print:has(.lcp-cover) {
        page: oplcPochette;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page {
        display: flow-root;
        margin: 0;
        box-decoration-break: clone;
        color: #24212b;
        font:
            11pt/1.4 Arial,
            sans-serif;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-cover) .lcp-cover {
        padding: 9mm 10mm;
        margin-bottom: 7mm;
        border: 1px solid #aa98c9;
        border-radius: 4mm;
        background: #f7f4fb;
        color: #30264d;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-cover) .lcp-cover strong {
        font-size: 9pt;
        letter-spacing: 0.14em;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page h1 {
        font:
            600 23pt/1.15 Fredoka,
            Arial,
            sans-serif;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-cover) .lcp-cover h1 {
        margin: 3mm 0;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-cover) .lcp-cover p {
        margin: 0;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-cover) .lcp-note {
        margin: 5mm 0;
        padding: 2mm 5mm;
        border-color: #aa98c9;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-cover) .lcp-note h2 {
        margin: 0 0 2mm;
        font-size: 13pt;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:has(> .lcp-challenge) .lcp-challenge div {
        padding: 4mm 2mm;
        white-space: pre-line;
        font-size: 12pt;
        line-height: 1.6;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:not(:has(.lcp-cover, .lcp-challenge)) > table {
        margin-bottom: 2mm !important;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:not(:has(.lcp-cover, .lcp-challenge)) td {
        padding: 2mm 4mm !important;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:not(:has(.lcp-cover, .lcp-challenge)) td div {
        font-size: 11pt !important;
        line-height: 1.35 !important;
    }
    #oplc-collective-print:has(.lcp-cover)
        .lcp-page:not(:has(.lcp-cover, .lcp-challenge))
        > table:first-of-type
        td
        > div:nth-child(2) {
        font-size: 16pt !important;
    }
    #oplc-collective-print:has(.lcp-cover) .lcp-page:not(:has(.lcp-cover, .lcp-challenge)) li {
        margin-bottom: 0.5mm !important;
        line-height: 1.35 !important;
    }
}

@media print {
    /* Le thème de l'écran ne doit pas effacer le texte sur le papier blanc. */
    [data-theme='dark'] #oplc-collective-print:has(.lcp-cover),
    [data-theme='dark'] #oplc-collective-print:has(.lcp-cover) * {
        color: #111 !important;
        background-color: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}
