/* Contenu du jour : structure commune. Chaque site pose ses variables et sa signature dans theme.css. */
:root {
    --bg: #faf7f0; --surface: #ffffff; --surface-2: #f3eee3; --ink: #1f1b16; --muted: #6b6257; --line: rgba(31, 27, 22, 0.12);
    --accent: #8a2be2; --accent-2: #c9a24b; --accent-ink: #ffffff; --lit: #4a7c59;
    --display: Georgia, 'Times New Roman', serif; --body-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --text-font: Georgia, serif;
    --radius: 18px; --radius-sm: 10px; --shadow: 0 10px 30px rgba(31, 27, 22, 0.08);
    --max: 1180px; --gutter: 16px; --fs: 1;
}
@media (min-width: 640px) { :root { --gutter: 28px; } }
html[data-taille="2"] { --fs: 1.12; }
html[data-taille="3"] { --fs: 1.25; }
html[data-taille="4"] { --fs: 1.4; }
[data-lit="vert"] { --lit: #2f7a4d; } [data-lit="blanc"] { --lit: #c9a24b; } [data-lit="rouge"] { --lit: #b3261e; }
[data-lit="violet"] { --lit: #6a3d9a; } [data-lit="rose"] { --lit: #d9739b; } [data-lit="or"] { --lit: #c9a24b; } [data-lit="noir"] { --lit: #333; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: calc(17px * var(--fs)) / 1.65 var(--body-font); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* En-tête */
#header-placeholder { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-content { max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 22px; font-weight: 600; }
.site-brand-logo { width: 32px; height: 32px; flex: none; }
#main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
#main-nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
#main-nav a:hover, #main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
#main-nav a.nav-cta { border: 1px solid var(--line); }
.burger-menu { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.burger-menu svg { stroke: currentColor; }
.burger-menu .ico-close { display: none; }
.burger-menu.active .ico-open { display: none; }
.burger-menu.active .ico-close { display: inline; }
@media (max-width: 899px) {
    .burger-menu { display: inline-grid; place-items: center; }
    #main-nav { position: fixed; inset: 66px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; transform: translateY(-120%); transition: transform 0.25s ease; box-shadow: var(--shadow); }
    #main-nav.nav-active { transform: none; }
    #main-nav ul { flex-direction: column; align-items: stretch; }
    #main-nav a { padding: 14px 12px; font-size: 17px; }
}

/* Page */
.jour-main { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.eyebrow a { color: inherit; text-decoration: none; }

/* Éphéméride : feuillet de calendrier + titre + navigation */
.ephemeride { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 40px); align-items: center; margin: 8px 0 28px; }
.feuillet { width: clamp(110px, 18vw, 150px); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; text-align: center; border: 1px solid var(--line); }
.f-jour { display: block; background: var(--lit); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 4px; }
.f-num { display: block; font-family: var(--display); font-size: clamp(54px, 9vw, 78px); line-height: 1.05; padding-top: 6px; }
.f-mois { display: block; font-size: 13px; color: var(--muted); padding: 2px 6px 10px; text-transform: capitalize; }
.eph-titre { font-size: clamp(30px, 5vw, 52px); margin: 0 0 10px; }
.eph-lit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; color: var(--muted); }
.eph-saison { opacity: 0.85; }
.pastille { width: 14px; height: 14px; border-radius: 50%; background: var(--lit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lit) 25%, transparent); flex: none; }
.eph-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eph-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; min-height: 40px; }
.eph-btn:hover { border-color: var(--accent); }
.eph-aller input { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 40px; }
.eph-nav-simple { justify-content: center; margin-top: 14px; }

/* Grille de blocs */
.jour-grille { display: grid; gap: clamp(16px, 2.4vw, 26px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
    .jour-grille.jour-3, .jour-grille.jour-4 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .jour-grille.jour-3 > :first-child, .jour-grille.jour-4 > :first-child { grid-row: span 2; }
}
.bloc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.4vw, 34px); box-shadow: var(--shadow); min-width: 0; }
.bloc-titre { font-size: clamp(24px, 3vw, 32px); display: flex; align-items: center; gap: 10px; }
.bloc-titre::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--accent-2); transform: rotate(45deg); flex: none; }
.bloc-lien { margin: 18px 0 0; font-weight: 600; }
.bloc-lien a { text-decoration: none; }
.ref-principale { font-weight: 600; color: var(--accent); margin-bottom: 10px; }

/* Textes bibliques */
.texte-biblique { font-family: var(--text-font); font-size: calc(19px * var(--fs)); line-height: 1.75; }
.texte-biblique sup { font-family: var(--body-font); font-size: 0.6em; color: var(--accent); font-weight: 700; margin-right: 3px; }
.lettrine .initiale { float: left; font-family: var(--display); font-size: 3.4em; line-height: 0.85; padding: 6px 8px 0 0; color: var(--accent); }
details.lecture { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
details.lecture summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.lecture summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--accent); }
details.lecture[open] summary::after { content: '−'; }
details.lecture summary .ref { font-weight: 400; color: var(--muted); margin-left: auto; }
.psaume-ref { margin: 14px 0 0; color: var(--muted); } .psaume-ref span { font-weight: 600; color: var(--ink); }
.note-ref { color: var(--muted); font-size: 15px; }
.traduction { color: var(--muted); font-size: 13px; text-align: center; margin: 22px auto 0; max-width: 760px; }

