/* EXTEND Catalogues 1.1 — couleurs tirées du logo EXTEND.
   Modifiables dans le thème : :root { --extcat-accent: #…; } */
:root {
	--extcat-graphite: #555658;
	--extcat-lime: #cadb2a;
	--extcat-yellow: #ffc20e;
	--extcat-accent: var(--extcat-graphite);
	--extcat-stage: #2b2c2e;
	--extcat-stage-ink: #f2f3f4;
	--extcat-muted: #a3a6a9;
}

/* ---------- Bibliothèque ---------- */
.extcat-lib { --extcat-col: 210px; --extcat-gap-x: 2rem; margin: 2rem 0 3rem; overflow-x: clip; overflow-clip-margin: 10px; }
.extcat-lib--compacte { --extcat-col: 165px; --extcat-gap-x: 1.6rem; }
.extcat-lib--grande { --extcat-col: 270px; --extcat-gap-x: 2.4rem; }

.extcat-lib__head { max-width: 62ch; margin: 0 0 2.2rem; }
.extcat-lib__title { margin: 0 0 0.5rem; }
.extcat-lib__intro { margin: 0; font-size: 1.08em; line-height: 1.55; opacity: 0.8; }

/* Filtres */
.extcat-filters { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0 0 2.2rem; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.extcat-filter {
	all: unset;
	cursor: pointer;
	padding: 0.55rem 0 0.7rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: inherit;
	opacity: 0.6;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}
.extcat-filter:hover { opacity: 1; }
.extcat-filter[aria-pressed="true"] { opacity: 1; border-bottom-color: var(--extcat-lime); }
.extcat-filter:focus-visible { outline: 2px solid var(--extcat-graphite); outline-offset: 4px; border-radius: 2px; }

/* Grille */
.extcat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--extcat-col, 210px), 1fr));
	gap: 2.6rem var(--extcat-gap-x, 2rem);
	margin: 0 0 2rem;
}
.extcat-grid > p:empty,
.extcat-grid > br { display: none; }
.extcat[hidden] { display: none !important; }
.extcat-lib__empty { opacity: 0.7; }

.extcat-lib__group { margin: 0 0 2.4rem; }
.extcat-lib__group-title { margin: 0 0 0.3rem; }
.extcat-lib__group-desc { margin: 0 0 1.4rem; opacity: 0.75; max-width: 62ch; }
.extcat-lib__group-title + .extcat-grid { margin-top: 1.4rem; }

/* ---------- Vignette ---------- */
.extcat { margin: 0; display: flex; flex-direction: column; gap: 0.9rem; max-width: 340px; }
.extcat-lib .extcat--card { max-width: none; }
.extcat__cover { position: relative; display: block; aspect-ratio: 210 / 297; }
.extcat__cover img,
.extcat__cover canvas {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #eceef0;
	border-radius: 2px 6px 6px 2px;
	box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.06), 0 12px 26px -14px rgba(0, 0, 0, 0.5);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	transform-origin: 50% 100%;
}
.extcat__cover:hover img,
.extcat__cover:hover canvas,
.extcat__cover:focus-visible img,
.extcat__cover:focus-visible canvas { transform: translateY(-6px) rotate(-1.2deg); box-shadow: 0 22px 34px -16px rgba(0, 0, 0, 0.55); }
.extcat__cover:focus-visible { outline: 3px solid var(--extcat-graphite); outline-offset: 6px; border-radius: 4px; }
.extcat__badge {
	position: absolute;
	top: 10px;
	left: -6px;
	padding: 0.3rem 0.65rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	color: #2f3032;
	background: var(--extcat-yellow);
	border-radius: 2px 3px 3px 0;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}
.extcat__badge::after { content: ""; position: absolute; left: 0; bottom: -5px; border-style: solid; border-width: 0 6px 5px 0; border-color: transparent rgba(0, 0, 0, 0.35) transparent transparent; }

