:root {
        --primary-blue: #0b2240;
        --accent-red: #a82025;
        --bg-light: #f4f6f9;
        --text-dark: #333333;
        --white: #ffffff;
        --overlay: rgba(0, 0, 0, 0.5);
    }

    /* Base globale */
    html, body {
        margin: 0;
        padding: 0;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: var(--bg-light);
        color: var(--text-dark);
    }

    .main-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    header {
        background-color: var(--primary-blue);
        color: var(--white);
        padding: 15px 20px;
        text-align: center;
        border-bottom: 4px solid var(--accent-red);
        flex-shrink: 0;
    }
    .brand-header {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
    }
    header h1 {
        margin: 0;
        font-size: 1.8rem;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    header p {
        margin: 5px 0 0 0;
        font-style: italic;
        font-size: 0.9rem;
        opacity: 0.9;
    }

    nav {
        background-color: var(--white);
        padding: 10px 16px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        flex-shrink: 0;
    }
    nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        max-width: 1200px;
        margin-inline: auto;
    }
    nav li { display: flex; }
    nav button {
        background: none;
        border: none;
        color: var(--primary-blue);
        font-weight: bold;
        font-size: 0.9rem;
        padding: 8px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        line-height: 1.25;
        white-space: normal;
    }
    nav button:hover:not(:disabled) {
        background-color: var(--primary-blue);
        color: var(--white);
    }
    nav button.is-active {
        background-color: var(--primary-blue);
        color: var(--white);
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
    }

    nav button:disabled {
        color: #94a3b8;
        cursor: not-allowed;
        opacity: 0.5;
        background-color: #e2e8f0;
    }

    .content-container {
        flex-grow: 1;
        overflow-y: auto;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        gap: 12px;
    }

    .lock-warning {
        background-color: #fef2f2;
        color: var(--accent-red);
        border: 1px solid #fca5a5;
        padding: 10px 20px;
        border-radius: 6px;
        margin-bottom: 15px;
        font-weight: bold;
        font-size: 0.9rem;
        display: block;
        text-align: center;
        max-width: 900px;
        width: 100%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .app-utility-bar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        max-width: 900px;
        width: 100%;
    }

    .install-button {
        display: none;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 999px;
        background-color: var(--accent-red);
        color: var(--white);
        padding: 10px 16px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
    }

    .install-button:hover {
        background-color: #821619;
    }

    .install-button.is-visible,
    .status-chip.is-visible {
        display: inline-flex;
    }

    .status-chip {
        display: none;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 600;
        background-color: #eff6ff;
        color: var(--primary-blue);
        border: 1px solid #bfdbfe;
    }

    .status-chip.is-offline {
        background-color: #fff7ed;
        color: #9a3412;
        border-color: #fdba74;
    }

    .preface-section {
        background-color: var(--white);
        padding: 25px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        max-width: 900px;
        width: 100%;
        margin-bottom: 10px;
    }
    .preface-box {
        background-color: #f9f9f9;
        border-left: 4px solid var(--primary-blue);
        padding: 15px 20px;
        font-style: italic;
    }
    .study-dashboard {
        width: 100%;
        max-width: 900px;
        padding: 10px 16px;
        border: 1px solid #d9e0e8;
        border-radius: 10px;
        background: #fff;
    }
    .study-dashboard-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    .study-dashboard h2 {
        margin: 0 0 2px;
        padding: 0;
        border: 0;
        font-size: 1.1rem;
    }
    .study-dashboard-heading p,
    .study-progress-text {
        margin: 0;
        color: #526075;
        font-size: 0.9rem;
    }
    .resume-button {
        flex: 0 0 auto;
        padding: 7px 14px;
        border: 0;
        border-radius: 7px;
        background: var(--primary-blue);
        color: #fff;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }
    .resume-button:hover { background: #17395f; }
    .resume-button:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 3px; }
    .study-progress-label {
        display: block;
        margin-top: 8px;
        color: #263445;
        font-size: 0.88rem;
        font-weight: 700;
    }
    #overallProgress {
        display: block;
        width: 100%;
        height: 8px;
        margin: 4px 0 3px;
        accent-color: #256044;
    }
    .study-progress-text { font-size: 0.82rem; }
    .preface-section {
        max-width: 900px;
        width: 100%;
        padding: 10px 16px;
        border: 1px solid #d9e0e8;
        border-radius: 8px;
        background: #fff;
    }
    .preface-section summary,
    .preface-section .preface-title {
        color: var(--primary-blue);
        font-weight: 700;
        cursor: pointer;
    }
    .preface-section .preface-title {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 1rem;
        cursor: default;
    }
    .preface-section .preface-box {
        margin-top: 8px;
        padding: 8px 14px;
        font-size: 0.88rem;
        line-height: 1.4;
    }
    .preface-section .preface-box p { margin: 0 0 6px; }
    .preface-section .preface-box ul { margin: 4px 0 6px; padding-left: 20px; }
    .preface-section .preface-box li { margin-bottom: 2px; }
    .preface-section .preface-box p[style*="margin-top"] { margin-top: 6px !important; }
    .preface-section .preface-box p[style*="1.1rem"] { font-size: 1rem !important; }

    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: var(--overlay);
        overflow: visible;
        padding: 0 12px;
    }
    .modal-content {
        --modal-padding: 30px;
        background-color: var(--white);
        margin: 82px auto 20px;
        padding: var(--modal-padding);
        border-radius: 8px;
        max-width: 850px;
        width: min(850px, 100%);
        border: 1px solid #d9e0e8;
        box-shadow: 0 4px 16px rgba(11, 34, 64, 0.12);
        position: relative;
        max-height: calc(100dvh - 112px);
        overflow-y: auto;
    }
    h2 {
        color: var(--primary-blue);
        border-bottom: 2px solid var(--accent-red);
        padding-bottom: 6px;
        margin-top: 0;
    }
    .modal-toolbar {
        position: fixed;
        top: 12px;
        left: 50%;
        z-index: 1100;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: min(850px, calc(100% - 24px));
        margin: 0;
        padding: 12px 18px;
        transform: translateX(-50%);
        background: linear-gradient(135deg, var(--primary-blue), #16396a);
        border-bottom: 3px solid var(--accent-red);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(11, 34, 64, 0.25);
    }
    .module-nav-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .modal-toolbar .module-nav-controls > button,
    .modal-toolbar > .auth-toolbar-logout {
        box-sizing: border-box;
        height: 58px;
    }
    .module-nav-button.module-nav-previous,
    .module-nav-button.module-nav-next {
        width: 34px;
        min-width: 34px;
        padding-inline: 4px;
    }
    .module-nav-button > span {
        display: none;
    }
    .modal-toolbar > span {
        position: relative;
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
        height: 58px;
        flex-shrink: 0;
        white-space: nowrap;
        color: #fff;
        font-size: 0.8rem;
        font-weight: 800;
        letter-spacing: 0.12em;
        padding: 4px 10px;
        border-radius: 7px;
        background: var(--accent-red);
    }
    .modal-return-btn {
        padding: 6px 10px;
        border: 1px solid rgba(255, 255, 255, 0.55);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font: inherit;
        font-size: 0.9em;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .module-nav-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-width: 36px;
        min-height: 36px;
        padding: 6px 10px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font: inherit;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
    }
    .module-nav-button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
    .module-nav-button:disabled { opacity: 0.45; cursor: not-allowed; }
    .module-nav-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    .modal-return-btn:hover { background: #fff; color: var(--primary-blue); }
    .modal-return-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    .modal-content > h2 {
        line-height: 1.35;
        padding: 12px 14px;
        background: #f4f7fb;
        border-left: 5px solid var(--accent-red);
        border-bottom: 2px solid #d9e0e8;
        border-radius: 0 6px 6px 0;
    }
    .mod-body {
        max-width: 72ch;
        margin-inline: auto;
        color: #263445;
        font-size: 0.98rem;
        line-height: 1.65;
    }
    .mod-body p { margin-block: 0.7em; }
    .mod-body li { line-height: 1.6; }
    .mod-body .dossier-item { box-shadow: none; }
    .correction-gate {
        max-width: 72ch;
        margin: -14px auto 12px;
        padding: 10px 12px;
        border: 1px solid #d9e0e8;
        border-left: 4px solid var(--accent-red);
        border-radius: 6px;
        background: #f4f7fb;
    }
    .correction-gate h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.2; }
    .correction-gate form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 8px;
    }
    .correction-gate form > select,
    .correction-gate form > p { grid-column: 1 / -1; }
    .correction-gate form > p { order: 3; margin: 0; font-size: 0.85rem; line-height: 1.3; }
    .correction-gate form > button { order: 2; padding-inline: 6px; font-size: 0.8rem; line-height: 1.15; }
    #correctionGateStatus { margin: 6px 0 0; font-size: 0.85rem; }
    #correctionGateStatus:empty { display: none; }
    .correction-verification { margin-top: 8px; }
    .correction-verification[hidden] { display: none; }
    .correction-verification label { display: block; margin-bottom: 4px; font-size: 0.85rem; }
    .correction-verification progress { display: block; width: 100%; height: 12px; accent-color: #70bd83; }
    .correction-gate input,
    .correction-gate select,
    .correction-gate button { font: inherit; }
    .correction-gate input { max-width: 100%; }
    .correction-gate select {
        width: 100%;
        max-width: 100%;
        padding: 6px 8px;
        border: 1px solid #aeb9c7;
        border-radius: 5px;
        background: #fff;
    }
    .correction-gate button {
        justify-self: stretch;
        padding: 7px 10px;
        border: 0;
        border-radius: 5px;
        background: var(--primary-blue);
        color: #fff;
        font-weight: 700;
        font-size: 0.9rem;
        cursor: pointer;
    }
    .correction-gate button:hover { background: #16396a; }
    .correction-gate button:focus-visible,
    .correction-gate input:focus-visible,
    .correction-gate select:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 2px; }
    .correction-gate .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    #corrigeList[hidden],
    #corrigeList .dossier-item[hidden] { display: none !important; }
    .mod-body[data-mod="4"] .progress-container { display: none; }

    .progress-container {
        background-color: #eee;
        border-radius: 4px;
        margin: 15px 0;
        position: relative;
        height: 20px;
        width: 100%;
    }
    .progress-bar {
        background-color: #4cd137;
        height: 100%;
        width: 0%;
        border-radius: 4px;
        transition: width 0.4s ease;
    }
    .progress-text {
        position: absolute;
        width: 100%;
        text-align: center;
        top: 0;
        left: 0;
        font-size: 0.85rem;
        font-weight: bold;
        color: #333;
        line-height: 20px;
    }

    .dossier-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0;
        list-style: none;
        width: 100%;
    }
    .dossier-item {
        background: var(--bg-light);
        padding: 10px 12px;
        border-radius: 6px;
        border-left: 3px solid var(--accent-red);
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        gap: 10px;
        min-width: 0;
    }
    .dossier-item label {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        flex-grow: 1;
        min-width: 0;
    }
    .dossier-item .dossier-text {
        flex-grow: 1;
        overflow-wrap: anywhere;
    }
    .dossier-item input[type="checkbox"] {
        transform: scale(1.1);
        cursor: pointer;
    }
    .dossier-list .dossier-item.study-tracked-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
    .dossier-tracking-controls {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 15rem);
        justify-content: end;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid #d9e0e8;
    }
    .dossier-tracking-field {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        color: #526075;
        font-size: 0.75rem;
        font-weight: 700;
    }
    .dossier-tracking-field select,
    .dossier-tracking-field input {
        width: 100%;
        min-width: 0;
        padding: 6px 7px;
        border: 1px solid #aeb9c6;
        border-radius: 4px;
        background: #fff;
        color: #263445;
        font: inherit;
        font-size: 0.8rem;
    }
    .dossier-tracking-field select:focus-visible,
    .dossier-tracking-field input:focus-visible {
        outline: 2px solid var(--primary-blue);
        outline-offset: 2px;
    }
    .dossier-item.completed {
        background-color: #e3ebe6;
        border-left-color: #256044;
    }
    .dossier-item.completed > label span {
        text-decoration: line-through;
    }
    .stars {
        color: #ffb400;
        font-weight: bold;
        margin-right: 5px;
    }
    .dossier-difficulty-filter {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin: 12px 0;
        color: #526075;
        font-size: 0.9rem;
    }
    .dossier-difficulty-filter select {
        padding: 7px 9px;
        border: 1px solid #aeb9c6;
        border-radius: 4px;
        background: #fff;
        color: #263445;
        font: inherit;
    }
    .dossier-difficulty-filter select:focus-visible {
        outline: 2px solid var(--primary-blue);
        outline-offset: 2px;
    }
    .difficulty-scale {
        margin: 8px 0 12px;
        color: #526075;
        font-size: 0.9rem;
    }
    .difficulty-scale summary {
        width: fit-content;
        color: var(--primary-blue);
        cursor: pointer;
        font-weight: 700;
    }
    .difficulty-scale ul {
        display: grid;
        gap: 4px;
        margin: 8px 0 0;
        padding-left: 1.25rem;
    }
    .dossier-recommendation {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin: 12px 0;
        padding: 10px 12px;
        border-left: 3px solid var(--primary-blue);
        border-radius: 4px;
        background: var(--bg-light);
    }
    .dossier-recommendation p {
        margin: 0;
        flex: 1 1 16rem;
    }
    .fiche-dossier-viewer {
        margin: 8px 0 12px;
        padding: 10px 12px;
        border: 1px solid #d9e0e8;
        border-radius: 6px;
        background: #f8fafc;
    }
    .fiche-dossier-viewer label {
        display: block;
        margin-bottom: 4px;
        color: var(--primary-blue);
        font-weight: 700;
    }
    .fiche-dossier-viewer select {
        width: 100%;
        max-width: 560px;
        padding: 6px 8px;
        border: 1px solid #aeb9c6;
        border-radius: 4px;
        background: #fff;
        color: var(--text-dark);
        font: inherit;
    }
    .fiche-dossier-viewer select:focus-visible {
        outline: 2px solid var(--primary-blue);
        outline-offset: 2px;
    }
    .jury-accordeon {
        border-color: rgba(177, 201, 181, 0.28);
        background: #101918;
        color: #fff;
    }
    .jury-accordeon > summary,
    .jury-accordeon h3,
    .jury-accordeon p,
    .jury-accordeon label,
    .jury-accordeon #jury-specialite-statut { color: #fff; }
    .jury-accordeon .fiche-dossier-content {
        border: 1px solid rgba(255, 255, 255, 0.16);
        background: #0a1110;
        color: #fff;
    }
    .jury-accordeon > summary {
        position: relative;
        padding-right: 28px;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }
    .jury-accordeon > summary::-webkit-details-marker { display: none; }
    .jury-accordeon > summary::after {
        content: "▾";
        position: absolute;
        right: 4px;
        top: 0;
        transition: transform 0.25s ease;
    }
    .jury-accordeon[open] > summary::after { transform: rotate(180deg); }
    .jury-accordeon > summary:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }
    .jury-accordeon h3 { margin: 12px 0 0; font-size: 1rem; }
    .jury-rendu { display: grid; gap: 12px; margin-top: 12px; }
    .jury-rendu[hidden] { display: none; }
    .jury-bloc {
        padding: 14px 16px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-left: 4px solid #e5c158;
        border-radius: 8px;
        background: #0a1110;
        color: #fff;
    }
    .jury-bloc h4 { margin: 0 0 10px; color: #e5c158; font-size: 1rem; line-height: 1.35; }
    .jury-bloc h5 { margin: 14px 0 6px; color: #fff; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; }
    .jury-bloc ul { margin: 0; padding-left: 20px; }
    .jury-bloc li { margin: 6px 0; line-height: 1.55; overflow-wrap: anywhere; }
    .jury-bloc li ul { margin-top: 6px; }
    .jury-bloc strong { color: #f3dd91; }
    .jury-rendu h3 { margin: 4px 0 0; color: #fff; font-size: 1.05rem; line-height: 1.35; }
    .jury-badge {
        justify-self: start;
        margin: 0;
        padding: 4px 12px;
        border: 1px solid #e5c158;
        border-radius: 999px;
        background: rgba(229, 193, 88, 0.15);
        color: #f3dd91;
        font-weight: 700;
        font-size: 0.85rem;
    }
    @media (max-width: 560px) {
        .jury-bloc { padding: 12px 10px; }
        .jury-bloc ul { padding-left: 16px; }
        .jury-bloc li { font-size: 0.95rem; }
    }
    .qcm-cartes { display: grid; gap: 14px; }
    .qcm-carte {
        padding: 16px 18px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-left: 4px solid #e5c158;
        border-radius: 8px;
        background: #0a1110;
        color: #fff;
        display: grid;
        gap: 12px;
    }
    .qcm-carte-tete { display: flex; align-items: center; gap: 12px; }
    .qcm-carte h3 { margin: 0; color: #e5c158; font-size: 1.05rem; line-height: 1.35; }
    .qcm-num {
        flex-shrink: 0;
        padding: 3px 10px;
        border: 1px solid #e5c158;
        border-radius: 999px;
        background: rgba(229, 193, 88, 0.15);
        color: #f3dd91;
        font-weight: bold;
        font-size: 0.85rem;
    }
    .qcm-chiffres { display: flex; flex-wrap: wrap; gap: 10px; }
    .qcm-chiffres span { padding: 6px 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
    .qcm-chiffres strong { color: #f3dd91; font-size: 1.15rem; }
    .qcm-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; line-height: 1.5; }
    .qcm-ligne .doc-link { flex-shrink: 0; }
    .qcm-texte { margin: 0; line-height: 1.6; }
    .qcm-texte strong { color: #f3dd91; }
    .qcm-acces { text-align: center; }
    .qcm-acces .btn-link { margin-top: 0; }
    .qcm-acces .btn-link,
    .qcm-acces .btn-link:hover {
        position: relative;
        overflow: hidden;
        border: 1px solid #7fdcff;
        background: linear-gradient(145deg, #1aa7ff, #0078d4 55%, #005a9e) !important;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        text-shadow: 0 1px rgba(0, 40, 80, 0.45);
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.5), inset 0 1px rgba(255, 255, 255, 0.4);
    }
    .qcm-acces .btn-link:hover { filter: brightness(1.08); transform: translateY(-1px); }
    .qcm-acces .btn-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
    @media (prefers-reduced-motion: no-preference) {
        .qcm-acces .btn-link,
        .modal-toolbar > span { animation: blue-glow 2.4s ease-in-out infinite; }
        .qcm-acces .btn-link::after,
        .modal-toolbar > span::after {
            content: "";
            position: absolute;
            top: 0;
            left: -75%;
            width: 50%;
            height: 100%;
            background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.75), transparent);
            transform: skewX(-20deg);
            animation: blue-shine 3s ease-in-out infinite;
            pointer-events: none;
        }
    }
    @keyframes blue-glow {
        0%, 100% { box-shadow: 0 0 8px rgba(0, 191, 255, 0.4), inset 0 1px rgba(255, 255, 255, 0.4); }
        50% { box-shadow: 0 0 24px rgba(0, 217, 255, 0.9), inset 0 1px rgba(255, 255, 255, 0.4); }
    }
    @keyframes blue-shine {
        0%, 55% { left: -75%; }
        100% { left: 140%; }
    }
    @media (max-width: 560px) {
        .qcm-carte { padding: 14px 12px; }
        .qcm-ligne { flex-direction: column; align-items: stretch; }
        .qcm-ligne .doc-link { text-align: center; }
    }
    .jury-year-message {
        margin: 8px 0 0;
        padding: 8px 12px;
        border-left: 4px solid #e5c158;
        border-radius: 4px;
        background: rgba(229, 193, 88, 0.15);
        color: #f3dd91;
        font-weight: 600;
    }
    .jury-year-message[hidden] { display: none; }
    .part-card {
        display: block;
        margin: 0 0 14px !important;
        padding: 16px 18px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-left: 4px solid #e5c158;
        border-radius: 8px;
        background: #0a1110;
        color: #fff;
        list-style: none;
    }
    .part-card:last-child { margin-bottom: 0 !important; }
    .part-card > .qcm-chiffres { margin-bottom: 12px; }
    .part-card > p:first-child,
    .part-card > ul:first-child:has(> li > strong:only-child),
    .part-card > .dossier-item:first-child,
    .part-card > .section-title {
        margin: 0 0 12px;
        padding: 0 0 10px;
        border: 0;
        border-bottom: 1px solid rgba(229, 193, 88, 0.35);
        border-radius: 0;
        background: none;
        box-shadow: none;
        list-style: none;
    }
    .part-card > ul:first-child:has(> li > strong:only-child) { padding-left: 0; }
    .part-card > p:first-child > strong,
    .part-card > ul:first-child > li > strong:only-child,
    .part-card > .dossier-item:first-child > strong,
    .part-card > .section-title,
    .part-card > .align-row:first-child .row-text > strong {
        color: #e5c158;
        font-size: 1.05rem;
        line-height: 1.35;
    }
    .part-card > .align-row:first-child:only-child { padding: 0; border-bottom: 0; }
    @media (max-width: 560px) {
        .part-card { padding: 14px 12px; }
    }
    .fiche-intro { margin: 0 0 12px; line-height: 1.5; }
    .fiche-group {
        margin: 0 0 14px;
        padding: 12px 14px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
    }
    .fiche-group legend {
        padding: 0 8px;
        color: #e5c158;
        font-weight: 700;
    }
    .fiche-step {
        display: inline-block;
        min-width: 22px;
        margin-right: 6px;
        border-radius: 50%;
        background: #e5c158;
        color: #0a1110;
        font-size: 0.85rem;
        line-height: 22px;
        text-align: center;
    }
    .fiche-question { display: block; margin: 12px 0 6px; font-weight: 600; }
    .fiche-group > label:not(.fiche-question) {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        margin: 6px 0;
        cursor: pointer;
    }
    .fiche-group input[type="radio"],
    .fiche-group input[type="checkbox"] { margin-top: 3px; accent-color: #e5c158; }
    .fiche-group select,
    .fiche-group input[type="text"],
    .fiche-group textarea {
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 6px;
        background: #0f1a18;
        color: #fff;
        font: inherit;
    }
    .fiche-group textarea { resize: vertical; }
    .fiche-profile { display: grid; gap: 6px; margin: 0 0 6px; }
    .fiche-profile div { display: flex; flex-wrap: wrap; gap: 6px; }
    .fiche-profile dt { color: #e5c158; font-weight: 600; }
    .fiche-profile dd { margin: 0; }
    .fiche-count { margin-top: 4px; font-size: 0.85rem; text-align: right; opacity: 0.8; }
    .fiche-status { min-height: 1.2em; margin: 4px 0 10px; font-weight: 600; }
    .fiche-status.is-ok { color: #8fdca0; }
    .fiche-status.is-error { color: #ff8a80; }
    .fiche-form[hidden] { display: none; }
    #retexCard > p:first-child,
    #signalementCard > p:first-child {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }
    #retexCard > p:first-child[aria-expanded="false"],
    #signalementCard > p:first-child[aria-expanded="false"] {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: 0;
    }
    #retexCard > p:first-child::after,
    #signalementCard > p:first-child::after {
        content: '▾';
        margin-left: auto;
        color: #e5c158;
        transition: transform 0.2s ease;
    }
    #retexCard > p:first-child[aria-expanded="true"]::after,
    #signalementCard > p:first-child[aria-expanded="true"]::after { transform: rotate(180deg); }
    #retexCard > .fiche-form:not([hidden]),
    #signalementCard > .fiche-form:not([hidden]) { margin-top: 0; }
    #retexCard.is-sent > .fiche-form:not([hidden]) {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(229, 193, 88, 0.35);
    }
    .fiche-sent-badge {
        padding: 2px 10px;
        border: 1px solid #8fdca0;
        border-radius: 999px;
        color: #8fdca0;
        font-size: 0.85rem;
        font-weight: 600;
    }
    .fiche-sent-badge[hidden] { display: none; }
    .fiche-form .btn-link { border: 0; cursor: pointer; font: inherit; }
    .fiche-form .btn-link:disabled { opacity: 0.55; cursor: not-allowed; }
    .jury-accordeon select { margin: 6px 0 8px; }
    #ficheDossierStatus {
        margin: 6px 0 0;
        color: #526075;
        font-size: 0.9rem;
    }
    #ficheDossierStatus:empty { display: none; }
    .fiche-dossier-content {
        max-height: 55vh;
        overflow: auto;
        margin: 12px 0 0;
        padding: 14px;
        border-radius: 4px;
        background: #fff;
        color: var(--text-dark);
        font: 0.9rem/1.55 ui-monospace, Consolas, monospace;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
    .fiche-dossier-admin {
        margin-top: 16px;
        padding: 14px;
        border: 1px solid #e5c158;
        border-radius: 6px;
        background: #fff8dc;
    }
    .fiche-dossier-admin h3 {
        margin: 0 0 12px;
        color: var(--primary-blue);
    }
    .fiche-dossier-admin input,
    .fiche-dossier-admin textarea {
        box-sizing: border-box;
        width: 100%;
        max-width: 760px;
        padding: 8px;
        border: 1px solid #aeb9c6;
        border-radius: 4px;
        color: var(--text-dark);
        font: inherit;
    }
    .fiche-dossier-admin textarea {
        display: block;
        resize: vertical;
        font-family: ui-monospace, Consolas, monospace;
    }
    .fiche-dossier-admin-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }
    .fiche-dossier-admin-actions button {
        padding: 7px 10px;
        border: 1px solid var(--primary-blue);
        border-radius: 4px;
        background: #fff;
        color: var(--primary-blue);
        font: inherit;
        cursor: pointer;
    }
    .fiche-dossier-admin-actions button.adm-save {
        background: var(--primary-blue);
        color: #fff;
    }
    .fiche-dossier-admin-status {
        margin: 8px 0 0;
        color: #526075;
        font-size: 0.9rem;
    }
    #studyDossierList > .dossier-item[hidden] {
        display: none !important;
    }
    .doc-link {
        font-size: 0.8rem;
        background-color: var(--primary-blue);
        color: var(--white);
        padding: 4px 8px;
        border-radius: 4px;
        text-decoration: none;
        font-weight: bold;
        display: inline-block;
    }
    .doc-link:hover {
        background-color: var(--accent-red);
    }
    .btn-link {
        display: inline-block;
        background-color: var(--accent-red);
        color: var(--white);
        padding: 10px 20px;
        text-decoration: none;
        border-radius: 5px;
        font-weight: bold;
        margin-top: 10px;
        transition: background 0.3s;
    }
    .btn-link:hover {
        background-color: #821619;
    }


/* Suppression des puces et marges de liste */
.modal-list {
list-style: none;
padding: 0;
margin: 0;
}

.modal-list > li {
margin-bottom: 24px;
}

/* Titres de sous-sections (6.1 et 6.3) */
.section-title {
font-weight: bold;
margin-bottom: 8px;
color: #111;
}

/* Conteneur de ligne : aligne le texte à gauche et le bouton tout à droite */
.align-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid #f0f0f0; /* Optionnel : ajoute une fine ligne de séparation */
}

/* Gère le texte pour éviter qu'il vienne s'écraser contre le bouton */
.row-text {
flex: 1;
padding-right: 15px;
font-size: 0.95rem;
}

/* Bouton Ouvrir fixe et standardisé */
.doc-link {
display: inline-block;
padding: 4px 12px;
background-color: #007bff;
color: #ffffff;
text-decoration: none;
border-radius: 4px;
font-size: 0.85rem;
font-weight: 500;
text-align: center;
min-width: 60px; /* Force tous les boutons à avoir exactement la même taille */
white-space: nowrap;
flex-shrink: 0;
position: relative;
overflow: hidden;
transition: background-color .3s;
}
.doc-link .dl-fill {
position: absolute;
inset: 0 auto 0 0;
width: 0;
background: #5aa9ff;
}
.doc-link .dl-label { position: relative; }
.doc-link.dl-done { background-color: #159b78; }
.doc-link.dl-done .dl-fill { opacity: 0; }
.doc-link.dl-done .dl-label { animation: dl-pop .4s ease; }
@keyframes dl-pop {
0% { transform: scale(.3); }
70% { transform: scale(1.3); }
100% { transform: scale(1); }
}

.resource-pending {
flex-shrink: 0;
color: #64748b;
font-size: 0.8rem;
}

#modal-module6 [data-specialty-row][hidden] {
display: none;
}

.specialty-filter-message {
color: #526075;
font-size: 0.9rem;
}

.specialty-admin-picker {
display: none;
margin: 8px 0;
}

body.adm-on .specialty-admin-picker,
body.admin-account .specialty-admin-picker {
display: block;
}

.specialty-admin-picker select {
display: block;
width: 100%;
max-width: 520px;
margin-top: 6px;
padding: 8px;
border: 1px solid #99a;
border-radius: 4px;
font: inherit;
}

.doc-link:hover {
background-color: #0056b3; /* Effet de survol sur le bouton */
}

/* PATCH UNIVERSAL */
    * {
        box-sizing: border-box;
    }
    img, video {
        max-width: 100%;
        height: auto;
    }
    .modal {
        overflow-y: auto;
    }

    /* Ordinateur : les 7 modules sur une seule ligne */
    @media (min-width: 1025px) {
        nav ul {
            flex-wrap: nowrap;
            max-width: none;
            gap: 6px;
        }
        nav li {
            flex: 1 1 0;
            min-width: 0;
        }
        nav button {
            width: 100%;
            padding: 8px 6px;
            font-size: 0.82rem;
            text-align: center;
        }
    }

    /* RESPONSIVE TABLETTE */
    @media (max-width: 1024px) {
        .content-container {
            padding: 16px;
        }
        nav ul {
            gap: 8px;
        }
        nav button {
            font-size: 0.8rem;
            padding: 7px 10px;
        }
        .dossier-list {
            grid-template-columns: 1fr !important;
        }
        .modal-content {
            padding: 24px;
            --modal-padding: 24px;
        }
    }

    /* RESPONSIVE MOBILE */
    @media (max-width: 768px) {
        header {
            padding: 12px 14px;
        }
        .brand-header {
            gap: 10px;
        }
        header h1 {
            font-size: 1.3rem;
        }
        nav {
            padding: 8px 10px;
        }
        nav ul {
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
        }
        nav li {
            width: 100%;
        }
        nav button {
            width: 100%;
            text-align: left;
            font-size: 0.9rem;
        }
        .content-container {
            padding: 12px;
        }
        .app-utility-bar {
            justify-content: stretch;
        }
        .install-button,
        .status-chip {
            width: 100%;
            justify-content: center;
        }
        .preface-section,
        .modal-content,
        .study-dashboard {
            width: 100%;
            padding: 12px 14px;
            --modal-padding: 14px;
        }
        .study-dashboard-heading {
            align-items: stretch;
            flex-direction: column;
            gap: 8px;
        }
        .resume-button {
            width: 100%;
        }
        .modal { padding: 0 8px; }
        .modal-content {
            margin: 8px auto 100px;
            max-height: calc(100dvh - 108px);
        }
        .modal-toolbar {
            top: auto;
            bottom: max(8px, env(safe-area-inset-bottom));
            left: 8px;
            width: calc(100% - 16px);
            flex-wrap: wrap;
            gap: 8px;
            padding: 10px 12px;
            transform: none;
        }
        .module-nav-controls { gap: 5px; }
        .module-nav-button,
        .modal-return-btn { padding: 7px 8px; font-size: 0.78rem; }
        .dossier-item {
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
        }
        .dossier-item label {
            width: 100%;
        }
        .mod-body[data-mod="2"] .dossier-item,
        .mod-body[data-mod="3"] .dossier-item,
        .mod-body[data-mod="4"] .dossier-item {
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }
        .mod-body[data-mod="2"] .dossier-item > .doc-link,
        .mod-body[data-mod="3"] .dossier-item .doc-link,
        .mod-body[data-mod="4"] .dossier-item .doc-link {
            flex-shrink: 0;
            margin-left: auto;
            font-size: 0.72rem;
            padding: 3px 8px;
        }
        .mod-body[data-mod="3"] .dossier-item label > span:last-child,
        .mod-body[data-mod="4"] .dossier-item label > span:last-child {
            min-width: 0;
            overflow-wrap: anywhere;
        }
        .mod-body[data-mod="3"] .dossier-item > div,
        .mod-body[data-mod="4"] .dossier-item > div {
            width: auto;
            flex-shrink: 0;
            flex-wrap: nowrap;
        }
        .dossier-list .dossier-item > .dossier-tracking-controls {
            display: grid;
            width: 100%;
            justify-content: stretch;
            align-items: start;
            gap: 8px;
            grid-template-columns: 1fr;
        }
        .dossier-tracking-field {
            grid-template-columns: 1fr;
            gap: 4px;
            font-size: 0.8rem;
        }
        .dossier-tracking-field select {
            min-height: 44px;
            padding: 9px 10px;
            font-size: 16px;
        }
        .dossier-item > div {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .align-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
        .row-text {
            padding-right: 0;
        }
    }

    @media (max-width: 560px) {
        h2 {
            font-size: 1.05rem;
        }
        .preface-box {
            padding: 8px 10px;
        }
        .btn-link {
            width: 100%;
            text-align: center;
        }
        .modal-content > h2 { padding-right: 0; }
    }

    :root {
        --primary-blue: #20352b;
        --accent-red: #b52e35;
        --bg-light: #141c19;
        --text-dark: #e4ebe4;
        --white: #1b2722;
        --overlay: rgba(3, 8, 8, 0.82);
        --panel-line: rgba(177, 201, 181, 0.2);
        --panel-highlight: rgba(194, 219, 194, 0.58);
    }

    html,
    body {
        background:
            radial-gradient(ellipse at 50% 0%, rgba(58, 84, 63, 0.36), transparent 56%),
            linear-gradient(145deg, #17221c, #0d1314 62%, #11191b);
        color: var(--text-dark);
    }

    .main-wrapper {
        background:
            linear-gradient(rgba(179, 222, 195, 0.025) 1px, transparent 1px),
            linear-gradient(90deg, rgba(179, 222, 195, 0.025) 1px, transparent 1px);
        background-size: 46px 46px;
    }

    .main-wrapper > header {
        position: relative;
        padding: 22px 20px 19px;
        border-bottom: 2px solid #9a2930;
        background:
            linear-gradient(135deg, rgba(194, 219, 194, 0.54) 0 1px, transparent 1.5px) 10px 10px / 18px 18px no-repeat,
            linear-gradient(225deg, rgba(194, 219, 194, 0.42) 0 1px, transparent 1.5px) calc(100% - 10px) 10px / 18px 18px no-repeat,
            linear-gradient(180deg, #24352d, #131c1b);
        box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.08);
    }

    .main-wrapper > header .brand-header {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
    }

    .main-wrapper > header .brand-kicker {
        margin-bottom: 0;
        color: #a9c5ad;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.19em;
    }

    .main-wrapper > header .c-blue { color: #4da3ff; }
    .main-wrapper > header .c-white { color: #ffffff; }
    .main-wrapper > header .c-red { color: #ff3b3b; }

    .main-wrapper > header h1 {
        color: #f0f3e8;
        font-size: clamp(1.15rem, 3vw, 1.8rem);
        letter-spacing: 0.09em;
        text-shadow: 0 0 24px rgba(120, 209, 195, 0.16);
    }

    .main-wrapper > nav {
        position: sticky;
        top: 0;
        z-index: 20;
        border-bottom: 1px solid var(--panel-line);
        background: rgba(13, 20, 19, 0.94);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
        backdrop-filter: blur(12px);
    }

    .main-wrapper > nav button {
        border: 1px solid transparent;
        color: #c3d0c6;
        letter-spacing: 0.025em;
    }

    .main-wrapper > nav button:hover:not(:disabled),
    .main-wrapper > nav button.is-active {
        border-color: rgba(153, 195, 163, 0.38);
        background: linear-gradient(145deg, #30483a, #1d3028);
        color: #f3f6ed;
        box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(88, 175, 139, 0.1);
    }

    .main-wrapper > nav button:disabled {
        border: 1px solid rgba(157, 171, 160, 0.08) !important;
        background: rgba(255, 255, 255, 0.035) !important;
        color: #819087 !important;
        opacity: 0.72 !important;
    }

    .content-container { color: #d7e0d8; }

    .lock-warning {
        border-color: rgba(215, 164, 100, 0.5);
        background: rgba(93, 65, 34, 0.34);
        color: #f2c98e;
        box-shadow: inset 3px 0 #d9a95f, 0 8px 24px rgba(0, 0, 0, 0.18);
    }

    .status-chip {
        border-color: var(--panel-line);
        background: #1c2a25;
        color: #c5d8c8;
    }

    .status-chip.is-offline {
        border-color: rgba(217, 169, 95, 0.45);
        background: #382d20;
        color: #f2c98e;
    }

    .preface-section,
    .study-dashboard {
        border: 1px solid #52675a;
        border-radius: 12px;
        background:
            linear-gradient(135deg, rgba(190, 218, 192, 0.38) 0 1px, transparent 1.5px) 9px 9px / 16px 16px no-repeat,
            linear-gradient(315deg, rgba(190, 218, 192, 0.28) 0 1px, transparent 1.5px) calc(100% - 9px) calc(100% - 9px) / 16px 16px no-repeat,
            linear-gradient(150deg, rgba(31, 47, 39, 0.98), rgba(17, 26, 25, 0.98));
        color: #dce5dc;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.06);
    }

    .preface-section summary,
    .preface-section .preface-title,
    .difficulty-scale summary { color: #d4e4d4; }

    .preface-box,
    .preface-section .preface-box {
        border-left-color: #82a88b;
        background: rgba(5, 12, 11, 0.32);
        color: #c4d0c7;
    }

    .preface-box strong,
    .study-dashboard h2 { color: #eef4ea; }

    .study-dashboard-heading p,
    .study-progress-text,
    .study-progress-label { color: #b6c4ba; }

    .resume-button,
    .install-button {
        border: 1px solid rgba(202, 228, 213, 0.2);
        background: linear-gradient(145deg, #385640, #243c30);
        color: #f1f5ed;
        box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.2);
    }

    .resume-button:hover,
    .install-button:hover { background: linear-gradient(145deg, #46694e, #2d4d3a); }

    #overallProgress { accent-color: #67b78d; }

    .modal {
        background:
            radial-gradient(ellipse at 50% 10%, rgba(61, 93, 69, 0.2), transparent 54%),
            rgba(3, 8, 8, 0.86);
        backdrop-filter: blur(5px);
    }

    .modal-content {
        border: 1px solid #5b7061;
        border-radius: 14px;
        background:
            linear-gradient(135deg, rgba(194, 219, 194, 0.34) 0 1px, transparent 1.5px) 10px 10px / 18px 18px no-repeat,
            linear-gradient(225deg, rgba(194, 219, 194, 0.26) 0 1px, transparent 1.5px) calc(100% - 10px) 10px / 18px 18px no-repeat,
            linear-gradient(45deg, rgba(194, 219, 194, 0.24) 0 1px, transparent 1.5px) 10px calc(100% - 10px) / 18px 18px no-repeat,
            linear-gradient(315deg, rgba(194, 219, 194, 0.22) 0 1px, transparent 1.5px) calc(100% - 10px) calc(100% - 10px) / 18px 18px no-repeat,
            linear-gradient(150deg, rgba(29, 43, 36, 0.99), rgba(14, 22, 22, 0.99) 68%);
        color: #dce5dd;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56), 0 0 0 4px rgba(7, 13, 11, 0.84), 0 0 0 6px rgba(143, 163, 147, 0.25), inset 0 0 0 4px rgba(4, 10, 9, 0.35);
    }

    .modal-content > h2 {
        border: 1px solid rgba(154, 183, 159, 0.28);
        border-left: 4px solid #b52e35;
        border-bottom: 1px solid rgba(154, 183, 159, 0.28);
        border-radius: 5px;
        background: linear-gradient(100deg, rgba(57, 78, 60, 0.62), rgba(19, 31, 29, 0.52));
        color: #edf2e8;
        text-shadow: 0 0 20px rgba(126, 201, 187, 0.1);
    }

    .modal-toolbar {
        border: 1px solid #667a69;
        border-bottom: 2px solid #a32b31;
        border-radius: 11px;
        background: linear-gradient(145deg, #263b30, #14221f);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.08);
    }

    .modal-toolbar > span {
        border: 1px solid rgba(255, 255, 255, 0.16);
        background: linear-gradient(145deg, #9f2930, #76232a);
    }

    .mod-body {
        color: #d2ddd4;
    }

    .mod-body strong,
    .section-title { color: #edf3e9; }

    .mod-body a:not(.doc-link),
    .mod-body .specialty-filter-message,
    .mod-body .resource-pending { color: #b4c6b7; }

    .modal-content > h2,
    .modal-toolbar,
    .dossier-item,
    .progress-container,
    .correction-gate,
    .dossier-recommendation,
    .difficulty-scale,
    .fiche-dossier-viewer,
    .fiche-dossier-admin,
    .study-dashboard,
    .preface-section {
        color-scheme: dark;
    }

    .dossier-item {
        border: 1px solid rgba(165, 190, 170, 0.16);
        border-left: 3px solid #a6373d;
        border-radius: 8px;
        background: linear-gradient(145deg, rgba(45, 59, 49, 0.82), rgba(24, 35, 32, 0.9));
        color: #e0e8df;
        box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 5px 14px rgba(0, 0, 0, 0.12);
    }

    .mod-body .dossier-item { box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 5px 14px rgba(0, 0, 0, 0.12); }

    .dossier-item.completed {
        border-left-color: #67b78d;
        background: linear-gradient(145deg, rgba(38, 73, 56, 0.92), rgba(22, 43, 35, 0.94));
        color: #d7eee0;
    }

    .dossier-tracking-controls { border-top-color: rgba(177, 201, 181, 0.18); }
    .dossier-tracking-field { color: #bdcbbf; }

    .progress-container {
        overflow: hidden;
        border: 1px solid rgba(173, 202, 180, 0.22);
        border-radius: 999px;
        background: #0c1412;
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.52);
    }

    .progress-bar {
        background: linear-gradient(90deg, #466d4a, #70bd83, #b5d17c) !important;
        box-shadow: 0 0 18px rgba(111, 204, 139, 0.32);
    }

    .progress-text { color: #f0f4e9; text-shadow: 0 1px 3px #101714; }

    .doc-link,
    .btn-link {
        border: 1px solid rgba(196, 224, 202, 0.2);
        border-radius: 6px;
        background: linear-gradient(145deg, #3c6348, #284532) !important;
        color: #f3f6ee;
        box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 4px 12px rgba(0, 0, 0, 0.18);
    }

    .doc-link:hover,
    .btn-link:hover {
        background: linear-gradient(145deg, #557a59, #35543c) !important;
        color: #fff;
    }

    .align-row { border-bottom-color: rgba(177, 201, 181, 0.18); }
    .row-text { color: #dce5dd; }
    .stars { color: #e7c56e; }

    .dossier-recommendation,
    .correction-gate,
    .fiche-dossier-viewer {
        border: 1px solid rgba(164, 192, 170, 0.22);
        border-left: 3px solid #83a98a;
        border-radius: 8px;
        background: rgba(9, 17, 15, 0.45);
        color: #d0ddd2;
    }

    .fiche-dossier-viewer label,
    .fiche-dossier-admin h3 { color: #e4ede3; }
    .difficulty-scale { color: #c3d0c6; }
    .difficulty-scale summary { color: #d4e4d4; }
    .fiche-dossier-admin { border-color: rgba(206, 177, 99, 0.42); background: rgba(59, 48, 27, 0.45); }
    .fiche-dossier-content { border: 1px solid rgba(177, 201, 181, 0.2); background: #101918; color: #dce5dd; }

    .mod-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .mod-body select,
    .mod-body textarea {
        border-color: rgba(176, 202, 183, 0.3);
        border-radius: 6px;
        background-color: #101a18;
        color: #edf3e9;
    }

    .mod-body input:focus-visible,
    .mod-body select:focus-visible,
    .mod-body textarea:focus-visible,
    .dossier-item input[type="checkbox"]:focus-visible,
    .dossier-item input[type="radio"]:focus-visible {
        outline: 2px solid #86d1c8;
        outline-offset: 2px;
    }

    .mod-body input[type="checkbox"],
    .mod-body input[type="radio"] { accent-color: #76c493; }
    .mod-body input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }
    .outil-redaction {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 0 0 12px;
        padding: 10px 12px;
        border: 1px solid rgba(165, 190, 170, 0.16);
        border-left: 3px solid #a6373d;
        border-radius: 8px;
        background: linear-gradient(145deg, rgba(45, 59, 49, 0.82), rgba(24, 35, 32, 0.9));
        color: #e0e8df;
        font-size: 0.95rem;
        text-align: left;
    }
    @media (min-width: 769px) {
        .outil-redaction {
            width: calc((100% - 12px) / 2);
        }
    }
    li.outil-redaction { list-style: none; }
    .outil-redaction > .doc-link {
        box-sizing: border-box;
        width: 5.2em;
        margin-left: auto;
        text-align: center;
    }
    .dossier-item > .annees-jury { display: flex; flex-wrap: wrap; gap: 6px; width: auto; }
    @media (max-width: 560px) {
        .dossier-item > .annees-jury { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
        .annees-jury .doc-link { text-align: center; }
        #modal-module1 .dossier-item:has(> .annees-jury) { flex-direction: column; align-items: flex-start !important; gap: 8px; }
    }

    #modal-module1 > .modal-content > div[style*="dashed"] {
        border-color: rgba(132, 170, 139, 0.55) !important;
        background: rgba(8, 15, 14, 0.42) !important;
        color: #edcf91;
    }

    #modal-module1 > .modal-content > div[style*="dashed"] label { color: #dce5dd !important; }

    #modal-module4 #correctionGateStatus { color: #ff9a91 !important; }

    @media (prefers-reduced-motion: no-preference) {
        .main-wrapper > header h1 { animation: anc-interface-arrive 0.6s ease-out both; }
        .study-dashboard,
        .preface-section { animation: anc-interface-arrive 0.45s ease-out both; }
    }

    @keyframes anc-interface-arrive {
        from { opacity: 0.72; transform: translateY(5px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 768px) {
        .main-wrapper > nav { position: relative; }
        .main-wrapper > header .brand-kicker { font-size: 0.58rem; letter-spacing: 0.12em; }
        .modal-content {
            border-radius: 12px;
            box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(7, 13, 11, 0.84), 0 0 0 4px rgba(143, 163, 147, 0.24);
        }
    }

    /* Colonnes alignées : étoiles puis bouton Ouvrir à largeur fixe */
    .mod-body .dossier-item > div:has(> .stars) {
        display: grid;
        grid-template-columns: 4.6em 5.2em;
        align-items: center;
        justify-content: end;
        column-gap: 10px;
        width: auto;
        flex-shrink: 0;
        margin-left: auto;
    }
    .mod-body .dossier-item > div:has(> .stars) > .stars {
        margin: 0;
        text-align: left;
        white-space: nowrap;
    }
    .mod-body .dossier-item > div:has(> .stars) > .doc-link {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        text-align: center;
        justify-self: stretch;
    }
    @media (max-width: 560px) {
        .outil-redaction > .doc-link { width: 4.6em; }
        .dossier-list .dossier-item.study-tracked-item {
            grid-template-columns: minmax(0, 1fr);
        }
        .mod-body .dossier-item > div:has(> .stars) {
            grid-template-columns: 4em 4.6em;
            column-gap: 8px;
            justify-self: end;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .main-wrapper > header h1,
        .study-dashboard,
        .preface-section { animation: none; }
    }

    @media (max-width: 768px) {
        .modal > .modal-toolbar {
            flex-wrap: nowrap;
            gap: 4px;
            padding: 8px;
        }

        .modal > .modal-toolbar > span,
        .modal > .modal-toolbar .module-nav-controls > button,
        .modal > .modal-toolbar > .auth-toolbar-logout {
            height: 44px;
            min-height: 0;
            font-size: 0.64rem;
            line-height: 1.1;
        }

        .modal > .modal-toolbar > span {
            order: 1;
            flex: 0 0 auto;
            padding: 4px 6px;
            letter-spacing: 0.03em;
        }

        .modal > .modal-toolbar > .module-nav-controls {
            order: 2;
            flex: 1 1 0;
            min-width: 0;
            gap: 3px;
        }

        .modal > .modal-toolbar .module-nav-controls > .modal-return-btn {
            flex: 1 1 0;
            min-width: 0;
            padding: 4px;
        }

        .modal > .modal-toolbar .module-nav-controls > .module-nav-button {
            flex: 0 0 26px;
            width: 26px;
            min-width: 26px;
            padding-inline: 0;
        }

        .modal > .modal-toolbar > .auth-toolbar-logout {
            order: 3;
            flex: 0 0 auto;
            margin: 0;
            padding: 4px 6px;
        }

        .modal-content > h2 {
            font-size: clamp(0.95rem, 3.8vw, 1.1rem);
            line-height: 1.3;
            overflow-wrap: anywhere;
            hyphens: auto;
        }

        .module-nav-button,
        .modal-return-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.2;
        }
    }

    @media (max-width: 560px) {
        .main-wrapper > nav ul {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        .main-wrapper > nav li {
            min-width: 0;
        }

        .main-wrapper > nav button {
            min-width: 0;
            min-height: 44px;
            padding: 8px 6px;
            text-align: center;
            font-size: clamp(0.72rem, 3.7vw, 0.88rem);
            line-height: 1.2;
            overflow-wrap: anywhere;
            hyphens: auto;
        }

        .modal-content > h2 {
            padding: 10px 12px;
            font-size: clamp(0.9rem, 4vw, 1.05rem);
        }
    }

    .adm-toolbar-toggle,
    .adm-views-toolbar-toggle,
    .adm-fiches-toolbar-signalements {
        text-transform: uppercase;
    }

    .module-nav-controls > button[hidden] {
        display: none;
    }