/* Outils (écouter, copier, partager) */
.outils { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.outil { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 500 14px var(--body-font); cursor: pointer; text-decoration: none; }
.outil svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.outil:hover { border-color: var(--accent); }
.outil.actif { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.outil-wa { color: #128c4a; }
.kit-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font: 600 15px var(--body-font); cursor: pointer; }
.kit-button:hover { filter: brightness(1.08); }
.btn-image { margin-top: 12px; background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* Saint */
.fete { font-family: var(--display); font-size: calc(24px * var(--fs)); margin: 0 0 8px; }
.fete strong { color: var(--accent); }
.saints-lit { font-size: 15px; } .saints-ligne { font-size: 15px; color: var(--muted); }
.badge-lit { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--lit) 16%, transparent); color: var(--lit); margin-right: 6px; }
.saint-carte { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 14px; }
.saint-portrait { margin: 0; }
.saint-portrait img { width: 120px; height: 150px; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow); background: var(--surface-2); }
.saint-sans-image { width: 120px; height: 150px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 44px; color: var(--accent-2); background: var(--surface-2); }
.saint-nom { font-size: calc(24px * var(--fs)); margin-bottom: 4px; }
.saint-desc { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.saint-bio { font-size: calc(16px * var(--fs)); }
.source { font-size: 13px; } .source a { color: var(--muted); }
.autres-saints { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.autres-titre { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.autres-saints ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.autres-saints li strong { display: block; } .autres-saints li span { font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .saint-carte { grid-template-columns: 88px minmax(0, 1fr); } .saint-portrait img, .saint-sans-image { width: 88px; height: 110px; } }

/* Verset */
.carte-verset { position: relative; margin: 6px 0 0; padding: clamp(26px, 5vw, 44px); border-radius: var(--radius); background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); color: #fff; overflow: hidden; }
.carte-verset blockquote { margin: 0; }
.carte-verset blockquote p { font-family: var(--text-font); font-size: calc(clamp(22px, 2.6vw, 30px) * var(--fs)); line-height: 1.45; margin: 0; }
.carte-verset blockquote p::before { content: '“'; display: block; font-family: var(--display); font-size: 80px; line-height: 0.6; opacity: 0.45; margin-bottom: 10px; }
.carte-verset figcaption { margin-top: 16px; font-weight: 700; letter-spacing: 0.04em; }
.carte-theme { position: absolute; top: 16px; right: 18px; font-size: 13px; opacity: 0.75; }
.carte-verset[hidden] { display: none; }

/* Tirage aléatoire */
.themes-choix { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.theme-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 500 14px var(--body-font); cursor: pointer; min-height: 38px; }
.theme-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-tirer { margin-top: 16px; }

/* Calendrier */
.page-tete { text-align: center; max-width: 820px; margin: 10px auto 28px; }
.page-tete h1 { font-size: clamp(30px, 5vw, 50px); }
.page-intro { color: var(--muted); }
.calendrier { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mois-bloc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.mois-bloc h2 { font-size: 24px; }
.mois-jours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mois-jours a { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--surface-2); font-size: 14px; }
.mois-jours a:hover { background: var(--accent); color: var(--accent-ink); }
.seo-court { max-width: 820px; margin: 26px auto 0; color: var(--muted); text-align: center; }

/* Texte d'accueil */
.seo-jour { max-width: 820px; margin: 48px auto 0; }
.seo-jour h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 1.6em; }
.seo-jour h3 { font-size: 22px; margin-top: 1.2em; }
.seo-jour p, .seo-jour li { font-size: calc(17px * var(--fs)); }
.seo-jour .chapo { font-size: calc(20px * var(--fs)); color: var(--muted); }
.seo-jour details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.seo-jour summary { cursor: pointer; font-weight: 600; font-family: var(--display); font-size: 20px; }
.note-box { margin-top: 26px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 15px; color: var(--muted); }

/* Onglets du bas (mobile) */
.onglets { display: none; }
@media (max-width: 899px) {
    .onglets { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08); padding-bottom: env(safe-area-inset-bottom); }
    .onglets a { flex: 1; text-align: center; padding: 12px 4px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
    .onglets a:active, .onglets a:focus-visible { color: var(--accent); }
    .bloc { scroll-margin-top: 80px; }
}

/* Réglages de lecture (taille, mode sombre) */
.reglages { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.reglages button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); font: 700 15px var(--body-font); cursor: pointer; }
.reglages-inline { position: static; box-shadow: none; border: 0; padding: 0; background: none; }
.reglages-inline button { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); }
.reglages button:hover { background: var(--accent); color: var(--accent-ink); }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; }

/* Pages simples (légales, à propos, contact) */
.content-page { max-width: 820px; margin: 0 auto; padding: 36px var(--gutter) 56px; }
.content-page h1 { font-size: clamp(30px, 5vw, 46px); }
.page-kicker { font-size: 14px !important; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); font-family: var(--body-font) !important; }
.page-title { font-size: clamp(30px, 5vw, 46px); }
.content-page h2 { font-size: 26px; margin-top: 1.4em; }
.content-page input, .content-page textarea { width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.content-page button, .content-page .btn { font: 600 15px var(--body-font); }
.author-section { margin-top: 36px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.author-content { display: flex; gap: 18px; align-items: flex-start; }
.author-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.author-info h4 { margin: 0 0 6px; font-family: var(--display); font-size: 20px; }

/* Pied de page */
#footer-placeholder { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface-2); }
.footer-content { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 90px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; font-size: 14px; color: var(--muted); }
.footer-name { font-family: var(--display); font-size: 20px; color: var(--ink); }
.footer-copy { margin: 4px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.footer-links a, .footer-langs a { color: var(--muted); }
.footer-langs { margin: 8px 0 0; } .footer-langs a { margin-right: 10px; }

@media (max-width: 640px) {
    .ephemeride { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .eph-lit, .eph-nav { justify-content: center; }
    .feuillet { width: 120px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { #header-placeholder, #footer-placeholder, .outils, .reglages, .eph-nav, .btn-image { display: none !important; } .bloc { box-shadow: none; } }
