#speed-reader-box {
    margin-top: 3rem;
    padding: 1.5rem;
    border: 2px solid #eee;
    border-radius: 12px;
    background: #000000;
    text-align: center;
    color: #ffffff; /* Exemple : texte blanc */
}

/* =====================
   ZONE D'AFFICHAGE ORP
   ===================== */
#speed-reader-word {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 6rem 0;
    min-height: 3rem;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.05em;

    /*
     * GRILLE 3 colonnes : [gauche | ORP | droite]
     * Les colonnes gauche et droite sont identiques (1fr chacune),
     * ce qui garantit que la colonne centrale (auto) est TOUJOURS
     * au milieu exact du conteneur, quelle que soit la longueur du mot.
     */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    position: relative;
}

/* Ligne de guidage verticale rouge semi-transparente */
#speed-reader-word::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -1.4rem;
    bottom: -1.4rem;
    width: 2px;
    background-color: rgba(220, 50, 50, 0.3);
    transform: translateX(-50%);
    pointer-events: none;
    border-radius: 1px;
}

/* Lettres AVANT l'ORP : colonne gauche, alignées à droite (collées contre l'ORP) */
.sr-before {
    grid-column: 1;
    text-align: right;
    white-space: nowrap;
    color: #ffffff;
}

/* Lettre ORP : colonne centrale, toujours au centre mathématique */
.sr-orp {
    grid-column: 2;
    color: #e03030;
    text-align: center;
    z-index: 1;
}

/* Lettres APRÈS l'ORP : colonne droite, alignées à gauche (collées contre l'ORP) */
.sr-after {
    grid-column: 3;
    text-align: left;
    white-space: nowrap;
    color: #ffffff;
}

#speed-reader-box {
    width: 100vw; /* largeur totale de la fenêtre */
    margin: 0;    /* supprime les marges automatiques */
    padding: 1.5rem;
    border: 2px solid #eee;
    border-radius: 0; /* optionnel : pour enlever les arrondis sur les côtés */
    background: #000000;
    text-align: center;
    box-sizing: border-box; /* inclut le padding dans la largeur */
}


#speed-reader-box .controls {
    display: flex;
    justify-content: center; /* centre horizontalement le groupe */
    align-items: center;     /* aligne verticalement les éléments */
    gap: 1rem;               /* espace entre le bouton et la barre */
    flex-wrap: nowrap;       /* empêche le retour à la ligne */
    margin-bottom: 1rem;
}

#speed-reader-box button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: #333333; /* gris foncé */
    color: #ffffff;            /* texte blanc pour contraster */
    border: none;              /* supprime la bordure par défaut */
    border-radius: 6px;        /* coins légèrement arrondis */
}


#sr-progress-container {
    margin-top: 1rem;
}

/* =====================
   BARRE DE PROGRESSION
   ===================== */
#sr-progress {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 2px;
    background: #ccc;
    border-radius: 1px;
}

/* Chrome, Edge, Safari */
#sr-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* Firefox */
#sr-progress::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* Edge / IE */
#sr-progress::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* =====================
   BARRE DE VITESSE
   ===================== */
#sr-speed {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 2px;
    background: #ccc;
    border-radius: 1px;
}

/* Chrome, Edge, Safari */
#sr-speed::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* Firefox */
#sr-speed::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* Edge / IE */
#sr-speed::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* =====================
   ACCESSIBILITÉ
   ===================== */

/* Classe utilitaire : visible uniquement pour les lecteurs d'écran */
.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;
}

/* Groupe label + input vitesse alignés */
.sr-speed-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
