/* === Détecteur de raccourci === */
        /* ---- Détecteur ---- */
        .detector-modal,
        .quiz-modal {
            max-height: 92vh;
            overflow-y: auto;
            /* Scrollbar discrète, aux couleurs du thème (Firefox) */
            scrollbar-width: thin;
            scrollbar-color: rgba(225, 29, 72, 0.45) transparent;
        }

        /* Détecteur : pleine largeur sur desktop pour afficher les résultats
           en grille (jusqu'à 4 par ligne). */
        .detector-modal {
            max-width: 1180px;
            width: 94vw;
            overflow-anchor: none;
            scrollbar-gutter: stable;
        }

        /* Les résultats ne doivent jamais recentrer le clavier sous les doigts. */
        #detectorModal {
            align-items: flex-start;
            padding-block: 4vh;
            padding-block: 4dvh;
        }
        #detectorModal .detector-modal { margin-block: 0; max-height: 92dvh; }
        #detectorModal .detector-modal,
        #detectorModal .detector-modal > * {
            transform: none;
            transition-property: opacity;
            transition-delay: 0s;
            flex-shrink: 0;
        }

        .quiz-modal {
            max-width: 820px;
            width: 96%;
        }

        /* Scrollbar thématisée (WebKit) pour les deux modales + clavier */
        .detector-modal::-webkit-scrollbar,
        .quiz-modal::-webkit-scrollbar,
        .keyboard-modal::-webkit-scrollbar {
            width: 10px;
        }

        .detector-modal::-webkit-scrollbar-track,
        .quiz-modal::-webkit-scrollbar-track,
        .keyboard-modal::-webkit-scrollbar-track {
            background: transparent;
            margin: 6px 0;
        }

        .detector-modal::-webkit-scrollbar-thumb,
        .quiz-modal::-webkit-scrollbar-thumb,
        .keyboard-modal::-webkit-scrollbar-thumb {
            background: rgba(225, 29, 72, 0.45);
            border-radius: 999px;
            border: 2px solid transparent;
            background-clip: padding-box;
        }

        .detector-modal::-webkit-scrollbar-thumb:hover,
        .quiz-modal::-webkit-scrollbar-thumb:hover,
        .keyboard-modal::-webkit-scrollbar-thumb:hover {
            background: rgba(225, 29, 72, 0.7);
            background-clip: padding-box;
        }

        .detector-sub {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 0.9rem;
            text-align: center;
        }

        /* Le clavier porte désormais ses réglages dans son propre châssis. */
        .det-kb-row { display: contents; }

        .apple-ico {
            width: 0.95em;
            height: 0.95em;
            vertical-align: middle;
            transform: translateY(-0.5px);
        }
        .detector-os-badge .apple-ico { width: 0.9em; height: 0.9em; }
        .detector-combo-wrap {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            justify-content: center;
            flex-wrap: nowrap;
            height: 56px;
            min-height: 56px;
            padding: 0.6rem 0.8rem;
            margin-bottom: 0.8rem;
            border-radius: 0.8rem;
            background: rgba(127, 127, 127, 0.07);
        }

        .detector-os-badge {
            flex-shrink: 0;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-secondary);
        }

        .detector-combo {
            display: flex;
            align-items: center;
            gap: 0.3rem;
            flex-wrap: nowrap;
            font-size: 1.05rem;
            min-width: 0;
            overflow-x: auto;
            scrollbar-width: thin;
            padding-block: 3px;
        }
        .detector-combo > * { flex-shrink: 0; }
        .detector-combo .det-placeholder { white-space: nowrap; }

        .det-placeholder {
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .detector-reset {
            flex-shrink: 0;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
            color: var(--text-primary);
            border-radius: 50%;
            width: 34px;
            height: 34px;
            cursor: pointer;
            font-size: 1.1rem;
            line-height: 1;
        }

        .detector-reset:hover { border-color: var(--accent); color: var(--accent); }

        /* Résultats du détecteur : grille responsive — jusqu'à 4 cartes par ligne
           sur desktop (modale pleine largeur), nombre de lignes illimité. */
        .detector-result {
            margin-top: 0.9rem;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 0.7rem;
            align-items: stretch;
        }

        .det-card { height: 100%; }

        /* Le bouton "Voir dans la liste" et le message "aucun résultat"
           occupent toute la largeur de la grille. */
        .detector-result > .det-seelist,
        .detector-result > .det-none {
            grid-column: 1 / -1;
        }

        .det-card {
            border: 1px solid var(--border-color);
            border-radius: 0.7rem;
            padding: 0.7rem 0.85rem;
            background: var(--bg-card);
            text-align: left;
        }

        .det-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.3rem;
        }

        .det-desc {
            font-size: 0.82rem;
            color: var(--text-secondary, var(--text-tertiary));
            margin-bottom: 0.5rem;
        }

        .det-osrow {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-wrap: wrap;
            font-size: 0.85rem;
            margin-top: 0.2rem;
        }

        .det-os {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-secondary);
            min-width: 46px;
        }

        .det-none {
            text-align: center;
            color: var(--text-secondary);
            padding: 0.8rem;
            font-size: 0.9rem;
        }

        .det-seelist {
            align-self: center;
            margin-top: 0.3rem;
            padding: 0.55rem 1.1rem;
            border: none;
            border-radius: 0.7rem;
            background: var(--accent);
            color: #fff;
            font-weight: 700;
            cursor: pointer;
        }

        .det-seelist:hover { filter: brightness(1.05); }

        .detector-warn {
            margin-top: -0.35rem;
            margin-bottom: 0.9rem;
            font-size: 0.76rem;
            color: var(--text-secondary);
            text-align: center;
            line-height: 1.45;
            max-width: 640px;
            margin-left: auto;
            margin-right: auto;
        }
        .det-char-preview {
            display: inline-flex;
            align-items: center;
            margin-inline-start: 0.5rem;
            color: var(--accent);
            font-weight: 750;
            white-space: pre;
        }
