/* =============================================================================
   QUPIDON Mini-test de personnalité (test-personnalite.html)
   Se charge après style.css et article.css. Les écrans de questions
   reprennent le rendu de l'app : jauge 2×2 du QS (SQGaugeScale.tsx) et cartes
   « pair » du QE (eqTestRunning.tsx). Les résultats reprennent la barre
   « centrée » de l'app (QuotientAxisRow.tsx : remplissage depuis le repère
   50 % vers le pôle dominant) et les dégradés de QuotientGradientsConstant.ts.
============================================================================= */

:root {
    --q-sq: #C89840;
    --q-sq-light: #DCAF5A;
    --q-sq-dark: #6B4C1D;
    --q-eq: #B85848;
    --q-eq-light: #CE6E5D;
    --q-eq-dark: #54221A;
    --q-cq: #5B5AD7;
    --q-seq: #E0245E;
    --glass: rgba(36, 21, 49, 0.7);
    --glass-border: rgba(255, 249, 246, 0.16);
}

/* L'attribut hidden doit toujours l'emporter : sans ça, `.btn { display:
   inline-block }` (style.css) réaffiche les boutons masqués par le script. */
.qt-app [hidden] {
    display: none !important;
}

.qt-hero {
    padding-bottom: 2.5rem;
}

/* Mode concentration (questions, intermède, calcul) : l'en-tête de page
   disparaît pour que la question occupe l'écran ; le test démarre juste sous
   la barre de navigation fixe. */
body.qt-focus .qt-hero {
    display: none;
}

body.qt-focus .qt-app {
    padding-top: 6.5rem;
    min-height: 100vh;
    min-height: 100svh;
}

.qt-app {
    max-width: 640px;
    margin: 0 auto;
    padding: 2.5rem 1rem 5rem;
}

.qt-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.5rem;
    margin-bottom: 1.2rem;
}

.qt-card h2 {
    font-size: 1.35rem;
    max-width: none;
    margin-bottom: 0.8rem;
}

.qt-card h2:focus {
    outline: none;
}

.qt-card p {
    color: var(--text-muted);
}

.qt-center {
    text-align: center;
}

.qt-card .btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.qt-card .btn-ghost,
.qt-restart .btn-ghost {
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.qt-btn-block {
    width: 100%;
}

/* --------------------------------- PUCES ---------------------------------- */

.qt-chip {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.28rem 0.8rem;
    border-radius: 50px;
    color: #fff;
    background: var(--chip, var(--q-sq));
}

.qt-chip-sq { --chip: var(--q-sq); }
.qt-chip-eq { --chip: var(--q-eq); }

.qt-duo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

/* ------------------------------ INTRODUCTION ------------------------------ */

.qt-facts {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
}

.qt-facts li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--text-muted);
}

.qt-facts li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--or);
    font-weight: 700;
}

.qt-check {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin: 1.2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.qt-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--or);
}

.qt-check a {
    color: var(--or);
}

.qt-input {
    width: 100%;
    font: inherit;
    color: var(--creme);
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.qt-input:focus {
    outline: none;
    border-color: var(--or);
}

.qt-error {
    color: #F5809F !important;
    font-weight: 700;
    margin: 0.4rem 0 1rem;
}

.qt-success {
    color: #7FD3A5 !important;
    font-weight: 700;
    margin-top: 0.8rem;
}

.qt-last {
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.92rem;
}

.qt-last a {
    color: var(--or);
}

/* ------------------------------ PROGRESSION ------------------------------- */

.qt-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--text-faint);
    margin-bottom: 0.6rem;
}

/* Pastille et compteur restent chacun sur une ligne, quelle que soit la largeur. */
.qt-progress .qt-chip,
#quiz-count {
    white-space: nowrap;
}

#quiz-count {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.qt-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.8rem;
}

.qt-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--q-sq), var(--q-eq));
    transition: width 0.35s var(--ease);
}

.qt-question {
    font-size: clamp(1.2rem, 3.4vw, 1.45rem) !important;
    line-height: 1.35;
    text-align: center;
    min-height: 3.2em;
    margin-bottom: 1.6rem !important;
    animation: qt-fade-up 0.35s var(--ease);
}

.qt-question:focus {
    outline: none;
}

#quiz-answers > * {
    animation: qt-fade-up 0.35s 0.05s var(--ease) both;
}

/* ------------------------- JAUGE 4 CRANS (QS) ---------------------------- */
/* Colonne gauche = désaccord, droite = accord ; haut = tranché, bas = nuancé. */

.qt-gauge {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: auto auto;
    gap: 10px;
}

.qt-gauge button {
    font: inherit;
    cursor: pointer;
}

.qt-gauge button {
    min-height: 84px;
    padding: 10px;
    border-radius: 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: rgba(255, 249, 246, 0.85);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.3;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transition: background 0.15s, transform 0.15s;
}

