:root {
  --bg: #CFDBD5;
  --surface: #E8EDDF;
  --ink: #242423;
  --muted: #333533;
  --line: #C3D0CA;
  --accent: #F5CB5C;
  --accent-strong: #242423;
  --bronze: #333533;
  --radius: 1rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.5rem;
}

/* Marque */
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}
.brand-mark { flex: 0 0 auto; width: 10px; height: 16px; color: var(--muted); }

/* Héros */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 1.25rem;
}

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--bronze);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}

.title {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.015em;
}

.title-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(.8rem, 3vw, 1.2rem);
}
.title-cross {
  flex: 0 0 auto;
  width: clamp(1.8rem, 5vw, 2.6rem);
  height: auto;
  margin-top: .3rem;
  color: var(--ink);
}

.lede {
  margin: .9rem 0 1.6rem;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Alerte : la fiche du dimanche n'est pas encore prête */
.alerte {
  margin-bottom: .9rem;
  padding: .8rem 1rem;
  border-radius: .8rem;
  border: 1.5px solid #b98a2a;
  background: #f8e7bd;
  color: #4a3610;
  font-size: .9rem;
  line-height: 1.4;
}
.alerte strong { color: #2e2208; }

/* Carte de la fiche du jour */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 1px 0 rgba(36, 36, 35, .04);
}

.card-eyebrow {
  margin: 0 0 .35rem;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}

.card-quand {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.card-quoi {
  margin: .25rem 0 .35rem;
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .02em;
}
.card-titre {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.5rem, 5.2vw, 2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--ink);
  /* petit surlignage jaune sous les mots, comme un marqueur */
  background-image: linear-gradient(transparent 72%, rgba(245, 203, 92, .55) 72%);
  background-repeat: no-repeat;
  display: inline;
  padding-bottom: .12em;
}
.card-titre.long { font-size: clamp(1.15rem, 3.4vw, 1.5rem); line-height: 1.2; }

.card-date {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}

.card-sunday {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.card-gospel {
  margin: .55rem 0 0;
  font-size: .92rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1.05rem;
  padding: .8rem 1.05rem;
  border-radius: .7rem;
  background: var(--accent);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.cta:hover { background: var(--accent-strong); color: var(--accent); }
.cta:focus-visible { outline: 3px solid rgba(36, 36, 35, .35); outline-offset: 2px; }
.cta-texte { display: block; }
.cta-texte .cta-label { display: block; }
.cta .cta-texte .cta-sous {
  display: block;
  margin-top: .12rem;
  font-size: .6rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--muted);
  opacity: .85;
  letter-spacing: 0;
}
.cta-icon { font-size: .85rem; opacity: .85; display: inline-flex; flex: 0 0 auto; }
.cta-icon svg { width: 1.15rem; height: 1.15rem; display: block; }

/* Deux boutons : la fiche du parent, le coloriage de l'enfant */
.cta-group { display: grid; gap: .55rem; margin-top: 1.05rem; }
.cta-note-link {
  justify-self: center;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: .1rem 0;
}
.cta-note-link:hover { color: var(--ink); }
.cta-note {
  margin: .1rem 0 0;
  text-align: center;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .01em;
}
.cta-group .cta { margin-top: 0; justify-content: flex-start; gap: .6rem; }
button.cta {
  width: 100%;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.cta-secondary {
  background: transparent;
  border: 1.5px solid var(--ink);
}
.cta-secondary:hover { background: var(--surface); color: var(--ink); }

/* Le chant : plein écran, vidéo chargée au clic */
body.video-ouverte { overflow: hidden; }
.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background: #141413;
}
.video-overlay[hidden] { display: none; }
.video-cadre {
  width: min(100%, 52rem);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.video-cadre video {
  width: 100%;
  max-height: 72svh;
  max-height: calc(100svh - 9rem);
  border-radius: .8rem;
  background: #000;
  display: block;
}
.video-legende {
  margin: 0;
  text-align: center;
  color: var(--surface);
  font-size: .9rem;
  line-height: 1.5;
}
.video-close {
  position: absolute;
  top: .7rem;
  right: .8rem;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 0;
  background: rgba(232, 237, 223, .16);
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}
.video-close:hover { background: rgba(232, 237, 223, .3); }
.video-close:focus { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Historique replié */
.history {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: .85rem;
}
.history summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history summary::-webkit-details-marker { display: none; }
.history summary::after {
  content: "＋";
  color: var(--bronze);
  font-size: .95rem;
}
.history[open] summary::after { content: "−"; }
.history ul {
  list-style: none;
  margin: .65rem 0 0;
  padding: 0;
  display: grid;
  gap: .1rem;
}
.history li {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: .5rem 0 .7rem;
}
.history li:last-child { border-bottom: 0; }
.history-date {
  margin: 0 0 .45rem;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 500;
}
.history-actions { display: grid; gap: .4rem; }
.cta-mini {
  margin-top: 0;
  padding: .55rem .7rem;
  font-size: .85rem;
  border-radius: .55rem;
  justify-content: flex-start;
  gap: .5rem;
}
.cta-mini .cta-icon svg { width: 1rem; height: 1rem; }
.history-empty { color: var(--muted); font-size: .9rem; padding: .45rem .1rem; }
details[hidden] { display: none; }

/* Comment ça marche */
.howto {
  margin-top: .85rem;
  border-top: 1px solid var(--line);
  padding-top: .85rem;
}
.howto summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after {
  content: "＋";
  color: var(--bronze);
  font-size: .95rem;
}
.howto[open] summary::after { content: "−"; }
.howto-body { margin-top: .7rem; color: var(--muted); font-size: .92rem; }
.howto-body p { margin: 0 0 .6rem; }
.howto-body p:last-child { margin-bottom: 0; }
.howto-body strong { color: var(--ink); font-weight: 600; }
.howto-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.howto-steps {
  margin: .4rem 0 .8rem;
  padding-left: 1.1rem;
  display: grid;
  gap: .45rem;
}
.howto-note {
  font-size: .86rem;
  border-left: 2px solid var(--line);
  padding-left: .7rem;
}

@media (max-width: 420px) {
  .page { padding: 1rem 1rem 1.25rem; }
  .hero { padding-top: 1.25rem; }
  .card { padding: 1rem 1rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
