/* ── Lecteur à haute voix (3.51.0) : boutons « Écouter », fenêtre de lecture ─────────────────────────── */

.lvh-txtlecture { display: none; }
.lhv-controls { margin: 0; }

.lhv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 44px;
    min-width: 44px;
    padding: .55rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font: 600 .92rem/1.2 var(--schilo-font-sans, system-ui, sans-serif);
    cursor: pointer;
}
.lhv-btn .ti { font-size: 1.15rem; }
.lhv-btn:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }

/* Bouton de la barre latérale */
.schilo-sidebar-lhv .lhv-btn-listen {
    width: 100%;
    background: #3a5a8c;
    color: #fff;
}
.schilo-sidebar-lhv .lhv-btn-listen:hover { background: #2c4570; }

/* Bouton en tête d'étude, à côté de la durée de lecture */
.lhv-btn-hero {
    min-height: 0;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
    font-size: .82rem;
}
.lhv-btn-hero:hover { background: rgba(255, 255, 255, .28); }

/* Fenêtre de lecture */
.lhv-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 16, 28, .6);
}
body.lhv-open { overflow: hidden; }

.lhv-popup {
    --lhv-fond: #fff;
    --lhv-texte: #1b2430;
    --lhv-doux: #4a5566;
    --lhv-trait: #dfe4ea;
    --lhv-actif: #fff1b8;
    --lhv-bouton: #eef2f7;
    --lhv-accent: #3a5a8c;
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    background: var(--lhv-fond);
    color: var(--lhv-texte);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
    font-family: var(--schilo-font-sans, system-ui, sans-serif);
    overflow: hidden;
}
@media (prefers-color-scheme: dark) {
    .lhv-popup {
        --lhv-fond: #1b2230;
        --lhv-texte: #e8ecf2;
        --lhv-doux: #b4bfcd;
        --lhv-trait: #2f3a4b;
        --lhv-actif: #5a4a12;
        --lhv-bouton: #2a3445;
        --lhv-accent: #8fb0e6;
    }
}

.lhv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 4px 18px;
}
.lhv-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.lhv-close-btn { background: transparent; color: inherit; }
.lhv-close-btn:hover { background: var(--lhv-bouton); }

.lhv-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 18px;
}
.lhv-bar .lhv-btn { background: var(--lhv-bouton); color: var(--lhv-texte); }
.lhv-bar .lhv-btn-play { background: var(--lhv-accent); color: var(--lhv-fond); min-width: 110px; }

.lhv-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 6px 18px;
    font-size: .88rem;
    color: var(--lhv-doux);
}
.lhv-settings label { display: inline-flex; align-items: center; gap: 6px; }
.lhv-settings select {
    min-height: 36px;
    max-width: 260px;
    padding: 4px 8px;
    border: 1px solid var(--lhv-trait);
    border-radius: 6px;
    background: var(--lhv-fond);
    color: var(--lhv-texte);
    font: inherit;
}

.lhv-status {
    margin: 0;
    padding: 4px 18px 8px;
    border-bottom: 1px solid var(--lhv-trait);
    font-size: .85rem;
    color: var(--lhv-doux);
}

.lhv-popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px 18px;
    font-size: 1.05rem;
    line-height: 1.75;
}
.lhv-paragraph { margin: 0 0 .9rem; }
.lhv-chunk { cursor: pointer; border-radius: 4px; }
.lhv-chunk:hover { text-decoration: underline; text-decoration-color: var(--lhv-trait); }
.lhv-chunk.is-active { background: var(--lhv-actif); box-shadow: 0 0 0 3px var(--lhv-actif); }

/* Téléphone : la fenêtre prend tout l'écran, les boutons restent à portée de pouce. */
@media (max-width: 600px) {
    .lhv-overlay { padding: 0; }
    .lhv-popup { width: 100%; height: 100%; max-height: none; border-radius: 0; }
    .lhv-bar { justify-content: space-between; }
    .lhv-bar .lhv-btn span { display: none; }
    .lhv-bar .lhv-btn-play span { display: inline; }
    .lhv-settings select { max-width: 100%; }
}