.qt-gauge button:hover {
    transform: translateY(-2px);
}

.qt-gauge button.is-chosen {
    background: var(--q-sq);
    color: #FFF9F6;
    transform: scale(0.97);
}

/* ------------------------- CURSEUR « PAIR » (QE) -------------------------- */
/* Un seul curseur continu entre les 2 formulations (textA à gauche, textB à
   droite, éventuellement permutées via bFirst) - remplace les 2 cartes à
   boutons Plutôt/Tout à fait qui donnaient l'impression de 2 questions
   distinctes. Valeur envoyée au back telle quelle (sliderValue, 0-100). */

.qt-slider-card {
    border: 1.5px solid var(--q-eq);
    border-radius: 18px;
    padding: 20px 18px 18px;
    background: rgba(36, 21, 49, 0.55);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.qt-slider-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.qt-slider-label {
    color: #FFF9F6;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    flex: 1;
}

.qt-slider-label-end {
    text-align: right;
}

.qt-slider-wrap {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
}

.qt-slider-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 249, 246, 0.14);
    overflow: hidden;
    pointer-events: none;
}

.qt-slider-track::before {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--pct, 50%);
    background: linear-gradient(90deg, var(--q-eq-light), var(--q-eq));
    transition: width 0.05s linear;
}

.qt-slider-mid {
    position: absolute;
    left: 50%;
    top: -22px;
    transform: translateX(-50%);
    color: rgba(255, 249, 246, 0.55);
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
}

.qt-slider-input {
    position: relative;
    width: 100%;
    margin: 0;
    height: 36px;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.qt-slider-input::-webkit-slider-runnable-track {
    background: transparent;
    height: 8px;
}

.qt-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    margin-top: -9px;
    border-radius: 50%;
    background: #FFF9F6;
    border: 3px solid var(--q-eq);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s;
}

.qt-slider-input::-webkit-slider-thumb:hover,
.qt-slider-input:focus-visible::-webkit-slider-thumb {
    transform: scale(1.12);
}

.qt-slider-input::-moz-range-track {
    background: transparent;
    height: 8px;
}

.qt-slider-input::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #FFF9F6;
    border: 3px solid var(--q-eq);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s;
}

.qt-slider-input::-moz-range-thumb:hover,
.qt-slider-input:focus-visible::-moz-range-thumb {
    transform: scale(1.12);
}

.qt-slider-confirm {
    margin-top: 20px;
}

.qt-slider-confirm.is-chosen {
    transform: scale(0.97);
}

/* -------------------------------- INTERMÈDE ------------------------------- */

.qt-done-badge {
    width: 84px;
    height: 84px;
    margin: 0.4rem auto 1.2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, var(--q-sq-light), var(--q-sq) 55%, var(--q-sq-dark));
    box-shadow: 0 0 0 0 rgba(200, 152, 64, 0.6);
    animation: qt-pop 0.6s var(--ease) both, qt-ring 1.6s 0.4s ease-out 2;
}

.qt-done-badge svg {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: qt-draw 0.5s 0.35s ease-out forwards;
}

.qt-btn-eq {
    margin-top: 0.8rem;
    background: var(--q-eq) !important;
    color: #FFF9F6 !important;
    box-shadow: 0 10px 30px rgba(184, 88, 72, 0.35) !important;
}

/* --------------------------------- CALCUL --------------------------------- */

.qt-orbit {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0.8rem auto 1.4rem;
    animation: qt-spin 1.6s linear infinite;
}

.qt-orb {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    filter: blur(0.3px);
}

.qt-orb-sq {
    top: 0;
    left: 38px;
    background: radial-gradient(circle at 30% 30%, var(--q-sq-light), var(--q-sq));
    box-shadow: 0 0 24px 6px rgba(200, 152, 64, 0.55);
}

.qt-orb-eq {
    bottom: 0;
    left: 38px;
    background: radial-gradient(circle at 30% 30%, var(--q-eq-light), var(--q-eq));
    box-shadow: 0 0 24px 6px rgba(184, 88, 72, 0.55);
}

#computing-text {
    animation: qt-pulse-text 1.4s ease-in-out infinite;
}

/* -------------------------------- RÉSULTATS ------------------------------- */

.qt-summary {
    overflow: hidden;
    padding-top: 2.2rem;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(200, 152, 64, 0.22), transparent 70%),
        radial-gradient(ellipse 80% 60% at 80% 100%, rgba(184, 88, 72, 0.22), transparent 70%),
        rgba(255, 255, 255, 0.05);
}

.qt-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--or) !important;
    margin-bottom: 0.9rem;
}

.qt-summary-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem !important;
}

.qt-badge {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    font-size: clamp(1.15rem, 4.2vw, 1.5rem);
    color: #FFF9F6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    animation: qt-pop 0.7s var(--ease) both;
}

