﻿html, body { margin: 0; }

    html {
        box-sizing: border-box;
    }

    *, *::before, *::after {
        box-sizing: inherit;
    }

    html, body {
        min-width: 0;
    }

    :root {
        --ttx-azure: #009dff;
        --ttx-azure-light: #63c8ff;
        --ttx-azure-dark: #0369a1;
        --ttx-azure-pressed: #0284c7;
        --ttx-teal: #0f766e;
        --ttx-teal-dark: #115e59;
        --ttx-gold: #f5b301;
        --ttx-ink: #0f172a;
        --ttx-muted: #475569;
        --ttx-surface: #f8fdff;
        --ttx-focus-ring: rgba(245, 179, 1, 0.42);
    }

    .ttx-wrapper {
        margin: 0;
        min-height: 100vh;
        min-height: 100dvh;
        font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
        background: linear-gradient(135deg, #ecfeff 0%, #f9fafc 45%, #dff7ff 100%);
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 0 20px 32px;
        color: #0f172a;
        overflow-x: clip;
    }

    .ttx-app-shell {
        width: min(1280px, 100%);
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .ttx-main-nav {
        position: relative;
        z-index: 70;
        width: 100%;
        min-height: 54px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 8px 12px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.86);
        border: 1px solid rgba(148, 163, 184, 0.28);
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
        backdrop-filter: blur(10px);
    }

    .ttx-main-tabs,
    .ttx-nav-account {
        display: inline-flex;
        align-items: center;
        gap: 18px;
    }

    .ttx-nav-brand {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .ttx-nav-logo {
        display: block;
        width: auto;
        height: 38px;
        max-width: 180px;
        object-fit: contain;
    }

    .ttx-nav-tab {
        min-height: 46px;
        padding: 8px 4px 10px;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid transparent;
        background: transparent;
        color: var(--ttx-muted);
        font-size: 22.5px;
        font-weight: 800;
        cursor: pointer;
        transition: color 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
    }

    .ttx-nav-tab:hover:not(.ttx-active) {
        color: var(--ttx-azure-dark);
        filter: brightness(1.12);
    }

    .ttx-nav-tab.ttx-active {
        color: var(--ttx-teal-dark);
        border-bottom-color: var(--ttx-gold);
    }

    .ttx-nav-account {
        justify-content: flex-end;
        position: relative;
    }

    .ttx-nav-account .ttx-account-status {
        flex-basis: auto;
        white-space: nowrap;
    }

    .ttx-view {
        width: 100%;
    }

    .ttx-view[hidden] {
        display: none;
    }

    .ttx-brand-bar {
        width: 100%;
        display: block;
        gap: 16px;
        align-items: stretch;
        margin-bottom: 8px;
    }

    .ttx-brand-kicker {
        margin: 0 0 6px;
        color: #1d4ed8;
        font-size: 18px;
        font-weight: 800;
        letter-spacing: 0;
    }

    .ttx-brand-title {
        margin: 0;
        max-width: 580px;
        color: var(--ttx-ink);
        font-size: 34px;
        line-height: 1.08;
        letter-spacing: 0;
    }

    .ttx-account-entry {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        align-self: start;
        position: relative;
    }

    .ttx-account-status {
        margin: 0;
        color: #475569;
        font-size: 13px;
        font-weight: 700;
        overflow-wrap: anywhere;
        text-align: right;
        flex-basis: 100%;
    }

    .ttx-account-status[hidden] {
        display: none;
    }

    .ttx-secondary-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 7px 12px;
        border-radius: 999px;
        border: 1px solid rgba(3, 105, 161, 0.32);
        background: rgba(240, 249, 255, 0.92);
        color: var(--ttx-azure-dark);
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
    }

    .ttx-secondary-button:hover:not(:disabled) {
        background: #e0f7ff;
        color: var(--ttx-azure-dark);
    }

    .ttx-secondary-button:disabled {
        color: #64748b;
        border-color: rgba(148, 163, 184, 0.35);
        background: #e2e8f0;
        cursor: not-allowed;
    }

    .ttx-secondary-button[hidden] {
        display: none;
    }

    .ttx-account-menu-wrap {
        position: relative;
    }

    .ttx-account-name-button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ttx-account-name-button .ttx-account-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ttx-account-name-button .ttx-inline-icon {
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
    }

    .ttx-settings-button {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1px solid rgba(3, 105, 161, 0.28);
        background: rgba(240, 249, 255, 0.92);
        color: var(--ttx-azure-dark);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

    .ttx-settings-button:hover {
        background: #e0f7ff;
        color: var(--ttx-teal-dark);
        transform: translateY(-1px);
    }

    .ttx-settings-button .ttx-inline-icon {
        width: 22px;
        height: 22px;
    }

    .ttx-account-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        min-width: 170px;
        padding: 6px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.32);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
        z-index: 90;
    }

    .ttx-account-menu[hidden] {
        display: none;
    }

    .ttx-account-menu button {
        width: 100%;
        min-height: 36px;
        padding: 8px 10px;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: #0f172a;
        font-size: 14px;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    .ttx-account-menu button:hover:not(:disabled) {
        background: #eff6ff;
        color: #1d4ed8;
    }

    .ttx-account-menu button:disabled {
        color: #94a3b8;
        cursor: not-allowed;
    }

    .ttx-modal-form select {
        width: 100%;
        min-height: 42px;
        padding: 8px 12px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.55);
        background: #fff;
        color: #0f172a;
        font-size: 16px;
    }

    .ttx-top-bar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 16px;
    }

    .ttx-top-bar .ttx-button {
        margin: 0;
    }

    .ttx-sound-toggle {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 1px solid rgba(148, 163, 184, 0.45);
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: #1f2937;
        cursor: pointer;
        transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    } 

    .ttx-sound-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
        filter: brightness(1.05);
    }

    .ttx-sound-toggle[aria-pressed="true"] {
        background: rgba(226, 232, 240, 0.9);
        color: #64748b;
        box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.12);
    }

    .ttx-inline-icon {
        display: inline-flex;
        width: 1.25em;
        height: 1.25em;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        color: currentColor;
        line-height: 1;
    }

    .ttx-inline-icon svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .ttx-sound-toggle .ttx-inline-icon {
        width: 26px;
        height: 26px;
    }

    .ttx-course-toggle {
        width: 42px;
        height: 42px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    }

    .ttx-course-toggle .ttx-inline-icon {
        width: 24px;
        height: 24px;
    }

    .ttx-button {
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 14px 32px;
        font-size: 18px;
        font-weight: 600;
        color: var(--ttx-azure-dark);
        background: transparent;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid transparent;
        cursor: pointer;
        box-shadow: none;
        transition: color 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
        text-decoration: none;
    }

    .ttx-button:hover:not(:disabled) {
        color: var(--ttx-teal-dark);
        border-bottom-color: currentColor;
        filter: brightness(1.08);
    }

    .ttx-button:focus-visible,
    .ttx-secondary-button:focus-visible,
    .ttx-nav-tab:focus-visible,
    .ttx-control-buttons button:focus-visible,
    .ttx-scoreboard-toggle-button:focus-visible,
    .ttx-auth-switch button:focus-visible,
    .ttx-forgot-password:focus-visible {
        outline: 3px solid var(--ttx-focus-ring);
        outline-offset: 3px;
    }

    .ttx-key-button {
        position: relative;
        min-height: auto;
        padding: 0 5px 7px;
        border: none;
        border-radius: 14px;
        background: transparent;
        color: #fff;
        font-weight: 800;
        text-shadow: 0 1px 1px rgba(3, 47, 74, 0.36);
        box-shadow: none;
        transform: none;
        isolation: isolate;
        transition: filter 0.12s ease;
    }

    .ttx-key-button::before {
        content: "";
        position: absolute;
        z-index: 0;
        top: 5px;
        right: 0;
        bottom: 0;
        left: 0;
        border-radius: 16px;
        background: linear-gradient(180deg, #047bb8 0%, var(--ttx-azure-dark) 48%, #025f92 100%);
        box-shadow: 0 7px 13px rgba(3, 105, 161, 0.16);
    }

    .ttx-key-button-label {
        position: relative;
        z-index: 1;
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        padding: 8px 28px;
        border: 1px solid rgba(3, 105, 161, 0.62);
        border-radius: 13px;
        background: linear-gradient(180deg, #32b9f5 0%, #008ed8 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.56),
            inset 0 -3px 0 rgba(255, 255, 255, 0.38);
        transform: translateY(0);
        transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    }

    .ttx-secondary-button.ttx-key-button .ttx-key-button-label {
        min-height: 30px;
        padding: 5px 12px;
        font-size: 13px;
    }

    .ttx-button.ttx-key-button .ttx-key-button-label {
        min-height: 40px;
        padding: 8px 28px;
        font-size: 18px;
    }

    .ttx-key-button:hover:not(:disabled) {
        background: transparent;
        color: #fff;
        border-bottom-color: transparent;
        filter: none;
    }

    .ttx-key-button:hover:not(:disabled) .ttx-key-button-label {
        filter: brightness(1.03);
        transform: translateY(2px);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            inset 0 -2px 0 rgba(255, 255, 255, 0.34);
    }

    .ttx-key-button:active:not(:disabled) .ttx-key-button-label,
    .ttx-key-button.ttx-is-pressed:not(:disabled) .ttx-key-button-label {
        transform: translateY(4px);
        box-shadow:
            inset 0 2px 5px rgba(3, 47, 74, 0.24);
    }

    .ttx-button:disabled {
        background: #94a3b8; /* Couleur de fond grisée */
        cursor: not-allowed; /* Change le curseur pour indiquer que le bouton est désactivé */
        color: #e2e8f0; /* Change la couleur du texte pour qu'elle soit également grisée */
        box-shadow: none;
        border-bottom-color: transparent;
    }

    .ttx-key-button:disabled {
        background: transparent;
    }

    .ttx-key-button:disabled::before {
        background: #64748b;
        box-shadow: none;
    }

    .ttx-key-button:disabled .ttx-key-button-label {
        background: #94a3b8;
        border-color: rgba(100, 116, 139, 0.42);
        color: #e2e8f0;
        box-shadow: none;
        text-shadow: none;
    }
    .ttx-difficulty-selector {
        display: inline-flex;
        align-items: center;
        gap: 14px;
        background: rgba(255, 255, 255, 0.75);
        padding: 12px 24px;
        border-radius: 999px;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.15);
        backdrop-filter: blur(12px);
        font-size: 18px;
        color: #1f2937;
    }

    .ttx-difficulty-selector label {
        font-weight: 600;
    }

    .ttx-difficulty-selector select {
        padding: 2px 24px;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.45);
        background: rgba(255, 255, 255, 0.9);
        font-size: 16px;
        color: #111827;
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.4);
        cursor: pointer;
        transition: box-shadow 0.12s ease, border-color 0.12s ease;
    }

    .ttx-duration-selector select {
        min-width: 140px;
    }

    .ttx-difficulty-selector select:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    }

    .ttx-control-panel {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 16px;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    .ttx-control-buttons {
        display: inline-flex;
        justify-content: center;
        gap: 12px;
        margin: 0;
    }

    .ttx-control-buttons button,
    .ttx-scoreboard-toggle-button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 9px 4px 10px;
        border: none;
        border-bottom: 2px solid transparent;
        border-radius: 0;
        background: transparent;
        color: var(--ttx-ink);
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: none;
        transition: color 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
    }

    .ttx-control-buttons button:hover:not(:disabled),
    .ttx-scoreboard-toggle-button:hover:not(:disabled) {
        color: var(--ttx-azure-dark);
        border-bottom-color: currentColor;
        filter: brightness(1.12);
    }

    .ttx-control-buttons button.ttx-is-paused,
    .ttx-scoreboard-toggle-button[aria-expanded="true"] {
        color: var(--ttx-teal-dark);
        border-bottom-color: var(--ttx-gold);
    }

    .ttx-control-buttons button:disabled,
    .ttx-scoreboard-toggle-button:disabled {
        color: #64748b;
        cursor: not-allowed;
        box-shadow: none;
        border-bottom-color: transparent;
    }

    .ttx-control-buttons .ttx-icon,
    .ttx-scoreboard-toggle-button .ttx-icon {
        display: inline-flex;
        width: 16px;
        height: 16px;
    }

    .ttx-control-buttons .ttx-icon svg,
    .ttx-scoreboard-toggle-button .ttx-icon svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }

    .ttx-control-buttons .ttx-label,
    .ttx-scoreboard-toggle-button .ttx-label {
        display: inline-flex;
        align-items: center;
    }

    #ttx-pauseTest .ttx-icon-play,
    #ttx-pauseTest .ttx-label-play {
        display: none;
    }

    #ttx-pauseTest.ttx-is-paused .ttx-icon-play,
    #ttx-pauseTest.ttx-is-paused .ttx-label-play {
        display: inline-flex;
    }

    #ttx-pauseTest.ttx-is-paused .ttx-icon-pause,
    #ttx-pauseTest.ttx-is-paused .ttx-label-pause {
        display: none;
    }

    .ttx-status-line {
        text-align: center;
        font-size: 15px;
        color: #1f2937;
        margin: 0;
        display: none;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 14px;
        padding: 8px 22px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.7);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(10px);
    }

    .ttx-status-metric {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 700;
        white-space: nowrap;
    }

    .ttx-status-icon {
        display: inline-flex;
        width: 18px;
        height: 18px;
        color: var(--ttx-azure-dark);
    }

    .ttx-status-icon svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }


    .ttx-medal-section {
        display: none;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        flex-wrap: wrap;
    }

    .ttx-medal-actions {
        display: inline-flex;
        align-items: center;
        gap: 12px;
    }

    .ttx-medal-badge {
        display: inline-flex;
        align-items: center;
        gap: 14px;
        padding: 12px 20px;
        border-radius: 16px;
        color: #0f172a;
        background: linear-gradient(145deg, rgba(242, 244, 247, 1), rgba(221, 229, 239, 0.95));
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.7), inset 0 -1px 2px rgba(15, 23, 42, 0.08);
        border: 1px solid rgba(148, 163, 184, 0.4);
    }

    .ttx-medal-badge.ttx-platinum {
        background: linear-gradient(145deg, rgba(186, 230, 253, 1), rgba(129, 212, 250, 0.95));
        color: #0b1120;
        border-color: rgba(59, 130, 246, 0.45);
    }

    .ttx-medal-badge.ttx-gold {
        background: linear-gradient(145deg, rgba(253, 224, 71, 0.98), rgba(251, 191, 36, 0.9));
        color: #1f2937;
        border-color: rgba(217, 119, 6, 0.55);
    }

    .ttx-medal-badge.ttx-silver {
        background: linear-gradient(145deg, rgba(209, 213, 219, 0.98), rgba(156, 163, 175, 0.92));
        color: #111827;
        border-color: rgba(107, 114, 128, 0.55);
    }

    .ttx-medal-badge.ttx-bronze {
        background: linear-gradient(145deg, rgba(248, 196, 113, 0.95), rgba(217, 119, 6, 0.92));
        color: #1f2937;
        border-color: rgba(180, 83, 9, 0.6);
    }

    .ttx-medal-badge.ttx-copper {
        background: linear-gradient(145deg, rgba(233, 196, 148, 0.9), rgba(202, 138, 73, 0.88));
        color: #1f2937;
        border-color: rgba(180, 112, 43, 0.6);
    }

    .ttx-medal-icon {
        width: 52px;
        height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
    }

    .ttx-medal-icon .ttx-inline-icon {
        width: 32px;
        height: 32px;
    }

    .ttx-medal-image {
        width: 52px;
        height: 52px;
        display: block;
        object-fit: contain;
        filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.2));
    }

    .ttx-medal-text {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .ttx-medal-title {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
    }

    .ttx-medal-subtitle {
        margin: 0;
        font-size: 15px;
        opacity: 0.85;
    }

    .ttx-medal-info-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: none;
        background: rgba(37, 99, 235, 0.12);
        color: #1d4ed8;
        cursor: pointer;
        box-shadow: 0 12px 24px rgba(30, 64, 175, 0.16);
        transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    }

    .ttx-medal-info-button:hover {
        transform: translateY(-1px);
        background: rgba(37, 99, 235, 0.18);
        box-shadow: 0 14px 30px rgba(30, 64, 175, 0.2);
    }

    .ttx-medal-info-button:focus-visible {
        outline: 3px solid rgba(59, 130, 246, 0.35);
        outline-offset: 2px;
    }

    .ttx-medal-info-button .ttx-inline-icon {
        width: 20px;
        height: 20px;
    }

    .ttx-medal-info-panel {
        display: none;
        margin-top: 14px;
        padding: 16px 22px;
        border-radius: 18px;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(226, 232, 240, 0.88));
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
        color: #0f172a;
        min-width: min(360px, 100%);
        width: 100%;
        max-width: 520px;
    }

    .ttx-medal-info-panel.ttx-open {
        display: block;
    }

    .ttx-medal-info-description {
        margin: 0 0 12px 0;
        font-size: 15px;
        font-weight: 600;
        color: #1f2937;
    }

    .ttx-medal-info-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 0 0 6px 0;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        font-size: 13px;
        font-weight: 600;
        color: #64748b;
    }

    .ttx-medal-info-header span {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .ttx-medal-info-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 8px 0;
        font-size: 13px;
        border-radius: 12px;
        transition: background 0.12s ease;
    }

    .ttx-medal-info-row.ttx-active {
        background: rgba(59, 130, 246, 0.12);
        padding: 10px 12px;
    }

    .ttx-medal-info-name {
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .ttx-medal-info-speed,
    .ttx-medal-info-accuracy {
        min-width: 72px;
        text-align: right;
        font-variant-numeric: tabular-nums;
        font-weight: 600;
        color: #0f172a;
    }

    .ttx-medal-info-header .ttx-medal-info-speed,
    .ttx-medal-info-header .ttx-medal-info-accuracy {
        color: #64748b;
    }

    .ttx-medal-info-icon,
    .ttx-info-icon-certificate,
    .ttx-info-icon-speed,
    .ttx-info-icon-accuracy {
        width: 18px;
        height: 18px;
    }

    .ttx-medal-info-row.ttx-platinum .ttx-medal-info-icon {
        color: #0284c7;
    }

    .ttx-medal-info-row.ttx-gold .ttx-medal-info-icon,
    .ttx-info-icon-certificate {
        color: #d97706;
    }

    .ttx-medal-info-row.ttx-silver .ttx-medal-info-icon {
        color: #64748b;
    }

    .ttx-medal-info-row.ttx-bronze .ttx-medal-info-icon {
        color: #b45309;
    }

    .ttx-medal-info-row.ttx-copper .ttx-medal-info-icon {
        color: #a16207;
    }

    .ttx-info-icon-speed {
        color: #2563eb;
    }

    .ttx-info-icon-accuracy {
        color: #16a34a;
    }

    .ttx-sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .ttx-test-container {
        display: block;
        width: min(1120px, 100%);
        max-width: 100%;
        height: 400px;
        margin: 18px auto 10px;
        padding: 36px 36px 32px 36px;
        border-radius: 24px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
        border: 1px solid rgba(148, 163, 184, 0.25);
        backdrop-filter: blur(8px);
        overflow: hidden;
        position: relative;
    }
    .ttx-test-text {
        display: block;
        font-size: 32px; /* Doublé la taille de la police */
        margin: 0;
        line-height: 2; /* Doubler l'interligne */
        letter-spacing: 4px; /* Augmenter l'espace entre chaque lettre */
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 18px;
        color: #111827;
        font-family: 'Arial', 'Helvetica Neue', sans-serif;
        transition: filter 0.3s ease, opacity 0.3s ease;
    }
    .ttx-test-container.ttx-preview-mode .ttx-test-text {
        filter: blur(4px);
        opacity: 0.55;
        user-select: none;
        pointer-events: none;
    }
    .ttx-preview-overlay {
        position: absolute;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 0;
        text-align: center;
        border-radius: 24px;
        border: none;
        background: transparent;
        cursor: pointer;
        z-index: 2;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .ttx-preview-overlay-label {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 20px 28px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.85);
        color: #0f172a;
        font-size: 20px;
        font-weight: 500;
        box-shadow: 0 20px 46px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(3px);
    }
    .ttx-preview-overlay strong {
        font-weight: 700;
    }
    .ttx-preview-overlay:hover .ttx-preview-overlay-label {
        transform: translateY(-2px);
        box-shadow: 0 24px 52px rgba(15, 23, 42, 0.22);
    }
    .ttx-preview-overlay:focus-visible {
        outline: 3px solid rgba(37, 99, 235, 0.35);
        outline-offset: -6px;
    }
    .ttx-test-container.ttx-preview-mode .ttx-preview-overlay {
        display: none;
    }
            .ttx-test-text::-webkit-scrollbar {
                width: 10px;
            }
            .ttx-test-text::-webkit-scrollbar-track {
                background: rgba(226, 232, 240, 0.6);
                border-radius: 999px;
            }
            .ttx-test-text::-webkit-scrollbar-thumb {
                background: rgba(148, 163, 184, 0.7);
                border-radius: 999px;
            }
            .ttx-test-text span {
                padding: 3px;
                border-radius: 6px;
                transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
            }
            .ttx-correct {
                color: #64748b;
            }
            .ttx-incorrect {
                text-decoration: underline;
                text-decoration-color: #ef4444;
                text-decoration-skip-ink: none;
            }
            .ttx-semi {
                text-decoration: underline;
                text-decoration-color: #f97316;
            }
            .ttx-current {
                background: rgba(248, 113, 113, 0.18);
                box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
            }
            .ttx-next {
                background: rgba(34, 197, 94, 0.12);
                box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
            }
            .ttx-course-plan,
            .ttx-course-practice {
                width: 100%;
                margin-top: 10px;
            }

            .ttx-course-plan[hidden],
            .ttx-course-practice[hidden] {
                display: none;
            }

            .ttx-course-step-list {
                display: flex;
                flex-direction: column;
                gap: 38px;
            }

            .ttx-course-plan-section,
            .ttx-course-panel {
                box-sizing: border-box;
                border-radius: 28px;
                background: rgba(255, 255, 255, 0.9);
                border: 2px solid #cfe8ff;
                box-shadow: 0 12px 30px rgba(7, 82, 184, 0.16);
            }

            .ttx-course-plan-section {
                position: relative;
                min-height: 420px;
                padding: 30px 28px 34px;
                margin-top: 22px;
            }

            .ttx-course-panel {
                width: 100%;
                padding: 18px;
                display: flex;
                flex-direction: column;
                gap: 14px;
            }
            .ttx-course-header {
                display: flex;
                align-items: flex-start;
                justify-content: space-between;
                gap: 16px;
            }
            .ttx-course-header-actions {
                display: inline-flex;
                align-items: center;
                gap: 10px;
                flex: 0 0 auto;
            }
            .ttx-course-kicker {
                margin: 0 0 5px;
                color: #1d4ed8;
                font-size: 13px;
                font-weight: 800;
                text-transform: uppercase;
                letter-spacing: 0;
            }
            .ttx-course-title {
                margin: 0;
                color: #0f172a;
                font-size: 22px;
                line-height: 1.18;
                letter-spacing: 0;
            }
            .ttx-course-plan-section > .ttx-course-title {
                display: inline-block;
                margin: 0 0 28px 0;
                color: #0877f2;
                font-size: clamp(24px, 4vw, 36px);
            }
            .ttx-course-progress {
                margin: 0;
                padding: 8px 12px;
                border-radius: 999px;
                background: #eff6ff;
                color: #1d4ed8;
                font-size: 13px;
                font-weight: 800;
                white-space: nowrap;
            }
            .ttx-course-substep-list {
                display: flex;
                flex-direction: column;
                gap: 28px;
            }
            .ttx-course-substep-card {
                display: grid;
                grid-template-columns: minmax(160px, 210px) auto minmax(320px, 1fr);
                align-items: center;
                gap: 22px;
            }
            .ttx-course-substep-header {
                display: contents;
            }
            .ttx-course-substep-label {
                grid-column: 1;
                min-height: 122px;
                padding: 18px 22px;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                border: 2px solid #0877f2;
                border-radius: 42px;
                background: #ffffff;
                color: #0752b8;
                box-shadow: 0 8px 22px rgba(7, 82, 184, 0.14);
                container-type: inline-size;
            }
            .ttx-course-substep-label strong {
                display: -webkit-box;
                max-width: 100%;
                font-size: clamp(28px, calc(125cqw / var(--ttx-course-substep-title-units, 3)), 64px);
                font-weight: 700;
                line-height: 1;
                letter-spacing: 0;
                overflow: hidden;
                overflow-wrap: anywhere;
                text-align: center;
                white-space: normal;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
            }
            .ttx-course-substep-label span {
                margin-top: 10px;
                max-width: 100%;
                color: #0752b8;
                font-size: clamp(9px, calc(145cqw / var(--ttx-course-substep-subtitle-units, 16)), 16px);
                font-weight: 650;
                line-height: 1.2;
                overflow: hidden;
                overflow-wrap: anywhere;
                text-align: center;
                white-space: normal;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
            }
            .ttx-course-reward-stack {
                grid-column: 2;
                display: flex;
                flex-direction: column;
                gap: 14px;
            }
            .ttx-course-reward-gauge {
                --ttx-course-progress: 0%;
                --ttx-course-progress-color: #10b981;
                position: relative;
                width: 60px;
                height: 60px;
                padding: 4px;
                box-sizing: border-box;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                border: 2px solid rgba(148, 163, 184, 0.5);
                border-radius: 17px;
                background: #eef6f8;
                box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
                overflow: hidden;
            }
            .ttx-course-reward-gauge::before {
                content: "";
                position: absolute;
                inset: 4px;
                border-radius: 13px;
                background:
                    radial-gradient(circle at center, #eef6f8 0 42%, transparent 43%),
                    conic-gradient(var(--ttx-course-progress-color) var(--ttx-course-progress), #dce8ef 0);
            }
            .ttx-course-reward-gauge::after {
                content: attr(data-progress-label);
                position: absolute;
                left: 50%;
                bottom: calc(100% + 8px);
                z-index: 5;
                min-width: max-content;
                padding: 6px 9px;
                border-radius: 8px;
                background: #0f172a;
                color: #ffffff;
                font-size: 12px;
                font-weight: 800;
                line-height: 1;
                opacity: 0;
                pointer-events: none;
                transform: translate(-50%, 4px);
                transition: opacity 0.12s ease, transform 0.12s ease;
                box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
            }
            .ttx-course-reward-gauge:hover::after,
            .ttx-course-reward-gauge:focus-visible::after {
                opacity: 1;
                transform: translate(-50%, 0);
            }
            .ttx-course-reward-speed {
                --ttx-course-progress-color: #a855f7;
            }
            .ttx-course-reward-gauge-inner {
                position: relative;
                z-index: 1;
                width: 40px;
                height: 40px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                border-radius: 12px;
                background: #edf5f7;
                color: #3f6f99;
            }
            .ttx-course-reward-gauge-inner .ttx-inline-icon,
            .ttx-course-exercise-icon .ttx-inline-icon {
                width: 100%;
                height: 100%;
            }
            .ttx-course-reward-gauge-inner .ttx-inline-icon {
                width: 24px;
                height: 24px;
            }
            .ttx-course-exercise-list {
                grid-column: 3;
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                gap: 18px 22px;
            }
            .ttx-course-exercise-button {
                position: relative;
                width: 90px;
                min-height: 48px;
                display: grid;
                grid-template-columns: 28px 1fr;
                align-items: center;
                gap: 8px;
                padding: 8px 10px;
                border-radius: 5px;
                border: 3px solid rgba(100, 116, 139, 0.76);
                background: #f8fafc;
                color: #1f2937;
                text-align: left;
                cursor: pointer;
                box-shadow: 0 5px 0 #cbd5e1;
                transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
            }
            .ttx-course-exercise-button:hover {
                transform: translateY(-2px);
                box-shadow: 0 7px 0 #cbd5e1;
            }
            .ttx-course-exercise-icon {
                width: 24px;
                height: 24px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                color: #334155;
            }
            .ttx-course-exercise-number {
                justify-self: end;
                font-size: 22px;
                font-weight: 800;
                line-height: 1;
            }
            .ttx-course-exercise-button.ttx-active {
                border-color: rgba(37, 99, 235, 0.5);
                background: #eff6ff;
                color: #1d4ed8;
            }
            .ttx-course-exercise-button.ttx-active .ttx-course-exercise-icon,
            .ttx-course-exercise-button.ttx-active .ttx-course-exercise-number {
                color: #1d4ed8;
            }
            .ttx-course-exercise-button.ttx-course-done {
                border-color: #2563eb;
                background: #2563eb;
                color: #fff;
                box-shadow: 0 5px 0 #1d4ed8;
            }
            .ttx-course-exercise-button.ttx-course-done .ttx-course-exercise-icon,
            .ttx-course-exercise-button.ttx-course-done .ttx-course-exercise-number {
                color: #fff;
            }
            .ttx-course-exercise-button.ttx-course-perfect {
                border-color: #16a34a;
                background: #16a34a;
                color: #fff;
                box-shadow: 0 5px 0 #15803d;
            }
            .ttx-course-exercise-button.ttx-course-perfect:hover {
                box-shadow: 0 7px 0 #15803d;
            }
            .ttx-course-exercise-button.ttx-course-perfect .ttx-course-exercise-icon,
            .ttx-course-exercise-button.ttx-course-perfect .ttx-course-exercise-number {
                color: #fff;
            }
            .ttx-course-test-container {
                width: 100%;
                max-width: 100%;
                min-height: 136px;
                height: auto;
                margin: 0;
                padding: 24px 16px;
                border-radius: 18px;
            }
            .ttx-course-text {
                height: 100%;
                overflow-y: auto;
                overflow-x: hidden;
                padding: 0;
                white-space: normal;
                overflow-wrap: break-word;
            }
            .ttx-course-text-active {
                display: flex;
                align-items: center;
                gap: 12px;
                line-height: 1;
                letter-spacing: 0;
                font-size: 32px;
                overflow: visible;
                white-space: nowrap;
            }
            .ttx-course-text-active .ttx-course-char {
                flex: 0 0 68px;
                width: 68px;
                height: 82px;
                box-sizing: border-box;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                padding: 0;
                border-radius: 8px;
                border: 1px solid rgba(148, 163, 184, 0.42);
                background: rgba(255, 255, 255, 0.95);
                box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
                color: #666b73;
                font-size: 34px;
                font-weight: 700;
                text-transform: lowercase;
            }
            .ttx-course-text-active .ttx-course-space {
                font-size: 14px;
                text-transform: none;
                color: #64748b;
            }
            .ttx-course-text-active .ttx-correct {
                color: #94a3b8;
                background: #f8fafc;
            }
            .ttx-course-text-active .ttx-incorrect {
                text-decoration-line: underline;
                text-decoration-color: #ef4444;
                text-decoration-thickness: 4px;
                text-underline-offset: 8px;
                text-decoration-skip-ink: none;
            }
            .ttx-course-text-active .ttx-current {
                background: rgba(248, 113, 113, 0.18);
                box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25), 0 10px 20px rgba(15, 23, 42, 0.08);
            }
            .ttx-course-text-active .ttx-next {
                background: rgba(34, 197, 94, 0.12);
                box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25), 0 10px 20px rgba(15, 23, 42, 0.08);
            }
            .ttx-course-text-complete {
                display: flex;
                flex-wrap: wrap;
                align-items: flex-start;
                align-content: flex-start;
                gap: 6px;
                white-space: normal;
            }
            .ttx-course-text-complete .ttx-course-char {
                flex: 0 0 34px;
                width: 34px;
                height: 41px;
                border-radius: 6px;
                font-size: 17px;
                box-shadow: 0 5px 10px rgba(15, 23, 42, 0.06);
            }
            .ttx-course-text-complete .ttx-course-space {
                flex-basis: 44px;
                width: 44px;
                font-size: 9px;
            }
            .ttx-course-text-complete .ttx-incorrect {
                background: rgba(239, 68, 68, 0.18);
                border-color: rgba(239, 68, 68, 0.62);
                color: #b91c1c;
                box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18), 0 5px 10px rgba(15, 23, 42, 0.06);
                text-decoration: none;
            }
            .ttx-course-control-panel {
                visibility: visible;
                opacity: 1;
                margin-bottom: -4px;
            }

            .ttx-course-control-panel .ttx-control-buttons button {
                min-height: 40px;
                padding: 9px 16px;
                border: 1px solid rgba(3, 105, 161, 0.28);
                border-bottom: 3px solid rgba(3, 105, 161, 0.38);
                border-radius: 10px;
                background: linear-gradient(180deg, #ffffff 0%, #e0f2fe 100%);
                color: var(--ttx-azure-dark);
                box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
                transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
            }

            .ttx-course-control-panel .ttx-control-buttons button:hover:not(:disabled) {
                color: var(--ttx-azure-dark);
                border-color: rgba(3, 105, 161, 0.42);
                border-bottom-color: rgba(3, 105, 161, 0.5);
                filter: brightness(1.02);
                transform: translateY(-1px);
                box-shadow: 0 10px 18px rgba(15, 23, 42, 0.14);
            }

            .ttx-course-control-panel .ttx-control-buttons button:active:not(:disabled) {
                transform: translateY(1px);
                border-bottom-width: 2px;
                box-shadow: 0 5px 10px rgba(15, 23, 42, 0.1);
            }

            .ttx-course-control-panel .ttx-control-buttons button:disabled {
                border-color: rgba(148, 163, 184, 0.35);
                border-bottom-color: rgba(100, 116, 139, 0.28);
                background: #e2e8f0;
                color: #64748b;
                box-shadow: none;
                transform: none;
            }

            .ttx-course-results {
                display: block;
            }
            .ttx-course-results[hidden] {
                display: none;
            }
            .ttx-results {
                display: none;
                margin-top: 20px;
            }

     .ttx-scoreboard-panel {
        width: 100%;
        max-width: 900px;
        background: rgba(255, 255, 255, 0.85);
        border-radius: 24px;
        padding: 12px;
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .ttx-scoreboard-panel[hidden] {
        display: none;
    }

    .ttx-scoreboard-header {
        text-align: center;
    }

    .ttx-scoreboard-title {
        margin: 0;
        font-size: 24px;
        font-weight: 700;
    }

    .ttx-scoreboard-content {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .ttx-scoreboard-table-wrapper {
        max-height: 248px;
        overflow: auto;
        border-radius: 16px;
        border: 1px solid rgba(148, 163, 184, 0.25);
        background: rgba(248, 250, 252, 0.45);
    }

    .ttx-scoreboard-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 640px;
    }

    .ttx-scoreboard-table th,
    .ttx-scoreboard-table td {
        padding: 4px 4px;
        text-align: left;
        font-size: 15px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
        color: #0f172a;
        white-space: nowrap;
    }

    .ttx-scoreboard-table th {
        font-weight: 700;
        font-size: 14px;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: #1f2937;
    }

    .ttx-scoreboard-table tbody tr:last-child td {
        border-bottom: none;
    }
    .ttx-scoreboard-medal-cell {
        min-width: 90px;
    }

    .ttx-scoreboard-note-cell {
        min-width: 150px;
    }

    .ttx-score-note-input {
        width: 100%;
        padding: 4px 8px;
        border: 1px solid rgba(148, 163, 184, 0.5);
        border-radius: 8px;
        font-size: 13px;
        background: rgba(255, 255, 255, 0.9);
        color: #0f172a;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
    }

    .ttx-score-note-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    }


    .ttx-scoreboard-table-wrapper::-webkit-scrollbar {
        width: 10px;
    }

    .ttx-scoreboard-table-wrapper::-webkit-scrollbar-track {
        background: rgba(226, 232, 240, 0.55);
        border-radius: 999px;
    }

    .ttx-scoreboard-table-wrapper::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.55);
        border-radius: 999px;
    }

    .ttx-scoreboard-empty {
        margin: 0;
        text-align: center;
        color: #64748b;
        font-size: 15px;
        display: none;
    }

    @media (max-width: 640px) {
        .ttx-brand-bar {
            grid-template-columns: 1fr;
        }

        .ttx-brand-title {
            font-size: 26px;
        }

        .ttx-account-entry {
            justify-content: flex-start;
            width: 100%;
        }

        .ttx-account-status {
            text-align: left;
        }

        .ttx-scoreboard-panel {
            padding: 20px;
        }
        .ttx-scoreboard-table {
            min-width: unset;
        }
        .ttx-scoreboard-table th,
        .ttx-scoreboard-table td {
            font-size: 14px;
        }
    }

    /* Styles pour les boîtes de résultats */
    .ttx-result-box {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 200px;
        min-height: 110px;
        border-radius: 18px;
        text-align: center;
        padding: 2px 4px;
        margin: 0;
        color: #0f172a;
        background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(226, 232, 240, 0.85));
        box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
    }

    #ttx-speedResult {
        background: linear-gradient(145deg, rgba(129, 140, 248, 0.92), rgba(96, 165, 250, 0.88));
        color: #fff;
    }

    #ttx-timeResult {
        background: linear-gradient(145deg, rgba(251, 191, 36, 0.92), rgba(249, 115, 22, 0.88));
        color: #fff;
    }

    #ttx-accuracyResult {
        background: linear-gradient(145deg, rgba(34, 197, 94, 0.9), rgba(16, 185, 129, 0.9));
        color: #fff;
    }

    #ttx-errorCountResult {
        background: linear-gradient(145deg, rgba(248, 113, 113, 0.95), rgba(239, 68, 68, 0.9));
        color: #fff;
    }

    .ttx-result-title {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 17px;
        font-weight: 900;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        opacity: 0.96;
    }

    .ttx-result-title .ttx-inline-icon {
        width: 26px;
        height: 26px;
        filter: drop-shadow(0 1px 0 currentColor);
    }

    .ttx-result-value {
        font-size: 26px;
        font-weight: 700;
        margin-top: 10px;
    }

    .ttx-results-chart {
        width: 100%;
        max-width: none;
        min-height: 145px;
        box-sizing: border-box;
        padding: 10px 14px 8px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: zoom-in;
        transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    }

    .ttx-results-chart[hidden] {
        display: none;
    }

    .ttx-results-chart:hover,
    .ttx-results-chart:focus-visible {
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, 0.42);
        box-shadow: 0 22px 42px rgba(15, 23, 42, 0.2);
        outline: none;
    }

    .ttx-results-chart svg {
        width: 100%;
        height: 128px;
        display: block;
        overflow: visible;
    }

    .ttx-chart-plot {
        fill: rgba(248, 250, 252, 0.72);
        stroke: rgba(148, 163, 184, 0.28);
    }

    .ttx-chart-grid-line {
        stroke: rgba(148, 163, 184, 0.28);
        stroke-width: 1;
    }

    .ttx-chart-grid-line-vertical {
        stroke-dasharray: 4 6;
        opacity: 0.72;
    }

    .ttx-chart-axis-line {
        stroke: rgba(15, 23, 42, 0.48);
        stroke-width: 1.4;
    }

    .ttx-chart-speed-line,
    .ttx-chart-accuracy-line {
        fill: none;
        stroke-width: 4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .ttx-chart-speed-line {
        stroke: #2563eb;
        filter: drop-shadow(0 5px 8px rgba(37, 99, 235, 0.25));
    }

    .ttx-chart-accuracy-line {
        stroke: #10b981;
        filter: drop-shadow(0 5px 8px rgba(16, 185, 129, 0.22));
    }

    .ttx-chart-error-marker {
        fill: none;
        stroke: #ef4444;
        stroke-width: 3;
        stroke-linecap: round;
        filter: drop-shadow(0 4px 6px rgba(239, 68, 68, 0.25));
    }

    .ttx-chart-axis-label,
    .ttx-chart-axis-title {
        fill: #475569;
        font-size: 13px;
        font-weight: 600;
        font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    }

    .ttx-chart-axis-title {
        fill: #0f172a;
    }

    .ttx-chart-axis-title-vertical {
        writing-mode: tb;
        glyph-orientation-vertical: 0;
    }

    .ttx-chart-legend {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        color: #334155;
        font-size: 14px;
        font-weight: 600;
    }

    .ttx-chart-legend span {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

    .ttx-chart-hover-context {
        display: grid;
        gap: 6px;
        margin: 0 22px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(248, 250, 252, 0.92);
        border: 1px solid rgba(148, 163, 184, 0.28);
        color: #0f172a;
        font-size: 14px;
        line-height: 1.35;
    }

    .ttx-chart-hover-context[hidden] {
        display: none;
    }

    .ttx-chart-hover-line {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 14px;
        margin: 0;
        align-items: baseline;
    }

    .ttx-chart-hover-label {
        color: #475569;
        font-weight: 700;
        white-space: nowrap;
    }

    .ttx-chart-hover-text {
        min-width: 0;
        overflow-wrap: anywhere;
        font-weight: 600;
    }

    .ttx-chart-hover-error {
        color: #dc2626;
        font-weight: 800;
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: 3px;
    }

    .ttx-chart-dot {
        width: 22px;
        height: 4px;
        border-radius: 999px;
        display: inline-block;
    }

    .ttx-chart-dot.ttx-speed {
        background: #2563eb;
    }

    .ttx-chart-dot.ttx-accuracy {
        background: #10b981;
    }

    .ttx-chart-cross {
        width: 12px;
        height: 12px;
        display: inline-block;
        position: relative;
    }

    .ttx-chart-cross::before,
    .ttx-chart-cross::after {
        content: '';
        position: absolute;
        left: 5px;
        top: 0;
        width: 3px;
        height: 12px;
        border-radius: 99px;
        background: #ef4444;
    }

    .ttx-chart-cross::before {
        transform: rotate(45deg);
    }

    .ttx-chart-cross::after {
        transform: rotate(-45deg);
    }

    .ttx-results-analysis {
        width: 100%;
        max-width: 900px;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(280px, 3fr);
        gap: 18px;
        align-items: stretch;
    }

    .ttx-reward-summary {
        width: 100%;
        max-width: 900px;
        grid-column: 1 / -1;
        box-sizing: border-box;
        padding: 18px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(14, 116, 144, 0.18);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
        display: grid;
        grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.3fr);
        gap: 16px;
        align-items: stretch;
    }

    .ttx-reward-summary:empty {
        display: none;
    }

    .ttx-course-reward-summary {
        max-width: none;
    }

    .ttx-reward-message {
        min-width: 0;
        padding: 16px;
        border-radius: 12px;
        background: #f0fdfa;
        border: 1px solid rgba(13, 148, 136, 0.2);
        color: #0f172a;
        display: flex;
        align-items: center;
    }

    .ttx-reward-message p {
        margin: 0;
        font-size: 17px;
        line-height: 1.45;
        font-weight: 750;
    }

    .ttx-reward-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .ttx-reward-item {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px 12px;
        align-items: center;
        min-height: 92px;
        padding: 16px;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid rgba(148, 163, 184, 0.28);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }

    .ttx-reward-icon-wrap {
        grid-row: 2;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(148, 163, 184, 0.22);
    }

    .ttx-reward-icon {
        width: 27px;
        height: 27px;
        color: #334155;
    }

    .ttx-reward-title-line {
        grid-column: 1 / -1;
        font-size: 17px;
        font-weight: 800;
        color: #0f172a;
    }

    .ttx-reward-level {
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 22px;
        line-height: 1.05;
        font-weight: 900;
        color: #0f172a;
    }

    .ttx-reward-record {
        grid-column: 1 / -1;
        width: fit-content;
        padding: 5px 10px;
        border-radius: 999px;
        background: #fef3c7;
        color: #92400e;
        font-size: 14px;
        font-weight: 800;
    }

    .ttx-reward-gold {
        background: linear-gradient(145deg, rgba(254, 243, 199, 0.96), rgba(251, 191, 36, 0.24));
        border-color: rgba(217, 119, 6, 0.35);
    }

    .ttx-reward-gold .ttx-reward-icon {
        color: #d97706;
        filter: drop-shadow(0 2px 4px rgba(217, 119, 6, 0.22));
    }

    .ttx-reward-silver {
        background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(203, 213, 225, 0.5));
        border-color: rgba(100, 116, 139, 0.32);
    }

    .ttx-reward-silver .ttx-reward-icon {
        color: #64748b;
        filter: drop-shadow(0 2px 4px rgba(100, 116, 139, 0.2));
    }

    .ttx-reward-bronze {
        background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(251, 146, 60, 0.3));
        border-color: rgba(194, 65, 12, 0.3);
    }

    .ttx-reward-bronze .ttx-reward-icon {
        color: #c2410c;
        filter: drop-shadow(0 2px 4px rgba(194, 65, 12, 0.2));
    }

    .ttx-reward-none {
        background: #f8fafc;
    }

    .ttx-keyboard-heatmap {
        width: 100%;
        min-height: 0;
        box-sizing: border-box;
        padding: 8px 10px 7px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(148, 163, 184, 0.25);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: zoom-in;
        transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    }

    .ttx-keyboard-heatmap[hidden] {
        display: none;
    }

    .ttx-keyboard-heatmap:hover,
    .ttx-keyboard-heatmap:focus-visible {
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, 0.42);
        box-shadow: 0 22px 42px rgba(15, 23, 42, 0.2);
        outline: none;
    }

    .ttx-keyboard-title {
        color: #0f172a;
        font-size: 13px;
        font-weight: 700;
        text-align: center;
    }

    .ttx-keyboard-layout {
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }

    .ttx-keyboard-row {
        display: flex;
        justify-content: stretch;
        gap: 2px;
        width: 100%;
    }

    .ttx-keyboard-key {
        --ttx-key-width: 1;
        --ttx-key-border-left-width: 1px;
        --ttx-key-border-right-width: 1px;
        --ttx-key-border-left-color: rgba(15, 23, 42, 0.12);
        --ttx-key-border-right-color: rgba(15, 23, 42, 0.12);
        flex: var(--ttx-key-width) 1 0;
        min-width: 0;
        height: 22px;
        border-radius: 6px;
        border-style: solid;
        border-width: 1px var(--ttx-key-border-right-width) 1px var(--ttx-key-border-left-width);
        border-color: rgba(15, 23, 42, 0.14) var(--ttx-key-border-right-color) rgba(15, 23, 42, 0.24) var(--ttx-key-border-left-color);
        background: var(--ttx-key-color, #cbd5e1);
        color: #0f172a;
        box-shadow:
            inset 0 1px 1px rgba(255, 255, 255, 0.58),
            inset 0 -1px 1px rgba(15, 23, 42, 0.08),
            0 5px 10px rgba(15, 23, 42, 0.1);
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
        font-family: 'Segoe UI Variable Text', 'Segoe UI', Arial, sans-serif;
    }

    .ttx-finger-index-left,
    .ttx-finger-index-right {
        --ttx-key-border-left-width: 0;
        --ttx-key-border-right-width: 0;
    }

    .ttx-finger-middle-left {
        --ttx-key-border-left-width: 1px;
        --ttx-key-border-left-color: rgba(51, 65, 85, 0.26);
        --ttx-key-border-right-color: rgba(148, 163, 184, 0.14);
    }

    .ttx-finger-middle-right {
        --ttx-key-border-right-width: 1px;
        --ttx-key-border-left-color: rgba(148, 163, 184, 0.14);
        --ttx-key-border-right-color: rgba(51, 65, 85, 0.26);
    }

    .ttx-finger-ring-left {
        --ttx-key-border-left-width: 2px;
        --ttx-key-border-left-color: rgba(51, 65, 85, 0.32);
        --ttx-key-border-right-color: rgba(148, 163, 184, 0.16);
    }

    .ttx-finger-ring-right {
        --ttx-key-border-right-width: 2px;
        --ttx-key-border-left-color: rgba(148, 163, 184, 0.16);
        --ttx-key-border-right-color: rgba(51, 65, 85, 0.32);
    }

    .ttx-finger-pinky-left {
        --ttx-key-border-left-width: 3px;
        --ttx-key-border-left-color: rgba(30, 41, 59, 0.38);
        --ttx-key-border-right-color: rgba(148, 163, 184, 0.18);
    }

    .ttx-finger-pinky-right {
        --ttx-key-border-right-width: 3px;
        --ttx-key-border-left-color: rgba(148, 163, 184, 0.18);
        --ttx-key-border-right-color: rgba(30, 41, 59, 0.38);
    }

    .ttx-course-keyboard {
        width: min(840px, 100%);
        align-self: center;
        margin-top: 0;
        border-radius: 14px;
        cursor: default;
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
        position: relative;
        overflow: visible;
    }

    .ttx-course-keyboard:hover,
    .ttx-course-keyboard:focus-visible {
        transform: none;
        border-color: rgba(148, 163, 184, 0.25);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    }

    .ttx-course-keyboard .ttx-keyboard-key {
        height: 44px;
        color: #0f172a;
    }

    .ttx-course-hands-overlay {
        width: 100%;
        height: clamp(196px, 25vw, 252px);
        margin: -8px 0 calc(-1 * clamp(196px, 25vw, 252px));
        pointer-events: none;
        position: relative;
        z-index: 4;
        overflow: visible;
    }

    .ttx-course-hands-svg {
        --ttx-course-hand-neutral-fill: #fff8e6;
        --ttx-course-hand-active-fill: #22c55e;
        --ttx-course-hand-active-stroke: #15803d;
        display: block;
        width: 108%;
        height: 100%;
        margin-left: -4%;
        overflow: visible;
        transform: translateY(0) scale(1.7) scaleX(1.155);
        transform-origin: center top;
    }

    .ttx-course-hands-svg #L_Neutral,
    .ttx-course-hands-svg #Backquote,
    .ttx-course-hands-svg #Digit1,
    .ttx-course-hands-svg #Digit2,
    .ttx-course-hands-svg #Digit3,
    .ttx-course-hands-svg #Digit4,
    .ttx-course-hands-svg #Digit5,
    .ttx-course-hands-svg #Digit6,
    .ttx-course-hands-svg #Tab,
    .ttx-course-hands-svg #KeyA,
    .ttx-course-hands-svg #KeyZ,
    .ttx-course-hands-svg #KeyE,
    .ttx-course-hands-svg #KeyR,
    .ttx-course-hands-svg #KeyT,
    .ttx-course-hands-svg #KeyQ,
    .ttx-course-hands-svg #KeyS,
    .ttx-course-hands-svg #KeyD,
    .ttx-course-hands-svg #KeyF,
    .ttx-course-hands-svg #KeyG,
    .ttx-course-hands-svg #IntlBackslash,
    .ttx-course-hands-svg #KeyW,
    .ttx-course-hands-svg #KeyX,
    .ttx-course-hands-svg #KeyC,
    .ttx-course-hands-svg #KeyV,
    .ttx-course-hands-svg #KeyB,
    .ttx-course-hands-svg #ShiftLeft,
    .ttx-course-hands-svg #ControlLeft,
    .ttx-course-hands-svg #MetaLeft {
        transform: translateX(-38px);
    }

    .ttx-course-hands-svg #R_Neutral,
    .ttx-course-hands-svg #Digit7,
    .ttx-course-hands-svg #Digit8,
    .ttx-course-hands-svg #Digit9,
    .ttx-course-hands-svg #Digit0,
    .ttx-course-hands-svg #Equal,
    .ttx-course-hands-svg #KeyY,
    .ttx-course-hands-svg #KeyU,
    .ttx-course-hands-svg #KeyI,
    .ttx-course-hands-svg #KeyO,
    .ttx-course-hands-svg #KeyP,
    .ttx-course-hands-svg #Quote,
    .ttx-course-hands-svg #KeyH,
    .ttx-course-hands-svg #KeyJ,
    .ttx-course-hands-svg #KeyK,
    .ttx-course-hands-svg #KeyL,
    .ttx-course-hands-svg #KeyM,
    .ttx-course-hands-svg #Semicolon,
    .ttx-course-hands-svg #Comma,
    .ttx-course-hands-svg #Period,
    .ttx-course-hands-svg #Slash,
    .ttx-course-hands-svg #ShiftRight,
    .ttx-course-hands-svg #MetaRight,
    .ttx-course-hands-svg #Enter {
        transform: translateX(-33px);
    }

    .ttx-course-hands-overlay[data-target-key-id="n"] .ttx-course-hands-svg #KeyM {
        transform: translateX(-68px);
    }

    .ttx-course-hands-svg .handPositions path,
    .ttx-course-hands-svg .handPositions line {
        fill: none;
        stroke: rgba(71, 85, 105, 0.28);
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.35px;
        vector-effect: non-scaling-stroke;
    }

    .ttx-course-hands-svg .handPositions .cls-36 {
        fill: url(#ttx-neutral-hand-fade);
        opacity: 0.96;
        stroke: none;
    }

    .ttx-course-hands-svg .handPositions g.active-hand .cls-36 {
        fill: url(#ttx-neutral-hand-fade);
        opacity: 0.9;
    }

    .ttx-course-hands-svg .handPositions g.active-hand .ttx-course-hand-filled-shape:not(.cls-36):not(.cls-68):not(.cls-69) {
        fill: url(#ttx-active-finger-fade);
        opacity: 1;
        stroke: none;
    }

    .ttx-course-hands-svg .handPositions g.active-hand .ttx-course-hand-line:not(.ttx-course-hand-bottom-edge):not(.cls-67) {
        fill: none;
        stroke: var(--ttx-course-hand-active-stroke, #15803d);
        stroke-width: 2.25px;
        opacity: 0.95;
    }

    .ttx-course-hands-svg .handPositions g.active-hand .cls-67 {
        stroke: rgba(71, 85, 105, 0.26);
    }

    .ttx-course-hands-svg .handPositions .ttx-course-hand-bottom-edge {
        stroke: none;
    }

    .ttx-course-keyboard .ttx-keyboard-layout {
        position: relative;
        z-index: 2;
    }

    .ttx-course-keyboard .ttx-keyboard-key-control .ttx-key-label {
        font-size: 10px;
    }

    .ttx-course-keyboard .ttx-key-label-single .ttx-key-primary {
        font-size: 18px;
    }

    .ttx-course-keyboard .ttx-key-label-dual .ttx-key-primary,
    .ttx-course-keyboard .ttx-key-label-dual .ttx-key-secondary {
        font-size: 11px;
    }

    .ttx-course-keyboard .ttx-finger-pinky-left,
    .ttx-course-keyboard-legend .ttx-finger-pinky-left {
        --ttx-key-color: #ef4444;
        background: #ef4444;
    }

    .ttx-course-keyboard .ttx-finger-ring-left,
    .ttx-course-keyboard-legend .ttx-finger-ring-left {
        --ttx-key-color: #f97316;
        background: #f97316;
    }

    .ttx-course-keyboard .ttx-finger-middle-left,
    .ttx-course-keyboard-legend .ttx-finger-middle-left {
        --ttx-key-color: #facc15;
        background: #facc15;
    }

    .ttx-course-keyboard .ttx-finger-index-left,
    .ttx-course-keyboard-legend .ttx-finger-index-left {
        --ttx-key-color: #22c55e;
        background: #22c55e;
    }

    .ttx-course-keyboard .ttx-finger-index-right,
    .ttx-course-keyboard-legend .ttx-finger-index-right {
        --ttx-key-color: #22d3ee;
        background: #22d3ee;
    }

    .ttx-course-keyboard .ttx-finger-middle-right,
    .ttx-course-keyboard-legend .ttx-finger-middle-right {
        --ttx-key-color: #3b82f6;
        background: #3b82f6;
    }

    .ttx-course-keyboard .ttx-finger-ring-right,
    .ttx-course-keyboard-legend .ttx-finger-ring-right {
        --ttx-key-color: #8b5cf6;
        background: #8b5cf6;
    }

    .ttx-course-keyboard .ttx-finger-pinky-right,
    .ttx-course-keyboard-legend .ttx-finger-pinky-right {
        --ttx-key-color: #ec4899;
        background: #ec4899;
    }

    .ttx-course-keyboard .ttx-finger-thumb,
    .ttx-course-keyboard-legend .ttx-finger-thumb {
        --ttx-key-color: #f3d37a;
        background: #f3d37a;
    }

    .ttx-course-keyboard-key:not(.ttx-course-key-active)::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.58);
        z-index: 1;
        pointer-events: none;
    }

    .ttx-course-keyboard-key .ttx-key-label {
        z-index: 2;
    }

    .ttx-course-key-active {
        z-index: 3;
        border-color: rgba(15, 23, 42, 0.38);
        filter: saturate(1.35);
        animation: ttx-course-key-pulse 0.72s ease-in-out infinite alternate;
    }

    .ttx-course-keyboard-legend {
        gap: 5px 9px;
    }

    .ttx-course-legend-swatch {
        width: 12px;
        height: 12px;
        border-radius: 4px;
        display: inline-block;
        border: 1px solid rgba(15, 23, 42, 0.16);
    }

    @keyframes ttx-course-key-pulse {
        from {
            box-shadow:
                inset 0 1px 1px rgba(255, 255, 255, 0.7),
                inset 0 -1px 1px rgba(15, 23, 42, 0.12),
                0 0 0 2px rgba(255, 255, 255, 0.95),
                0 7px 14px rgba(15, 23, 42, 0.18);
        }
        to {
            box-shadow:
                inset 0 1px 1px rgba(255, 255, 255, 0.75),
                inset 0 -1px 1px rgba(15, 23, 42, 0.14),
                0 0 0 4px color-mix(in srgb, var(--ttx-key-color) 55%, white),
                0 9px 18px rgba(15, 23, 42, 0.24);
        }
    }

    .ttx-keyboard-key-control {
        background: linear-gradient(145deg, #d1d5db, #bfc4ca);
        color: #111827;
    }

    .ttx-keyboard-key-highlight {
        background: linear-gradient(145deg, #dff7ff, #bae6fd);
    }

    .ttx-keyboard-key.ttx-unused {
        background: #cbd5e1;
        color: #64748b;
    }

    .ttx-key-label {
        position: absolute;
        inset: 2px 3px;
        display: block;
        font-weight: 650;
        line-height: 1;
        white-space: nowrap;
    }

    .ttx-keyboard-key-control .ttx-key-label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-align: center;
        color: rgba(17, 24, 39, 0.78);
        font-size: 8px;
        font-weight: 650;
        white-space: nowrap;
    }

    .ttx-key-icon,
    .ttx-key-icon-svg {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 9px;
        height: 9px;
    }

    .ttx-key-icon svg,
    .ttx-key-icon-svg svg {
        display: block;
        width: 100%;
        height: 100%;
    }

    .ttx-key-text {
        min-width: 0;
        line-height: 0.95;
        white-space: normal;
    }

    .ttx-key-icon-compact .ttx-key-icon {
        display: none;
    }

    .ttx-key-primary {
        position: absolute;
        color: #020617;
    }

    .ttx-key-secondary {
        position: absolute;
        color: #020617;
    }

    .ttx-key-label-single .ttx-key-primary {
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
    }

    .ttx-key-label-dual .ttx-key-primary {
        left: 0;
        top: -1px;
        font-size: 8px;
    }

    .ttx-key-label-dual .ttx-key-secondary {
        right: 0;
        bottom: 0;
        font-size: 8px;
    }

    .ttx-key-alt {
        position: absolute;
        right: 0;
        bottom: 1px;
        color: #1d4ed8;
        font-size: 10px;
    }

    .ttx-keyboard-key.ttx-has-error::before,
    .ttx-keyboard-key.ttx-has-error::after {
        content: '';
        position: absolute;
        right: 3px;
        top: -1px;
        width: 2px;
        height: 8px;
        border-radius: 99px;
        background: #dc2626;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
        transform-origin: center;
        z-index: 2;
    }

    .ttx-keyboard-key.ttx-has-error::before {
        transform: rotate(45deg);
    }

    .ttx-keyboard-key.ttx-has-error::after {
        transform: rotate(-45deg);
    }

    .ttx-keyboard-legend {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 10px;
        color: #334155;
        font-size: 10px;
        font-weight: 600;
    }

    .ttx-keyboard-legend span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .ttx-keyboard-gradient-label {
        gap: 7px;
    }

    .ttx-keyboard-gradient-label b {
        font-size: 11px;
        font-weight: 650;
    }

    .ttx-keyboard-scale,
    .ttx-keyboard-gradient,
    .ttx-keyboard-error-sample {
        width: 16px;
        height: 7px;
        border-radius: 99px;
        display: inline-block;
        border: 1px solid rgba(15, 23, 42, 0.1);
    }

    .ttx-keyboard-gradient {
        width: 120px;
        background: linear-gradient(90deg, hsl(18 86% 55%), hsl(70 86% 56%), hsl(150 86% 58%));
    }

    .ttx-keyboard-scale.ttx-empty {
        background: #cbd5e1;
    }

    .ttx-keyboard-error-sample {
        width: 10px;
        height: 10px;
        border: none;
        position: relative;
    }

    .ttx-keyboard-error-sample::before,
    .ttx-keyboard-error-sample::after {
        content: '';
        position: absolute;
        left: 4px;
        top: 0;
        width: 2px;
        height: 10px;
        border-radius: 99px;
        background: #dc2626;
    }

    .ttx-keyboard-error-sample::before {
        transform: rotate(45deg);
    }

    .ttx-keyboard-error-sample::after {
        transform: rotate(-45deg);
    }

    /* Styles pour le conteneur de résultats */
    #ttx-resultsContainer {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        justify-items: center;
        gap: 18px; /* Espace entre les blocs */
        margin: 18px 0 10px; /* Marge autour du conteneur */
    }

    .ttx-certificate-cta {
        display: inline-flex;
        align-items: center;
    }

    .ttx-certificate-cta[hidden] {
        display: none;
    }

    .ttx-certificate-button {
        white-space: nowrap;
    }

    .ttx-button.ttx-key-button.ttx-certificate-button .ttx-key-button-label {
        min-height: 34px;
        padding: 7px 18px;
        font-size: 16px;
    }

    .ttx-modal {
        position: fixed;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(15, 23, 42, 0.45);
        padding: 20px;
        z-index: 80;
    }

    .ttx-modal[aria-hidden="false"] {
        display: flex;
    }

    .ttx-modal-content {
        width: min(480px, 100%);
        background: #fff;
        border-radius: 24px;
        padding: 28px;
        box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .ttx-auth-modal-content {
        width: min(420px, 100%);
    }

    .ttx-auth-modal-content [hidden] {
        display: none;
    }

    .ttx-auth-form {
        margin-top: 16px;
    }

    .ttx-auth-switch {
        margin: 14px 0 0;
        color: #475569;
        font-size: 14px;
        text-align: center;
    }

    .ttx-auth-switch button {
        padding: 0;
        border: none;
        background: transparent;
        color: #1d4ed8;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .ttx-auth-switch button:hover {
        color: #1e40af;
    }

    .ttx-forgot-password {
        display: inline-flex;
        margin-top: 8px;
        padding: 0;
        border: none;
        background: transparent;
        color: #1d4ed8;
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .ttx-forgot-password:hover:not(:disabled) {
        color: #1e40af;
    }

    .ttx-forgot-password:disabled {
        color: #94a3b8;
        cursor: not-allowed;
    }

    .ttx-modal-close {
        position: absolute;
        top: 14px;
        right: 14px;
        border: none;
        background: transparent;
        font-size: 24px;
        cursor: pointer;
        color: #475569;
    }

    .ttx-modal-title {
        margin: 0;
        font-size: 24px;
        font-weight: 700;
        color: #0f172a;
    }

    .ttx-modal-form {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .ttx-modal-form .ttx-key-button {
        align-self: center;
    }

    .ttx-modal-form label {
        font-size: 15px;
        font-weight: 600;
        color: #0f172a;
    }

    .ttx-modal-form input {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.6);
        font-size: 16px;
        box-sizing: border-box;
        transition: border 0.15s ease, box-shadow 0.15s ease;
    }

    .ttx-modal-form input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }

    .ttx-modal-hint {
        font-size: 14px;
        color: #475569;
        margin: 0;
    }

    .ttx-modal-message {
        min-height: 20px;
        font-size: 14px;
        color: #b91c1c;
        margin: 0;
    }

    .ttx-modal-message.ttx-success {
        color: #0f766e;
    }

    .ttx-settings-modal-content {
        width: min(430px, 100%);
        gap: 18px;
    }

    .ttx-settings-form {
        gap: 16px;
    }

    .ttx-settings-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .ttx-settings-label {
        color: #0f172a;
        font-size: 15px;
        font-weight: 600;
    }

    .ttx-segmented-control {
        display: inline-grid;
        grid-template-columns: repeat(2, minmax(58px, 1fr));
        padding: 3px;
        border-radius: 999px;
        background: #e2e8f0;
        border: 1px solid rgba(148, 163, 184, 0.4);
    }

    .ttx-segmented-control input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .ttx-segmented-control label {
        min-height: 32px;
        padding: 7px 14px;
        border-radius: 999px;
        color: #475569;
        font-size: 13px;
        font-weight: 800;
        text-align: center;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    }

    .ttx-segmented-control input:checked + label {
        background: #fff;
        color: var(--ttx-azure-dark);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    }

    .ttx-settings-check {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 42px;
        cursor: pointer;
    }

    .ttx-settings-check input {
        width: 20px;
        height: 20px;
        flex: 0 0 auto;
    }

    .ttx-modal-content.ttx-chart-modal-content {
        width: min(900px, calc(100vw - 40px));
        max-height: calc(100vh - 40px);
        box-sizing: border-box;
        padding: 22px 0 18px;
        gap: 12px;
    }

    #ttx-chartModal[aria-hidden="false"] {
        align-items: flex-start;
        padding-top: 7vh;
    }

    #ttx-keyboardModal[aria-hidden="false"] {
        align-items: flex-start;
        padding-top: 7vh;
    }

    .ttx-modal-content.ttx-chart-modal-content .ttx-modal-close {
        top: 8px;
        right: 10px;
        z-index: 2;
    }

    .ttx-chart-modal-title {
        padding: 0 52px 0 22px;
    }

    .ttx-results-chart.ttx-results-chart-large {
        max-width: none;
        width: 100%;
        min-height: 418px;
        padding: 10px 0 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        cursor: default;
    }

    .ttx-results-chart.ttx-results-chart-large:hover,
    .ttx-results-chart.ttx-results-chart-large:focus-visible {
        transform: none;
        border-color: rgba(148, 163, 184, 0.25);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    }

    .ttx-results-chart.ttx-results-chart-large svg {
        height: 384px;
    }

    .ttx-results-chart.ttx-results-chart-large .ttx-chart-hover-context {
        font-size: 32px;
    }

    .ttx-results-chart.ttx-results-chart-large .ttx-chart-axis-label {
        font-size: 20px;
    }

    .ttx-results-chart.ttx-results-chart-large .ttx-chart-axis-title {
        font-size: 22px;
        font-weight: 700;
    }

    .ttx-modal-content.ttx-keyboard-modal-content {
        width: min(1000px, calc(100vw - 40px));
        max-height: calc(100vh - 40px);
        box-sizing: border-box;
        padding: 22px 0 18px;
        gap: 12px;
    }

    .ttx-modal-content.ttx-keyboard-modal-content .ttx-modal-close {
        top: 8px;
        right: 10px;
        z-index: 2;
    }

    .ttx-keyboard-heatmap.ttx-keyboard-heatmap-large {
        max-width: none;
        width: 100%;
        min-height: 430px;
        padding: 16px 20px 18px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        cursor: default;
    }

    .ttx-keyboard-heatmap.ttx-keyboard-heatmap-large:hover,
    .ttx-keyboard-heatmap.ttx-keyboard-heatmap-large:focus-visible {
        transform: none;
        border-color: rgba(148, 163, 184, 0.25);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-title {
        font-size: 20px;
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-layout {
        gap: 8px;
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-row {
        gap: 8px;
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-key {
        height: 58px;
        border-radius: 12px;
    }

    .ttx-keyboard-heatmap-large .ttx-key-label {
        inset: 8px 10px;
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-key-control .ttx-key-label {
        gap: 8px;
        font-size: 20px;
    }

    .ttx-keyboard-heatmap-large .ttx-key-icon,
    .ttx-keyboard-heatmap-large .ttx-key-icon-svg {
        width: 24px;
        height: 24px;
    }

    .ttx-keyboard-heatmap-large .ttx-key-icon-compact .ttx-key-icon {
        display: inline-flex;
    }

    .ttx-keyboard-heatmap-large .ttx-key-label-single .ttx-key-primary {
        font-size: 30px;
    }

    .ttx-keyboard-heatmap-large .ttx-key-label-dual .ttx-key-primary,
    .ttx-keyboard-heatmap-large .ttx-key-label-dual .ttx-key-secondary {
        font-size: 24px;
    }

    .ttx-keyboard-heatmap-large .ttx-key-label-dual .ttx-key-primary {
        top: -5px;
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-key.ttx-has-error::before,
    .ttx-keyboard-heatmap-large .ttx-keyboard-key.ttx-has-error::after {
        right: 9px;
        top: 2px;
        height: 20px;
        width: 4px;
    }

    .ttx-keyboard-heatmap-large .ttx-keyboard-legend {
        font-size: 14px;
        gap: 12px 18px;
    }

    .ttx-info-page {
        width: 100%;
        max-width: 980px;
        margin: 10px auto 0;
    }

    .ttx-info-page[hidden] {
        display: none;
    }

    .ttx-info-hero,
    .ttx-info-content,
    .ttx-footer {
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(148, 163, 184, 0.26);
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(10px);
    }

    .ttx-info-hero {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 20px;
        align-items: center;
        padding: 28px;
        border-radius: 24px 24px 0 0;
    }

    .ttx-info-icon {
        width: 62px;
        height: 62px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 18px;
        color: #0f766e;
        background: #ecfeff;
        border: 1px solid rgba(15, 118, 110, 0.22);
    }

    .ttx-info-icon svg {
        width: 36px;
        height: 36px;
    }

    .ttx-info-kicker {
        margin: 0 0 6px;
        color: var(--ttx-azure-dark);
        font-size: 14px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .ttx-info-hero h1,
    .ttx-info-content h2 {
        margin: 0;
        color: var(--ttx-ink);
        letter-spacing: 0;
    }

    .ttx-info-hero h1 {
        font-size: clamp(30px, 5vw, 48px);
        line-height: 1.04;
    }

    .ttx-info-hero p:last-child {
        margin: 10px 0 0;
        max-width: 760px;
        color: var(--ttx-muted);
        font-size: 18px;
        line-height: 1.55;
    }

    .ttx-info-content {
        display: grid;
        gap: 12px;
        padding: 28px;
        border-top: none;
        border-radius: 0 0 24px 24px;
    }

    .ttx-info-content h2 {
        margin-top: 12px;
        font-size: 22px;
    }

    .ttx-info-content h2:first-child {
        margin-top: 0;
    }

    .ttx-info-content p {
        margin: 0;
        color: #334155;
        font-size: 17px;
        line-height: 1.62;
    }

    .ttx-info-figure {
        margin: 0 0 10px;
    }

    .ttx-info-figure img {
        display: block;
        width: 100%;
        max-height: 360px;
        object-fit: cover;
        border-radius: 18px;
        border: 1px solid rgba(148, 163, 184, 0.24);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    }

    .ttx-info-content a,
    .ttx-footer a {
        color: var(--ttx-azure-dark);
        font-weight: 800;
        text-decoration: none;
    }

    .ttx-info-content a:hover,
    .ttx-footer a:hover {
        color: var(--ttx-teal-dark);
        text-decoration: underline;
    }

    .ttx-contact-form {
        display: grid;
        gap: 16px;
        max-width: 720px;
    }

    .ttx-contact-form label {
        display: block;
        margin-bottom: 6px;
        color: #0f172a;
        font-size: 15px;
        font-weight: 800;
    }

    .ttx-contact-form input,
    .ttx-contact-form select,
    .ttx-contact-form textarea {
        width: 100%;
        border: 1px solid rgba(148, 163, 184, 0.55);
        border-radius: 12px;
        background: #fff;
        color: #0f172a;
        font: inherit;
        font-size: 16px;
        line-height: 1.4;
        padding: 11px 12px;
    }

    .ttx-contact-form textarea {
        resize: vertical;
        min-height: 160px;
    }

    .ttx-contact-form input:focus,
    .ttx-contact-form select:focus,
    .ttx-contact-form textarea:focus {
        outline: none;
        border-color: var(--ttx-azure-dark);
        box-shadow: 0 0 0 3px rgba(0, 157, 255, 0.18);
    }

    .ttx-contact-form .ttx-key-button {
        width: 100%;
    }

    .ttx-contact-form .ttx-key-button-label {
        width: 100%;
    }

    .ttx-contact-message {
        min-height: 22px;
        margin: 0;
        color: #b91c1c;
        font-weight: 800;
    }

    .ttx-contact-message-success {
        color: var(--ttx-teal-dark);
    }

    .ttx-footer {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(230px, 1.2fr) minmax(220px, 0.9fr) auto;
        gap: 24px;
        align-items: start;
        margin-top: 18px;
        padding: 22px;
        border-radius: 22px;
    }

    .ttx-footer-brand,
    .ttx-footer-links,
    .ttx-footer-actions {
        min-width: 0;
    }

    .ttx-footer-logo {
        display: block;
        width: auto;
        height: 42px;
        max-width: 190px;
        object-fit: contain;
        margin-bottom: 10px;
    }

    .ttx-footer p {
        margin: 0;
        color: #334155;
        font-size: 15px;
        line-height: 1.5;
    }

    .ttx-footer-copy {
        margin-top: 8px !important;
    }

    .ttx-footer-links {
        display: grid;
        gap: 9px;
    }

    .ttx-footer-actions {
        display: grid;
        gap: 14px;
        justify-items: end;
    }

    .ttx-social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
    }

    .ttx-social-links a,
    .ttx-donate-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(3, 105, 161, 0.26);
        background: #f0f9ff;
        color: var(--ttx-azure-dark);
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    }

    .ttx-social-links a {
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    .ttx-social-links svg {
        width: 23px;
        height: 23px;
    }

    .ttx-donate-button {
        min-height: 42px;
        gap: 8px;
        padding: 9px 15px;
        border-radius: 999px;
        font-size: 15px;
        font-weight: 900;
    }

    .ttx-donate-button svg {
        width: 22px;
        height: 22px;
    }

    .ttx-social-links a:hover,
    .ttx-donate-button:hover {
        background: #dcfce7;
        color: var(--ttx-teal-dark);
        text-decoration: none;
        transform: translateY(-1px);
    }

    @media (max-width: 760px) {
        .ttx-wrapper {
            padding: 0 12px 56px;
        }
        .ttx-main-nav {
            align-items: stretch;
            flex-direction: column;
        }
        .ttx-main-tabs,
        .ttx-nav-account {
            width: 100%;
            justify-content: space-between;
        }
        .ttx-nav-account {
            flex-wrap: wrap;
        }
        .ttx-nav-account .ttx-account-status {
            max-width: 100%;
            white-space: normal;
        }
        .ttx-brand-title {
            font-size: 26px;
        }
        .ttx-course-plan-section,
        .ttx-course-panel {
            border-radius: 28px;
        }
        .ttx-course-plan-section {
            min-height: 360px;
            padding: 34px 18px 24px;
        }
        .ttx-course-plan-section > .ttx-course-title {
            margin-left: 0;
        }
        .ttx-course-header {
            flex-wrap: wrap;
        }
        .ttx-course-header-actions {
            width: 100%;
            justify-content: flex-end;
        }
        .ttx-course-substep-card {
            grid-template-columns: 1fr;
            gap: 14px;
        }
        .ttx-course-substep-header {
            display: grid;
            grid-template-columns: minmax(142px, 190px) auto;
            align-items: center;
            gap: 12px;
        }
        .ttx-course-substep-label {
            grid-column: auto;
            min-height: 104px;
            border-radius: 34px;
        }
        .ttx-course-reward-stack {
            grid-column: auto;
            justify-self: start;
        }
        .ttx-course-exercise-list {
            grid-column: auto;
            gap: 14px;
        }
        .ttx-course-exercise-button {
            width: 82px;
        }
        .ttx-course-test-container {
            height: 136px;
            padding: 20px 12px;
        }
        .ttx-course-text-active {
            gap: 8px;
        }
        .ttx-course-text-active .ttx-course-char {
            flex-basis: 52px;
            width: 52px;
            height: 68px;
            font-size: 28px;
        }
        .ttx-course-text-active .ttx-course-space {
            font-size: 12px;
        }
        .ttx-course-keyboard {
            padding: 7px 6px 6px;
        }
        .ttx-course-hands-overlay {
            height: clamp(124px, 32vw, 174px);
            margin: -6px 0 calc(-1 * clamp(124px, 32vw, 174px));
        }
        .ttx-course-hands-svg {
            width: 112%;
            margin-left: -6%;
            transform: translateY(0) scale(1.7);
        }
        .ttx-course-keyboard .ttx-keyboard-key {
            height: 22px;
            border-radius: 5px;
        }
        .ttx-course-keyboard .ttx-key-label {
            inset: 2px;
        }
        .ttx-course-keyboard .ttx-key-label-single .ttx-key-primary {
            font-size: 11px;
        }
        .ttx-course-keyboard .ttx-key-label-dual .ttx-key-primary,
        .ttx-course-keyboard .ttx-key-label-dual .ttx-key-secondary,
        .ttx-course-keyboard .ttx-keyboard-key-control .ttx-key-label {
            font-size: 7px;
        }
        .ttx-course-results {
            grid-template-columns: 1fr;
        }
        .ttx-reward-summary {
            grid-template-columns: 1fr;
        }
        .ttx-reward-grid {
            grid-template-columns: 1fr;
        }
        .ttx-results-analysis {
            grid-template-columns: 1fr;
        }
        .ttx-info-hero {
            grid-template-columns: 1fr;
            padding: 22px;
        }
        .ttx-info-content {
            padding: 22px;
        }
        .ttx-footer {
            grid-template-columns: 1fr;
            gap: 18px;
        }
        .ttx-footer-actions,
        .ttx-social-links {
            justify-items: start;
            justify-content: flex-start;
        }
    }

.ttx-hidden-input { opacity: 0; position: absolute; }

#ttx-resultsContainer.ttx-results-container-hidden { display: none; }

#ttx-resultsContainer[hidden] { display: none; }
