/*!
 * GD PDF-WP — Styles du site
 * By Gentil Design — https://www.gentildesign.com
 */

/* =====================================================================
 * Jetons de design
 * ================================================================== */
.gdpdf,
.gdpdf-viewer,
.gdpdf-page,
.gdpdf-modal,
.gdpdf-notice,
.gdpdf-library,
.gdpdf-btn {
	--gd-accent: var(--gdpdf-accent, #ff5b3a);
	--gd-accent-ink: #fff;
	--gd-ink: #14142b;
	--gd-bg: #ffffff;
	--gd-surface: #f6f5f2;
	--gd-canvas: var(--gdpdf-canvas-custom, #e8e6e1);
	--gd-text: #14142b;
	--gd-muted: #64647a;
	--gd-border: rgba(20, 20, 43, 0.1);
	--gd-hover: rgba(20, 20, 43, 0.06);
	--gd-active: rgba(20, 20, 43, 0.1);
	--gd-shadow: 0 1px 2px rgba(20, 20, 43, 0.06), 0 8px 24px rgba(20, 20, 43, 0.08);
	--gd-shadow-lg: 0 24px 64px rgba(20, 20, 43, 0.22);
	--gd-radius: 12px;
	--gd-radius-sm: 8px;
	--gd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.gdpdf[data-theme="dark"],
.gdpdf-viewer[data-theme="dark"],
.gdpdf-page[data-theme="dark"],
.gdpdf-page[data-theme="dark"] .gdpdf-notice {
	--gd-bg: #17172a;
	--gd-surface: #1f1f35;
	--gd-canvas: var(--gdpdf-canvas-custom, #0f0f1d);
	--gd-text: #f2f1ee;
	--gd-muted: #a3a3b8;
	--gd-border: rgba(255, 255, 255, 0.1);
	--gd-hover: rgba(255, 255, 255, 0.08);
	--gd-active: rgba(255, 255, 255, 0.14);
	--gd-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	.gdpdf[data-theme="auto"],
	.gdpdf-viewer[data-theme="auto"],
	.gdpdf-page[data-theme="auto"],
	.gdpdf-page[data-theme="auto"] .gdpdf-notice {
		--gd-bg: #17172a;
		--gd-surface: #1f1f35;
		--gd-canvas: var(--gdpdf-canvas-custom, #0f0f1d);
		--gd-text: #f2f1ee;
		--gd-muted: #a3a3b8;
		--gd-border: rgba(255, 255, 255, 0.1);
		--gd-hover: rgba(255, 255, 255, 0.08);
		--gd-active: rgba(255, 255, 255, 0.14);
		--gd-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
		color-scheme: dark;
	}
}

.gdpdf-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gdpdf-icon,
.gdpdf-ico {
	display: inline-block;
	flex: none;
	vertical-align: middle;
}

/* =====================================================================
 * Boutons
 * ================================================================== */
.gdpdf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
}
.gdpdf-btn:active { transform: translateY(1px); }
.gdpdf-btn:focus-visible { outline: 2px solid var(--gd-accent); outline-offset: 2px; }
.gdpdf-btn--sm { padding: 0.45em 0.95em; font-size: 0.82rem; }
.gdpdf-btn--md { padding: 0.7em 1.35em; font-size: 0.95rem; }
.gdpdf-btn--lg { padding: 0.9em 1.75em; font-size: 1.05rem; }
.gdpdf-btn--primary { background: var(--gd-accent); color: var(--gd-accent-ink) !important; box-shadow: 0 4px 14px -6px var(--gd-accent); }
.gdpdf-btn--primary:hover { filter: brightness(1.06); box-shadow: 0 6px 18px -6px var(--gd-accent); }
.gdpdf-btn--outline { background: transparent; color: var(--gd-accent) !important; border-color: currentColor; }
.gdpdf-btn--outline:hover { background: color-mix(in srgb, var(--gd-accent) 10%, transparent); }
.gdpdf-btn--ghost { background: var(--gd-hover); color: var(--gd-text) !important; }
.gdpdf-btn--ghost:hover { background: var(--gd-active); }
.gdpdf-btn--dark { background: var(--gd-ink); color: #fff !important; }
.gdpdf-btn--dark:hover { background: #26264a; }
.gdpdf-btn-wrap { margin: 1em 0; }
.gdpdf-btn-wrap--center { text-align: center; }
.gdpdf-btn-wrap--right { text-align: right; }

.gdpdf-input {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 0.6em 0.85em;
	border: 1px solid var(--gd-border);
	border-radius: var(--gd-radius-sm);
	background: var(--gd-bg);
	color: var(--gd-text);
	font: inherit;
	font-size: 0.95rem;
}
.gdpdf-input:focus { outline: none; border-color: var(--gd-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gd-accent) 22%, transparent); }

.gdpdf-spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid color-mix(in srgb, var(--gd-accent, #ff5b3a) 20%, transparent);
	border-top-color: var(--gd-accent, #ff5b3a);
	animation: gdpdf-spin 0.8s linear infinite;
}
@keyframes gdpdf-spin { to { transform: rotate(360deg); } }

.gdpdf-inline-error {
	padding: 0.8em 1em;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
	color: #50575e;
	font-size: 0.9rem;
	margin: 1em 0;
}

/* =====================================================================
 * Lecteur
 * ================================================================== */
.gdpdf-viewer {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: var(--gdpdf-width, 100%);
	max-width: 100%;
	height: var(--gdpdf-height, 800px);
	min-height: 320px;
	margin: 1.5em 0;
	overflow: hidden;
	border: 1px solid var(--gd-border);
	border-radius: var(--gd-radius);
	background: var(--gd-canvas);
	color: var(--gd-text);
	font-family: var(--gd-font);
	font-size: 14px;
	line-height: 1.4;
	box-shadow: var(--gd-shadow);
	container-type: inline-size;
	container-name: gdpdf;
	isolation: isolate;
	text-align: left;
}
.gdpdf-viewer *,
.gdpdf-viewer *::before,
.gdpdf-viewer *::after { box-sizing: border-box; }
.gdpdf-viewer:focus { outline: none; }
.gdpdf-viewer:focus-visible { outline: 2px solid var(--gd-accent); outline-offset: 2px; }

.gdpdf-viewer__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: var(--gd-muted);
	font-size: 14px;
	overflow: hidden;
}
.gdpdf-viewer__poster {
	position: absolute;
	inset: -20px;
	width: calc(100% + 40px) !important;
	height: calc(100% + 40px) !important;
	max-width: none !important;
	object-fit: cover;
	filter: blur(18px) saturate(1.1);
	opacity: 0.35;
	transform: scale(1.05);
}
.gdpdf-viewer__placeholder .gdpdf-spinner,
.gdpdf-viewer__placeholder-text { position: relative; }

/* Barre d'outils ---------------------------------------------------- */
.gdpdf-toolbar {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex: none;
	min-height: 52px;
	padding: 6px 8px;
	background: var(--gd-bg);
	border-bottom: 1px solid var(--gd-border);
}
.gdpdf-tb-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.gdpdf-tb-start { flex: 1 1 0; }
.gdpdf-tb-center { flex: 0 1 auto; gap: 10px; }
.gdpdf-tb-end { flex: 1 1 0; justify-content: flex-end; }
.gdpdf-tb-logo { height: 26px; width: auto; max-width: 120px; object-fit: contain; margin: 0 6px; }
.gdpdf-tb-title {
	min-width: 0;
	margin: 0 6px;
	overflow: hidden;
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.gdpdf-tb-btn,
.gdpdf .gdpdf-tb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--gd-text);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	box-shadow: none;
	min-height: 0;
	line-height: 1;
}
.gdpdf-tb-btn:hover { background: var(--gd-hover); color: var(--gd-text); }
.gdpdf-tb-btn:active,
.gdpdf-tb-btn.is-active,
.gdpdf-tb-btn[aria-pressed="true"],
.gdpdf-tb-btn[aria-expanded="true"] { background: var(--gd-active); color: var(--gd-accent); }
.gdpdf-tb-btn:focus-visible { outline: 2px solid var(--gd-accent); outline-offset: -2px; }
.gdpdf-tb-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }

.gdpdf-tb-pages,
.gdpdf-tb-zoom {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border-radius: 12px;
	background: var(--gd-surface);
}
.gdpdf-page-input {
	width: 46px !important;
	height: 32px !important;
	padding: 0 4px !important;
	margin: 0 !important;
	border: 1px solid var(--gd-border) !important;
	border-radius: 8px !important;
	background: var(--gd-bg) !important;
	color: var(--gd-text) !important;
	font: 600 14px/1 var(--gd-font) !important;
	text-align: center;
	box-shadow: none !important;
}
.gdpdf-page-input:focus { outline: none; border-color: var(--gd-accent) !important; }
.gdpdf-page-total { padding: 0 6px 0 4px; color: var(--gd-muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gdpdf-zoom-select {
	height: 32px !important;
	min-width: 0;
	max-width: 170px;
	padding: 0 26px 0 10px !important;
	margin: 0 !important;
	border: 1px solid transparent !important;
	border-radius: 8px !important;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364647a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center no-repeat !important;
	color: var(--gd-text) !important;
	font: 500 13px/1 var(--gd-font) !important;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
}
.gdpdf-zoom-select:hover { background-color: var(--gd-hover) !important; }
.gdpdf-zoom-select:focus { outline: none; border-color: var(--gd-accent) !important; }
.gdpdf-zoom-select option { color: #14142b; background: #fff; }

/* Recherche ---------------------------------------------------------- */
.gdpdf-findbar {
	position: relative;
	z-index: 19;
	display: flex;
	align-items: center;
	gap: 4px;
	flex: none;
	padding: 6px 8px;
	background: var(--gd-bg);
	border-bottom: 1px solid var(--gd-border);
	animation: gdpdf-slide 0.18s ease;
}
.gdpdf-findbar[hidden] { display: none; }
@keyframes gdpdf-slide { from { opacity: 0; transform: translateY(-6px); } }
.gdpdf-find-field {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 260px;
	max-width: 420px;
}
.gdpdf-find-ico { position: absolute; left: 10px; color: var(--gd-muted); display: flex; pointer-events: none; }
.gdpdf-find-input {
	width: 100% !important;
	height: 36px !important;
	padding: 0 92px 0 34px !important;
	margin: 0 !important;
	border: 1px solid var(--gd-border) !important;
	border-radius: 10px !important;
	background: var(--gd-surface) !important;
	color: var(--gd-text) !important;
	font: 14px/1 var(--gd-font) !important;
	box-shadow: none !important;
}
.gdpdf-find-input:focus { outline: none; border-color: var(--gd-accent) !important; background: var(--gd-bg) !important; }
.gdpdf-find-input::-webkit-search-cancel-button,
.gdpdf-find-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.gdpdf-find-input.is-notfound { border-color: #e5484d !important; background: color-mix(in srgb, #e5484d 8%, var(--gd-bg)) !important; }
.gdpdf-find-count {
	position: absolute;
	right: 10px;
	color: var(--gd-muted);
	font-size: 12px;
	white-space: nowrap;
	pointer-events: none;
	font-variant-numeric: tabular-nums;
}
.gdpdf-find-opt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 6px;
	color: var(--gd-muted);
	font-size: 13px;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
}
.gdpdf-find-opt input { margin: 0; accent-color: var(--gd-accent); }
.gdpdf-find-close { margin-left: auto; }

/* Corps -------------------------------------------------------------- */
.gdpdf-body { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.gdpdf-main { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.gdpdf-container {
	position: absolute;
	inset: 0;
	overflow: auto;
	background: var(--gd-canvas);
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--gd-text) 25%, transparent) transparent;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.gdpdf-container:focus { outline: none; }
.gdpdf .pdfViewer { padding: 18px 0 28px; }
.gdpdf .pdfViewer .page {
	--page-border: 0 solid transparent;
	margin: 0 auto 18px;
	border: 0;
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 6px 22px rgba(0, 0, 0, 0.12);
	overflow: hidden;
}
.gdpdf .pdfViewer.scrollHorizontal .page,
.gdpdf .pdfViewer.scrollWrapped .page { margin: 9px; display: inline-block; vertical-align: middle; }
.gdpdf .pdfViewer.scrollHorizontal { padding: 18px; }
.gdpdf .pdfViewer.scrollWrapped { text-align: center; padding: 18px; }
.gdpdf .pdfViewer .page.loadingIcon::after { background: none; }
.gdpdf .pdfViewer .page.loading::after {
	display: block;
	background: linear-gradient(110deg, rgba(0, 0, 0, 0) 30%, rgba(20, 20, 43, 0.05) 50%, rgba(0, 0, 0, 0) 70%) 0 0 / 200% 100%;
	animation: gdpdf-shimmer 1.2s linear infinite;
}
@keyframes gdpdf-shimmer { to { background-position: -200% 0; } }

/* Textes et surlignage de recherche */
.gdpdf .textLayer .highlight { --highlight-bg-color: color-mix(in srgb, var(--gd-accent) 35%, transparent); --highlight-selected-bg-color: color-mix(in srgb, var(--gd-accent) 70%, transparent); }
.gdpdf .textLayer ::selection { background: color-mix(in srgb, var(--gd-accent) 30%, transparent); }

/* Protection (dissuasive) */
.gdpdf--protect .textLayer,
.gdpdf--protect .textLayer * {
	-webkit-user-select: none !important;
	user-select: none !important;
	-webkit-touch-callout: none;
}
.gdpdf--protect canvas { -webkit-touch-callout: none; pointer-events: none; }

/* Filigrane dynamique */
.gdpdf--wm .pdfViewer .page::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 4;
	background-image: var(--gdpdf-wm);
	background-repeat: repeat;
	background-size: 420px 260px;
	pointer-events: none;
}

/* Chargement --------------------------------------------------------- */
.gdpdf-loader {
	position: absolute;
	inset: 0;
	z-index: 15;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: var(--gd-canvas);
	color: var(--gd-muted);
	font-size: 14px;
}
.gdpdf-loader[hidden] { display: none; }
.gdpdf-progress { width: min(220px, 60%); height: 4px; border-radius: 4px; background: var(--gd-border); overflow: hidden; }
.gdpdf-progress-bar { display: block; width: 0; height: 100%; background: var(--gd-accent); transition: width 0.2s ease; }

.gdpdf-error,
.gdpdf-pdfpass,
.gdpdf-print-overlay {
	position: absolute;
	inset: 0;
	z-index: 16;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	background: var(--gd-canvas);
	color: var(--gd-text);
	text-align: center;
}
.gdpdf-print-overlay { background: color-mix(in srgb, var(--gd-canvas) 88%, transparent); backdrop-filter: blur(3px); }
.gdpdf-error p,
.gdpdf-pdfpass p { max-width: 420px; margin: 0; font-size: 15px; }
.gdpdf-error-ico { color: var(--gd-accent); display: flex; }
.gdpdf-pdfpass .gdpdf-password__row { width: min(360px, 100%); }

/* Panneau latéral ----------------------------------------------------- */
.gdpdf-sidebar {
	position: relative;
	z-index: 5;
	display: flex;
	flex-direction: column;
	flex: none;
	width: 0;
	overflow: hidden;
	background: var(--gd-bg);
	border-right: 1px solid transparent;
	transition: width 0.22s ease, border-color 0.22s ease;
}
.gdpdf.is-sidebar-open .gdpdf-sidebar { width: 190px; border-right-color: var(--gd-border); }
.gdpdf-side-tabs { display: flex; gap: 4px; padding: 8px; flex: none; min-width: 190px; }
.gdpdf-side-tab {
	flex: 1;
	height: 30px;
	padding: 0 8px;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--gd-muted);
	font: 600 12px/1 var(--gd-font);
	cursor: pointer;
	box-shadow: none;
}
.gdpdf-side-tab:hover { background: var(--gd-hover); color: var(--gd-text); }
.gdpdf-side-tab.is-active { background: var(--gd-surface); color: var(--gd-text); }
.gdpdf-side-tab[hidden] { display: none; }
.gdpdf-thumbs,
.gdpdf-outline { flex: 1 1 auto; min-width: 190px; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; }
.gdpdf-thumbs[hidden],
.gdpdf-outline[hidden] { display: none; }
.gdpdf-thumb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 8px;
	margin: 0 0 4px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	color: var(--gd-muted);
	box-shadow: none;
}
.gdpdf-thumb:hover { background: var(--gd-hover); }
.gdpdf-thumb-img {
	display: block;
	width: 120px;
	max-width: 100%;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	outline: 2px solid transparent;
	outline-offset: 2px;
	transition: outline-color 0.15s ease;
}
.gdpdf-thumb-img canvas { display: block; width: 100% !important; height: auto !important; }
.gdpdf-thumb-num { font-size: 12px; font-variant-numeric: tabular-nums; }
.gdpdf-thumb.is-current .gdpdf-thumb-img { outline-color: var(--gd-accent); }
.gdpdf-thumb.is-current .gdpdf-thumb-num { color: var(--gd-accent); font-weight: 700; }
.gdpdf-outline-list { list-style: none; margin: 0; padding: 0; }
.gdpdf-outline-list .gdpdf-outline-list { padding-left: 12px; border-left: 1px solid var(--gd-border); margin-left: 8px; }
.gdpdf-outline-item {
	display: block;
	width: 100%;
	padding: 7px 8px;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--gd-text);
	font: 13px/1.35 var(--gd-font);
	text-align: left;
	cursor: pointer;
	box-shadow: none;
}
.gdpdf-outline-item:hover { background: var(--gd-hover); color: var(--gd-accent); }
.gdpdf-outline-empty { padding: 12px 4px; color: var(--gd-muted); font-size: 13px; }

/* Popovers ------------------------------------------------------------ */
.gdpdf-popover {
	position: absolute;
	z-index: 40;
	min-width: 230px;
	max-width: min(340px, calc(100% - 16px));
	padding: 8px;
	border: 1px solid var(--gd-border);
	border-radius: 14px;
	background: var(--gd-bg);
	color: var(--gd-text);
	box-shadow: var(--gd-shadow-lg);
	animation: gdpdf-pop 0.14s ease;
	max-height: calc(100% - 70px);
	overflow-y: auto;
}
@keyframes gdpdf-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.gdpdf-menu-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--gd-text);
	font: 14px/1.2 var(--gd-font);
	text-align: left;
	cursor: pointer;
	box-shadow: none;
}
.gdpdf-menu-item:hover,
.gdpdf-menu-item:focus-visible { background: var(--gd-hover); outline: none; }
.gdpdf-menu-item.is-active { color: var(--gd-accent); font-weight: 600; }
.gdpdf-menu-item .gdpdf-ico { color: var(--gd-muted); }
.gdpdf-menu-item.is-active .gdpdf-ico { color: var(--gd-accent); }
.gdpdf-menu-sep { margin: 8px 10px 4px; padding-top: 8px; border-top: 1px solid var(--gd-border); color: var(--gd-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.gdpdf-pop-title { margin: 4px 6px 10px; font-weight: 700; font-size: 14px; }
.gdpdf-share { width: 320px; padding: 12px; }
.gdpdf-share-copy { display: flex; gap: 6px; margin-bottom: 8px; }
.gdpdf-share-copy .gdpdf-input { font-size: 12px; padding: 0.5em 0.7em; }
.gdpdf-share .gdpdf-find-opt { margin: 0 2px 10px; }
.gdpdf-share-nets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gdpdf-share-net {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 4px;
	border-radius: 10px;
	background: var(--gd-surface);
	color: var(--gd-text) !important;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.gdpdf-share-net:hover { background: var(--gd-active); color: var(--gd-accent) !important; }
.gdpdf-share-native { width: 100%; margin-top: 8px; }

/* Reprise de lecture --------------------------------------------------- */
.gdpdf-resume {
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 18;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100% - 24px);
	padding: 8px 8px 8px 14px;
	border-radius: 999px;
	background: var(--gd-ink, #14142b);
	color: #fff;
	box-shadow: var(--gd-shadow-lg);
	transform: translateX(-50%);
	animation: gdpdf-up 0.25s ease;
	font-size: 13px;
}
.gdpdf-resume.is-leaving { opacity: 0; transform: translate(-50%, 8px); transition: all 0.2s ease; }
@keyframes gdpdf-up { from { opacity: 0; transform: translate(-50%, 10px); } }
.gdpdf-resume-ico { display: flex; color: var(--gd-accent); }
.gdpdf-resume-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gdpdf-resume-close { display: flex; padding: 6px; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, 0.7); cursor: pointer; }
.gdpdf-resume-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Plein écran --------------------------------------------------------- */
.gdpdf-viewer.is-fullscreen,
.gdpdf-viewer:fullscreen { width: 100% !important; height: 100% !important; margin: 0; border: 0; border-radius: 0; }
.gdpdf-viewer.is-pseudo-fullscreen {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	max-width: none !important;
}
html.gdpdf-lock-scroll,
html.gdpdf-lock-scroll body { overflow: hidden !important; }

/* Réactif (requêtes de conteneur) -------------------------------------- */
.gdpdf-only-sm { display: none; }
@container gdpdf (max-width: 760px) {
	.gdpdf-hide-sm { display: none !important; }
	.gdpdf-only-sm { display: flex; }
	.gdpdf-zoom-select { max-width: 120px; }
	.gdpdf-tb-title { display: none; }
}
@container gdpdf (max-width: 520px) {
	.gdpdf-hide-xs { display: none !important; }
	.gdpdf-toolbar { padding: 4px; gap: 2px; }
	.gdpdf-tb-btn { width: 36px; height: 36px; }
	.gdpdf-tb-center { gap: 4px; }
	.gdpdf-zoom-select { max-width: 92px; padding-left: 6px !important; }
	.gdpdf-page-total { display: none; }
	.gdpdf-tb-logo { display: none; }
	.gdpdf.is-sidebar-open .gdpdf-sidebar { position: absolute; inset: 0 auto 0 0; width: min(220px, 80%); box-shadow: var(--gd-shadow-lg); }
	.gdpdf-find-opt span { display: none; }
	.gdpdf .pdfViewer { padding: 10px 0 18px; }
	.gdpdf .pdfViewer .page { margin-bottom: 10px; }
}
@container gdpdf (max-width: 440px) {
	.gdpdf-tb-zoom { display: none; }
}

/* Impression ----------------------------------------------------------- */
#gdpdf-print-container { display: none; }
@media print {
	html.gdpdf-printing body > *:not(#gdpdf-print-container) { display: none !important; }
	html.gdpdf-printing #gdpdf-print-container { display: block !important; }
	html.gdpdf-printing body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
	.gdpdf-print-page { break-after: page; page-break-after: always; text-align: center; }
	.gdpdf-print-page:last-child { break-after: auto; page-break-after: auto; }
	.gdpdf-print-page img { display: block; max-width: 100%; max-height: 100vh; margin: 0 auto; }
	/* Les documents dont l'impression est interdite ne s'impriment pas avec la page. */
	.gdpdf--noprint .gdpdf-body { visibility: hidden !important; }
}

/* =====================================================================
 * Messages d'accès (mot de passe, connexion…)
 * ================================================================== */
.gdpdf-notice {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: 560px;
	margin: 1.5em auto;
	padding: 36px 28px;
	border: 1px solid var(--gd-border);
	border-radius: 18px;
	background: var(--gd-bg);
	color: var(--gd-text);
	text-align: center;
	font-family: inherit;
	box-shadow: var(--gd-shadow);
}
.gdpdf-notice__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 4px;
	border-radius: 18px;
	background: color-mix(in srgb, var(--gd-accent) 12%, transparent);
	color: var(--gd-accent);
}
.gdpdf-notice__doc { margin: 0; font-size: 1.1rem; font-weight: 700; }
.gdpdf-notice__text { margin: 0; color: var(--gd-muted); font-size: 0.95rem; line-height: 1.55; }
.gdpdf-notice__hint { margin: 6px 0 0; font-size: 0.85rem; }
.gdpdf-notice__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.gdpdf-password { width: 100%; max-width: 380px; margin-top: 8px; }
.gdpdf-password__row { display: flex; gap: 8px; }
.gdpdf-password__row .gdpdf-btn { flex: none; border-radius: var(--gd-radius-sm); }
.gdpdf-password__error { margin: 10px 0 0; color: #d1343a; font-size: 0.88rem; font-weight: 600; }
@media (max-width: 480px) {
	.gdpdf-password__row { flex-direction: column; }
	.gdpdf-notice { padding: 28px 18px; }
}

/* =====================================================================
 * Bibliothèque
 * ================================================================== */
.gdpdf-library { margin: 2em 0; }
.gdpdf-library__title { margin: 0 0 0.8em; }
.gdpdf-library__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 1.5em;
}
.gdpdf-library__search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 260px;
	margin: 0;
}
.gdpdf-library__search .gdpdf-icon { position: absolute; left: 14px; color: var(--gd-muted); pointer-events: none; }
.gdpdf-library__search input,
.gdpdf-library__filter select {
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 16px 0 42px;
	border: 1px solid var(--gd-border);
	border-radius: 999px;
	background: var(--gd-bg);
	color: var(--gd-text);
	font: inherit;
	font-size: 0.95rem;
}
.gdpdf-library__filter { flex: 0 1 240px; margin: 0; }
.gdpdf-library__filter select { padding: 0 36px 0 18px; -webkit-appearance: none; appearance: none; background: var(--gd-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364647a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 16px center no-repeat; }
.gdpdf-library__search input:focus,
.gdpdf-library__filter select:focus { outline: none; border-color: var(--gd-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gd-accent) 18%, transparent); }
.gdpdf-library__tools .gdpdf-btn { height: 46px; }
.gdpdf-library__reset { font-size: 0.9rem; color: var(--gd-muted); }
.gdpdf-library__empty { padding: 2.5em 1em; border: 1px dashed var(--gd-border); border-radius: var(--gd-radius); color: var(--gd-muted); text-align: center; }

.gdpdf-library__grid {
	display: grid;
	grid-template-columns: repeat(var(--gdpdf-cols, 3), minmax(0, 1fr));
	gap: 28px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (max-width: 1024px) { .gdpdf-library__grid { grid-template-columns: repeat(min(var(--gdpdf-cols, 3), 3), minmax(0, 1fr)); } }
@media (max-width: 782px) { .gdpdf-library__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }
@media (max-width: 340px) { .gdpdf-library__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .gdpdf-card__title { font-size: 0.92rem; } .gdpdf-card__excerpt { display: none; } }

.gdpdf-card { margin: 0; padding: 0; list-style: none; }
.gdpdf-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit !important;
	text-decoration: none !important;
	border-radius: var(--gd-radius);
	outline: none;
}
.gdpdf-card__cover {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: var(--gd-radius);
	background: linear-gradient(160deg, #f6f5f2, #e8e6e1);
	box-shadow: 0 1px 2px rgba(20, 20, 43, 0.08), 0 10px 26px -12px rgba(20, 20, 43, 0.3);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gdpdf-card__cover img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: top center;
	margin: 0 !important;
}
.gdpdf-card__link:hover .gdpdf-card__cover,
.gdpdf-card__link:focus-visible .gdpdf-card__cover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(20, 20, 43, 0.08), 0 22px 40px -14px rgba(20, 20, 43, 0.38); }
.gdpdf-card__link:focus-visible .gdpdf-card__cover { outline: 3px solid var(--gd-accent); outline-offset: 3px; }
.gdpdf-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--gd-accent);
}
.gdpdf-card__placeholder em { font-style: normal; font-weight: 800; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--gd-muted); }
.gdpdf-card__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #14142b;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(4px);
}
.gdpdf-card__badge--lock { background: #14142b; color: #fff; }
.gdpdf-card__body { display: flex; flex-direction: column; gap: 5px; padding: 14px 2px 0; }
.gdpdf-card__cat { color: var(--gd-accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.gdpdf-card__title { font-size: 1.02rem; font-weight: 700; line-height: 1.3; color: var(--gd-text); }
.gdpdf-card__excerpt { color: var(--gd-muted); font-size: 0.88rem; line-height: 1.5; }
.gdpdf-card__meta { color: var(--gd-muted); font-size: 0.8rem; }
.gdpdf-card__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--gd-accent); font-size: 0.88rem; font-weight: 700; }
.gdpdf-card__link:hover .gdpdf-card__cta .gdpdf-icon { transform: translateX(3px); }
.gdpdf-card__cta .gdpdf-icon { transition: transform 0.2s ease; }

.gdpdf-library--list .gdpdf-library__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.gdpdf-library--list .gdpdf-card__link { flex-direction: row; align-items: center; gap: 18px; padding: 12px; border: 1px solid var(--gd-border); background: var(--gd-bg); }
.gdpdf-library--list .gdpdf-card__link:hover { border-color: color-mix(in srgb, var(--gd-accent) 40%, var(--gd-border)); }
.gdpdf-library--list .gdpdf-card__cover { flex: none; width: 72px; border-radius: 8px; }
.gdpdf-library--list .gdpdf-card__link:hover .gdpdf-card__cover { transform: none; }
.gdpdf-library--list .gdpdf-card__body { padding: 0; }
.gdpdf-library--list .gdpdf-card__badge { top: 4px; right: 4px; width: 22px; height: 22px; }

.gdpdf-library__pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2em; }
.gdpdf-library__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--gd-border);
	border-radius: 999px;
	color: var(--gd-text) !important;
	text-decoration: none !important;
	font-weight: 600;
}
.gdpdf-library__page:hover { border-color: var(--gd-accent); color: var(--gd-accent) !important; }
.gdpdf-library__page.is-current { background: var(--gd-ink); border-color: var(--gd-ink); color: #fff !important; }

/* =====================================================================
 * Fenêtre modale
 * ================================================================== */
.gdpdf-modal { position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: center; justify-content: center; font-family: var(--gd-font); }
.gdpdf-modal-backdrop { position: absolute; inset: 0; background: rgba(12, 12, 24, 0.72); backdrop-filter: blur(6px); animation: gdpdf-fade 0.2s ease; }
@keyframes gdpdf-fade { from { opacity: 0; } }
.gdpdf-modal-frame {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(1200px, calc(100vw - 120px));
	height: calc(100vh - 48px);
	height: calc(100dvh - 48px);
	animation: gdpdf-zoom 0.22s ease;
}
@keyframes gdpdf-zoom { from { opacity: 0; transform: scale(0.97); } }
.gdpdf-modal-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; color: #fff; }
.gdpdf-modal-count { font-size: 13px; font-weight: 600; opacity: 0.8; font-variant-numeric: tabular-nums; }
.gdpdf-modal-stage { position: relative; flex: 1; min-height: 0; }
.gdpdf-modal-stage .gdpdf-viewer { height: 100%; margin: 0; border: 0; box-shadow: var(--gd-shadow-lg); }
.gdpdf-modal-close,
.gdpdf-modal-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.gdpdf-modal-close:hover,
.gdpdf-modal-nav:hover { background: rgba(255, 255, 255, 0.24); }
.gdpdf-modal-close { width: 40px; height: 40px; }
.gdpdf-modal-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.gdpdf-modal-nav[hidden] { display: none; }
.gdpdf-modal-nav--prev { left: 12px; }
.gdpdf-modal-nav--next { right: 12px; }
@media (max-width: 782px) {
	.gdpdf-modal-frame { width: 100vw; height: 100vh; height: 100dvh; }
	.gdpdf-modal-head { padding: 0 8px; background: #14142b; }
	.gdpdf-modal-stage .gdpdf-viewer { border-radius: 0; }
	.gdpdf-modal-nav { top: auto; bottom: 14px; transform: none; background: rgba(20, 20, 43, 0.85); z-index: 30; }
}

/* =====================================================================
 * Page autonome (/pdf/slug/)
 * ================================================================== */
html.gdpdf-standalone-html,
html.gdpdf-standalone-html body { height: 100%; margin: 0; padding: 0; }
body.gdpdf-standalone { background: #14142b; font-family: var(--gd-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); -webkit-font-smoothing: antialiased; }
.gdpdf-page {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	background: var(--gd-canvas);
	color: var(--gd-text);
	font-family: var(--gd-font);
}
.gdpdf-page__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: none;
	min-height: 60px;
	padding: 8px 16px;
	padding-top: max(8px, env(safe-area-inset-top));
	background: var(--gd-ink);
	color: #fff;
}
.gdpdf-page__brand { display: flex; align-items: center; gap: 10px; flex: none; color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 14px; max-width: 30%; }
.gdpdf-page__brand img { display: block; height: 32px; width: auto; max-width: 160px; object-fit: contain; }
.gdpdf-page__home { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); }
.gdpdf-page__site { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0.85; }
.gdpdf-page__heading { flex: 1 1 auto; min-width: 0; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.gdpdf-page__title { margin: 0; overflow: hidden; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.gdpdf-page__meta { margin: 2px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 12px; }
.gdpdf-page__actions { display: flex; gap: 8px; flex: none; }
.gdpdf-page__actions .gdpdf-btn--ghost { background: rgba(255, 255, 255, 0.1); color: #fff !important; }
.gdpdf-page__actions .gdpdf-btn--ghost:hover { background: rgba(255, 255, 255, 0.18); }
.gdpdf-page__main { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.gdpdf-page__main .gdpdf-viewer { flex: 1; height: 100% !important; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.gdpdf-page__main--notice { align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.gdpdf-page__main--notice .gdpdf-notice { margin: auto; }
.gdpdf-page__drawer {
	position: absolute;
	top: 60px;
	right: 0;
	bottom: 0;
	z-index: 50;
	width: min(400px, 100%);
	padding: 22px 24px 32px;
	overflow-y: auto;
	background: var(--gd-bg);
	color: var(--gd-text);
	box-shadow: var(--gd-shadow-lg);
	animation: gdpdf-drawer 0.22s ease;
}
.gdpdf-page__drawer[hidden] { display: none; }
@keyframes gdpdf-drawer { from { transform: translateX(24px); opacity: 0; } }
.gdpdf-page__drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gdpdf-page__drawer-head h2 { margin: 0; font-size: 17px; }
.gdpdf-page__drawer-close { display: flex; padding: 8px; border: 0; border-radius: 10px; background: var(--gd-hover); color: var(--gd-text); cursor: pointer; }
.gdpdf-page__desc { margin-bottom: 18px; color: var(--gd-text); font-size: 15px; line-height: 1.65; }
.gdpdf-page__desc > :first-child { margin-top: 0; }
@media (max-width: 640px) {
	.gdpdf-page__bar { gap: 10px; padding-left: 10px; padding-right: 10px; }
	.gdpdf-page__site,
	.gdpdf-page__meta { display: none; }
	.gdpdf-page__heading { padding-left: 10px; }
	.gdpdf-page__title { font-size: 14px; }
	.gdpdf-page__actions .gdpdf-btn span { display: none; }
	.gdpdf-page__actions .gdpdf-btn { padding: 0.55em; }
}

/* Détails & navigation ------------------------------------------------- */
.gdpdf-details { margin: 1.5em 0; }
.gdpdf-details__list { display: grid; gap: 0; margin: 0 0 1.2em; padding: 0; border: 1px solid var(--gd-border, rgba(20, 20, 43, 0.1)); border-radius: 12px; overflow: hidden; }
.gdpdf-details__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--gd-border, rgba(20, 20, 43, 0.1)); font-size: 0.9rem; }
.gdpdf-details__row:last-child { border-bottom: 0; }
.gdpdf-details__row dt { margin: 0; color: var(--gd-muted, #64647a); font-weight: 500; }
.gdpdf-details__row dd { margin: 0; font-weight: 600; text-align: right; }
.gdpdf-docnav { display: grid; gap: 10px; margin: 1.5em 0; }
.gdpdf-docnav__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid var(--gd-border, rgba(20, 20, 43, 0.1));
	border-radius: 12px;
	color: inherit !important;
	text-decoration: none !important;
	transition: border-color 0.15s ease;
}
.gdpdf-docnav__item:hover { border-color: var(--gd-accent, #ff5b3a); }
.gdpdf-docnav__thumb { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 58px; overflow: hidden; border-radius: 6px; background: #f6f5f2; color: var(--gd-accent, #ff5b3a); }
.gdpdf-docnav__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gdpdf-docnav__text { display: flex; flex-direction: column; min-width: 0; }
.gdpdf-docnav__text small { color: var(--gd-muted, #64647a); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.gdpdf-docnav__text strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
	.gdpdf *,
	.gdpdf-card__cover,
	.gdpdf-modal * { animation: none !important; transition: none !important; }
}