.qt-badge-sq {
    background: linear-gradient(135deg, var(--q-sq-light), var(--q-sq) 55%, var(--q-sq-dark));
    animation-delay: 0.15s;
}

.qt-badge-eq {
    background: linear-gradient(135deg, var(--q-eq-light), var(--q-eq) 55%, var(--q-eq-dark));
    animation-delay: 0.4s;
}

.qt-amp {
    color: var(--text-faint);
    font-size: 1.2rem;
    animation: qt-pop 0.5s 0.3s var(--ease) both;
}

.qt-caveat {
    font-size: 0.9rem;
    color: var(--text-faint) !important;
    max-width: 44ch;
    margin: 0 auto;
}

/* Éclats lancés depuis le centre à l'apparition du profil (générés en JS). */
.qt-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
}

.qt-burst span {
    position: absolute;
    width: var(--s, 8px);
    height: var(--s, 8px);
    border-radius: 50%;
    background: var(--c);
    opacity: 0;
    animation: qt-burst 1.1s var(--d, 0s) cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

/* Carte d'un quotient. */
.qt-result {
    --c: var(--q-sq);
    --c-light: var(--q-sq-light);
    --c-dark: var(--q-sq-dark);
    border-color: color-mix(in srgb, var(--c) 55%, transparent);
    background:
        radial-gradient(ellipse 90% 70% at 100% 0%, color-mix(in srgb, var(--c-light) 28%, transparent), transparent 70%),
        linear-gradient(170deg, color-mix(in srgb, var(--c) 16%, transparent), color-mix(in srgb, var(--c-dark) 22%, transparent)),
        rgba(20, 10, 94, 0.55);
}

.qt-result-eq {
    --c: var(--q-eq);
    --c-light: var(--q-eq-light);
    --c-dark: var(--q-eq-dark);
}

.qt-result .qt-chip {
    --chip: var(--c);
}

.qt-result-intensity {
    margin-top: 1.1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--c-light) !important;
}

.qt-result-pole {
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--creme) !important;
    font-size: clamp(1.9rem, 7vw, 2.5rem);
    line-height: 1.1;
    margin: 0.1rem 0 1.4rem;
}

.qt-meter-labels {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-faint);
    margin-bottom: 0.55rem;
}

.qt-meter-labels span:last-child {
    text-align: right;
}

.qt-meter-labels b {
    font-size: 1.15rem;
    color: var(--creme);
}

.qt-meter-labels .is-win b {
    color: var(--c-light);
}

.qt-meter-track {
    position: relative;
    height: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* Remplissage depuis le repère central (50 %) vers le pôle dominant : la
   barre est posée à sa taille finale et « pousse » depuis le centre grâce
   à transform-origin (animation GPU, sans recalcul de mise en page). */
.qt-meter-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--fill-left);
    width: var(--fill-width);
    background: linear-gradient(90deg, var(--c-light), var(--c));
    transform: scaleX(0);
    transform-origin: var(--fill-origin);
    transition: transform 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}

.qt-meter-fill.is-right {
    border-radius: 0 14px 14px 0;
}

.qt-meter-fill.is-left {
    border-radius: 14px 0 0 14px;
    background: linear-gradient(270deg, var(--c-light), var(--c));
}

.qt-meter-mid {
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: rgba(255, 255, 255, 0.75);
}

.qt-result.is-in .qt-meter-fill {
    transform: scaleX(1);
}

.qt-result h3 {
    font-size: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-light);
    margin: 1.8rem 0 0.5rem;
}

.qt-couple {
    margin-top: 1.2rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--c);
}

.qt-couple strong {
    display: block;
    color: var(--creme);
    margin-bottom: 0.3rem;
}

/* Apparition progressive des cartes de résultat. */
.qt-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.qt-reveal.is-in {
    opacity: 1;
    transform: none;
}

.qt-share-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.qt-share-actions .btn {
    padding: 0.75rem 1.3rem;
    font-size: 0.95rem;
}

/* Carte « télécharge l'app » : 2 quotients faits, 2 à découvrir dans l'app. */
.qt-download {
    border-color: rgba(200, 152, 64, 0.45);
    background:
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(200, 152, 64, 0.2), transparent 70%),
        rgba(255, 255, 255, 0.05);
}

.qt-download h2 {
    font-size: clamp(1.4rem, 4.6vw, 1.75rem) !important;
}

.qt-quad {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 1.4rem 0 1.6rem;
    text-align: left;
}

.qt-quad li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.25;
    color: var(--creme);
    border: 1.5px solid var(--q);
    background: color-mix(in srgb, var(--q) 16%, transparent);
}

.qt-quad li span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.8rem;
    background: var(--q);
    color: #fff;
}

