/* test-rg-publication.css — fiche publication (livre), refonte d'octobre 2026.
 * Préfixe .rg-pub. Même langage que les fiches chercheur et groupe de recherche modernisées :
 * pétrole #165F70, Raleway (interface) + EB Garamond (texte), cartes blanches à bord fin,
 * intertitres pétrole soulignés d'un trait court. Racine du thème : 1rem = 10px.
 * Chargé par single-publication-test-rg(-v2).php (wp_enqueue_scripts, priorité 100 → après le thème).
 */

.rg-pub { padding-bottom: 6rem; }

/* ---------- Rubrique (comme « Groupe de recherche » sur les fiches groupe) ---------- */
.rg-pub-eyebrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.6rem; margin: 3rem 0 2.4rem; }
.rg-pub-eyebrow__type { font-family: 'Raleway', sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #165F70; }
.rg-pub-eyebrow__all { font-family: 'Raleway', sans-serif; font-size: 1.35rem; font-weight: 500; color: #165F70; text-decoration: none; }
.rg-pub-eyebrow__all:hover, .rg-pub-eyebrow__all:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Haut : couverture | contenu | auteurs & mots-clés ---------- */
.rg-pub-top { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr) minmax(210px, 270px); gap: 4.4rem; align-items: start; }

/* Couverture traitée comme un objet-livre (pas de recadrage, ombre portée douce) */
.rg-pub-cover { margin: 0; }
.rg-pub-cover__img { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 14px 30px rgba(22, 95, 112, .16); }
.rg-pub-cover--vide { aspect-ratio: 2 / 3; display: flex; align-items: flex-end; padding: 2.2rem; border-radius: 3px; background: linear-gradient(160deg, #1a6b7e, #134f5e); }
.rg-pub-cover__ph { font-family: 'EB Garamond', serif; font-size: 2.2rem; line-height: 1.2; color: #fff; }

/* Fiche du livre */
.rg-pub-fiche { margin: 2.6rem 0 0; padding: 1.6rem 0 0; border-top: 1px solid #e6eef0; display: flex; flex-direction: column; gap: 1.05rem; }
.rg-pub-fiche > div { display: grid; grid-template-columns: 8.8rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.rg-pub-fiche dt { margin: 0; font-family: 'Raleway', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #8a9aa0; }
.rg-pub-fiche dd { margin: 0; font-family: 'Raleway', sans-serif; font-size: 1.4rem; line-height: 1.45; color: #333; overflow-wrap: anywhere; }

/* Bouton d'action (recette des boutons de la fiche chercheur) */
.rg-pub-btn { display: flex; align-items: center; gap: .65rem; margin-top: 2.2rem; padding: .75em 1em; border-radius: 5px; background: #f2f6f7; color: #165F70; font-family: 'Raleway', sans-serif; font-size: 1.4rem; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background .15s, color .15s; }
.rg-pub-btn:hover, .rg-pub-btn:focus-visible { background: #165F70; color: #fff; }
.rg-pub-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* Colonne centrale */
.rg-pub-title { margin: 0; font-family: 'Raleway', sans-serif; font-size: 3.8rem; font-weight: 400; line-height: 1.18; color: #222; text-wrap: balance; }
.rg-pub-byline { margin: 1.3rem 0 0; font-family: 'Raleway', sans-serif; font-size: 1.7rem; font-weight: 600; line-height: 1.4; color: #165F70; }
.rg-pub-byline a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(22, 95, 112, .3); transition: border-color .15s; }
.rg-pub-byline a:hover, .rg-pub-byline a:focus-visible { border-bottom-color: #165F70; }
.rg-pub-desc { margin-top: 2.4rem; }

/* Onglets de langue (composant partagé template-parts/ressource/tabs.php) */
/* (le thème donne à .tab une ombre interne + coins arrondis, et à .tabcontent 20px de marge interne : neutralisés) */
.rg-pub .rg-pub-desc .tab { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.8rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.rg-pub .rg-pub-desc .tabcontent { padding: 0; border: 0; box-shadow: none; background: none; }
.rg-pub .rg-pub-desc .tab .tablinks { margin: 0; padding: .45em .95em; border: 0; border-radius: 5px; background: #eef3f4; color: #165F70; font-family: 'Raleway', sans-serif; font-size: 1.2rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; cursor: pointer; box-shadow: none; transition: background .15s, color .15s; }
.rg-pub .rg-pub-desc .tab .tablinks:hover { background: rgba(22, 95, 112, .16); }
.rg-pub .rg-pub-desc .tab .tablinks.tab-button-active { background: #165F70; color: #fff; }
.rg-pub .rg-pub-desc .tabcontent { font-family: 'EB Garamond', serif; font-size: 1.95rem; line-height: 1.62; color: #222; }
.rg-pub .rg-pub-desc .tabcontent p { margin: 0 0 1.25rem; }
/* Liens de la description sans soulignement (choix de Raphaël, 04/11/2026) ; soulignés seulement
   en mode daltonisme (data-cvd) ou contraste renforcé (data-contrast), convention de pluriel-a11y. */
.rg-pub .rg-pub-desc .tabcontent a { color: #165F70; text-decoration: none; }
.rg-pub .rg-pub-desc .tabcontent a:hover, .rg-pub .rg-pub-desc .tabcontent a:focus-visible { color: #0d3f4b; }
html[data-cvd] .rg-pub .rg-pub-desc .tabcontent a, html[data-contrast] .rg-pub .rg-pub-desc .tabcontent a { text-decoration: underline !important; text-underline-offset: 2px; }

/* Colonne de droite */
.rg-pub-side__block { margin-bottom: 2.8rem; }
.rg-pub-side__title { display: inline-block; position: relative; margin: 0 0 1.4rem; padding: 0 0 .9rem; font-family: 'Raleway', sans-serif; font-size: 1.8rem; font-weight: 700; line-height: 1.2; color: #165F70; }
.rg-pub-side__title::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 2.4rem; height: 3px; border-radius: 2px; background: #165F70; }
.rg-pub-side__label { margin: 0 0 .7rem; font-family: 'Raleway', sans-serif; font-size: 1.15rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #8a9aa0; }

.rg-pub-people { display: flex; flex-direction: column; gap: 1rem; }
.rg-pub-person { display: flex; align-items: center; gap: 1.2rem; padding: .8rem 1rem; background: #fff; border: 1px solid #e6eef0; border-radius: 8px; text-decoration: none; transition: border-color .18s, box-shadow .18s, transform .18s; }
.rg-pub-person:hover, .rg-pub-person:focus-visible { border-color: #165F70; box-shadow: 0 6px 16px rgba(22, 95, 112, .10); transform: translateY(-1px); }
.rg-pub-person__img { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 22%; background: #eef3f4; display: block; margin: 0; }
.rg-pub-person__img--vide { display: flex; align-items: center; justify-content: center; font-family: 'EB Garamond', serif; font-size: 2.4rem; color: #165F70; }
.rg-pub-person__txt { min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.rg-pub-person__nom { font-family: 'Raleway', sans-serif; font-size: 1.5rem; font-weight: 600; line-height: 1.3; color: #222; transition: color .15s; }
.rg-pub-person:hover .rg-pub-person__nom { color: #165F70; }
.rg-pub-person__fonction { font-family: 'Raleway', sans-serif; font-size: 1.2rem; line-height: 1.4; color: #7a8a90; }

.rg-pub-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.rg-pub-tag { display: inline-block; padding: .35em .85em; border-radius: 5px; background: #eef3f4; color: #165F70; font-family: 'Raleway', sans-serif; font-size: 1.25rem; font-weight: 500; line-height: 1.35; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
a.rg-pub-tag:hover, a.rg-pub-tag:focus-visible { background: #165F70; color: #fff; }
.rg-pub-tag--motcle { background: transparent; box-shadow: inset 0 0 0 1px #d6e2e5; color: #4a6169; }
a.rg-pub-tag--motcle:hover, a.rg-pub-tag--motcle:focus-visible { background: #165F70; box-shadow: inset 0 0 0 1px #165F70; color: #fff; }

/* ---------- Bas : « Du même auteur » et « Ressources liées à » ---------- */
.rg-pub-section { margin-top: 6.4rem; }
.rg-pub-h2 { position: relative; margin: 0 0 2.4rem; padding: 0 0 1.2rem; font-family: 'Raleway', sans-serif; font-size: 2.4rem; font-weight: 700; line-height: 1.25; color: #165F70; }
.rg-pub-h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 3rem; height: 3px; border-radius: 2px; background: #165F70; }
.rg-pub-h2__sujet { font-weight: 500; }

.rg-pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.2rem; } /* 3 colonnes en grand écran : 6 cartes = 2 rangées pleines */
.rg-pub-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden; text-decoration: none; transition: border-color .18s, box-shadow .18s, transform .18s; }
.rg-pub-card:hover, .rg-pub-card:focus-visible { border-color: #165F70; box-shadow: 0 8px 20px rgba(22, 95, 112, .10); transform: translateY(-2px); }
.rg-pub-card__media { display: block; aspect-ratio: 3 / 2; background: #eef3f4; overflow: hidden; }
.rg-pub-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; margin: 0; }
.rg-pub-card__media--vide { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a6b7e, #134f5e); }
.rg-pub-card__ph { font-family: 'EB Garamond', serif; font-size: 2.6rem; letter-spacing: .02em; color: rgba(255, 255, 255, .85); }
.rg-pub-card__body { display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem 1.35rem 1.5rem; }
.rg-pub-card__meta { display: flex; align-items: center; gap: .8rem; }
.rg-pub-card__badge { display: inline-block; padding: .34em .75em; border-radius: 4px; background: #165F70; color: #fff; font-family: 'Raleway', sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.rg-pub-card__annee { font-family: 'Raleway', sans-serif; font-size: 1.25rem; font-weight: 600; color: #8a9aa0; }
.rg-pub-card__title { font-family: 'Raleway', sans-serif; font-size: 1.8rem; font-weight: 600; line-height: 1.3; color: #222; transition: color .15s; }
.rg-pub-card:hover .rg-pub-card__title { color: #165F70; }
.rg-pub-card__auteurs { font-family: 'Raleway', sans-serif; font-size: 1.25rem; font-weight: 600; color: #165F70; }
.rg-pub-card__extrait { font-family: 'Raleway', sans-serif; font-size: 1.4rem; line-height: 1.55; color: #555; }

/* ---------- Clavier ---------- */
.rg-pub a:focus-visible { outline: 2px solid #165F70; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .rg-pub-card, .rg-pub-person, .rg-pub-btn, .rg-pub-tag { transition: none; }
    .rg-pub-card:hover, .rg-pub-person:hover { transform: none; }
}

/* ---------- Responsive ---------- */
/* Tablette : couverture | contenu ; auteurs & mots-clés passent sous les deux colonnes */
@media (max-width: 1100px) {
    .rg-pub-top { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 3.4rem; }
    .rg-pub-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 3.4rem; }
}
/* Mobile : titre + auteur, puis couverture et fiche côte à côte, puis description, puis le reste.
   La colonne centrale passe en display:contents pour intercaler la couverture entre l'auteur et la description. */
@media (max-width: 760px) {
    .rg-pub-eyebrow { margin: 2rem 0 1.6rem; }
    .rg-pub-top { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .rg-pub-main { display: contents; }
    .rg-pub-title { order: 1; }
    .rg-pub-byline { order: 2; }
    .rg-pub-media { order: 3; margin-top: 2.2rem; }
    .rg-pub-desc { order: 4; }
    .rg-pub-side { order: 5; margin-top: 3.2rem; }
    .rg-pub-media { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 0 1.8rem; align-items: start; }
    .rg-pub-fiche { margin: 0; padding: 0; border-top: 0; }
    .rg-pub-fiche > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
    .rg-pub-btn { grid-column: 1 / -1; }
    .rg-pub-title { font-size: 2.8rem; }
    .rg-pub-byline { font-size: 1.6rem; }
    .rg-pub-desc { margin-top: 2.4rem; }
    .rg-pub .rg-pub-desc .tabcontent { font-size: 1.8rem; }
    .rg-pub-side { grid-template-columns: minmax(0, 1fr); }
    .rg-pub-section { margin-top: 4.6rem; }
    .rg-pub-h2 { font-size: 2.1rem; }
    .rg-pub-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Mode sombre (html[data-theme="dark"], pluriel-a11y) ----------
   Palette du site : fond #0f1620, surface #18242e, filet #26343f, texte #c7d0d8, accent #8fd3e0.
   Spécificité renforcée (main.rg-pub + 2 classes) pour primer sur le « filet large » de pluriel-a11y.css. */
html[data-theme="dark"] main.rg-pub .rg-pub-eyebrow .rg-pub-eyebrow__type,
html[data-theme="dark"] main.rg-pub .rg-pub-main .rg-pub-byline,
html[data-theme="dark"] main.rg-pub .rg-pub-side .rg-pub-side__title,
html[data-theme="dark"] main.rg-pub .rg-pub-section .rg-pub-h2 { color: #8fd3e0 !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-side .rg-pub-side__title::after,
html[data-theme="dark"] main.rg-pub .rg-pub-section .rg-pub-h2::after { background: #8fd3e0; }
html[data-theme="dark"] main.rg-pub .rg-pub-main .rg-pub-title { color: #eef3f6 !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-media .rg-pub-fiche { border-top-color: #26343f; }
html[data-theme="dark"] main.rg-pub .rg-pub-fiche div dt,
html[data-theme="dark"] main.rg-pub .rg-pub-side .rg-pub-side__label,
html[data-theme="dark"] main.rg-pub .rg-pub-card .rg-pub-card__annee { color: #8494a0 !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-media .rg-pub-cover__img { box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
html[data-theme="dark"] main.rg-pub .rg-pub-media .rg-pub-btn { background: #18242e !important; color: #8fd3e0 !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-media .rg-pub-btn:hover { background: #165F70 !important; color: #fff !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-desc .tab .tablinks { background: #18242e; color: #8fd3e0; }
html[data-theme="dark"] main.rg-pub .rg-pub-desc .tab .tablinks.tab-button-active { background: #165F70; color: #fff; }
html[data-theme="dark"] main.rg-pub .rg-pub-tags .rg-pub-tag { background: #18242e !important; box-shadow: inset 0 0 0 1px #26343f; color: #8fd3e0 !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-tags a.rg-pub-tag:hover { background: #165F70 !important; color: #fff !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-card .rg-pub-card__auteurs { color: #8fd3e0 !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-card .rg-pub-card__media--vide,
html[data-theme="dark"] main.rg-pub .rg-pub-media .rg-pub-cover--vide { background: linear-gradient(135deg, #134f5e, #0b2a31) !important; }
html[data-theme="dark"] main.rg-pub .rg-pub-card .rg-pub-card__ph,
html[data-theme="dark"] main.rg-pub .rg-pub-cover .rg-pub-cover__ph { background: transparent !important; color: rgba(255, 255, 255, .85) !important; }
/* .rg-pub-card__badge : le mot « badge » dans la classe l'exclut du filet large sombre (fond pétrole et texte blanc conservés). */
