.tm-app {
    --tm-accent: #1a6c7a;
    --tm-soft: #e9f4f3;
    --tm-border: #cbdfe1;
    width: 100%; max-width: 900px; margin: 1.5rem auto; padding: clamp(1rem, 3vw, 2rem);
    color: #1f2430; background: #f3f9fb; border: 1px solid var(--tm-border); border-radius: 14px;
    line-height: 1.65; overflow-wrap: anywhere;
}
.tm-app, .tm-app *, .tm-app *::before, .tm-app *::after { box-sizing: border-box; }
.tm-app a { color: var(--tm-accent); }
.tm-app h2, .tm-app h3, .tm-app h4 { color: var(--tm-accent); line-height: 1.3; }
.tm-app :focus-visible { outline: 3px solid var(--tm-accent); outline-offset: 3px; }
.tm-app .tm-languages, .tm-pagination, .tm-bible-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.tm-languages a, .tm-bible-links a, .tm-days a { padding: .4rem .8rem; border: 1px solid var(--tm-border); border-radius: .5rem; text-decoration: none; }
.tm-app a[aria-current] { color: #fff; background: var(--tm-accent); border-color: var(--tm-accent); }
/* Discreet FR | PL switch */
.tm-app .tm-languages {
    width: fit-content; margin: 0 0 .75rem auto; gap: 0; flex-wrap: nowrap;
    border: 1px solid var(--tm-border); border-radius: 999px; overflow: hidden; background: #fff;
}
.tm-app .tm-languages .tm-lang-toggle, .tm-app .tm-languages a {
    display: inline-flex; align-items: center; gap: .3rem; min-height: 0; margin: 0;
    padding: .15rem .55rem; border: 0; border-radius: 0; background: transparent; color: #5b6573;
    font-size: .75rem; font-weight: 600; line-height: 1.4; letter-spacing: .03em; text-decoration: none; opacity: .75;
}
.tm-app .tm-languages > * + * { border-left: 1px solid var(--tm-border); }
.tm-app .tm-languages .tm-lang-toggle:hover, .tm-app .tm-languages a:hover { opacity: 1; background: var(--tm-soft); }
.tm-app .tm-languages .tm-lang-toggle[aria-pressed="true"], .tm-app .tm-languages a[aria-current] {
    color: var(--tm-accent); background: var(--tm-soft); opacity: 1;
}
.tm-flag { display: inline-block; width: 1.1em; height: .75em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); flex: none; }
.tm-flag--fr { background: linear-gradient(90deg, #0055a4 33.3%, #fff 33.3% 66.6%, #ef4135 66.6%); }
.tm-flag--pl { background: linear-gradient(180deg, #fff 50%, #dc143c 50%); }
.tm-app [hidden] { display: none !important; }
.tm-app--today { margin: 0 auto 2rem; }
.tm-app button {
    padding: .55rem 1rem; border: 0; border-radius: .5rem; background: var(--tm-accent); color: #fff;
    cursor: pointer; font: inherit; white-space: normal;
}
.tm-app input, .tm-app select { min-width: 0; max-width: 100%; padding: .55rem; background: #fff; color: #1f2430; border: 1px solid var(--tm-border); border-radius: .4rem; font: inherit; }
.tm-date-form, .tm-search-form, .tm-month-form { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.tm-search-form label { flex-basis: 100%; }
.tm-search-form input { flex: 1 1 12rem; }
.tm-date-form input { width: 6rem; }
.tm-reading { margin-top: 1.5rem; }
.tm-reading h2 { text-align: center; }
.tm-app .tm-verse { margin: 1rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--tm-accent); background: var(--tm-soft); font-weight: 600; }
.tm-comment { text-align: justify; hyphens: auto; }
.tm-bible-links { margin: 1.5rem 0; align-items: center; }
.tm-bible-links h3 { flex-basis: 100%; margin: 0; }
.tm-bible-links a { display: inline-flex; gap: .4rem; align-items: center; background: #fff; }
.tm-bible-links svg { flex: 0 0 20px; }
.tm-search { border-top: 1px solid var(--tm-border); margin-top: 1.5rem; padding-top: 1rem; }
.tm-results { padding-left: 1.25rem; }
.tm-results li { margin: .8rem 0; }
.tm-pagination { justify-content: space-between; }
.tm-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin-top: 1rem; }
.tm-days a, .tm-day-missing { min-height: 44px; padding: .45rem .1rem; text-align: center; }
.tm-days a { background: #fff; }
.tm-app .tm-day-missing, .tm-app .tm-note { color: #59627a; font-size: .9em; }
.tm-videos { border-top: 1px solid var(--tm-border); padding-top: 1rem; }
.tm-video { margin: 1.25rem 0; }
.tm-player { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--tm-soft); border: 1px solid var(--tm-border); border-radius: .6rem; overflow: hidden; }
.tm-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.tm-error { padding: 1rem; border-left: 4px solid #b3141b; color: #7d171c; background: #fff2f2; }
@media (max-width: 480px) {
    .tm-app { border-radius: .6rem; padding: 1rem; }
    .tm-comment { text-align: left; }
    .tm-app button, .tm-app input, .tm-app select { min-height: 44px; }
    .tm-app .tm-languages .tm-lang-toggle, .tm-app .tm-languages a { min-height: 32px; padding: 0 .7rem; }
}

/* Petit format [texte_manne_jour format="compact"] — après les règles générales pour les surcharger. */
.tm-app.tm-app--compact { margin: 0; padding: .8rem; font-size: .85rem; line-height: 1.5; border-radius: 10px; }
.tm-app--compact .tm-languages { margin-bottom: .4rem; }
.tm-app--compact .tm-languages .tm-lang-toggle { padding: .1rem .45rem; font-size: .7rem; }
.tm-app--compact h2 { margin: 0 0 .4rem; font-size: 1rem; text-align: center; }
.tm-app--compact .tm-verse { margin: .4rem 0; padding: .5rem .6rem; border-left-width: 3px; font-size: .85rem; }
.tm-app--compact .tm-more summary { cursor: pointer; font-weight: 600; color: var(--tm-accent); }
.tm-app--compact .tm-comment { max-height: 45vh; overflow-y: auto; text-align: left; }
.tm-app--compact .tm-bible-links { gap: .3rem; margin-top: .5rem; }
.tm-app--compact .tm-bible-links a { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .45rem; font-size: .8rem; }
.tm-app--compact .tm-today { margin: .5rem 0 0; text-align: center; }

/* Bouton et surcouche plein écran (verset + commentaire uniquement). */
.tm-present-wrap { margin: .25rem 0 0; text-align: right; }
.tm-app .tm-present { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; font-size: .9em; }
.tm-app--compact .tm-present-wrap { margin: 0; text-align: center; }
.tm-app--compact .tm-present { padding: .15rem .55rem; font-size: .8rem; }
.tm-no-scroll, .tm-no-scroll body { overflow: hidden; }
.tm-screen {
    position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column;
    background: #0d3d44; color: #fff; font-family: Georgia, "Times New Roman", serif;
}
.tm-screen-bar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.2rem; background: rgba(0, 0, 0, .3); font: 16px/1.4 system-ui, sans-serif; }
.tm-screen-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.tm-screen-close { padding: 0 .4rem; border: 0; background: none; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.tm-screen-close:focus-visible { outline: 3px solid #7fd6d0; outline-offset: 2px; }
.tm-screen-area { flex: 1; display: flex; overflow-y: auto; padding: 3vh 6vw; }
.tm-screen-inner { width: 100%; max-width: 1400px; margin: auto; line-height: 1.45; }
.tm-screen-verse { margin: 0 0 .9em; padding: 0 0 0 .8em; border-left: .15em solid #7fd6d0; font-size: 1.15em; font-weight: 700; color: #e6fbf8; }
.tm-screen-comment { font-size: .8em; text-align: justify; hyphens: auto; }
.tm-screen-comment p { margin: 0 0 .7em; }
.tm-screen-comment a { color: #9fe6e0; }
@media (max-width: 600px) { .tm-screen-comment { text-align: left; } }