.qt-quad li.is-locked {
    border-style: dashed;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.qt-quad li.is-locked span {
    background: rgba(255, 255, 255, 0.1);
}

.qt-quad-sq { --q: var(--q-sq); }
.qt-quad-eq { --q: var(--q-eq); }
.qt-quad-cq { --q: var(--q-cq); }
.qt-quad-seq { --q: var(--q-seq); }

.qt-download .download-buttons {
    gap: 0.8rem;
}

.qt-download .download-btn {
    padding: 0.8rem 1.4rem;
}

.qt-inline {
    display: flex;
    gap: 0.6rem;
}

.qt-inline .qt-input {
    flex: 1;
    min-width: 0;
}

.qt-inline .btn {
    flex: 0 0 auto;
    padding: 0.85rem 1.2rem;
}

.qt-turnstile:empty {
    display: none;
}

.qt-turnstile {
    display: flex;
    justify-content: center;
    margin: 1rem 0 0;
}

.qt-restart {
    margin-top: 1.6rem;
}

/* ------------------------------- ANIMATIONS ------------------------------- */

@keyframes qt-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes qt-pop {
    0% { opacity: 0; transform: scale(0.6); }
    70% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes qt-ring {
    from { box-shadow: 0 0 0 0 rgba(200, 152, 64, 0.6); }
    to { box-shadow: 0 0 0 26px rgba(200, 152, 64, 0); }
}

@keyframes qt-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes qt-spin {
    to { transform: rotate(360deg); }
}

@keyframes qt-pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@keyframes qt-burst {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.3); }
}

/* ------------------------------- MOBILE ---------------------------------- */

@media (max-width: 480px) {
    .qt-hero {
        padding: 7rem 1rem 2rem;
    }

    .qt-hero h1 {
        font-size: 1.85rem;
    }

    .qt-hero .lede {
        font-size: 0.98rem;
    }

    .qt-app {
        padding: 1.4rem 0.75rem 3.5rem;
    }

    body.qt-focus .qt-app {
        padding-top: 5.5rem;
    }

    .qt-card {
        padding: 1.4rem 1.1rem;
        border-radius: 20px;
    }

    .qt-card h2 {
        font-size: 1.22rem;
    }

    .qt-chip {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
        padding: 0.3rem 0.75rem;
    }

    .qt-progress {
        font-size: 0.82rem;
    }

    .qt-progress-bar {
        margin-bottom: 1.4rem;
    }

    .qt-question {
        font-size: 1.12rem !important;
        min-height: 4em;
        margin-bottom: 1.3rem !important;
    }

    .qt-gauge button {
        min-height: 74px;
        font-size: 0.82rem;
        border-radius: 16px;
    }

    .qt-slider-card {
        padding: 16px 14px 14px;
    }

    .qt-slider-label {
        font-size: 0.87rem;
    }

    .qt-summary {
        padding-top: 1.8rem;
    }

    /* Badges empilés et centrés, le « & » entre les deux. */
    .qt-summary-title {
        flex-direction: column;
        gap: 0.3rem;
    }

    .qt-badge {
        font-size: 1.05rem;
        padding: 0.5rem 1.1rem;
    }

    .qt-amp {
        font-size: 1rem;
    }

    .qt-result-pole {
        font-size: 1.85rem;
        margin-bottom: 1.1rem;
    }

    .qt-meter-labels {
        font-size: 0.8rem;
    }

    .qt-meter-labels b {
        font-size: 1.05rem;
    }

    .qt-quad li {
        font-size: 0.8rem;
        padding: 0.6rem 0.65rem;
        gap: 0.45rem;
    }

    .qt-quad li span {
        width: 24px;
        height: 24px;
    }

    /* Badges des stores empilés en pleine largeur. */
    .qt-download .download-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .qt-download .download-btn {
        justify-content: center;
    }

    .qt-share-actions .btn {
        flex: 1 1 auto;
    }

    .qt-inline {
        flex-direction: column;
    }
}

@media (max-width: 350px) {
    .qt-gauge {
        gap: 8px;
    }

    .qt-gauge button {
        font-size: 0.78rem;
        padding: 8px;
    }

    .qt-quad {
        grid-template-columns: 1fr;
    }
}

/* Mouvement réduit : tout s'affiche directement à l'état final. */
@media (prefers-reduced-motion: reduce) {
    .qt-reveal,
    .qt-meter-fill {
        transition: none;
    }

    .qt-reveal {
        opacity: 1;
        transform: none;
    }

    .qt-meter-fill {
        transform: scaleX(1);
    }

    .qt-badge,
    .qt-amp,
    .qt-done-badge,
    .qt-done-badge svg,
    .qt-question,
    #quiz-answers > *,
    #computing-text {
        animation: none;
        stroke-dashoffset: 0;
    }

    .qt-orbit {
        animation-duration: 6s;
    }

    .qt-burst {
        display: none;
    }
}
