/* Oratorio — onglets Livres, Films, Textes (js/ressources.js). Couleurs : uniquement les tokens de style.css. */

/* ---------- commun ---------- */
.res-section{display:flex;flex-direction:column;gap:12px;min-width:0}
.res-section-title{font-family:var(--display);font-weight:400;font-size:24px;line-height:1.2;margin:6px 0 0;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;text-wrap:balance}
.res-section-title .count{font-family:var(--sc);font-weight:700;font-size:14px;letter-spacing:.08em;color:var(--gold)}
.res-page-title{font-family:var(--display);font-weight:400;font-size:26px;line-height:1.2;margin:4px 0 0;text-wrap:balance}
.res-note{margin:0;font-size:15.5px;line-height:1.5;color:var(--muted)}
.res-note a,.res-foot a,.res-text a,.res-desc a,.res-author-note a{color:var(--red)}
.res-meta{margin:0;color:var(--muted);font-size:15px;line-height:1.45}
.res-foot{margin:0;text-align:center;font-size:13px;color:var(--muted)}
.res-gated{margin:0;font-size:14.5px;line-height:1.45;color:var(--muted);font-style:italic;background:var(--soft);border-radius:var(--r-sm);padding:8px 12px}

/* Liens externes */
.res-links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.res-links a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--ground);color:var(--ink);text-decoration:none;font-size:15.5px;line-height:1.35}
.res-links a:hover{border-color:var(--red)}
.res-links a:focus-visible,.res-watch:focus-visible,.res-text a:focus-visible,.res-note a:focus-visible,.res-foot a:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.res-links a > span:first-child{min-width:0;overflow-wrap:anywhere}
.res-links small{display:block;font-size:13px;color:var(--muted)}
.res-links a > span:last-child{color:var(--red);flex:none}

/* ---------- Livres : grille de couvertures ---------- */
.res-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
@media (max-width:420px){.res-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
.res-book{appearance:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);padding:0;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.res-book:hover{border-color:var(--red)}
.res-book:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.res-book-cover{display:flex;align-items:center;justify-content:center;aspect-ratio:2/3;background:var(--soft);padding:12px;overflow:hidden}
.res-book-cover img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;box-shadow:0 6px 14px -8px rgba(20,10,20,.55)}
.res-book-text{display:flex;flex-direction:column;gap:3px;padding:10px 12px 12px}
.res-book-title{font-family:var(--display);font-size:17px;line-height:1.22;overflow-wrap:anywhere}
.res-book-author{font-size:13.5px;line-height:1.35;color:var(--muted)}

/* ---------- fiche plein écran ---------- */
html.res-sheet-open,html.res-sheet-open body{overflow:hidden}
.res-sheet{position:fixed;inset:0;z-index:30;background:var(--ground);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 16px calc(40px + env(safe-area-inset-bottom,0px))}
.res-sheet:focus{outline:none}
.res-sheet-bar{position:sticky;top:0;z-index:1;max-width:880px;margin:0 auto;display:flex;justify-content:flex-end;padding:calc(10px + env(safe-area-inset-top,0px)) 0 6px;pointer-events:none}
.res-sheet-close{pointer-events:auto;appearance:none;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--paper);color:var(--ink);font-size:18px;cursor:pointer;display:grid;place-items:center;box-shadow:0 6px 16px -12px rgba(40,20,40,.5)}
.res-sheet-close:hover{border-color:var(--red);color:var(--red)}
.res-sheet-close:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.res-sheet-body{max-width:880px;margin:0 auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);padding:24px clamp(18px,5vw,36px) 28px;display:flex;flex-direction:column;gap:14px}
.res-cover-big{margin:0 auto;width:min(220px,60%)}
.res-cover-big img{display:block;width:100%;height:auto;border-radius:2px;border:1px solid var(--line);box-shadow:0 12px 26px -16px rgba(20,10,20,.6)}
.res-head{display:flex;flex-direction:column;gap:4px;text-align:center}
.res-head .eyebrow{margin:0}
.res-head h2{font-family:var(--display);font-weight:400;font-size:clamp(24px,6vw,30px);line-height:1.18;margin:0;text-wrap:balance}
.res-desc{display:flex;flex-direction:column;gap:12px;font-size:17.5px;line-height:1.6}
.res-desc p{margin:0}
.res-author-note{margin:0;font-size:15px;line-height:1.55;color:var(--muted)}
.res-author-note strong{color:var(--ink);font-weight:500}
.res-h{margin:6px 0 0;font-family:var(--sc);font-weight:700;font-weight:400;letter-spacing:.12em;font-size:14px;color:var(--gold)}
.res-sommaire{margin:0;padding-left:1.5em;display:flex;flex-direction:column;gap:8px}
.res-sommaire li::marker{color:var(--red);font-variant-numeric:tabular-nums}
.res-sommaire b{display:block;font-family:var(--display);font-weight:400;font-size:18px;line-height:1.3}
.res-sommaire span{display:block;font-size:14.5px;line-height:1.45;color:var(--muted)}
.res-maxime{background:var(--soft);border-left:3px solid var(--red);border-radius:var(--r-sm);padding:12px 16px;display:flex;flex-direction:column;gap:6px}
.res-maxime-date{font-family:var(--sc);font-weight:700;letter-spacing:.08em;font-size:14px;color:var(--red)}
.res-maxime blockquote{font-size:19px;line-height:1.45}
.res-maxime blockquote::first-letter{float:none;font-size:inherit;padding:0;color:inherit}
.res-actions{display:flex;justify-content:flex-end;border-top:1px solid var(--line);padding-top:14px}

