/* Académie du Storytelling — correctif sombre V2.7.5.3
   Récapitulatif du quiz et vérification d'un nouvel appareil. */

html[data-theme="dark"] {
    color-scheme: dark;
    --v2753-surface: #151b34;
    --v2753-surface-soft: #202849;
    --v2753-border: #344064;
    --v2753-text: #f5f7ff;
    --v2753-muted: #b8c1df;
}

/* Récapitulatif final du quiz : classes réelles de quiz-review.blade.php. */
html[data-theme="dark"] .quiz-recap-summary,
html[data-theme="dark"] .quiz-recap-item {
    background: var(--v2753-surface) !important;
    border-color: var(--v2753-border) !important;
    color: var(--v2753-text) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] .quiz-recap-item > header {
    border-color: var(--v2753-border) !important;
}

html[data-theme="dark"] .quiz-recap-summary h2,
html[data-theme="dark"] .quiz-recap-summary p,
html[data-theme="dark"] .quiz-recap-summary .eyebrow,
html[data-theme="dark"] .quiz-recap-score,
html[data-theme="dark"] .quiz-recap-item h3,
html[data-theme="dark"] .quiz-recap-choice dd,
html[data-theme="dark"] .quiz-recap-explanation,
html[data-theme="dark"] .quiz-recap-explanation p {
    color: var(--v2753-text) !important;
}

html[data-theme="dark"] .quiz-recap-choice dt {
    color: var(--v2753-muted) !important;
}

html[data-theme="dark"] .quiz-recap-number {
    background: #26335e !important;
    color: #dfe5ff !important;
}

html[data-theme="dark"] .quiz-recap-choice {
    border: 1px solid var(--v2753-border);
    background: #1b2442 !important;
    color: var(--v2753-text) !important;
}

html[data-theme="dark"] .quiz-recap-choice.is-correct,
html[data-theme="dark"] .quiz-recap-choice.is-expected {
    background: rgba(16, 185, 129, .16) !important;
    border-color: rgba(52, 211, 153, .38) !important;
    color: #eafff7 !important;
}

html[data-theme="dark"] .quiz-recap-choice.is-incorrect {
    background: rgba(244, 63, 94, .16) !important;
    border-color: rgba(251, 113, 133, .38) !important;
    color: #fff1f3 !important;
}

html[data-theme="dark"] .quiz-recap-choice.is-correct *,
html[data-theme="dark"] .quiz-recap-choice.is-expected *,
html[data-theme="dark"] .quiz-recap-choice.is-incorrect * {
    color: inherit !important;
}

html[data-theme="dark"] .quiz-recap-item.is-correct .quiz-recap-status {
    color: #5ee0a8 !important;
}

html[data-theme="dark"] .quiz-recap-item.is-incorrect .quiz-recap-status {
    color: #ff8094 !important;
}

html[data-theme="dark"] .quiz-recap-explanation {
    background: var(--v2753-surface-soft) !important;
    border-color: #5872ff !important;
    color: #f1f4ff !important;
}

html[data-theme="dark"] .quiz-recap-explanation * {
    color: inherit !important;
}

/* Vérification d'appareil : aucun sélecteur :has(), pour une compatibilité fiable. */
html[data-theme="dark"] .device-verification-shell {
    background: #090f22 !important;
    color: var(--v2753-text) !important;
}

html[data-theme="dark"] .device-verification-card {
    background: var(--v2753-surface) !important;
    border-color: var(--v2753-border) !important;
    color: var(--v2753-text) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .26) !important;
}

html[data-theme="dark"] .device-verification-card h1,
html[data-theme="dark"] .device-verification-card p,
html[data-theme="dark"] .device-verification-card label,
html[data-theme="dark"] .device-verification-card strong {
    color: var(--v2753-text) !important;
}

html[data-theme="dark"] .device-verification-card .muted,
html[data-theme="dark"] .device-summary span {
    color: var(--v2753-muted) !important;
}

html[data-theme="dark"] .device-summary {
    background: var(--v2753-surface-soft) !important;
    border: 1px solid var(--v2753-border) !important;
    color: var(--v2753-text) !important;
}

html[data-theme="dark"] .device-verification-card .verification-code {
    background: #0d142b !important;
    border: 1px solid #5269d7 !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(75, 101, 255, .14) !important;
}

html[data-theme="dark"] .device-verification-card .verification-code:focus {
    border-color: #7890ff !important;
    box-shadow: 0 0 0 4px rgba(97, 124, 255, .24) !important;
}

html[data-theme="dark"] .device-verification-card .verification-code::placeholder {
    color: #9eabd0 !important;
    opacity: 1;
}

html[data-theme="dark"] .device-verification-card .notice-success {
    background: #12392f !important;
    border: 1px solid #28634f !important;
    color: #9aebc9 !important;
}

html[data-theme="dark"] .device-verification-card .notice-error {
    background: #3b1c27 !important;
    border: 1px solid #7d3046 !important;
    color: #ffabb4 !important;
}

html[data-theme="dark"] .device-verification-card .notice:empty,
html[data-theme="dark"] .device-verification-card [role="alert"]:empty,
.v2753-empty-message {
    display: none !important;
}

@media (max-width: 720px) {
    html[data-theme="dark"] .device-verification-card h1 {
        font-size: clamp(2rem, 10vw, 3.2rem);
        line-height: 1.05;
    }
}