/* Étagères : une tablette sous chaque rangée de couvertures */
.extcat-lib--etageres .extcat-grid { row-gap: 3.4rem; }
.extcat-lib--etageres .extcat__cover { margin-bottom: 14px; }
.extcat-lib--etageres .extcat--card .extcat__cover::after {
	content: "";
	position: absolute;
	left: calc(var(--extcat-gap-x, 2rem) / -2 - 1px);
	right: calc(var(--extcat-gap-x, 2rem) / -2 - 1px);
	bottom: -14px;
	height: 9px;
	background: linear-gradient(to bottom, color-mix(in srgb, var(--extcat-graphite) 80%, #fff) 0 2px, var(--extcat-graphite) 2px);
	box-shadow: 0 10px 14px -8px rgba(0, 0, 0, 0.45);
	z-index: -1;
}
.extcat-lib--etageres .extcat-grid { position: relative; z-index: 0; }

.extcat__meta { display: flex; flex-direction: column; gap: 0.3rem; }
.extcat__kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.6; }
.extcat__title { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.extcat__desc { font-size: 0.92rem; line-height: 1.45; opacity: 0.75; }
.extcat__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.5rem; }
.extcat__open {
	display: inline-block;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.65rem 1.2rem;
	border-radius: 999px;
	background: var(--extcat-graphite);
	color: #fff !important;
	text-decoration: none !important;
	transition: filter 0.15s ease;
}
.extcat__open:hover { filter: brightness(1.18); }
.extcat__open:focus-visible,
.extcat__dl:focus-visible { outline: 3px solid var(--extcat-graphite); outline-offset: 3px; }
.extcat__dl { font-size: 0.86rem; color: inherit; opacity: 0.8; text-underline-offset: 3px; }

/* À la une */
.extcat-lib__hero { margin: 0 0 3rem; }
.extcat--hero {
	max-width: none;
	display: grid;
	grid-template-columns: minmax(180px, 300px) 1fr;
	align-items: center;
	gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
	padding: clamp(1.4rem, 3vw, 2.5rem);
	background: color-mix(in srgb, var(--extcat-graphite) 7%, #fff);
	border-radius: 10px;
}
.extcat--hero .extcat__title { font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.2; }
.extcat--hero .extcat__desc { font-size: 1rem; max-width: 52ch; }
.extcat--hero .extcat__kicker::before { content: "À la une"; display: inline-block; margin-right: 0.6em; padding: 0.15rem 0.5rem; border-radius: 3px; background: var(--extcat-lime); color: #2f3032; opacity: 1; }
.extcat--hero .extcat__kicker { opacity: 0.85; }
.extcat--hero .extcat__open { padding: 0.8rem 1.5rem; font-size: 1rem; }
@media (max-width: 600px) {
	.extcat--hero { grid-template-columns: 1fr; }
	.extcat--hero .extcat__cover { max-width: 230px; }
}

/* Bandeau de fin */
.extcat-lib__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: 1rem;
	padding: 1.5rem clamp(1.3rem, 3vw, 2.2rem);
	border-radius: 10px;
	background: var(--extcat-graphite);
	color: #fff;
}
.extcat-lib__cta p { margin: 0; font-size: 1.05rem; line-height: 1.45; max-width: 52ch; }
.extcat-lib__cta-btn {
	display: inline-block;
	padding: 0.8rem 1.4rem;
	border-radius: 999px;
	background: var(--extcat-yellow);
	color: #2f3032 !important;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}
.extcat-lib__cta-btn:hover { filter: brightness(0.95); }
.extcat-lib__cta-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- Liseuse ---------- */
html.extcat-lock,
html.extcat-lock body { overflow: hidden; }

.extcat-viewer {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	background: var(--extcat-stage);
	color: var(--extcat-stage-ink);
	font-family: inherit;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	-webkit-tap-highlight-color: transparent;
}
.extcat-viewer[hidden],
.extcat-viewer [hidden] { display: none !important; }

/* Barre haute claire : le logo garde ses vraies couleurs */
.extcat-bar {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: calc(0.5rem + env(safe-area-inset-top, 0px)) clamp(0.6rem, 2vw, 1.25rem) 0.5rem;
	background: #fff;
	color: #2f3032;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.extcat-bar__logo { display: block; height: 38px; width: auto; flex: 0 0 auto; margin-right: 0.6rem; }
.extcat-bar__title {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	font-size: 0.98rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-left: 0.8rem;
	border-left: 1px solid #dfe1e3;
}
.extcat-btn {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
	color: inherit;
	flex: 0 0 auto;
}
.extcat-btn:hover { background: rgba(0, 0, 0, 0.06); }
.extcat-stage .extcat-btn:hover { background: rgba(255, 255, 255, 0.12); }
.extcat-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.extcat-btn[disabled] { opacity: 0.25; cursor: default; background: none !important; }
.extcat-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.extcat-cta {
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	padding: 0.6rem 1.05rem;
	border-radius: 999px;
	background: var(--extcat-yellow);
	color: #2f3032 !important;
	margin: 0 0.3rem;
}
.extcat-cta:hover { filter: brightness(0.95); }
.extcat-cta:focus-visible { outline: 2px solid #2f3032; outline-offset: 3px; }

/* Scène */
.extcat-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(0.5rem, 2vw, 1.5rem);
	overflow: hidden;
}
.extcat-book { margin: 0 auto; }
.extcat-page { background: #fff; overflow: hidden; }
.extcat-page img { display: block; width: 100%; height: 100%; object-fit: contain; }
.extcat-page:not(.is-ready)::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 3px solid #e3e5e7;
	border-top-color: var(--extcat-graphite);
	animation: extcat-spin 0.9s linear infinite;
}
.extcat-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: rgba(0, 0, 0, 0.3); z-index: 2; }
.extcat-nav--prev { left: clamp(0.25rem, 1.5vw, 1rem); }
.extcat-nav--next { right: clamp(0.25rem, 1.5vw, 1rem); }

.extcat-status {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	text-align: center;
	padding: 2rem;
	font-size: 0.95rem;
	color: var(--extcat-muted);
}
.extcat-status__spin {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: var(--extcat-lime);
	animation: extcat-spin 0.9s linear infinite;
}
.extcat-status a { color: var(--extcat-stage-ink); }

/* Barre basse : curseur de pages */
.extcat-foot {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.4rem clamp(0.8rem, 3vw, 2rem) 0.7rem;
}
.extcat-count { font-size: 0.86rem; color: var(--extcat-muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 7.5em; }
.extcat-range {
	flex: 1 1 auto;
	-webkit-appearance: none;
	appearance: none;
	height: 22px;
	background: transparent;
	cursor: pointer;
	margin: 0;
	--p: 0%;
}
.extcat-range::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(to right, var(--extcat-lime) var(--p), rgba(255, 255, 255, 0.18) var(--p));
}
.extcat-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); }
.extcat-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--extcat-lime); }
.extcat-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -6px;
	border-radius: 50%;
	background: #fff;
	border: 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.extcat-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.extcat-range:focus-visible { outline: 2px solid var(--extcat-lime); outline-offset: 4px; border-radius: 4px; }
