:root {
            --bleu-klein: #003CDC;
            --bleu-profond: #000F41;
            --jaune: #FFC800;
            --blanc: #FFFFFF;
            --bleu-pale: #EDF2FA;
            --success: #16A34A;
            --error: #DC2626;
            --orange: #EA580C;
            --muted: #6B7280;
            --radius: 12px;
            --cream: #F7F9FF;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* Always reserve the page scrollbar's space so the centered layout never
           shifts/resizes when content height crosses the scroll threshold. */
        html {
            scrollbar-gutter: stable;
        }

        body {
            font-family: 'Open Sans', sans-serif;
            background: var(--cream);
            color: var(--bleu-profond);
            min-height: 100vh;
        }

        /* ── HEADER ── */
        .header {
            background: var(--bleu-profond);
            position: sticky;
            top: 0;
            z-index: 200;
            box-shadow: 0 2px 24px rgba(0, 15, 65, .4);
        }

        .header-inner {
            max-width: 1000px;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            align-items: stretch;
            justify-content: space-between;
        }

        .header-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 0;
        }

        .logo-mark {
            width: 32px;
            height: 32px;
            background: var(--bleu-klein);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .logo-mark::after {
            content: "I";
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 1.2rem;
            color: var(--blanc);
        }

        .logo-accent {
            width: 6px;
            height: 6px;
            background: var(--jaune);
            border-radius: 50%;
            position: absolute;
            bottom: 3px;
            right: 3px;
        }

        .logo-text {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 1rem;
            color: var(--blanc);
            letter-spacing: .05em;
        }

        .logo-text span {
            font-weight: 200;
            color: rgba(255, 255, 255, .6);
        }

        .header-module-label {
            flex: 1;
            text-align: center;
            font-size: .72rem;
            font-weight: 600;
            color: rgba(255, 255, 255, .55);
            letter-spacing: .04em;
            padding: 6px 12px;
            border: 1px solid rgba(255, 255, 255, .12);
            border-radius: 20px;
            background: rgba(255, 255, 255, .06);
            max-width: 260px;
            margin: auto;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .header-back {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: .72rem;
            font-weight: 700;
            color: rgba(255, 255, 255, .5);
            text-decoration: none;
            padding: 5px 12px;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, .12);
            background: rgba(255, 255, 255, .06);
            transition: all .2s;
            font-family: 'Open Sans', sans-serif;
        }

        .header-back:hover {
            color: rgba(255, 255, 255, .9);
            background: rgba(255, 255, 255, .12);
        }

        .header-admin {
            display: flex;
            align-items: center;
            font-size: .72rem;
            font-weight: 700;
            color: rgba(255, 200, 0, .85);
            text-decoration: none;
            padding: 5px 12px;
            border-radius: 20px;
            border: 1px solid rgba(255, 200, 0, .3);
            background: rgba(255, 200, 0, .1);
            transition: all .2s;
            font-family: 'Open Sans', sans-serif;
        }

        .header-admin:hover {
            background: rgba(255, 200, 0, .2);
            color: rgba(255, 200, 0, 1);
        }

        .xp-pill {
            background: rgba(255, 200, 0, .12);
            border: 1px solid rgba(255, 200, 0, .3);
            padding: 5px 14px;
            border-radius: 20px;
            font-size: .72rem;
            color: var(--jaune);
            font-weight: 700;
            transition: all .3s;
            font-family: 'Saira Extra Condensed', sans-serif;
            letter-spacing: .08em;
        }


        .progress-wrap {
            background: rgba(255, 255, 255, .08);
            height: 3px;
        }

        .progress-fill {
            height: 3px;
            background: linear-gradient(90deg, var(--bleu-klein), var(--jaune));
            transition: width .5s ease;
            width: 0%;
        }

        /* ── LAYOUT ── */
        .layout {
            max-width: 1000px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 204px 1fr;
            padding: 28px 20px;
            gap: 0;
            align-items: start;
        }

        .sidebar {
            position: sticky;
            top: 68px;
            padding-right: 18px;
        }

        .sidebar-label {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: .72rem;
            text-transform: uppercase;
            letter-spacing: .18em;
            color: var(--muted);
            margin-bottom: 12px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 11px;
            border-radius: 8px;
            cursor: pointer;
            transition: all .2s;
            margin-bottom: 3px;
            font-size: .76rem;
            color: var(--muted);
            border: 1px solid transparent;
            position: relative;
            font-family: 'Open Sans', sans-serif;
        }

        .nav-item.locked {
            cursor: not-allowed;
            opacity: .4;
        }

        .nav-item.locked::after {
            content: "🔒";
            position: absolute;
            right: 10px;
            font-size: .62rem;
        }

        .nav-item:not(.locked):hover {
            background: var(--blanc);
            color: var(--bleu-profond);
        }

        .nav-item.active {
            background: var(--blanc);
            color: var(--bleu-klein);
            font-weight: 700;
            border-color: #D0DCFF;
        }

        .nav-item.done {
            color: var(--success);
        }

        .nav-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #D0D8F0;
            flex-shrink: 0;
            transition: background .3s;
        }

        .nav-item.active .nav-dot {
            background: var(--jaune);
        }

        .nav-item.done .nav-dot {
            background: var(--success);
        }

        .main {
            min-width: 0;
            padding: 32px 40px;
        }

        .section-panel {
            display: none;
        }

        .section-panel.visible {
            display: block;
            animation: fadeSlide .38s ease;
        }

        @keyframes fadeSlide {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ── LOCK OVERLAY ── */
        .lock-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 15, 65, .8);
            z-index: 300;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
        }

        .lock-overlay.show {
            display: flex;
        }

        .lock-box {
            background: var(--blanc);
            border-radius: 16px;
            padding: 36px 40px;
            text-align: center;
            max-width: 380px;
            box-shadow: 0 20px 60px rgba(0, 15, 65, .3);
        }

        .lock-icon {
            font-size: 2.5rem;
            margin-bottom: 14px;
        }

        .lock-title {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 1.6rem;
            color: var(--bleu-profond);
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .lock-msg {
            font-size: .84rem;
            color: var(--muted);
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .lock-btn {
            background: var(--bleu-klein);
            color: var(--blanc);
            border: none;
            padding: 11px 28px;
            border-radius: 8px;
            cursor: pointer;
            font-size: .84rem;
            font-weight: 700;
            font-family: 'Open Sans', sans-serif;
        }

        /* ── MISSION BANNER ── */
        .mission-banner {
            background: linear-gradient(135deg, var(--bleu-profond), var(--bleu-klein));
            border-radius: var(--radius);
            padding: 0;
            margin-bottom: 20px;
            overflow: hidden;
            border: 1px solid rgba(0, 60, 220, .3);
        }

        .mission-top {
            padding: 20px 24px 16px;
        }

        .mission-tag {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .68rem;
            text-transform: uppercase;
            letter-spacing: .18em;
            color: var(--jaune);
            font-weight: 800;
            margin-bottom: 6px;
        }

        .mission-title {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 1.2rem;
            color: var(--blanc);
            margin-bottom: 6px;
            line-height: 1.25;
            text-transform: uppercase;
        }

        .mission-title span {
            font-weight: 200;
        }

        .mission-desc {
            color: rgba(255, 255, 255, .58);
            font-size: .78rem;
            line-height: 1.6;
        }

        .mission-steps {
            display: flex;
            border-top: 1px solid rgba(255, 255, 255, .1);
        }

        .mission-step {
            flex: 1;
            padding: 12px 16px;
            border-right: 1px solid rgba(255, 255, 255, .08);
            display: flex;
            align-items: center;
            gap: 9px;
        }

        .mission-step:last-child {
            border-right: none;
        }

        .ms-icon {
            font-size: 1.1rem;
            flex-shrink: 0;
        }

        .ms-text {
            font-size: .7rem;
            color: rgba(255, 255, 255, .5);
            line-height: 1.35;
        }

        .ms-text strong {
            color: rgba(255, 255, 255, .88);
            display: block;
            font-size: .72rem;
        }

        /* ── CONTENT BLOCKS ── */
        .cb {
            background: var(--blanc);
            border-radius: var(--radius);
            padding: 26px;
            margin-bottom: 18px;
            border: 1px solid #D8E2FF;
        }

        .sh {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 1.5rem;
            color: var(--bleu-profond);
            margin-bottom: 13px;
            text-transform: uppercase;
        }

        .sh span {
            font-weight: 200;
        }

        .si {
            font-size: .88rem;
            line-height: 1.75;
            color: #374151;
            margin-bottom: 16px;
        }

        .hbox {
            background: linear-gradient(135deg, #EDF2FA, #E3EDFF);
            border-left: 4px solid var(--bleu-klein);
            border-radius: 0 8px 8px 0;
            padding: 13px 17px;
            margin: 16px 0;
            font-size: .84rem;
            line-height: 1.65;
            color: var(--bleu-profond);
        }

        .hbox strong {
            color: var(--bleu-klein);
        }

        .ibox {
            background: #EDF2FA;
            border: 1px solid #C5D6FF;
            border-radius: 8px;
            padding: 13px 17px;
            margin: 16px 0;
            font-size: .84rem;
            line-height: 1.65;
            color: var(--bleu-profond);
        }

        .wbox {
            background: #FEF2F2;
            border: 1px solid #FECACA;
            border-radius: 8px;
            padding: 13px 17px;
            margin: 16px 0;
            font-size: .84rem;
            line-height: 1.65;
            color: #991B1B;
        }

        .ablock {
            background: var(--bleu-profond);
            border-radius: var(--radius);
            padding: 20px 24px;
            margin: 16px 0;
            border-left: 4px solid var(--jaune);
        }

        .alabel {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            text-transform: uppercase;
            letter-spacing: .15em;
            color: var(--jaune);
            font-weight: 800;
            margin-bottom: 7px;
        }

        .atext {
            font-size: .88rem;
            line-height: 1.7;
            color: rgba(255, 255, 255, .85);
            font-style: italic;
        }

        .divider {
            height: 2px;
            background: linear-gradient(90deg, var(--bleu-klein), transparent);
            margin: 20px 0;
            opacity: .25;
        }

        .steps {
            display: flex;
            flex-direction: column;
            gap: 13px;
            margin: 16px 0;
        }

        .step {
            display: flex;
            gap: 13px;
        }

        .snum {
            width: 28px;
            height: 28px;
            background: var(--bleu-klein);
            color: var(--blanc);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: .75rem;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .sc h4 {
            font-size: .84rem;
            font-weight: 700;
            color: var(--bleu-profond);
            margin-bottom: 2px;
        }

        .sc p {
            font-size: .78rem;
            color: #555;
            line-height: 1.45;
        }

        /* ── SCENARIO CARDS ── */
        .scenario-intro {
            background: var(--blanc);
            border-radius: var(--radius);
            padding: 24px;
            margin-bottom: 18px;
            border: 1px solid #D8E2FF;
        }

        .scenario-chat {
            background: var(--bleu-profond);
            border-radius: var(--radius);
            padding: 20px 22px;
            margin: 16px 0;
        }

        .chat-msg {
            display: flex;
            gap: 10px;
            margin-bottom: 14px;
        }

        .chat-msg:last-child {
            margin-bottom: 0;
        }

        .chat-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .8rem;
            flex-shrink: 0;
        }

        .avatar-manager {
            background: var(--jaune);
        }

        .avatar-user {
            background: var(--bleu-klein);
        }

        .chat-bubble {
            background: rgba(255, 255, 255, .08);
            border-radius: 0 10px 10px 10px;
            padding: 10px 14px;
            font-size: .8rem;
            color: rgba(255, 255, 255, .85);
            line-height: 1.55;
            max-width: 380px;
        }

        .chat-bubble.user {
            background: rgba(0, 60, 220, .35);
            border-radius: 10px 0 10px 10px;
        }

        .chat-name {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            font-weight: 800;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: .06em;
        }

        .chat-name.manager {
            color: var(--jaune);
        }

        .chat-name.user {
            color: rgba(150, 180, 255, .9);
        }

        /* ── TIMELINE ── */
        .timeline {
            margin: 16px 0;
        }

        .titem {
            display: flex;
            gap: 13px;
            margin-bottom: 16px;
        }

        .tleft {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .tdot {
            width: 32px;
            height: 32px;
            background: var(--bleu-klein);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .7rem;
            font-weight: 800;
            color: var(--blanc);
            flex-shrink: 0;
        }

        .tline {
            width: 2px;
            flex: 1;
            background: linear-gradient(180deg, var(--bleu-klein), #D8E2FF);
            min-height: 16px;
            margin-top: 3px;
        }

        .tc h4 {
            font-size: .84rem;
            font-weight: 700;
            color: var(--bleu-profond);
            margin-bottom: 2px;
            padding-top: 4px;
        }

        .tc p {
            font-size: .76rem;
            color: #555;
            line-height: 1.45;
        }

        /* ── TABLE ── */
        .ctable {
            width: 100%;
            border-collapse: collapse;
            margin: 16px 0;
            font-size: .8rem;
        }

        .ctable th {
            background: var(--bleu-profond);
            color: var(--blanc);
            padding: 10px 13px;
            text-align: left;
            font-weight: 700;
            font-size: .75rem;
        }

        .ctable th:first-child {
            border-radius: 8px 0 0 0;
        }

        .ctable th:last-child {
            border-radius: 0 8px 0 0;
        }

        .ctable td {
            padding: 9px 13px;
            border-bottom: 1px solid #EDF2FA;
            color: #374151;
            line-height: 1.45;
        }

        .ctable tr:nth-child(even) td {
            background: #F7FAFE;
        }

        .tag {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 20px;
            font-size: .66rem;
            font-weight: 700;
        }

        .tn {
            background: var(--bleu-profond);
            color: var(--blanc);
        }

        .tg {
            background: #EDF2FA;
            color: var(--bleu-klein);
        }

        .tgr {
            background: #DCFCE7;
            color: #15803D;
        }

        .tr {
            background: #FEE2E2;
            color: #991B1B;
        }

        .tp {
            background: #EDE9FE;
            color: #5B21B6;
        }

        /* ── CAN/CANT ── */
        .cancant {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 13px;
            margin: 16px 0;
        }

        .canbox {
            background: #F0FDF4;
            border: 1px solid #BBF7D0;
            border-radius: 8px;
            padding: 16px;
        }

        .cantbox {
            background: #FEF2F2;
            border: 1px solid #FECACA;
            border-radius: 8px;
            padding: 16px;
        }

        .canbox h4 {
            color: #15803D;
            margin-bottom: 9px;
            font-size: .8rem;
            font-weight: 700;
        }

        .cantbox h4 {
            color: #DC2626;
            margin-bottom: 9px;
            font-size: .8rem;
            font-weight: 700;
        }

        .cancant ul {
            list-style: none;
        }

        .cancant li {
            font-size: .76rem;
            color: #374151;
            padding: 3px 0 3px 15px;
            position: relative;
            line-height: 1.4;
        }

        .canbox li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: #16A34A;
            font-weight: 700;
        }

        .cantbox li::before {
            content: "✗";
            position: absolute;
            left: 0;
            color: #DC2626;
            font-weight: 700;
        }

        /* ── COMPARISON CARDS (3 colonnes) — ex: prompt / projet / skill ── */
        .svp-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 11px;
            margin: 16px 0;
        }

        .svp-card {
            background: var(--blanc);
            border: 1.5px solid #D8E2FF;
            border-radius: 10px;
            padding: 16px 15px;
        }

        .svp-card.accent {
            border-color: var(--bleu-klein);
            border-width: 2px;
        }

        .svp-icon {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            background: var(--bleu-pale);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            margin-bottom: 9px;
        }

        .svp-card.accent .svp-icon {
            background: var(--bleu-klein);
        }

        .svp-name {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: .95rem;
            color: var(--bleu-profond);
            text-transform: uppercase;
            margin-bottom: 5px;
        }

        .svp-card.accent .svp-name {
            color: var(--bleu-klein);
        }

        .svp-desc {
            font-size: .74rem;
            color: #555;
            line-height: 1.5;
            margin-bottom: 8px;
        }

        .svp-tag {
            font-size: .64rem;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            letter-spacing: .05em;
            text-transform: uppercase;
            padding: 2px 8px;
            border-radius: 10px;
            background: var(--bleu-pale);
            color: var(--bleu-klein);
            display: inline-block;
        }

        /* ── CODE / FILE VIEWER — ex: aperçu d'un fichier (SKILL.md, prompt à copier) ── */
        .skillfile {
            background: var(--bleu-profond);
            border-radius: 10px;
            overflow: hidden;
            margin: 16px 0;
            border: 1px solid rgba(0, 60, 220, .35);
        }

        .skillfile-bar {
            background: rgba(0, 0, 0, .3);
            padding: 8px 14px;
            display: flex;
            align-items: center;
            gap: 7px;
        }

        .skillfile-bar .sim-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
        }

        .skillfile-name {
            color: rgba(255, 255, 255, .5);
            font-size: .7rem;
            margin-left: 6px;
            font-family: 'Saira Extra Condensed', sans-serif;
            letter-spacing: .04em;
        }

        .skillfile pre {
            margin: 0;
            padding: 16px 18px;
            font-family: 'Courier New', monospace;
            font-size: .74rem;
            line-height: 1.7;
            color: rgba(255, 255, 255, .82);
            overflow-x: auto;
            white-space: pre-wrap;
        }

        .skillfile .yaml-key {
            color: var(--jaune);
            font-weight: 700;
        }

        .skillfile .yaml-frontmatter {
            color: rgba(150, 180, 255, .85);
        }

        .skillfile .md-h {
            color: #FFFFFF;
            font-weight: 700;
        }

        .skillfile .md-comment {
            color: rgba(255, 255, 255, .4);
            font-style: italic;
        }

        /* ── WORKFLOW / BEFORE-AFTER STEPS — ex: bilan avant/après ── */
        .workflow-step {
            display: flex;
            gap: 14px;
            margin-bottom: 14px;
            background: var(--blanc);
            border: 1.5px solid #D8E2FF;
            border-radius: 10px;
            padding: 15px 18px;
            align-items: flex-start;
        }

        .ws-num {
            width: 32px;
            height: 32px;
            background: var(--bleu-klein);
            color: var(--blanc);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .8rem;
            font-weight: 800;
            flex-shrink: 0;
            margin-top: 1px;
        }

        .ws-body h4 {
            font-size: .84rem;
            font-weight: 700;
            color: var(--bleu-profond);
            margin-bottom: 3px;
        }

        .ws-body p {
            font-size: .76rem;
            color: #555;
            line-height: 1.45;
        }

        .ws-tool {
            font-size: .65rem;
            background: var(--bleu-pale);
            color: var(--bleu-klein);
            padding: 2px 8px;
            border-radius: 12px;
            font-weight: 700;
            margin-top: 5px;
            display: inline-block;
            font-family: 'Saira Extra Condensed', sans-serif;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        /* ════════════════════════════════════════════════════════════════
           Patterns de contenu portés depuis les modules statiques 2/3/4.
           Authored inside `text` blocks (cf. docs/BLOCK_DOM_REFERENCE.md).
           ════════════════════════════════════════════════════════════════ */

        /* ── HERO D'INTRO (module 2) ── */
        .module-hero { background: var(--bleu-profond); border-radius: var(--radius); padding: 32px 36px; margin-bottom: 24px; position: relative; overflow: hidden; }
        .module-hero::before { content: ""; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255, 200, 0, .12) 0%, transparent 70%); border-radius: 50%; }
        .module-hero::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--bleu-klein), var(--jaune)); }
        /* scoped under .module-hero — portal.css also defines .module-title/.module-desc
           for home-page cards and loads after shared.css, so unscoped rules would lose */
        .module-hero .module-tag { font-family: 'Saira Extra Condensed', sans-serif; font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; color: var(--jaune); font-weight: 800; margin-bottom: 8px; }
        .module-hero .module-title { font-family: 'Saira Extra Condensed', sans-serif; font-weight: 800; font-size: 2.1rem; color: var(--blanc); line-height: 1.1; margin-bottom: 12px; text-transform: uppercase; }
        .module-hero .module-title span { font-weight: 200; }
        .module-hero .module-desc { color: rgba(255, 255, 255, .62); font-size: .88rem; line-height: 1.65; max-width: 480px; }
        .module-hero .module-meta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

        /* ── PILLS DE HERO (modules 2 & 3) ── */
        .meta-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
        .meta-pill { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); padding: 5px 13px; border-radius: 20px; font-size: .72rem; color: rgba(255, 255, 255, .7); }
        .meta-pill.accent { border-color: rgba(255, 200, 0, .4); color: var(--jaune); background: rgba(255, 200, 0, .08); }

        /* ── ENCART SUCCÈS (module 2) ── */
        .sbox { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; padding: 13px 17px; margin: 16px 0; font-size: .84rem; line-height: 1.65; color: #166534; }

        /* ── CARTES COMPARATIVES AVEC LOGO (module 2) ── */
        .vs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
        .vs-card { border-radius: 10px; padding: 18px; border: 1.5px solid #D8E2FF; text-align: center; background: var(--blanc); }
        .vs-card.highlight { border-color: var(--bleu-klein); background: linear-gradient(135deg, #EDF2FA, #E3EDFF); }
        .vs-logo { font-size: 1.6rem; margin-bottom: 8px; }
        .vs-name { font-family: 'Saira Extra Condensed', sans-serif; font-weight: 800; font-size: .96rem; color: var(--bleu-profond); margin-bottom: 4px; text-transform: uppercase; }
        .vs-company { font-size: .68rem; color: var(--muted); margin-bottom: 10px; }
        .vs-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
        .vs-tag { padding: 2px 8px; border-radius: 20px; font-size: .65rem; font-weight: 600; background: #EDF2FA; color: var(--bleu-profond); }
        .vs-card.highlight .vs-tag { background: rgba(0, 60, 220, .12); color: var(--bleu-klein); }
        .vs-badge { display: inline-block; background: var(--bleu-klein); color: var(--blanc); font-size: .62rem; font-weight: 700; padding: 2px 10px; border-radius: 20px; margin-bottom: 8px; font-family: 'Saira Extra Condensed', sans-serif; letter-spacing: .06em; }

        /* ── ÉTAPES D'INSTALLATION (module 2) ── */
        .install-steps { display: flex; flex-direction: column; gap: 0; margin: 16px 0; }
        .install-step { display: flex; gap: 0; position: relative; }
        .install-step:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 38px; width: 2px; height: calc(100% - 10px); background: linear-gradient(180deg, var(--bleu-klein), #D8E2FF); }
        .install-num { width: 38px; height: 38px; background: var(--bleu-klein); color: var(--blanc); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Saira Extra Condensed', sans-serif; font-weight: 800; font-size: .9rem; flex-shrink: 0; margin-right: 16px; margin-bottom: 20px; z-index: 1; }
        .install-content { flex: 1; padding-bottom: 20px; }
        .install-content h4 { font-size: .88rem; font-weight: 700; color: var(--bleu-profond); margin-bottom: 4px; }
        .install-content p { font-size: .8rem; color: #555; line-height: 1.5; margin-bottom: 8px; }
        .install-tip { background: #EDF2FA; border: 1px solid #C5D6FF; border-radius: 6px; padding: 8px 12px; font-size: .75rem; color: var(--bleu-profond); line-height: 1.4; }
        .install-url { display: inline-flex; align-items: center; gap: 6px; background: var(--bleu-profond); color: var(--blanc); padding: 6px 14px; border-radius: 6px; font-size: .76rem; font-weight: 700; text-decoration: none; margin-bottom: 8px; }

        /* ── MAQUETTE D'INTERFACE (module 2) ── */
        .interface-mock { background: #1E293B; border-radius: 12px; overflow: hidden; margin: 16px 0; border: 1px solid rgba(255, 255, 255, .1); }
        .mock-topbar { background: #0F172A; padding: 10px 16px; display: flex; align-items: center; gap: 8px; }
        .mock-dot { width: 10px; height: 10px; border-radius: 50%; }
        .mock-dot-r { background: #FF5F57; }
        .mock-dot-y { background: #FEBC2E; }
        .mock-dot-g { background: #28C840; }
        .mock-url { background: rgba(255, 255, 255, .06); border-radius: 4px; padding: 3px 12px; font-size: .7rem; color: rgba(255, 255, 255, .35); flex: 1; text-align: center; }
        .mock-body { display: grid; grid-template-columns: 220px 1fr; min-height: 280px; }
        .mock-sidebar { background: #171E2E; padding: 14px; border-right: 1px solid rgba(255, 255, 255, .06); }
        .mock-sidebar-label { font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .28); margin-bottom: 10px; font-weight: 700; }
        .mock-new-btn { background: rgba(0, 60, 220, .2); border: 1px solid rgba(0, 60, 220, .4); border-radius: 6px; padding: 7px 12px; font-size: .72rem; color: rgba(100, 150, 255, .9); font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }
        .mock-proj-section { margin-top: 14px; }
        .mock-conv-item { font-size: .72rem; color: rgba(255, 255, 255, .45); padding: 6px 8px; border-radius: 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .mock-conv-item.active { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .8); }
        .mock-main { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
        .mock-chat-area { flex: 1; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
        .mock-msg-claude { background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 10px 13px; font-size: .74rem; color: rgba(255, 255, 255, .75); line-height: 1.5; max-width: 85%; }
        .mock-msg-user { background: rgba(0, 60, 220, .35); border-radius: 8px; padding: 10px 13px; font-size: .74rem; color: rgba(255, 255, 255, .88); line-height: 1.5; max-width: 75%; align-self: flex-end; }
        .mock-input-bar { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
        .mock-input-placeholder { font-size: .72rem; color: rgba(255, 255, 255, .22); }
        .mock-input-icons { display: flex; gap: 8px; align-items: center; }
        .mock-icon { width: 22px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, .07); display: flex; align-items: center; justify-content: center; font-size: .7rem; }

        /* ── PROMPT BUILDER (module 2) ── */
        .prompt-builder { background: #EDF2FA; border: 2px solid #C5D6FF; border-radius: 12px; padding: 22px; margin: 16px 0; }
        .pb-label { font-family: 'Saira Extra Condensed', sans-serif; font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: var(--bleu-klein); font-weight: 800; margin-bottom: 12px; }
        .pb-parts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
        .pb-part { display: flex; flex-direction: column; gap: 4px; }
        .pb-part label { font-family: 'Saira Extra Condensed', sans-serif; font-size: .72rem; font-weight: 800; color: var(--bleu-klein); text-transform: uppercase; letter-spacing: .08em; }
        .pb-part textarea { background: var(--blanc); border: 1.5px solid #C5D6FF; border-radius: 7px; padding: 9px 12px; font-size: .8rem; font-family: 'Open Sans', sans-serif; color: var(--bleu-profond); resize: none; outline: none; transition: border-color .2s; }
        .pb-part textarea:focus { border-color: var(--bleu-klein); }
        .pb-preview { background: var(--bleu-profond); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
        .pb-preview-label { font-family: 'Saira Extra Condensed', sans-serif; font-size: .6rem; text-transform: uppercase; letter-spacing: .14em; color: var(--jaune); font-weight: 800; margin-bottom: 7px; }
        .pb-preview-text { font-size: .8rem; color: rgba(255, 255, 255, .85); line-height: 1.6; font-style: italic; min-height: 40px; }
        .pb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

        /* ── CARTES DE FRAMEWORK — TAP / PASTA / CRISP (module 3) ── */
        .fw-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 18px 0; }
        .fw-card { border-radius: var(--radius); padding: 20px; border: 2px solid #D8E2FF; background: var(--blanc); position: relative; overflow: hidden; }
        .fw-card.tap { border-color: #003CDC; background: linear-gradient(135deg, #EDF2FA, #fff); }
        .fw-card.pasta { border-color: #7C3AED; background: linear-gradient(135deg, #F5F3FF, #fff); }
        .fw-card.crisp { border-color: #0891B2; background: linear-gradient(135deg, #ECFEFF, #fff); }
        .fw-icon { font-size: 1.6rem; margin-bottom: 8px; }
        .fw-name { font-family: 'Saira Extra Condensed', sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--bleu-profond); text-transform: uppercase; margin-bottom: 2px; }
        .fw-sub { font-size: .7rem; color: var(--muted); margin-bottom: 10px; font-style: italic; }
        .fw-letters { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
        .fw-letter { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: #374151; }
        .fw-letter strong { font-family: 'Saira Extra Condensed', sans-serif; font-weight: 800; font-size: .85rem; min-width: 14px; }
        .fw-when { font-size: .72rem; color: var(--muted); border-top: 1px solid #EDF2FA; padding-top: 8px; margin-top: 6px; line-height: 1.45; }

        /* ── BLOCS D'EXERCICE (module 3) ── */
        .exo-block { background: var(--blanc); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; border: 2px solid #C5D6FF; }
        .exo-tag { font-family: 'Saira Extra Condensed', sans-serif; font-size: .65rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
        .exo-tag.fun { color: #D97706; }
        .exo-tag.pro { color: var(--bleu-klein); }
        .exo-situation { background: linear-gradient(135deg, #EDF2FA, #E3EDFF); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
        .exo-sit-label { font-family: 'Saira Extra Condensed', sans-serif; font-size: .65rem; font-weight: 800; color: var(--bleu-klein); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
        .exo-sit-text { font-size: .88rem; color: var(--bleu-profond); line-height: 1.6; font-weight: 600; }
        .exo-consigne { font-size: .82rem; color: #374151; line-height: 1.6; margin-bottom: 14px; }
        .exo-objective { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 8px; padding: 10px 14px; font-size: .8rem; color: #92400E; margin-bottom: 14px; line-height: 1.5; }

        /* ── PANNEAU « CE QUE VOUS VENEZ D'APPRENDRE » (module 3) ── */
        .reveal-tech { background: linear-gradient(135deg, var(--bleu-profond), #001a7a); border-radius: var(--radius); padding: 18px 22px; margin-top: 14px; border: 1px solid rgba(255, 200, 0, .2); display: none; }
        .reveal-tech.show { display: block; animation: fadeSlide .3s ease; }
        .rt-label { font-family: 'Saira Extra Condensed', sans-serif; font-size: .65rem; text-transform: uppercase; letter-spacing: .15em; color: var(--jaune); font-weight: 800; margin-bottom: 8px; }
        .rt-title { font-size: .88rem; font-weight: 700; color: var(--blanc); margin-bottom: 6px; }
        .rt-desc { font-size: .8rem; color: rgba(255, 255, 255, .72); line-height: 1.6; }

        /* ── MOCK DE DOCUMENT (module 3) — remplace un iframe PDF ── */
        .pdf-viewer { width: 100%; height: 400px; border: 1px solid #C5D6FF; border-radius: 10px; overflow: hidden; margin: 14px 0; }

        /* ── CARTES MINDMAP (module 4) ── */
        .mindmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
        .mm-card { background: var(--blanc); border: 1.5px solid #D8E2FF; border-radius: 10px; padding: 14px 16px; }
        .mm-card.highlight { border-color: var(--bleu-klein); background: linear-gradient(135deg, #EDF2FA, #E3EDFF); }
        .mm-icon { font-size: 1.4rem; margin-bottom: 6px; }
        .mm-title { font-family: 'Saira Extra Condensed', sans-serif; font-weight: 700; font-size: .95rem; color: var(--bleu-profond); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
        .mm-desc { font-size: .78rem; color: var(--muted); line-height: 1.55; }

        /* ── Responsive pour les patterns portés ── */
        @media (max-width: 720px) {
            .vs-grid { grid-template-columns: 1fr; }
            .mock-body { grid-template-columns: 1fr; }
            .mock-sidebar { display: none; }
            .fw-grid { grid-template-columns: 1fr; }
            .mindmap-grid { grid-template-columns: 1fr; }
        }

        /* ── FLIP CARDS ── */
        .flip-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: 1fr;   /* all rows equal height → uniform cards regardless of text length */
            gap: 11px;
            margin: 16px 0;
        }

        .flip-card {
            perspective: 600px;
            cursor: pointer;
        }

        .flip-inner {
            display: grid;
            width: 100%;
            height: 100%;   /* fill the (now equal-height) card so both faces match */
            transform-style: preserve-3d;
            transition: transform .45s ease;
        }

        .flip-card.flipped .flip-inner {
            transform: rotateY(180deg);
        }

        .flip-front,
        .flip-back {
            grid-area: 1 / 1;
            border-radius: 10px;
            backface-visibility: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 14px 12px;
            text-align: center;
        }

        .flip-front {
            background: var(--bleu-profond);
            border: 1px solid rgba(0, 60, 220, .35);
        }

        .fft {
            color: var(--jaune);
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: .9rem;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: .04em;
        }

        .ffh {
            color: rgba(255, 255, 255, .3);
            font-size: .62rem;
        }

        .flip-back {
            background: var(--blanc);
            border: 2px solid var(--bleu-klein);
            transform: rotateY(180deg);
        }

        .fbt {
            color: var(--bleu-klein);
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: .78rem;
            margin-bottom: 4px;
            text-transform: uppercase;
        }

        .fbd {
            color: #374151;
            font-size: .69rem;
            line-height: 1.4;
        }

        /* ── VRAI/FAUX ── */
        .vf-list {
            display: flex;
            flex-direction: column;
            gap: 9px;
            margin: 16px 0;
        }

        .vf-item {
            background: var(--bleu-pale);
            border: 1.5px solid #C5D6FF;
            border-radius: 10px;
            padding: 15px 17px;
        }

        .vf-stmt {
            font-size: .85rem;
            font-weight: 700;
            color: var(--bleu-profond);
            margin-bottom: 10px;
            line-height: 1.45;
        }

        .vf-btns {
            display: flex;
            gap: 7px;
        }

        .vfbtn {
            padding: 6px 18px;
            border-radius: 6px;
            border: 1.5px solid #C5D6FF;
            cursor: pointer;
            font-size: .76rem;
            font-weight: 700;
            background: var(--blanc);
            transition: all .2s;
            font-family: 'Open Sans', sans-serif;
        }

        .vfbtn:hover:not(:disabled) {
            transform: translateY(-1px);
        }

        .vfbtn.vrai:hover:not(:disabled) {
            border-color: var(--success);
            color: var(--success);
        }

        .vfbtn.faux:hover:not(:disabled) {
            border-color: var(--error);
            color: var(--error);
        }

        .vfbtn.sel-ok {
            background: #F0FDF4;
            border-color: var(--success);
            color: var(--success);
        }

        .vfbtn.sel-ko {
            background: #FEF2F2;
            border-color: var(--error);
            color: var(--error);
        }

        .vfbtn.rev-ok {
            background: #F0FDF4;
            border-color: var(--success);
            color: var(--success);
        }

        .vfbtn:disabled {
            cursor: default;
            transform: none !important;
        }

        .vf-exp {
            margin-top: 9px;
            font-size: .76rem;
            color: #374151;
            line-height: 1.5;
            display: none;
            padding: 8px 11px;
            background: var(--blanc);
            border-radius: 6px;
            border: 1px solid #D8E2FF;
        }

        .vf-exp.show {
            display: block;
        }

        /* ── BRANCH ── */
        .branch-scene {
            background: var(--blanc);
            border-radius: var(--radius);
            padding: 24px;
            margin-bottom: 18px;
            border: 2px solid #C5D6FF;
        }

        .branch-tag {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            text-transform: uppercase;
            letter-spacing: .15em;
            color: var(--bleu-klein);
            font-weight: 800;
            margin-bottom: 10px;
        }

        .branch-situation {
            background: linear-gradient(135deg, #EDF2FA, #E3EDFF);
            border-radius: 10px;
            padding: 16px 18px;
            margin-bottom: 18px;
        }

        .branch-sit-label {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            font-weight: 800;
            color: var(--bleu-klein);
            text-transform: uppercase;
            letter-spacing: .08em;
            margin-bottom: 6px;
        }

        .branch-sit-text {
            font-size: .88rem;
            color: var(--bleu-profond);
            line-height: 1.6;
            font-weight: 600;
        }

        .branch-q {
            font-size: .9rem;
            font-weight: 700;
            color: var(--bleu-profond);
            margin-bottom: 14px;
        }

        .branch-choices {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .branch-choice {
            padding: 13px 16px;
            border: 1.5px solid #C5D6FF;
            border-radius: 9px;
            cursor: pointer;
            transition: all .2s;
            background: var(--blanc);
            font-size: .83rem;
            color: #374151;
            text-align: left;
            font-family: 'Open Sans', sans-serif;
            line-height: 1.45;
        }

        .branch-choice:hover:not(:disabled) {
            border-color: var(--bleu-klein);
            background: #EDF2FA;
            transform: translateX(3px);
        }

        .branch-choice:disabled {
            cursor: default;
            transform: none !important;
        }

        .branch-choice.chosen-ok {
            border-color: var(--success);
            background: #F0FDF4;
            color: #15803D;
            font-weight: 700;
        }

        .branch-choice.chosen-ko {
            border-color: var(--error);
            background: #FEF2F2;
            color: #991B1B;
        }

        .branch-choice.reveal-ok {
            border-color: var(--success);
            background: #F0FDF4;
            color: #15803D;
        }

        .branch-consequence {
            margin-top: 14px;
            padding: 14px 16px;
            border-radius: 9px;
            font-size: .82rem;
            line-height: 1.6;
            display: none;
        }

        .branch-consequence.ok {
            background: #F0FDF4;
            border: 1px solid #BBF7D0;
            color: #166534;
            display: block;
        }

        .branch-consequence.ko {
            background: #FEF2F2;
            border: 1px solid #FECACA;
            color: #991B1B;
            display: block;
        }

        .consequence-title {
            font-weight: 700;
            margin-bottom: 4px;
        }

        /* ── SIMULATOR ── */
        .sim-wrapper {
            background: var(--bleu-profond);
            border-radius: var(--radius);
            overflow: hidden;
            margin: 16px 0;
            border: 1px solid rgba(0, 60, 220, .35);
        }

        .sim-topbar {
            background: rgba(0, 0, 0, .3);
            padding: 10px 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sim-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .sim-dot-r {
            background: #FF5F57;
        }

        .sim-dot-y {
            background: #FEBC2E;
        }

        .sim-dot-g {
            background: #28C840;
        }

        .sim-title {
            color: rgba(255, 255, 255, .45);
            font-size: .72rem;
            margin-left: 6px;
        }

        .sim-body {
            padding: 16px;
        }

        .sim-context {
            background: rgba(255, 255, 255, .05);
            border-radius: 8px;
            padding: 12px 14px;
            margin-bottom: 14px;
            font-size: .76rem;
            color: rgba(255, 255, 255, .5);
            line-height: 1.5;
            border: 1px solid rgba(255, 255, 255, .07);
        }

        .sim-context strong {
            color: rgba(255, 255, 255, .78);
            display: block;
            margin-bottom: 4px;
            font-size: .7rem;
            text-transform: uppercase;
            letter-spacing: .08em;
            font-family: 'Saira Extra Condensed', sans-serif;
        }

        .sim-messages {
            min-height: 80px;
            margin-bottom: 12px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .sim-msg-user {
            align-self: flex-end;
            background: rgba(0, 60, 220, .45);
            border-radius: 12px 12px 2px 12px;
            padding: 10px 14px;
            font-size: .8rem;
            color: rgba(255, 255, 255, .9);
            max-width: 85%;
            line-height: 1.5;
        }

        .sim-msg-claude {
            align-self: flex-start;
            background: rgba(255, 255, 255, .08);
            border-radius: 12px 12px 12px 2px;
            padding: 10px 14px;
            font-size: .8rem;
            color: rgba(255, 255, 255, .85);
            max-width: 90%;
            line-height: 1.6;
        }

        .claude-label {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            color: var(--jaune);
            font-weight: 800;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 5px;
            text-transform: uppercase;
            letter-spacing: .08em;
        }

        /* Bulle d'évaluation du prompt (PromptBuilder). Sans cette règle, le corps du
           texte hérite d'une couleur sombre invisible sur le fond foncé : seuls les
           <strong> (blancs) restaient lisibles. */
        .sim-validation {
            margin-top: 10px;
            padding: 12px 14px;
            border-radius: 8px;
            font-size: .8rem;
            line-height: 1.55;
            border-left: 3px solid var(--bleu-klein);
            background: rgba(255, 255, 255, .06);
            color: rgba(255, 255, 255, .82);
        }

        .sim-validation .val-label {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            text-transform: uppercase;
            letter-spacing: .1em;
            color: var(--jaune);
            font-weight: 800;
            margin-bottom: 5px;
        }

        .sim-input-area {
            display: flex;
            gap: 8px;
            align-items: flex-end;
        }

        .sim-textarea {
            flex: 1;
            background: rgba(255, 255, 255, .07);
            border: 1px solid rgba(255, 255, 255, .14);
            border-radius: 8px;
            padding: 10px 13px;
            color: var(--blanc);
            font-size: .8rem;
            font-family: 'Open Sans', sans-serif;
            resize: none;
            min-height: 44px;
            max-height: 120px;
            line-height: 1.5;
            outline: none;
            transition: border-color .2s;
        }

        .sim-textarea::placeholder {
            color: rgba(255, 255, 255, .28);
        }

        .sim-textarea:focus {
            border-color: rgba(0, 60, 220, .6);
        }

        .sim-send {
            background: var(--bleu-klein);
            color: var(--blanc);
            border: none;
            padding: 10px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            font-size: .8rem;
            font-family: 'Open Sans', sans-serif;
            transition: all .2s;
        }

        .sim-send:hover:not(:disabled) {
            background: #1a4fe0;
        }

        .sim-send:disabled {
            opacity: .4;
            cursor: default;
        }

        .sim-hint {
            font-size: .72rem;
            color: rgba(255, 255, 255, .32);
            margin-top: 8px;
            line-height: 1.5;
        }

        .typing-dots {
            display: inline-flex;
            gap: 3px;
            align-items: center;
        }

        .typing-dots span {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .5);
            animation: typing 1.2s infinite;
        }

        .typing-dots span:nth-child(2) {
            animation-delay: .2s;
        }

        .typing-dots span:nth-child(3) {
            animation-delay: .4s;
        }

        @keyframes typing {

            0%,
            60%,
            100% {
                transform: translateY(0);
            }

            30% {
                transform: translateY(-5px);
            }
        }

        .sim-feedback {
            margin-top: 10px;
            padding: 11px 14px;
            border-radius: 8px;
            font-size: .8rem;
            line-height: 1.55;
            display: none;
            background: #F0FDF4;
            border: 1px solid #BBF7D0;
            color: #166534;
        }

        .sim-feedback.show {
            display: block;
        }

        /* ── QUIZ ── */
        .qblock {
            background: var(--blanc);
            border-radius: var(--radius);
            padding: 26px;
            margin-bottom: 18px;
            border: 2px solid var(--bleu-profond);
        }

        .qhead {
            display: flex;
            align-items: center;
            gap: 11px;
            margin-bottom: 20px;
        }

        .qicon {
            width: 36px;
            height: 36px;
            background: var(--bleu-profond);
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
        }

        .qtitle {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 1.3rem;
            color: var(--bleu-profond);
            text-transform: uppercase;
        }

        .qitem {
            margin-bottom: 24px;
        }

        .qtext {
            font-weight: 700;
            font-size: .88rem;
            color: var(--bleu-profond);
            margin-bottom: 11px;
            line-height: 1.5;
        }

        .qnum {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 21px;
            height: 21px;
            background: var(--jaune);
            color: var(--bleu-profond);
            border-radius: 50%;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .72rem;
            font-weight: 800;
            margin-right: 6px;
        }

        .qopts {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .qopt {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 13px;
            border: 1.5px solid #D8E2FF;
            border-radius: 8px;
            cursor: pointer;
            transition: all .2s;
            background: var(--blanc);
            text-align: left;
            font-size: .81rem;
            color: #374151;
            width: 100%;
            font-family: 'Open Sans', sans-serif;
            line-height: 1.4;
        }

        .qopt:hover:not(:disabled) {
            border-color: var(--bleu-klein);
            background: #EDF2FA;
        }

        .qopt.correct {
            border-color: var(--success);
            background: #F0FDF4;
            color: #15803D;
            font-weight: 700;
        }

        .qopt.wrong {
            border-color: var(--error);
            background: #FEF2F2;
            color: var(--error);
        }

        .qopt:disabled {
            cursor: default;
        }

        .qletter {
            width: 19px;
            height: 19px;
            border-radius: 50%;
            background: #EDF2FA;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .72rem;
            font-weight: 800;
            color: var(--bleu-profond);
            flex-shrink: 0;
            margin-top: 1px;
        }

        .qfb {
            margin-top: 8px;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: .77rem;
            line-height: 1.5;
            display: none;
        }

        .qfb.correct {
            background: #F0FDF4;
            color: #15803D;
            display: block;
        }

        .qfb.wrong {
            background: #FEF2F2;
            color: #991B1B;
            display: block;
        }

        /* ── MICRO QUIZ ── */
        .mq {
            background: linear-gradient(135deg, #EDF2FA, #E3EDFF);
            border: 2px solid #C5D6FF;
            border-radius: 12px;
            padding: 20px 22px;
            margin: 20px 0;
        }

        .mq-label {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .65rem;
            text-transform: uppercase;
            letter-spacing: .15em;
            color: var(--bleu-klein);
            font-weight: 800;
            margin-bottom: 9px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .mq-q {
            font-size: .88rem;
            font-weight: 700;
            color: var(--bleu-profond);
            margin-bottom: 12px;
            line-height: 1.5;
        }

        .mq-opts {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .mqopt {
            padding: 9px 14px;
            border: 1.5px solid #C5D6FF;
            border-radius: 8px;
            cursor: pointer;
            transition: all .2s;
            font-size: .81rem;
            color: #374151;
            background: var(--blanc);
            text-align: left;
            font-family: 'Open Sans', sans-serif;
            width: 100%;
        }

        .mqopt:hover:not(:disabled) {
            border-color: var(--bleu-klein);
            background: #EDF2FA;
        }

        .mqopt.ok {
            border-color: var(--success);
            background: #F0FDF4;
            color: #15803D;
            font-weight: 700;
        }

        .mqopt.ko {
            border-color: var(--error);
            background: #FEF2F2;
            color: var(--error);
        }

        .mqopt:disabled {
            cursor: default;
        }

        .mq-fb {
            margin-top: 9px;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: .78rem;
            line-height: 1.5;
            display: none;
        }

        .mq-fb.ok {
            background: #F0FDF4;
            color: #15803D;
            display: block;
        }

        .mq-fb.ko {
            background: #FEF2F2;
            color: #991B1B;
            display: block;
        }

        .xp-toast {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: var(--jaune);
            color: var(--bleu-profond);
            padding: 3px 10px;
            border-radius: 20px;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .72rem;
            font-weight: 800;
            margin-top: 7px;
            animation: pop .3s ease;
        }

        @keyframes pop {
            from {
                transform: scale(.6);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* ── BADGE ── */
        .badge-wrap {
            text-align: center;
            padding: 36px 20px;
        }

        .badge-ring {
            width: 110px;
            height: 110px;
            background: linear-gradient(135deg, var(--bleu-klein), var(--jaune));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.8rem;
            margin: 0 auto 20px;
            box-shadow: 0 8px 30px rgba(0, 60, 220, .3);
            animation: badgePop .65s cubic-bezier(.34, 1.56, .64, 1);
        }

        @keyframes badgePop {
            from {
                transform: scale(0) rotate(-15deg);
            }

            to {
                transform: scale(1) rotate(0deg);
            }
        }

        .badge-t {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 2rem;
            color: var(--bleu-profond);
            margin-bottom: 6px;
            text-transform: uppercase;
        }

        .badge-t span {
            font-weight: 200;
        }

        .badge-s {
            color: var(--muted);
            font-size: .84rem;
            margin-bottom: 22px;
        }

        .score-n {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: 3rem;
            color: var(--bleu-profond);
            line-height: 1;
        }

        .score-l {
            font-size: .75rem;
            color: var(--muted);
            margin-bottom: 20px;
        }

        .xp-final {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: var(--jaune);
            color: var(--bleu-profond);
            padding: 7px 20px;
            border-radius: 20px;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-weight: 800;
            font-size: .88rem;
            margin-bottom: 24px;
        }

        .recap-chips {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 7px;
            margin-bottom: 24px;
        }

        .quiz-verdict {
            border-radius: 10px;
            padding: 12px 18px;
            font-size: .82rem;
            line-height: 1.55;
            margin-bottom: 20px;
            text-align: center;
        }

        .quiz-verdict.pass {
            background: #f0fff4;
            border: 1px solid #86efac;
            color: #166534;
        }

        .quiz-verdict.fail {
            background: #fff0f0;
            border: 1px solid #fca5a5;
            color: #991b1b;
        }

        .rchip {
            padding: 5px 12px;
            border-radius: 20px;
            font-size: .72rem;
            font-weight: 700;
            background: #EDF2FA;
            color: var(--bleu-klein);
            border: 1px solid #C5D6FF;
        }

        /* ── BUTTONS ── */
        .nav-btns {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 6px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: .81rem;
            font-weight: 700;
            cursor: pointer;
            transition: all .2s;
            border: none;
            font-family: 'Open Sans', sans-serif;
        }

        .btn-p {
            background: var(--bleu-klein);
            color: var(--blanc);
        }

        .btn-p:hover {
            background: #0033cc;
            transform: translateY(-1px);
        }

        .btn-s {
            background: var(--blanc);
            color: var(--bleu-profond);
            border: 1.5px solid #D0DCFF;
        }

        .btn-s:hover {
            border-color: var(--bleu-klein);
        }

        .btn-g {
            background: var(--jaune);
            color: var(--bleu-profond);
        }

        .btn-g:hover {
            background: #e6b400;
        }

        .btn:disabled {
            opacity: .35;
            cursor: default;
            transform: none !important;
        }

        /* ── COACH IA ── */
        .coach-btn {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 54px;
            height: 54px;
            border-radius: 50%;
            background: var(--bleu-profond);
            border: 2px solid var(--jaune);
            color: var(--blanc);
            font-size: 1.3rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 250;
            box-shadow: 0 4px 20px rgba(0, 15, 65, .4);
            transition: all .3s;
        }

        .coach-btn:hover {
            transform: scale(1.08);
        }

        .coach-badge {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 16px;
            height: 16px;
            background: var(--jaune);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .58rem;
            font-weight: 800;
            color: var(--bleu-profond);
        }

        .coach-panel {
            position: fixed;
            bottom: 88px;
            right: 24px;
            width: 340px;
            background: var(--bleu-profond);
            border-radius: 14px;
            border: 1px solid rgba(0, 60, 220, .4);
            box-shadow: 0 16px 48px rgba(0, 15, 65, .5);
            z-index: 250;
            display: none;
            flex-direction: column;
            overflow: hidden;
            max-height: 480px;
        }

        .coach-panel.open {
            display: flex;
        }

        .coach-panel-header {
            background: rgba(0, 0, 0, .25);
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .coach-panel-title {
            font-family: 'Saira Extra Condensed', sans-serif;
            font-size: .9rem;
            font-weight: 800;
            color: var(--blanc);
            text-transform: uppercase;
            letter-spacing: .06em;
        }

        .coach-panel-title span {
            font-weight: 200;
        }

        .coach-panel-subtitle {
            font-size: .65rem;
            color: var(--jaune);
            margin-top: 2px;
        }

        .coach-close {
            background: none;
            border: none;
            color: rgba(255, 255, 255, .5);
            font-size: 1.1rem;
            cursor: pointer;
            padding: 2px;
        }

        .coach-messages {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-height: 180px;
        }

        .coach-msg-ai {
            background: rgba(255, 255, 255, .08);
            border-radius: 10px 10px 10px 2px;
            padding: 9px 12px;
            font-size: .78rem;
            color: rgba(255, 255, 255, .85);
            line-height: 1.55;
            max-width: 90%;
        }

        .coach-msg-user {
            align-self: flex-end;
            background: rgba(0, 60, 220, .45);
            border-radius: 10px 10px 2px 10px;
            padding: 9px 12px;
            font-size: .78rem;
            color: rgba(255, 255, 255, .9);
            line-height: 1.55;
            max-width: 90%;
        }

        /* Markdown rendu dans les réponses du modèle : coach, simulateur,
           prompt builder (react-markdown). Bulles sombres partagées. */
        .md-body > :first-child { margin-top: 0; }
        .md-body > :last-child  { margin-bottom: 0; }

        .md-body p { margin: 0 0 .55em; }

        .md-body ul,
        .md-body ol { margin: .4em 0; padding-left: 1.25em; }

        .md-body li { margin: .15em 0; }

        .md-body h1,
        .md-body h2,
        .md-body h3,
        .md-body h4 {
            margin: .6em 0 .3em;
            font-size: .85rem;
            font-weight: 700;
            color: #fff;
        }

        .md-body strong { color: #fff; font-weight: 700; }
        .md-body em { font-style: italic; }

        .md-body a {
            color: #8fb4ff;
            text-decoration: underline;
        }

        .md-body code {
            font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
            font-size: .9em;
            background: rgba(255, 255, 255, .12);
            border-radius: 4px;
            padding: .08em .35em;
        }

        .md-body pre {
            background: rgba(0, 0, 0, .35);
            border-radius: 8px;
            padding: 9px 11px;
            margin: .5em 0;
            overflow-x: auto;
        }

        .md-body pre code {
            background: none;
            padding: 0;
            font-size: .82em;
            line-height: 1.45;
        }

        .md-body blockquote {
            margin: .5em 0;
            padding-left: .8em;
            border-left: 3px solid rgba(255, 255, 255, .25);
            color: rgba(255, 255, 255, .7);
        }

        .md-body table {
            border-collapse: collapse;
            margin: .5em 0;
            font-size: .95em;
        }

        .md-body th,
        .md-body td {
            border: 1px solid rgba(255, 255, 255, .18);
            padding: 3px 7px;
            text-align: left;
        }

        .coach-input-area {
            padding: 10px 12px;
            border-top: 1px solid rgba(255, 255, 255, .08);
            display: flex;
            gap: 7px;
        }

        .coach-textarea {
            flex: 1;
            background: rgba(255, 255, 255, .07);
            border: 1px solid rgba(255, 255, 255, .14);
            border-radius: 7px;
            padding: 8px 10px;
            color: var(--blanc);
            font-size: .76rem;
            font-family: 'Open Sans', sans-serif;
            resize: none;
            outline: none;
            min-height: 38px;
            max-height: 80px;
            line-height: 1.45;
        }

        .coach-textarea::placeholder {
            color: rgba(255, 255, 255, .25);
        }

        .coach-send {
            background: var(--bleu-klein);
            color: var(--blanc);
            border: none;
            padding: 8px 12px;
            border-radius: 7px;
            cursor: pointer;
            font-size: .78rem;
            font-weight: 700;
            font-family: 'Open Sans', sans-serif;
        }

        .coach-send:disabled {
            opacity: .4;
            cursor: default;
        }

        .coach-quick-btns {
            padding: 0 12px 10px;
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .coach-quick-btn {
            background: rgba(255, 255, 255, .07);
            border: 1px solid rgba(255, 255, 255, .14);
            border-radius: 20px;
            padding: 4px 10px;
            font-size: .68rem;
            color: rgba(255, 255, 255, .65);
            cursor: pointer;
            font-family: 'Open Sans', sans-serif;
            transition: all .15s;
        }

        .coach-quick-btn:hover {
            background: rgba(0, 60, 220, .3);
            border-color: rgba(0, 60, 220, .5);
            color: rgba(255, 255, 255, .9);
        }

        /* ── Mobile nav toggle — hidden on desktop ── */
        .nav-toggle {
            display: none;
            background: rgba(255,255,255,.08);
            border: 1px solid rgba(255,255,255,.14);
            color: rgba(255,255,255,.7);
            font-size: 1.1rem;
            width: 34px;
            height: 34px;
            border-radius: 6px;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            line-height: 1;
            font-family: inherit;
        }

        /* ── Sidebar backdrop — hidden until mobile nav open ── */
        .sidebar-backdrop {
            display: none;
        }

        @media(max-width:720px) {
            /* ── Layout ── */
            .layout {
                grid-template-columns: 1fr;
                padding: 0;
            }

            .main {
                padding: 20px 16px;
            }

            /* ── Sidebar: slide-in drawer ── */
            .sidebar {
                position: fixed;
                top: 0;
                left: -260px;
                width: 240px;
                height: 100vh;
                overflow-y: auto;
                background: var(--cream);
                z-index: 300;
                padding: 70px 12px 32px;
                box-shadow: 4px 0 24px rgba(0,15,65,.18);
                transition: left .25s cubic-bezier(.4,0,.2,1);
                border-right: 1px solid #dde5f4;
            }

            .sidebar.open {
                left: 0;
            }

            /* ── Backdrop behind the sidebar ── */
            .sidebar-backdrop {
                position: fixed;
                inset: 0;
                background: rgba(0,15,65,.35);
                z-index: 299;
                display: none;
            }

            .sidebar-backdrop.open {
                display: block;
            }

            /* ── Hamburger button ── */
            .nav-toggle {
                display: flex;
            }

            /* ── Content blocks ── */
            .flip-grid {
                grid-template-columns: 1fr 1fr;
            }

            .cancant {
                grid-template-columns: 1fr;
            }

            .svp-grid {
                grid-template-columns: 1fr;
            }

            .mission-steps {
                flex-direction: column;
            }

            /* ── Tables: horizontal scroll ── */
            .ctable {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            /* ── Coach panel ── */
            .coach-panel {
                width: calc(100vw - 32px);
                right: 16px;
            }
        }

        @media(max-width:480px) {
            /* ── Header ── */
            .header-inner {
                padding: 0 12px;
            }

            .logo-text {
                font-size: .88rem;
            }

            .xp-pill {
                font-size: .65rem;
                padding: 4px 10px;
            }

            /* ── Flip cards: single column on very small screens ── */
            .flip-grid {
                grid-template-columns: 1fr;
            }

            /* ── Branch scenario ── */
            .branch-situation {
                flex-direction: column;
                gap: 8px;
            }

            /* ── Quiz options ── */
            .qopt {
                font-size: .82rem;
            }
        }

/* ════════════════════════════════════════════════════════════════════
   ACCORDION  (ported from static/module_2 — was module-inline)
   ════════════════════════════════════════════════════════════════════ */
.accordion { margin: 16px 0; }
.acc-item {
    border: 1px solid #D8E2FF;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}
.acc-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: var(--blanc);
    transition: background .2s;
}
.acc-header:hover { background: var(--bleu-pale); }
.acc-header-left { display: flex; align-items: center; gap: 10px; }
.acc-icon { font-size: 1.1rem; }
.acc-title { font-size: .86rem; font-weight: 700; color: var(--bleu-profond); }
.acc-arrow { font-size: .8rem; color: var(--muted); transition: transform .3s; }
.acc-item.open .acc-arrow { transform: rotate(180deg); }
.acc-body {
    display: none;
    padding: 12px 16px 16px;
    font-size: .82rem;
    color: #374151;
    line-height: 1.65;
    background: var(--blanc);
    border-top: 1px solid #EDF2FA;
}
.acc-item.open .acc-body { display: block; }
.acc-body strong { color: var(--bleu-klein); }

/* ════════════════════════════════════════════════════════════════════
   CHECKLIST  (ported from static/module_4 — was module-inline)
   ════════════════════════════════════════════════════════════════════ */
.checklist { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.check-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    background: var(--bleu-pale);
    border: 1.5px solid #C5D6FF;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all .2s;
}
.check-item.checked { background: #F0FDF4; border-color: #86EFAC; }
.check-box {
    width: 20px;
    height: 20px;
    border: 2px solid #C5D6FF;
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    margin-top: 1px;
}
.check-item.checked .check-box {
    background: var(--success);
    border-color: var(--success);
    color: var(--blanc);
}
.check-box::after { content: ""; display: none; }
.check-item.checked .check-box::after {
    display: block;
    content: "✓";
    font-size: .7rem;
    color: var(--blanc);
    font-weight: 700;
}
.check-label { font-size: .82rem; color: var(--bleu-profond); line-height: 1.5; }
.check-item.checked .check-label { color: #15803D; }

/* ════════════════════════════════════════════════════════════════════
   CONVERGENCE IPPON — styles des composants ajoutés/modifiés
   (.qopt.selected : sélection non révélée du quiz refondu ; .decision-tree)
   ════════════════════════════════════════════════════════════════════ */
.qopt.selected { border-color: var(--bleu-klein); background: var(--bleu-pale); }

.decision-tree { margin: 14px 0; }
.dt-q-text   { font-weight: 700; color: var(--bleu-profond); margin-bottom: 12px; }
.dt-choices  { display: flex; flex-direction: column; gap: 10px; }
.dt-choice   { padding: 13px 16px; border: 1.5px solid #C5D6FF; border-radius: 9px;
               cursor: pointer; transition: all .2s; background: var(--blanc);
               text-align: left; font-size: .9rem; color: var(--bleu-profond); }
.dt-choice:hover { border-color: var(--bleu-klein); background: var(--bleu-pale); }
.dt-result       { margin-top: 14px; padding: 18px; border: 2px solid var(--bleu-klein);
                   border-radius: var(--radius); background: var(--cream); text-align: center; }
.dt-result-icon  { font-size: 2rem; }
.dt-result-fw    { font-weight: 800; color: var(--bleu-klein); letter-spacing: .05em; margin-top: 4px; }
.dt-result-title { font-weight: 700; color: var(--bleu-profond); margin: 6px 0; }
.dt-result-why   { font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* Questions rapides du coach (suggestions cliquables, éditoriales par module) */
.coach-quick     { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.coach-quick-q   { font-size: .76rem; padding: 6px 10px; border: 1px solid #D8E2FF; border-radius: 14px;
                   background: var(--cream); color: var(--bleu-klein); cursor: pointer; text-align: left; line-height: 1.3; }
.coach-quick-q:hover { background: var(--bleu-pale); border-color: var(--bleu-klein); }
