/*
 * Prières quotidiennes
 * Une mise en page légère inspirée d'un missel traditionnel.
 */

:root {
  --ivory: #f7f1e5;
  --paper: #fffdf8;
  --ink: #2e2923;
  --muted: #73685b;
  --rubric: #8b2f2d;
  --rubric-dark: #682220;
  --gold: #b99a62;
  --line: #d9cdb9;
  --nav-height: 4rem;
  --reading-width: 45rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgb(255 255 255 / 70%), transparent 32rem),
    var(--ivory);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.85rem;
  color: #fff;
  background: var(--rubric-dark);
  border-radius: 0.25rem;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.utility-controls {
  position: fixed;
  z-index: 70;
  top: calc(var(--nav-height) + 0.65rem);
  right: max(0.75rem, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
}

.translation-toggle {
  display: inline-flex;
  min-width: 8rem;
  min-height: 2.35rem;
  padding: 0.36rem 0.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  color: var(--rubric-dark);
  background: rgb(255 253 248 / 96%);
  border: 1px solid var(--line);
  border-radius: 2rem;
  box-shadow: 0 0.25rem 1rem rgb(68 51 32 / 12%);
  font-family: Georgia, "Times New Roman", Times, serif;
  transition: border-color 180ms ease, background 180ms ease;
}

.settings-toggle,
.settings-close,
.settings-reset {
  color: var(--rubric-dark);
  background: rgb(255 253 248 / 96%);
  border: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", Times, serif;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.settings-toggle {
  display: inline-grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  color: var(--rubric-dark);
  background: transparent;
  border-color: transparent;
  border-radius: 0.35rem;
  box-shadow: none;
  font-size: 1.35rem;
}

.settings-toggle:hover,
.settings-toggle:focus-visible,
.settings-close:hover,
.settings-close:focus-visible,
.settings-reset:hover,
.settings-reset:focus-visible {
  background: #fff;
  border-color: var(--gold);
}

.settings-toggle:hover,
.settings-toggle:focus-visible {
  background: rgb(255 253 248 / 74%);
}

.settings-panel {
  position: fixed;
  z-index: 80;
  top: 4rem;
  right: max(0.75rem, env(safe-area-inset-right));
  width: min(20rem, calc(100% - 1.5rem));
  padding: 0.72rem;
  color: var(--ink);
  background: rgb(255 253 248 / 98%);
  border: 1px solid var(--line);
  box-shadow: 0 0.75rem 2rem rgb(68 51 32 / 16%);
}

.settings-panel-header {
  display: flex;
  margin-bottom: 0.45rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-panel h2 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.2;
}

.settings-close {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  font-size: 0.95rem;
  line-height: 1;
}

.settings-form {
  display: grid;
  gap: 0.48rem;
}

.settings-check {
  display: flex;
  gap: 0.42rem;
  align-items: center;
  color: var(--rubric-dark);
  font-size: 0.78rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem 0.5rem;
}

.settings-grid-angelus {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-angelus {
  min-width: 0;
  margin: 0.1rem 0 0;
  padding: 0.45rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.settings-angelus legend {
  padding: 0 0.35rem 0 0;
}

.settings-field {
  display: grid;
  gap: 0.16rem;
}

.settings-field label {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.settings-field input {
  width: 100%;
  padding: 0.24rem 0.28rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  font: inherit;
}

.settings-reset {
  padding: 0.34rem 0.55rem;
  border-radius: 1rem;
  font-size: 0.7rem;
}

.settings-note {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.notification-permission,
.speech-toggle {
  color: var(--rubric-dark);
  background: rgb(255 253 248 / 96%);
  border: 1px solid var(--line);
  border-radius: 1rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  cursor: pointer;
}

.notification-permission {
  justify-self: start;
  padding: 0.34rem 0.55rem;
  font-size: 0.7rem;
}

.is-hidden-by-settings {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.translation-toggle:focus-within,
.translation-toggle:hover {
  background: #fff;
  border-color: var(--gold);
}

.translation-toggle-icon {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.language-option {
  min-width: 2.25rem;
  padding: 0.24rem 0.36rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 1rem;
  cursor: pointer;
  font: 700 0.68rem/1 Georgia, "Times New Roman", Times, serif;
  letter-spacing: 0.06em;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.language-option:hover {
  color: var(--rubric-dark);
}

.language-option.is-selected {
  color: #fffdf8;
  background: var(--rubric-dark);
  box-shadow: 0 0.15rem 0.4rem rgb(68 51 32 / 18%);
}

.language-option:focus-visible {
  outline-offset: 2px;
}

.translation-divider {
  width: 1px;
  height: 1.05rem;
  background: var(--line);
}

.ui-la {
  display: none;
}

html[data-language-mode="latin"] .ui-fr {
  display: none;
}

html[data-language-mode="latin"] .ui-la {
  display: inline;
}

.main-nav {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  min-height: var(--nav-height);
  background: rgb(247 241 229 / 94%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0.2rem 1.2rem rgb(65 48 31 / 7%);
  backdrop-filter: blur(0.4rem);
}

.nav-inner {
  display: flex;
  min-height: var(--nav-height);
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 1rem;
  align-items: center;
  justify-content: center;
  gap: clamp(0.45rem, 2vw, 1.5rem);
}

.nav-inner .settings-toggle {
  position: absolute;
  top: 50%;
  right: max(0.75rem, env(safe-area-inset-right));
  transform: translateY(-50%);
}

.nav-link {
  position: relative;
  padding: 0.65rem 0.15rem;
  color: var(--muted);
  font-size: clamp(0.78rem, 2.5vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.nav-link .ui-la {
  display: none;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  left: 0;
  height: 2px;
  background: var(--rubric);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--rubric-dark);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-separator {
  color: var(--gold);
  font-size: 0.65rem;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.site-header {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4.25rem) 1.25rem 4.5rem;
  text-align: center;
}

.cross {
  margin: 0 0 0.75rem;
  color: var(--rubric);
  font-size: 1.7rem;
  line-height: 1;
}

h1,
h2,
h3 {
  color: var(--rubric-dark);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.subtitle {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-style: italic;
}

.current-prayer {
  display: inline-flex;
  margin: 1.15rem auto 0;
  padding: 0.32rem 0.7rem;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--muted);
  background: rgb(255 253 248 / 72%);
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.current-prayer[hidden] {
  display: none;
}

.current-prayer-label {
  color: var(--rubric);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-prayer-link {
  color: var(--rubric-dark);
  text-decoration: none;
}

.current-prayer-link:hover,
.current-prayer-link:focus-visible {
  text-decoration: underline;
}

.prayer-book {
  width: min(calc(100% - 2rem), var(--reading-width));
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 1rem 3rem rgb(68 51 32 / 9%);
}

.prayer-section {
  position: relative;
  min-height: 70vh;
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.35rem, 7vw, 4.5rem);
  scroll-margin-top: calc(var(--nav-height) + 1rem);
  text-align: center;
}

.prayer-section + .prayer-section {
  border-top: 1px solid var(--line);
}

.prayer-section + .prayer-section::before {
  position: absolute;
  top: -0.45rem;
  left: 50%;
  width: 4rem;
  height: 0.9rem;
  background: var(--paper);
  color: var(--gold);
  content: "· ✦ ·";
  font-size: 0.8rem;
  line-height: 0.9rem;
  transform: translateX(-50%);
}

.day-chapter {
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.day-chapter + .day-chapter {
  border-top: 1px solid var(--line);
}

.chapter-header {
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.35rem, 7vw, 4.5rem) clamp(2rem, 6vw, 3.5rem);
  text-align: center;
}

.chapter-schedule {
  display: grid;
  gap: 0.55rem;
  max-width: 24rem;
  margin: 0 auto;
}

.chapter-schedule-link {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.85rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
}

.chapter-schedule-link time {
  color: var(--rubric);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chapter-schedule-link:hover,
.chapter-schedule-link:focus-visible,
.chapter-schedule-link.is-active {
  color: var(--rubric-dark);
}

.chapter-schedule-link.is-active time {
  color: var(--rubric-dark);
}

.prayer-time {
  --time-column-width: clamp(6rem, 12vw, 8rem);

  display: grid;
  grid-template-columns: var(--time-column-width) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  padding-top: clamp(2.75rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.75rem, 7vw, 5.5rem);
  text-align: left;
}

.prayer-time::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(clamp(1.35rem, 7vw, 4.5rem) + (var(--time-column-width) * 0.5));
  width: 1px;
  background: linear-gradient(var(--line), rgb(217 205 185 / 0));
  content: "";
}

.prayer-time + .prayer-time::before {
  display: none;
}

.prayer-time-marker {
  position: sticky;
  top: calc(var(--nav-height) + 1.25rem);
  align-self: start;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  color: var(--rubric);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prayer-time-dot {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--gold);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0.25rem 0.8rem rgb(68 51 32 / 8%);
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.prayer-time.is-active .prayer-time-dot {
  color: var(--rubric);
  border-color: var(--gold);
  transform: scale(1.08);
}

.prayer-time-content {
  min-width: 0;
  text-align: center;
}

.prayer-time[data-rosary="true"] {
  display: grid;
  width: 100%;
  column-gap: clamp(1.25rem, 4vw, 3rem);
  row-gap: clamp(0.45rem, 1.5vw, 0.9rem);
  margin-inline: 0;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.prayer-time[data-rosary="true"]::before {
  display: none;
}

.prayer-time[data-rosary="true"] .prayer-time-marker {
  position: static;
  display: grid;
  width: auto;
  margin: 0;
  gap: 0.45rem;
  justify-items: center;
}

.prayer-time[data-rosary="true"] .prayer-time-dot {
  transform: none;
}

.prayer-time[data-rosary="true"].is-active .prayer-time-dot {
  transform: none;
}

.prayer-time[data-rosary="true"] .prayer-time-content {
  display: contents;
}

.prayer-time[data-rosary="true"] .moment,
.prayer-time[data-rosary="true"] .prayer-title-row {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  text-align: center;
}

.prayer-time[data-rosary="true"] .prayer-title-row {
  padding-top: 1.6rem;
}

.prayer-time[data-rosary="true"] h3 {
  margin-bottom: 0;
}

.prayer-time[data-rosary="true"] .prayer-text {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  max-width: none;
  text-align: center;
}

.ornament {
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 1rem;
}

.moment {
  margin: 0 0 0.25rem;
  color: var(--rubric);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0 0 2.2rem;
  font-size: clamp(1.85rem, 6vw, 2.8rem);
  line-height: 1.2;
}

h3 {
  margin-bottom: 1.6rem;
  font-size: clamp(1.55rem, 5vw, 2.35rem);
}

.prayer-title-row {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
}

.speech-toggle {
  display: inline-flex;
  max-width: min(100%, 22rem);
  margin: -0.75rem 0 1.4rem;
  padding: 0.42rem 0.78rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
}

.speech-icon {
  color: var(--gold);
  font-size: 0.88rem;
  line-height: 1;
}

.speech-button-text {
  min-width: 0;
}

.speech-toggle.is-speaking {
  color: #fffdf8;
  background: var(--rubric-dark);
  border-color: var(--rubric-dark);
}

.virtual-rosary {
  display: grid;
  width: 100%;
  max-width: none;
  margin: 0 auto clamp(2rem, 6vw, 3.75rem);
  justify-items: center;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.virtual-rosary-mystery {
  display: grid;
  max-width: 34rem;
  gap: 0.45rem;
  justify-items: center;
}

.virtual-rosary-mystery-nav {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) 2.4rem;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
}

.virtual-rosary-arrow {
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.virtual-rosary-arrow:hover,
.virtual-rosary-arrow:focus-visible {
  color: var(--rubric-dark);
  outline: 1px solid rgb(185 154 98 / 50%);
  outline-offset: 0.08rem;
}

.virtual-rosary-ordinal,
.virtual-rosary-title,
.virtual-rosary-verse,
.virtual-rosary-fruit,
.virtual-rosary-prayer-name,
.virtual-rosary-prayer-text {
  margin: 0;
}

.virtual-rosary-ordinal {
  color: var(--rubric);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.virtual-rosary-title {
  margin-top: 0.18rem;
  color: var(--rubric-dark);
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 400;
  line-height: 1.18;
}

.virtual-rosary-verse {
  max-width: 31rem;
  color: var(--ink);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.48;
}

.virtual-rosary-fruit {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.virtual-rosary-stage {
  width: 100%;
  max-width: none;
  margin: 0.65rem 0 0.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  appearance: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.virtual-rosary-stage-wrap {
  position: relative;
  display: grid;
  width: 100%;
}

.virtual-rosary-stage:focus-visible {
  outline: 1px solid rgb(185 154 98 / 36%);
  outline-offset: 0.12rem;
}

.virtual-rosary-stage:focus:not(:focus-visible) {
  outline: none;
}

.virtual-rosary-svg {
  display: block;
  width: 100%;
  min-height: clamp(16rem, 48vw, 24rem);
  height: auto;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.virtual-rosary-svg * {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.virtual-rosary-chain {
  fill: none;
  stroke: rgb(185 154 98 / 58%);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
}

.virtual-rosary-bead {
  fill: #fffaf0;
  stroke: rgb(185 154 98 / 72%);
  stroke-width: 2;
  transition: fill 220ms ease, stroke 220ms ease, filter 220ms ease;
}

.virtual-rosary-bead.is-done {
  fill: #d5c29e;
  stroke: var(--gold);
}

.virtual-rosary-bead.is-current {
  fill: var(--rubric);
  stroke: var(--gold);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 5px rgb(185 154 98 / 70%));
}

.virtual-rosary-cross {
  fill: none;
  stroke: rgb(185 154 98 / 68%);
  stroke-linecap: round;
  stroke-width: 4;
  transition: stroke 220ms ease, filter 220ms ease;
}

.virtual-rosary-cross.is-done {
  stroke: var(--gold);
}

.virtual-rosary-cross.is-current {
  stroke: var(--rubric);
  filter: drop-shadow(0 0 5px rgb(185 154 98 / 70%));
}

.virtual-rosary-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-linejoin: round;
  stroke-width: 3px;
  text-transform: uppercase;
}

.virtual-rosary-prayer {
  display: grid;
  min-height: 10.5rem;
  max-width: 34rem;
  gap: 0.65rem;
  align-content: start;
}

.virtual-rosary-prayer.is-overlay {
  position: absolute;
  z-index: 2;
  top: 27%;
  right: clamp(2.4rem, 14vw, 7.5rem);
  left: clamp(2.4rem, 14vw, 7.5rem);
  min-height: 0;
  max-width: none;
  gap: 0.25rem;
  pointer-events: none;
}

.virtual-rosary-prayer-name {
  color: var(--rubric);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.virtual-rosary-prayer-text {
  color: var(--ink);
  font-size: clamp(1.02rem, 3vw, 1.18rem);
  line-height: 1.6;
  text-align: center;
  transition: opacity 180ms ease;
}

.virtual-rosary-prayer-text.is-hint {
  color: var(--muted);
  font-size: 1.02rem;
  font-style: italic;
}

.virtual-rosary-prayer.is-overlay .virtual-rosary-prayer-text {
  max-width: 22rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(0.78rem, 2.25vw, 0.92rem);
  font-style: italic;
  line-height: 1.35;
  text-shadow:
    0 1px 0 var(--paper),
    0 -1px 0 var(--paper),
    1px 0 0 var(--paper),
    -1px 0 0 var(--paper);
}

.virtual-rosary-prayer-text.is-long {
  font-size: 0.98rem;
  line-height: 1.52;
}

.virtual-rosary-prayer-text.is-fading {
  opacity: 0;
}

.prayer-text {
  max-width: 36rem;
  margin: 0 auto;
  text-align: left;
}

.prayer-pair {
  display: grid;
  gap: clamp(2rem, 6vw, 4.5rem);
}

.prayer-language {
  min-width: 0;
}

.prayer-aligned {
  display: none;
}

.prayer-aligned-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

.prayer-aligned-row + .prayer-aligned-row {
  margin-top: 1.15em;
}

.prayer-aligned-cell {
  min-width: 0;
}

.prayer-aligned-cell + .prayer-aligned-cell {
  padding-left: clamp(2rem, 5vw, 4rem);
  border-left: 1px solid var(--line);
}

.prayer-subtitle {
  margin: 2.4rem 0 1rem;
  color: var(--rubric-dark);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.prayer-subtitle:first-child {
  margin-top: 0;
}

.prayer-list {
  margin: 0 0 1.15em;
  padding: 0;
  list-style: none;
}

.prayer-list li + li {
  margin-top: 0.35rem;
}

.prayer-la {
  display: none;
}

html[data-language-mode="latin"] .prayer-fr {
  display: none;
}

html[data-language-mode="latin"] .prayer-la {
  display: block;
}

html[data-language-mode="parallel"] .prayer-book {
  width: min(calc(100% - 2rem), 75rem);
}

html[data-language-mode="parallel"] .prayer-text {
  max-width: 64rem;
}

html[data-language-mode="parallel"] .prayer-pair {
  display: block;
}

html[data-language-mode="parallel"] .prayer-language {
  display: none;
}

html[data-language-mode="parallel"] .prayer-aligned {
  display: block;
}

html[data-language-mode="parallel"] .prayer-la {
  display: block;
  padding-left: clamp(2rem, 5vw, 4rem);
  border-left: 1px solid var(--line);
}

html[data-language-mode="parallel"] .prayer-language {
  display: none;
}

.prayer-text p {
  margin: 0 0 1.15em;
}

.prayer-text p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  color: var(--rubric);
  font-size: 3.15em;
  line-height: 0.78;
}

.prayer-text .virtual-rosary p::first-letter {
  float: none;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.prayer-text .amen {
  margin-top: 1.7rem;
  color: var(--rubric-dark);
  font-style: italic;
  font-weight: 700;
  text-align: center;
}

.site-footer {
  padding: 3.5rem 1rem 6rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

.back-to-top {
  position: fixed;
  z-index: 40;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  padding: 0.55rem 0.8rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--rubric-dark);
  background: rgb(255 253 248 / 94%);
  border: 1px solid var(--line);
  border-radius: 2rem;
  box-shadow: 0 0.35rem 1.2rem rgb(68 51 32 / 12%);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.78rem;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.back-to-top:hover {
  border-color: var(--gold);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* L'animation n'est activée qu'après le chargement de JavaScript. */
.js-enabled .prayer-section {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 550ms ease, transform 550ms ease;
}

.js-enabled .prayer-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 38rem) {
  :root {
    --nav-height: 3.65rem;
  }

  body {
    font-size: 1.02rem;
    line-height: 1.68;
  }

  .site-header {
    padding-top: calc(var(--nav-height) + 3.5rem);
    padding-bottom: 3.25rem;
  }

  .nav-inner {
    gap: 0.8rem;
    padding-right: 3.2rem;
    padding-left: 0.8rem;
    justify-content: center;
  }

  .nav-link {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  .utility-controls {
    top: auto;
    right: auto;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: max(1rem, env(safe-area-inset-left));
  }

  .translation-toggle {
    min-width: 7.2rem;
    min-height: 2.1rem;
    padding: 0.3rem 0.48rem;
    gap: 0.28rem;
  }

  .settings-toggle {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.25rem;
  }

  .settings-panel {
    top: auto;
    right: 0.5rem;
    bottom: 4rem;
    left: 0.5rem;
    width: auto;
    padding: 0.62rem;
  }

  .settings-grid {
    gap: 0.36rem 0.42rem;
  }

  .settings-grid-angelus {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-field label {
    font-size: 0.54rem;
  }

  .settings-field input {
    padding-right: 0.18rem;
    padding-left: 0.18rem;
    font-size: 0.78rem;
  }

  .translation-toggle-icon {
    font-size: 0.82rem;
  }

  .language-option {
    min-width: 2rem;
    padding: 0.22rem 0.3rem;
    font-size: 0.62rem;
  }

  .chapter-header {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .chapter-schedule-link {
    grid-template-columns: 4rem 1fr;
    font-size: 0.88rem;
  }

  .prayer-time {
    --time-column-width: 2.45rem;

    gap: 0.48rem;
    padding-right: 0.8rem;
    padding-left: 0.55rem;
  }

  .prayer-time::before {
    left: calc(0.55rem + (var(--time-column-width) * 0.5));
  }

  .prayer-time-marker {
    gap: 0.28rem;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .prayer-time-dot {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.72rem;
  }

  .prayer-time[data-rosary="true"] .moment {
    font-size: 0.64rem;
    letter-spacing: 0.07em;
    line-height: 1.22;
  }

  .prayer-time[data-rosary="true"]::before {
    display: none;
  }

  .prayer-time[data-rosary="true"] .prayer-time-marker {
    position: static;
    display: grid;
    width: auto;
    margin: 0;
    gap: 0.28rem;
    justify-items: center;
    font-size: 0.58rem;
    letter-spacing: 0.03em;
  }

  html[data-language-mode="parallel"] .prayer-book {
    width: min(calc(100% - 0.5rem), 75rem);
  }

  html[data-language-mode="parallel"] .prayer-section {
    padding-right: 0.8rem;
    padding-left: 0.55rem;
  }

  html[data-language-mode="parallel"] .prayer-text {
    max-width: none;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  html[data-language-mode="parallel"] .prayer-aligned-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
  }

  html[data-language-mode="parallel"] .prayer-aligned-cell + .prayer-aligned-cell {
    padding-left: 0.65rem;
    border-left: 1px solid var(--line);
  }

  html[data-language-mode="parallel"] .prayer-subtitle {
    margin: 1.45rem 0 0.55rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    line-height: 1.25;
  }

  html[data-language-mode="parallel"] .prayer-text p {
    margin-bottom: 0.75em;
  }

  html[data-language-mode="parallel"] .prayer-text p:first-child::first-letter {
    float: none;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }

  .prayer-book {
    width: min(calc(100% - 0.5rem), var(--reading-width));
  }

  .prayer-section {
    min-height: 65vh;
    padding-right: 0.8rem;
    padding-left: 0.55rem;
  }

  .back-to-top span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .back-to-top {
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    justify-content: center;
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