.extcat-foot .extcat-btn { width: 38px; height: 38px; }
.extcat-foot .extcat-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* Partage */
.extcat-share {
	position: absolute;
	top: calc(62px + env(safe-area-inset-top, 0px));
	right: clamp(0.6rem, 2vw, 1.25rem);
	z-index: 5;
	min-width: 230px;
	padding: 0.4rem;
	border-radius: 10px;
	background: #fff;
	color: #2f3032;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
}
.extcat-share a,
.extcat-share button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	padding: 0.65rem 0.85rem;
	border-radius: 6px;
	font-size: 0.92rem;
}
.extcat-share a:hover,
.extcat-share button:hover,
.extcat-share a:focus-visible,
.extcat-share button:focus-visible { background: #f1f2f3; }
.extcat-toast {
	position: absolute;
	left: 50%;
	bottom: 4.5rem;
	transform: translateX(-50%);
	z-index: 6;
	padding: 0.6rem 1rem;
	border-radius: 999px;
	background: #fff;
	color: #2f3032;
	font-size: 0.88rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Zoom */
.extcat-zoom {
	position: absolute;
	inset: 0;
	z-index: 3;
	overflow: auto;
	background: var(--extcat-stage);
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y pinch-zoom;
}
.extcat-zoom img { display: block; margin: 0 auto 12px; max-width: none; background: #fff; }

@keyframes extcat-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
	.extcat-bar { gap: 0.1rem; }
	.extcat-bar__logo { height: 30px; margin-right: 0.3rem; }
	.extcat-bar__title { display: none; }
	.extcat-bar__spacer-sm { flex: 1 1 auto; }
	.extcat-hide-sm { display: none !important; }
	.extcat-nav { display: none; }
	.extcat-cta { padding: 0.55rem 0.8rem; font-size: 0.8rem; margin: 0 0.15rem; }
	.extcat-count { min-width: 0; }
}
@media (min-width: 761px) { .extcat-bar__spacer-sm { display: none; } }

@media (prefers-reduced-motion: reduce) {
	.extcat__cover img,
	.extcat__cover canvas { transition: none; }
	.extcat__cover:hover img,
	.extcat__cover:hover canvas { transform: none; }
}

@media (min-width: 761px) { .extcat-only-sm { display: none !important; } }

/* Couverture et dernière page seules : le livre se recentre */
.extcat-book { transition: transform 0.45s ease; }
.extcat-book.is-front { transform: translateX(-25%); }
.extcat-book.is-back { transform: translateX(25%); }
@media (prefers-reduced-motion: reduce) { .extcat-book { transition: none; } }

/* Mobile : deux couvertures par rangée plutôt qu'une seule géante */
@media (max-width: 560px) {
	.extcat-lib { --extcat-gap-x: 1.1rem; }
	.extcat-lib .extcat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.4rem; }
	.extcat-lib .extcat--card .extcat__title { font-size: 0.95rem; }
	.extcat-lib .extcat--card .extcat__desc { display: none; }
	.extcat-lib .extcat--card .extcat__open { padding: 0.55rem 0.95rem; font-size: 0.85rem; }
	.extcat-lib .extcat--card .extcat__dl { font-size: 0.78rem; }
	.extcat-filters { gap: 0.2rem 1.1rem; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
	.extcat-filter { white-space: nowrap; }
}

/* ---------- Liens cliquables et surlignage dans les pages ---------- */

.extcat-ov { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.extcat-link {
	position: absolute;
	display: block;
	pointer-events: auto;
	cursor: pointer;
	border-radius: 2px;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.extcat-link:hover,
.extcat-link:focus-visible { background: color-mix(in srgb, var(--extcat-yellow) 28%, transparent); box-shadow: 0 0 0 2px var(--extcat-yellow); outline: none; }
.extcat-hl {
	position: absolute;
	display: block;
	background: color-mix(in srgb, var(--extcat-yellow) 45%, transparent);
	mix-blend-mode: multiply;
	border-radius: 2px;
}
.extcat-zoom__page { position: relative; margin: 0 auto 12px; }
.extcat-zoom__page img { margin: 0; width: 100% !important; }

/* ---------- Recherche dans la liseuse ---------- */
.extcat-search {
	position: absolute;
	top: calc(62px + env(safe-area-inset-top, 0px));
	right: clamp(0.6rem, 2vw, 1.25rem);
	z-index: 5;
	width: min(360px, calc(100vw - 1.2rem));
	max-height: calc(100% - 80px);
	display: flex;
	flex-direction: column;
	border-radius: 10px;
	background: #fff;
	color: #2f3032;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.extcat-search__input {
	margin: 0.6rem;
	padding: 0.7rem 0.9rem;
	font: inherit;
	font-size: 16px; /* évite le zoom automatique sur iPhone */
	border: 1px solid #d5d8db;
	border-radius: 8px;
	background: #f7f8f9;
	color: inherit;
}
.extcat-search__input:focus { outline: 2px solid var(--extcat-graphite); outline-offset: 0; background: #fff; }
.extcat-search__status { margin: 0 0.9rem 0.4rem; font-size: 0.82rem; color: #6b7075; min-height: 1.2em; }
.extcat-search__list { list-style: none; margin: 0; padding: 0 0.4rem 0.5rem; overflow-y: auto; }
.extcat-search__list button,
.extcat-lresult button {
	all: unset;
	box-sizing: border-box;
	display: block;
	width: 100%;
	cursor: pointer;
	padding: 0.55rem 0.6rem;
	border-radius: 6px;
	font-size: 0.86rem;
	line-height: 1.4;
}
.extcat-search__list button:hover,
.extcat-search__list button:focus-visible,
.extcat-search__list button[aria-current="true"],
.extcat-lresult button:hover,
.extcat-lresult button:focus-visible { background: #f1f2f3; }
.extcat-search__page { display: block; font-weight: 700; font-size: 0.78rem; margin-bottom: 0.1rem; }
.extcat-search__ext mark,
.extcat-lresult mark { background: color-mix(in srgb, var(--extcat-yellow) 60%, transparent); color: inherit; padding: 0 1px; border-radius: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Recherche sur la page bibliothèque ---------- */
.extcat-lsearch { margin: 0 0 1.6rem; max-width: 640px; }
.extcat-lsearch label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.45rem; }
.extcat-lsearch__row { display: flex; gap: 0.5rem; }
.extcat-lsearch input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.75rem 1rem;
	font: inherit;
	font-size: 16px;
	border: 1px solid color-mix(in srgb, var(--extcat-graphite) 35%, #fff);
	border-radius: 999px;
	background: #fff;
	color: inherit;
}
.extcat-lsearch input:focus { outline: 2px solid var(--extcat-graphite); outline-offset: 1px; }
.extcat-lsearch button {
	font: inherit;
	font-weight: 600;
	padding: 0.75rem 1.2rem;
	border: 0;
	border-radius: 999px;
	background: var(--extcat-graphite);
	color: #fff;
	cursor: pointer;
}
.extcat-lsearch button:focus-visible { outline: 3px solid var(--extcat-graphite); outline-offset: 3px; }
.extcat-lresults { margin: 0 0 2.4rem; padding: 1.2rem; border-radius: 10px; background: color-mix(in srgb, var(--extcat-graphite) 6%, #fff); }
.extcat-lresults__status { margin: 0 0 0.8rem; font-weight: 600; }
.extcat-lresults__status:last-child { margin: 0; }
.extcat-lresult { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.extcat-lresult img,
.extcat-lresult__ph { width: 64px; aspect-ratio: 210 / 297; object-fit: cover; border-radius: 2px 4px 4px 2px; background: #e4e6e8; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.5); }
.extcat-lresult__title { margin: 0 0 0.2rem; font-weight: 700; }
.extcat-lresult ul { list-style: none; margin: 0; padding: 0; }
.extcat-lresult__more button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
	.extcat-lsearch button { padding: 0.75rem 0.95rem; }
	.extcat-lresult { grid-template-columns: 48px 1fr; gap: 0.7rem; }
	.extcat-lresult img, .extcat-lresult__ph { width: 48px; }
	.extcat-search { left: 0.6rem; right: 0.6rem; width: auto; }
}

/* Barre de la liseuse sur petit écran : tout doit tenir, bouton Fermer compris */
.extcat-cta__short { display: none; }
.extcat-bar > * { flex-shrink: 0; }
.extcat-bar__title { flex-shrink: 1; }
@media (max-width: 480px) {
	.extcat-cta__long { display: none; }
	.extcat-cta__short { display: inline; }
	.extcat-bar { padding-left: 0.5rem; padding-right: 0.35rem; }
	.extcat-bar__logo { height: 26px; }
	.extcat-bar .extcat-btn { width: 38px; height: 38px; }
}
@media (max-width: 340px) {
	.extcat-bar [data-act="share"] { display: none; }
}

/* ---------- Page catalogue ---------- */
.extcat-single { margin: 0 0 3rem; }
.extcat--single {
	max-width: none;
	display: grid;
	grid-template-columns: minmax(180px, 300px) 1fr;
	align-items: center;
	gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
	margin: 0 0 2.5rem;
}
.extcat--single .extcat__kicker { opacity: 0.75; font-size: 0.9rem; }
.extcat--single .extcat__desc { font-size: 1.05rem; max-width: 52ch; opacity: 0.85; }
.extcat--single .extcat__open { padding: 0.85rem 1.6rem; font-size: 1rem; }
@media (max-width: 600px) {
	.extcat--single { grid-template-columns: 1fr; }
	.extcat--single .extcat__cover { max-width: 240px; }
}
.extcat-single__text { max-width: 68ch; margin: 0 0 2.5rem; font-size: 1.05rem; line-height: 1.65; }
.extcat-single__toc { margin: 0 0 2.5rem; max-width: 68ch; }
.extcat-single__toc ol { list-style: none; margin: 0.8rem 0 0; padding: 0; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.extcat-single__toc li a {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.65rem 0.2rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	color: inherit;
	text-decoration: none;
}
.extcat-single__toc li a:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.extcat-single__toc li.is-sub a { padding-left: 1.4rem; font-size: 0.95em; opacity: 0.85; }
.extcat-single__toc-page { white-space: nowrap; opacity: 0.6; font-variant-numeric: tabular-nums; }
.extcat-single__cta-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.extcat-single__cta-alt { display: inline-block; padding: 0.8rem 1.2rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.6); color: #fff !important; text-decoration: none !important; font-weight: 600; }
.extcat-single__more { margin-top: 3rem; }
.extcat__title-link { color: inherit !important; text-decoration: none !important; }
.extcat__title-link:hover { text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- Bibliothèque en bois ----------
   Fond, montants et tablettes dessinés en CSS : aucune image à charger. */
:is(.extcat-lib--bois, .extcat-lib--showroom) {
	--extcat-wood-back: #6f4423;
	--extcat-wood-back-2: #5e381c;
	--extcat-wood-plank: #b77a45;
	--extcat-wood-plank-2: #8f5730;
	--extcat-shelf-h: 270px;
	--extcat-plank-h: 52px;
	--extcat-col: 190px;
	--extcat-gap-x: 2.6rem;
}
:is(.extcat-lib--bois, .extcat-lib--showroom).extcat-lib--compacte { --extcat-shelf-h: 210px; --extcat-col: 150px; --extcat-gap-x: 2rem; }
:is(.extcat-lib--bois, .extcat-lib--showroom).extcat-lib--grande { --extcat-shelf-h: 330px; --extcat-col: 230px; }

:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat-grid {
	position: relative;
	z-index: 0;
	align-items: end;
	row-gap: 0;
	padding: 0 calc(var(--extcat-gap-x) / 2 + 14px) 0;
	border-radius: 6px;
	overflow: hidden;
	--extcat-row: calc(var(--extcat-shelf-h) + var(--extcat-plank-h) * 1.55);
	background:
		/* tablettes : une planche au bas de chaque rangée, sur toute la largeur, même rangée incomplète */
		repeating-linear-gradient(180deg,
			transparent 0 calc(var(--extcat-row) - var(--extcat-plank-h)),
			rgba(255, 255, 255, 0.35) calc(var(--extcat-row) - var(--extcat-plank-h)) calc(var(--extcat-row) - var(--extcat-plank-h) + 2px),
			var(--extcat-wood-plank) calc(var(--extcat-row) - var(--extcat-plank-h) + 2px) calc(var(--extcat-row) - var(--extcat-plank-h) + 12px),
			rgba(0, 0, 0, 0.3) calc(var(--extcat-row) - var(--extcat-plank-h) + 12px) calc(var(--extcat-row) - var(--extcat-plank-h) + 13px),
			var(--extcat-wood-plank-2) calc(var(--extcat-row) - var(--extcat-plank-h) + 13px) var(--extcat-row)),
		/* ombre portée sous chaque tablette */
		repeating-linear-gradient(180deg,
			rgba(0, 0, 0, 0.45) 0, transparent 14px, transparent var(--extcat-row)),
		/* veinage */
		repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 9px, rgba(255, 255, 255, 0.03) 9px 11px, transparent 11px 23px),
		repeating-linear-gradient(90deg, transparent 0 140px, rgba(0, 0, 0, 0.07) 140px 143px, transparent 143px 310px),
		/* montants latéraux */
		linear-gradient(90deg, var(--extcat-wood-plank-2) 0 14px, transparent 14px calc(100% - 14px), var(--extcat-wood-plank-2) calc(100% - 14px)),
		/* fond, plus sombre en haut */
		linear-gradient(180deg, var(--extcat-wood-back-2), var(--extcat-wood-back) 40%, var(--extcat-wood-back-2));
	background-position: 0 0, 0 var(--extcat-row), 0 0, 0 0, 0 0, 0 0;
	background-repeat: repeat-y, repeat-y, repeat, repeat, no-repeat, no-repeat;
	box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
}

:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat--card {
	position: relative;
	gap: 0;
	padding: calc(var(--extcat-plank-h) * 0.55) 0 var(--extcat-plank-h);
}
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover {
	aspect-ratio: auto;
	height: var(--extcat-shelf-h);
	margin: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover::after { content: none; }
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover img,
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover canvas {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 1px 3px 3px 1px;
	box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.08), -6px 4px 12px rgba(0, 0, 0, 0.35), 2px 0 3px rgba(0, 0, 0, 0.25);
	transform-origin: 50% 100%;
}
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover:hover img,
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover:focus-visible img { transform: translateY(-8px); box-shadow: -10px 14px 22px rgba(0, 0, 0, 0.45); }
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__badge { top: 8px; }

/* Étiquette sur le chant de la tablette */
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(var(--extcat-plank-h) - 12px);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	text-align: center;
}
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__kicker,
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__desc,
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__actions { display: none; }
.extcat-lib:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat--card .extcat__title {
	display: block;
	max-width: 100%;
	padding: 0 0.3rem;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff7ec !important;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__title-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px; }

@media (max-width: 560px) {
	:is(.extcat-lib--bois, .extcat-lib--showroom) { --extcat-shelf-h: 190px; --extcat-plank-h: 46px; --extcat-gap-x: 1.2rem; }
	:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: calc(var(--extcat-gap-x) / 2 + 10px); padding-right: calc(var(--extcat-gap-x) / 2 + 10px); }
	.extcat-lib:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat--card .extcat__title { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
	:is(.extcat-lib--bois, .extcat-lib--showroom) .extcat__cover:hover img { transform: none; }
}


/* ---------- Showroom EXTEND (disposition par défaut) ----------
   Un mur clair à lames, des tablettes en profilé aluminium graphite
   soulignées du vert du logo : l'univers de la menuiserie alu plutôt que la bibliothèque. */
.extcat-lib--showroom .extcat-grid {
	background:
		/* tablettes alu : arête claire, dessus, joint, face avant graphite, filet vert */
		repeating-linear-gradient(180deg,
			transparent 0 calc(var(--extcat-row) - var(--extcat-plank-h)),
			#c9cacc calc(var(--extcat-row) - var(--extcat-plank-h)) calc(var(--extcat-row) - var(--extcat-plank-h) + 2px),
			#8a8b8e calc(var(--extcat-row) - var(--extcat-plank-h) + 2px) calc(var(--extcat-row) - var(--extcat-plank-h) + 10px),
			#3a3b3d calc(var(--extcat-row) - var(--extcat-plank-h) + 10px) calc(var(--extcat-row) - var(--extcat-plank-h) + 11px),
			var(--extcat-graphite) calc(var(--extcat-row) - var(--extcat-plank-h) + 11px) calc(var(--extcat-row) - 3px),
			var(--extcat-lime) calc(var(--extcat-row) - 3px) var(--extcat-row)),
		/* ombre douce sous chaque tablette */
		repeating-linear-gradient(180deg, rgba(40, 40, 42, 0.22) 0, transparent 18px, transparent var(--extcat-row)),
		/* lames du mur */
		repeating-linear-gradient(90deg, transparent 0 179px, rgba(0, 0, 0, 0.05) 179px 180px, rgba(255, 255, 255, 0.6) 180px 181px),
		linear-gradient(180deg, #f3f3f1, #e6e6e3);
	background-position: 0 0, 0 var(--extcat-row), 0 0, 0 0;
	background-repeat: repeat-y, repeat-y, repeat, no-repeat;
	border-radius: 10px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05), 0 20px 40px -30px rgba(0, 0, 0, 0.45);
}
.extcat-lib--showroom .extcat__cover img,
.extcat-lib--showroom .extcat__cover canvas {
	box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.06), -8px 6px 14px rgba(40, 40, 42, 0.22), 1px 0 2px rgba(0, 0, 0, 0.18);
}
.extcat-lib--showroom .extcat__cover:hover img,
.extcat-lib--showroom .extcat__cover:focus-visible img { box-shadow: -12px 16px 24px rgba(40, 40, 42, 0.3); }
.extcat-lib--showroom .extcat__meta { height: calc(var(--extcat-plank-h) - 14px); bottom: 3px; }
.extcat-lib--showroom .extcat__title { color: #fff !important; text-shadow: none; letter-spacing: 0.01em; }
.extcat-lib--showroom .extcat__title-link:hover { color: var(--extcat-lime) !important; text-decoration: none !important; }


/* ---------- 2.4.1 : couverture vers la page, bouton « Feuilleter » toujours visible ---------- */
/* Enfold ajoute un voile blanc (span.image-overlay) sur les images cliquables : on le retire ici. */
.extcat .image-overlay,
.extcat-viewer .image-overlay { display: none !important; }
.extcat__cover img,
.extcat__cover:hover img,
.extcat__cover:focus img { opacity: 1 !important; filter: none !important; }

.extcat__coverwrap { position: relative; }
/* Pastille jaune en coin, toujours visible ; au survol elle s'allonge et affiche « Feuilleter ». */
.extcat__flip {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	height: 40px;
	min-width: 40px;
	padding: 0 11px;
	border-radius: 999px;
	background: var(--extcat-yellow);
	color: #2f3032;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.9);
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.extcat__flip svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.extcat__flip span {
	display: inline-block;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	margin-left: 0;
	transition: max-width 0.25s ease, opacity 0.2s ease, margin-left 0.25s ease;
}
.extcat__coverwrap:hover .extcat__flip span,
.extcat__flip:focus-visible span { max-width: 100px; opacity: 1; margin-left: 7px; }
.extcat__flip:hover { background: #ffd23f; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), 0 0 0 2px #fff; }
.extcat__flip:focus-visible { outline: 3px solid var(--extcat-graphite); outline-offset: 3px; }
/* Mobile : la pastille reste ronde, sans texte */
@media (hover: none), (max-width: 560px) {
	.extcat__flip { right: 8px; bottom: 8px; height: 38px; min-width: 38px; padding: 0 10px; }
	.extcat__flip span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .extcat__flip, .extcat__flip span { transition: none; } }


/* ---------- 2.4.2 : écran de chargement avec pourcentage ---------- */
.extcat-load { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(320px, 80vw); }
.extcat-load__cover { display: block; max-height: 42vh; max-width: 70%; width: auto; border-radius: 2px 5px 5px 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); animation: extcat-breathe 1.8s ease-in-out infinite; }
.extcat-load__txt { margin: 0; font-size: 15px; color: var(--extcat-stage-ink); }
.extcat-load__pct { font-variant-numeric: tabular-nums; color: var(--extcat-lime); }
.extcat-load__bar { width: 100%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.extcat-load__bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--extcat-lime); transition: width 0.35s ease; }
@keyframes extcat-breathe { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .extcat-load__cover { animation: none; } .extcat-load__bar span { transition: none; } }

/* Thème Enfold : pas de voile au survol des images cliquables des pages catalogue */
.extcat-single .image-overlay,
.xcp .image-overlay,
.xcat-chapters .image-overlay,
.xcp-fam .image-overlay { display: none !important; }
.xcat-chapters img,
.xcp-fam img { opacity: 1 !important; }
