/* Page d'une ressource de la bibliothèque — sur le site et dans le Vet Vault. */
.dp-res-page { padding: clamp(32px, 6vw, 88px) 16px clamp(48px, 7vw, 104px); }
.dp-res { max-width: 1100px; margin: 0 auto; color: var(--dp-color-text, #303030); }

.dp-res__head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.dp-res__back { display: inline-block; margin-bottom: 20px; font-size: 14px; color: var(--dp-color-primary-strong, #417e88); text-decoration: none; }
.dp-res__back:hover { text-decoration: underline; }
.dp-res__kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: var(--dp-tracking-caps, .12em); text-transform: uppercase; color: var(--dp-color-text-muted, #5b5b5b); }
.dp-res__kicker span + span::before { content: "·"; margin-right: 14px; }
.dp-res__reserved { color: var(--dp-color-primary-strong, #417e88); }
.dp-res__title { margin: 0; font-family: var(--dp-font-heading, inherit); font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -.01em; }
.dp-res__lead { margin: 20px 0 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--dp-color-text-muted, #5b5b5b); }
.dp-res__facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--dp-color-border, #dedede); }
.dp-res__facts div { margin: 0; }
.dp-res__facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: var(--dp-tracking-caps, .12em); color: var(--dp-color-text-muted, #5b5b5b); }
.dp-res__facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }

.dp-res__section + .dp-res__section { margin-top: clamp(32px, 4vw, 56px); }
.dp-res__text { max-width: 760px; font-size: 17px; line-height: 1.65; }
.dp-res__text > :first-child { margin-top: 0; }
.dp-res__text h2, .dp-res__text h3 { font-family: var(--dp-font-heading, inherit); line-height: 1.2; margin: 1.6em 0 .5em; }
.dp-res__text img { max-width: 100%; height: auto; }

.dp-res__cta { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 26px; border-radius: var(--dp-radius-pill, 999px); background: var(--dp-color-text, #303030); color: #fff; font-weight: 600; text-decoration: none; transition: background-color var(--dp-duration, .2s); }
.dp-res__cta:hover, .dp-res__cta:focus-visible { background: var(--dp-color-primary-strong, #417e88); color: #fff; }
/* Un lien qui sort du site : un maillon, à la taille du texte qu'il suit. */
.dp-res__ext { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dp-res__cta .dp-res__ext { width: 16px; height: 16px; }

/* Podcast : le lecteur du navigateur (fichier) ou celui de la plateforme (iframe). */
.dp-res__player { display: block; width: 100%; max-width: 760px; border: 0; border-radius: 12px; }
iframe.dp-res__player { background: var(--dp-color-border, #dedede); }

/* Outil interactif : grand cadre, hauteur adaptée à l'écran sauf réglage. */
.dp-res__embed iframe { display: block; width: 100%; height: clamp(420px, 78vh, 820px); border: 0; border-radius: var(--dp-radius-lg, 20px); background: var(--dp-color-border, #dedede); }
.dp-res__embed-full { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--dp-color-primary-strong, #417e88); text-decoration: none; }
.dp-res__embed-full:hover { text-decoration: underline; }
/* Plein écran sans quitter le site : le cadre passe en plein écran natif
   (:fullscreen) ou, quand le navigateur ne le permet pas (iPhone, page
   encadrée), se fixe sur toute la fenêtre. Dans les deux cas une barre
   d'encre : le nom de l'outil et le bouton pour quitter. Le bouton est un
   <button> nu, écrit en entier contre le reset et le thème. */
.dp-res__embed-bar { display: none; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 6px 12px 6px 20px; background: var(--dp-color-text, #303030); color: #fff; font-size: 13px; }
.dp-res__embed-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dp-res .dp-res__embed-exit { display: inline-flex; align-items: center; gap: 8px; flex: none; width: auto; min-height: 34px; margin: 0; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .45); border-radius: var(--dp-radius-pill, 999px); background: transparent; box-shadow: none; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; color: #fff; cursor: pointer; transition: background-color var(--dp-duration, .2s), color var(--dp-duration, .2s); }
.dp-res .dp-res__embed-exit:hover, .dp-res .dp-res__embed-exit:focus { background: #fff; border-color: #fff; box-shadow: none; color: var(--dp-color-text, #303030); text-decoration: none; }
.dp-res .dp-res__embed-exit:focus-visible { outline: 3px solid #61c2d0; outline-offset: 2px; }
.dp-res__embed-frame:fullscreen { display: flex; flex-direction: column; background: var(--dp-color-text, #303030); }
.dp-res__embed-frame:fullscreen .dp-res__embed-bar { display: flex; }
.dp-res__embed-frame:fullscreen iframe { flex: 1 1 0; min-height: 0; height: auto !important; border-radius: 0; }
.dp-res__embed-frame:-webkit-full-screen { display: flex; flex-direction: column; background: var(--dp-color-text, #303030); }
.dp-res__embed-frame:-webkit-full-screen .dp-res__embed-bar { display: flex; }
.dp-res__embed-frame:-webkit-full-screen iframe { flex: 1 1 0; min-height: 0; height: auto !important; border-radius: 0; }
.dp-res__embed.is-fullscreen .dp-res__embed-frame { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: var(--dp-color-text, #303030); }
.dp-res__embed.is-fullscreen .dp-res__embed-bar { display: flex; padding-top: max(6px, env(safe-area-inset-top, 0px)); }
.dp-res__embed.is-fullscreen iframe { flex: 1 1 0; min-height: 0; height: auto !important; border-radius: 0; }
html.dp-res-fullscreen, html.dp-res-fullscreen body { overflow: hidden; }

/* ── Contenu + panneau latéral (documents, bibliothèque) ──────────────
   PC et tablette : le panneau à droite, collant, rétractable en un onglet
   vertical. Téléphone : il passe sous le contenu, listes limitées à trois. */
.dp-res { max-width: 1240px; }
.dp-res__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.dp-res__layout--solo { grid-template-columns: minmax(0, 1fr); }
.dp-res__body { min-width: 0; }
.dp-res.is-aside-collapsed .dp-res__layout:not(.dp-res__layout--solo) { grid-template-columns: minmax(0, 1fr) 44px; }

.dp-res__aside { position: sticky; top: calc(var(--dp-header-height, 80px) + 24px); max-height: calc(100vh - var(--dp-header-height, 80px) - 48px); overflow-y: auto; overscroll-behavior: contain; }
/* Le bouton du panneau est un <button> nu. Le reset de Hello Elementor
   (#c36 au survol et au focus, spécificité 0,1,1) et la règle générique du
   thème (aplat cyan, 0,2,0) battaient une classe seule : texte cyan sur fond
   rose dans le portail, cyan sur cyan sur le site. Deux classes, et chaque
   état écrit en entier — fond, bordure, ombre, graisse. */
.dp-res .dp-res__aside-toggle { display: flex; align-items: center; gap: 8px; width: auto; margin: 0 0 12px auto; padding: 6px 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 13px; font-weight: 400; line-height: 1.4; white-space: normal; text-align: start; color: var(--dp-color-text-muted, #5b5b5b); cursor: pointer; transition: color var(--dp-duration, .2s), border-color var(--dp-duration, .2s); }
.dp-res .dp-res__aside-toggle:hover, .dp-res .dp-res__aside-toggle:focus { background: none; border-color: transparent; box-shadow: none; color: var(--dp-color-primary-strong, #417e88); text-decoration: none; }
.dp-res__aside-show { display: none; }
.dp-res.is-aside-collapsed .dp-res__aside-inner, .dp-res.is-aside-collapsed .dp-res__aside-hide { display: none; }
.dp-res.is-aside-collapsed .dp-res__aside-show { display: inline; }
/* Replié : un onglet vertical en encre, demi-gras — une commande, pas un filet. */
.dp-res.is-aside-collapsed .dp-res__aside-toggle { writing-mode: vertical-rl; margin: 0; padding: 18px 10px; border: 1px solid var(--dp-color-border, #dedede); border-radius: var(--dp-radius-pill, 999px); background: var(--dp-color-surface, #fff); font-weight: 600; color: var(--dp-color-text, #303030); }
.dp-res.is-aside-collapsed .dp-res__aside-toggle:hover, .dp-res.is-aside-collapsed .dp-res__aside-toggle:focus { background: var(--dp-color-surface, #fff); border-color: var(--dp-color-text, #303030); color: var(--dp-color-text, #303030); }

.dp-res__panel { border-top: 1px solid var(--dp-color-border, #dedede); }
.dp-res__panel:last-child { border-bottom: 1px solid var(--dp-color-border, #dedede); }
.dp-res__panel > summary { display: flex; align-items: center; gap: 8px; padding: 16px 0; list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: var(--dp-tracking-caps, .12em); text-transform: uppercase; }
.dp-res__panel > summary::-webkit-details-marker { display: none; }
.dp-res__panel > summary::after { content: "+"; margin-left: auto; font-size: 18px; font-weight: 400; }
.dp-res__panel[open] > summary::after { content: "–"; }
.dp-res__count { color: var(--dp-color-text-muted, #5b5b5b); font-weight: 600; }

.dp-res__list { margin: 0 0 12px; padding: 0; list-style: none; }
.dp-res__list a { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; color: inherit; text-decoration: none; }
.dp-res__list li + li a { border-top: 1px solid var(--dp-color-border, #dedede); }
.dp-res__list a:hover .dp-res__name, .dp-res__list a:focus-visible .dp-res__name { color: var(--dp-color-primary-strong, #417e88); }
.dp-res__fmt { font-size: 10px; line-height: 1.4; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dp-color-primary-strong, #417e88); }
.dp-res__name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.dp-res__name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--dp-color-text-muted, #5b5b5b); }
.dp-res__go { color: var(--dp-color-primary-strong, #417e88); }
.dp-res .dp-res__more { display: none; width: auto; margin: 0 0 14px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: normal; color: var(--dp-color-primary-strong, #417e88); cursor: pointer; }
.dp-res .dp-res__more:hover, .dp-res .dp-res__more:focus { background: none; box-shadow: none; color: var(--dp-color-text, #303030); text-decoration: underline; text-underline-offset: 3px; }
.dp-res .dp-res__more[hidden] { display: none !important; }
.dp-res__all { display: inline-block; margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--dp-color-primary-strong, #417e88); text-decoration: none; }
.dp-res__all:hover { text-decoration: underline; }

/* ── Fiche sans autre contenu : ses documents au centre ───────────────
   Le premier PDF dans un lecteur (posé par le script à partir de 768 px),
   chaque fichier sur une ligne « Télécharger » — la page n'est jamais vide. */
.dp-res__preview { margin: 0 0 24px; overflow: hidden; border: 1px solid var(--dp-color-border, #dedede); border-radius: var(--dp-radius-lg, 20px); background: var(--dp-color-border, #dedede); }
.dp-res__preview:empty { display: none; }
.dp-res__preview object { display: block; width: 100%; height: clamp(480px, 80vh, 920px); border: 0; }
.dp-res__preview object > p { margin: 0; padding: 32px 24px; text-align: center; font-size: 15px; }
.dp-res__preview object > p a { color: var(--dp-color-primary-strong, #417e88); font-weight: 600; }
.dp-res__list--main { margin: 0; border-top: 1px solid var(--dp-color-border, #dedede); }
.dp-res__list--main a { grid-template-columns: 72px minmax(0, 1fr) auto; padding: 18px 0; border-bottom: 1px solid var(--dp-color-border, #dedede); }
.dp-res__list--main li + li a { border-top: 0; }
.dp-res__list--main .dp-res__name { font-size: 17px; }
.dp-res__dl { font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--dp-color-primary-strong, #417e88); }
.dp-res__list--main a:hover .dp-res__dl, .dp-res__list--main a:focus-visible .dp-res__dl { text-decoration: underline; text-underline-offset: 3px; }
.dp-res__none { margin: 0; font-size: 15px; color: var(--dp-color-text-muted, #5b5b5b); }

@media (max-width: 1023px) {
    .dp-res__layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; }
}
@media (max-width: 767px) {
    .dp-res__layout, .dp-res.is-aside-collapsed .dp-res__layout:not(.dp-res__layout--solo) { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .dp-res__aside { position: static; max-height: none; overflow: visible; }
    .dp-res .dp-res__aside-toggle { display: none; }
    .dp-res.is-aside-collapsed .dp-res__aside-inner { display: block; }
    .dp-res__list .is-extra { display: none; }
    .dp-res__panel.is-expanded .is-extra { display: list-item; }
    .dp-res .dp-res__more { display: block; }
    .dp-res__list--main a { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
}

/* Dans le portail : la page prend la largeur de la zone de travail. */
.vv-main .dp-res { max-width: none; }

/* Le questionnaire suit l’alignement à gauche de la page. */
.dp-res__quiz .dp-quiz { margin-left: 0; }