/* ---------- Films ---------- */
.res-film{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);padding:16px;display:grid;grid-template-columns:112px minmax(0,1fr);grid-template-areas:"poster head" "body body";gap:14px 16px;align-items:start}
.res-film-poster{grid-area:poster;display:block;width:100%;height:auto;border-radius:2px;border:1px solid var(--line)}
.res-film-head{grid-area:head;display:flex;flex-direction:column;gap:6px;min-width:0}
.res-film-head h3,.res-video-body h3{font-family:var(--display);font-weight:400;font-size:22px;line-height:1.2;margin:0;text-wrap:balance;overflow-wrap:anywhere}
.res-film-body{grid-area:body;display:flex;flex-direction:column;gap:12px;min-width:0}
.res-film-body p{margin:0;font-size:17px;line-height:1.55}
@media (min-width:560px){
  .res-film{grid-template-columns:160px minmax(0,1fr);grid-template-areas:"poster head" "poster body"}
}

/* Reportages, conférences */
.res-videos{display:flex;flex-direction:column;gap:12px}
.res-video{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;display:flex;flex-direction:column}
.res-video-thumb{position:relative;display:block;aspect-ratio:16/9;background:var(--soft);overflow:hidden}
.res-video-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.res-play{position:absolute;left:50%;top:50%;width:58px;height:58px;margin:-29px 0 0 -29px;border-radius:50%;background:var(--red);color:var(--red-ink);display:grid;place-items:center;box-shadow:0 8px 20px -10px rgba(0,0,0,.6)}
.res-play svg{width:26px;height:26px;fill:currentColor;margin-left:3px}
.res-video-thumb:hover .res-play{filter:brightness(1.08)}
.res-video-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;min-width:0}
.res-watch{align-self:flex-start;margin-top:4px;color:var(--red);text-decoration:none;font-family:var(--sc);font-weight:700;letter-spacing:.06em;font-size:15px;border:1px solid var(--line);border-radius:999px;padding:6px 14px}
.res-watch:hover{border-color:var(--red)}

/* ---------- Textes des papes ---------- */
.res-popes{gap:10px}
.res-pope{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);padding:14px clamp(14px,4vw,22px) 16px;display:flex;flex-direction:column;gap:8px}
.res-pope-name{margin:0;font-family:var(--sc);font-weight:700;font-weight:400;letter-spacing:.12em;font-size:15px;color:var(--gold)}
.res-texts{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.res-texts li{display:grid;grid-template-columns:3.1em minmax(0,1fr);gap:10px;padding:9px 0;border-top:1px solid var(--line);line-height:1.45}
.res-texts li:first-child{border-top:0;padding-top:2px}
.res-year{font-family:var(--display);color:var(--red);font-size:18px;line-height:1.3;font-variant-numeric:lining-nums tabular-nums}
.res-text{font-size:16px;overflow-wrap:anywhere}
.res-text a{text-decoration-thickness:1px;text-underline-offset:2px}
.res-text a:first-child{color:var(--ink)}
.res-text a:first-child:hover{color:var(--red)}

/* Documents liturgiques */
.res-doc-gated{display:flex;flex-direction:column;gap:6px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--ground);font-size:15.5px;line-height:1.35}
