/**
 * Documentheque SRE29 - styles du front.
 *
 * Toutes les tailles sont en pixels : le theme fixe html { font-size: 62.5% },
 * ce qui ramene 1rem a 10px et rapetissait toute l'interface. Les regles
 * de remise a zero en tete de fichier neutralisent aussi les styles
 * generiques du theme (puces de listes, liens, couleur imposee a *).
 */

.sre29-doctheque {
	--sre29-ink: #1f2937;
	--sre29-muted: #6b7280;
	--sre29-border: #e3e6ea;
	--sre29-surface: #fff;
	--sre29-surface-2: #f6f7f9;
	--sre29-accent: #1d4ed8;
	--sre29-accent-hover: #1a44c2;
	--sre29-accent-soft: #eef3ff;
	--sre29-drop: #dbe6ff;
	--sre29-danger: #b42318;
	--sre29-danger-soft: #fef3f2;
	--sre29-success: #15803d;
	--sre29-folder: #fcd477;
	--sre29-folder-stroke: #b7791f;

	font-size: 15px;
	line-height: 1.5;
	color: var(--sre29-ink);
}

/* Remise a zero face aux styles generiques du theme.
   Les selecteurs d elements sont enveloppes dans :where() : la regle pese
   (0,1,0), assez pour battre les regles d elements du theme (button, li,
   select...) mais pas davantage que les classes des composants, declarees
   plus bas, qui l emportent donc toujours. */

.sre29-doctheque *,
.sre29-doctheque *::before,
.sre29-doctheque *::after {
	box-sizing: border-box;
}

.sre29-doctheque * {
	color: inherit;
	line-height: inherit;
}

.sre29-doctheque [hidden] {
	display: none !important;
}

.sre29-doctheque :where(ul, ol, li) {
	float: none;
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sre29-doctheque :where(li)::before,
.sre29-doctheque :where(li)::marker {
	content: none;
}

.sre29-doctheque :where(a) {
	font-size: inherit;
	text-decoration: none;
}

.sre29-doctheque :where(button, input, select, textarea) {
	margin: 0;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.sre29-doctheque :where(p, h2, span, strong, label) {
	margin: 0;
}

/* Le theme donne width: 100% a tous les label : barre de tri et barre de
   selection s empilaient. */
.sre29-doctheque :where(label) {
	width: auto;
}

.sre29-doctheque :where(input[type="checkbox"]) {
	-webkit-appearance: checkbox;
	appearance: auto;
	display: inline-block;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--sre29-accent);
	cursor: pointer;
}

/* Boutons : le theme style button[type=submit] (largeur 200px, marge haute
   de 40px, capitales). Specificite (0,2,0) pour passer devant. */

.sre29-doctheque .sre29-doctheque__btn,
.sre29-doctheque .sre29-doctheque__navbtn,
.sre29-doctheque .sre29-doctheque__iconbtn,
.sre29-doctheque .sre29-doctheque__crumb {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.sre29-doctheque .sre29-doctheque__btn {
	width: auto;
	margin: 0;
	padding: 0 14px;
	line-height: 1.2;
}

.sre29-doctheque :focus-visible {
	outline: 3px solid rgba(29, 78, 216, 0.45);
	outline-offset: 2px;
}

.sre29-icon {
	display: block;
	flex: none;
	width: 20px;
	height: 20px;
}

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

/* Largeur : sortie du conteneur de 800px du gabarit par defaut du theme.
   Pas de transform : il casserait position: fixed pour les transferts. */

.sre29-doctheque.is-wide {
	width: min(1440px, 94vw);
	margin-left: calc(50% - min(1440px, 94vw) / 2);
}

.sre29-doctheque-template .sre29-doctheque.is-wide {
	width: auto;
	margin-left: 0;
}

.sre29-doctheque-template .sre29-doctheque-page {
	padding: 32px 0 64px;
}

/* Cadre general */

.sre29-doctheque__frame {
	display: grid;
	grid-template-columns: 256px minmax(0, 1fr);
	min-height: 72vh;
	border: 1px solid var(--sre29-border);
	border-radius: 16px;
	background: var(--sre29-surface);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

/* Arborescence */

.sre29-doctheque__sidebar {
	padding: 18px 8px;
	border-right: 1px solid var(--sre29-border);
	border-radius: 16px 0 0 16px;
	background: var(--sre29-surface-2);
	min-width: 0;
}

.sre29-doctheque__sidebar-title {
	padding: 0 12px 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sre29-muted);
}

.sre29-doctheque__tree-row {
	display: flex;
	align-items: center;
	min-height: 36px;
	padding-left: calc(var(--depth, 0) * 16px);
	border-radius: 8px;
}

.sre29-doctheque__tree-row:hover {
	background: #eceff3;
}

.sre29-doctheque__tree-row.is-active {
	background: var(--sre29-accent-soft);
	color: var(--sre29-accent);
	font-weight: 700;
}

.sre29-doctheque__tree-row.is-drop-target {
	background: var(--sre29-drop);
	outline: 2px solid var(--sre29-accent);
	outline-offset: -2px;
}

.sre29-doctheque__tree-row.is-disabled {
	opacity: 0.4;
}

.sre29-doctheque__tree-row.is-picked {
	background: var(--sre29-accent);
	color: #fff;
}

.sre29-doctheque__tree-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--sre29-muted);
	cursor: pointer;
}

.sre29-doctheque__tree-toggle .sre29-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.15s ease;
}

.sre29-doctheque__tree-toggle.is-open .sre29-icon {
	transform: rotate(90deg);
}

.sre29-doctheque__tree-link {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 10px;
	min-width: 0;
	min-height: 36px;
	padding: 0 10px 0 2px;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: inherit;
	text-align: left;
	cursor: pointer;
}

.sre29-doctheque__tree-link:disabled {
	cursor: not-allowed;
}

.sre29-doctheque__tree-icon .sre29-icon {
	width: 18px;
	height: 18px;
	fill: var(--sre29-folder);
	color: var(--sre29-folder-stroke);
}

.sre29-doctheque__tree-row.is-picked .sre29-doctheque__tree-icon .sre29-icon {
	fill: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.sre29-doctheque__tree-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Zone principale */

.sre29-doctheque__main {
	position: relative;
	min-width: 0;
	padding: 18px 22px 24px;
}

.sre29-doctheque__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--sre29-border);
}

.sre29-doctheque__nav-buttons {
	display: flex;
	gap: 6px;
}

.sre29-doctheque__navbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--sre29-border);
	border-radius: 9px;
	background: var(--sre29-surface);
	cursor: pointer;
}

.sre29-doctheque__navbtn:hover:not(:disabled) {
	border-color: var(--sre29-accent);
	background: var(--sre29-accent-soft);
	color: var(--sre29-accent);
}

.sre29-doctheque__navbtn:disabled {
	opacity: 0.35;
	cursor: default;
}

.sre29-doctheque__navbtn[data-nav="tree"] {
	display: none;
}

/* Emplacement */

.sre29-doctheque__path ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
}

.sre29-doctheque__path li {
	display: flex;
	align-items: center;
}

.sre29-doctheque__crumb {
	min-height: 36px;
	padding: 0 10px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--sre29-accent);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

.sre29-doctheque__crumb:hover {
	background: var(--sre29-accent-soft);
}

.sre29-doctheque__crumb[aria-current] {
	color: var(--sre29-ink);
	font-weight: 700;
	background: none;
	cursor: default;
}

.sre29-doctheque__crumb.is-drop-target {
	background: var(--sre29-drop);
	outline: 2px solid var(--sre29-accent);
}

.sre29-doctheque__crumb-sep .sre29-icon {
	width: 16px;
	height: 16px;
	color: var(--sre29-muted);
}

/* Barre d outils */

.sre29-doctheque__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}

.sre29-doctheque__toolbar-start,
.sre29-doctheque__toolbar-end {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* Reste cale a droite, y compris quand la barre passe sur deux lignes. */
.sre29-doctheque__toolbar-end {
	margin-left: auto;
}

.sre29-doctheque__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--sre29-border);
	border-radius: 9px;
	background: var(--sre29-surface);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}

.sre29-doctheque__btn .sre29-icon {
	width: 18px;
	height: 18px;
}

.sre29-doctheque__btn-short {
	display: none;
}

.sre29-doctheque__btn:hover:not(:disabled) {
	border-color: var(--sre29-accent);
	background: var(--sre29-accent-soft);
	color: var(--sre29-accent);
}

.sre29-doctheque__btn:disabled {
	opacity: 0.45;
	cursor: default;
}

.sre29-doctheque__btn.is-primary {
	border-color: var(--sre29-accent);
	background: var(--sre29-accent);
	color: #fff;
}

.sre29-doctheque__btn.is-primary:hover:not(:disabled) {
	background: var(--sre29-accent-hover);
	color: #fff;
}

.sre29-doctheque__btn.is-active {
	border-color: var(--sre29-accent);
	background: var(--sre29-accent-soft);
	color: var(--sre29-accent);
}

.sre29-doctheque__btn.is-danger {
	color: var(--sre29-danger);
}

.sre29-doctheque__btn.is-danger:hover:not(:disabled) {
	border-color: var(--sre29-danger);
	background: var(--sre29-danger-soft);
	color: var(--sre29-danger);
}

.sre29-doctheque__btn.is-danger-solid {
	border-color: var(--sre29-danger);
	background: var(--sre29-danger);
	color: #fff;
}

.sre29-doctheque__btn.is-danger-solid:hover:not(:disabled) {
	background: #912018;
	color: #fff;
}

.sre29-doctheque__btn.is-ghost {
	border-color: transparent;
	background: transparent;
}

.sre29-doctheque__count {
	margin-right: 4px;
	font-size: 13px;
	color: var(--sre29-muted);
}

.sre29-doctheque__sort {
	display: inline-flex;
	align-items: center;
}

.sre29-doctheque__sort select {
	display: inline-block;
	width: auto;
	max-width: 100%;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid var(--sre29-border);
	border-radius: 9px;
	background-color: var(--sre29-surface);
	font-size: 14px;
	cursor: pointer;
}

.sre29-doctheque__views {
	display: inline-flex;
	border: 1px solid var(--sre29-border);
	border-radius: 10px;
	overflow: hidden;
}

.sre29-doctheque__view {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 38px;
	padding: 0;
	border: 0;
	background: var(--sre29-surface);
	color: var(--sre29-muted);
	cursor: pointer;
}

.sre29-doctheque__view + .sre29-doctheque__view {
	border-left: 1px solid var(--sre29-border);
}

.sre29-doctheque__view[aria-pressed="true"] {
	background: var(--sre29-accent-soft);
	color: var(--sre29-accent);
}

/* Barre de selection */

.sre29-doctheque__selectionbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 14px;
	padding: 6px 8px 6px 14px;
	border: 1px solid #c9d7fb;
	border-radius: 12px;
	background: var(--sre29-accent-soft);
}

.sre29-doctheque__selectall {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	font-size: 14px;
	cursor: pointer;
}

.sre29-doctheque__selection-count {
	font-size: 14px;
}

.sre29-doctheque__selectall-box {
	display: inline-flex;
	align-items: center;
}

.sre29-doctheque__selection-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-left: auto;
}

/* Etats */

.sre29-doctheque__progress {
	height: 3px;
	margin: -10px 0 13px;
	border-radius: 3px;
	background: var(--sre29-accent-soft);
	overflow: hidden;
}

.sre29-doctheque__progress::after {
	content: "";
	display: block;
	width: 40%;
	height: 100%;
	background: var(--sre29-accent);
	animation: sre29-slide 1s ease-in-out infinite;
}

@keyframes sre29-slide {

	0% { transform: translateX(-100%); }
	100% { transform: translateX(350%); }
}

.sre29-doctheque__status {
	padding: 40px 16px;
	font-size: 16px;
	text-align: center;
	color: var(--sre29-muted);
}

.sre29-doctheque__status.is-error {
	font-weight: 600;
	color: var(--sre29-danger);
}

.sre29-doctheque.is-busy .sre29-doctheque__list {
	opacity: 0.6;
}

/* Elements : commun aux deux vues */

.sre29-doctheque__item {
	position: relative;
	background: var(--sre29-surface);
	cursor: pointer;
}

.sre29-doctheque__item.is-selected {
	background: var(--sre29-accent-soft);
}

.sre29-doctheque__item.is-drop-target {
	background: var(--sre29-drop);
	outline: 3px solid var(--sre29-accent);
	outline-offset: -3px;
}

.sre29-doctheque__item.is-dragging {
	opacity: 0.45;
}

.sre29-doctheque__item.is-removing {
	opacity: 0;
	transform: scale(0.96);
	pointer-events: none;
}

.sre29-doctheque__item.is-new {
	animation: sre29-flash 1.8s ease;
}

@keyframes sre29-flash {

	0%, 40% { background: var(--sre29-drop); }
	100% { background: var(--sre29-surface); }
}

.sre29-doctheque__check {
	opacity: 0;
}

.sre29-doctheque:not(.is-writable) .sre29-doctheque__check {
	display: none !important;
}

.sre29-doctheque.is-selecting .sre29-doctheque__check,
.sre29-doctheque__item:hover .sre29-doctheque__check,
.sre29-doctheque__check:checked,
.sre29-doctheque__check:focus-visible {
	opacity: 1;
}

.sre29-doctheque__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--sre29-surface-2);
	overflow: hidden;
}

.sre29-doctheque__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sre29-doctheque__media.is-icon .sre29-icon {
	width: 50px;
	height: 50px;
	stroke-width: 1.5;
	color: #9aa3af;
}

.sre29-doctheque__media.is-folder .sre29-icon {
	fill: var(--sre29-folder);
	color: var(--sre29-folder-stroke);
}

.sre29-doctheque__ext {
	position: absolute;
	bottom: 20%;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--sre29-muted);
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.is-pdf .sre29-doctheque__ext { background: #b42318; }
.is-doc .sre29-doctheque__ext { background: #1d4ed8; }
.is-sheet .sre29-doctheque__ext { background: #15803d; }
.is-slides .sre29-doctheque__ext { background: #c2410c; }
.is-archive .sre29-doctheque__ext { background: #7c3aed; }
.is-image .sre29-doctheque__ext { background: #0e7490; }

.sre29-doctheque__name {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sre29-doctheque__size,
.sre29-doctheque__date {
	font-size: 13px;
	line-height: 1.4;
	color: var(--sre29-muted);
	white-space: nowrap;
}

.sre29-doctheque__actions {
	display: flex;
	gap: 4px;
}

.sre29-doctheque__iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 9px;
	background: none;
	color: var(--sre29-muted);
	cursor: pointer;
}

.sre29-doctheque__iconbtn .sre29-icon {
	width: 18px;
	height: 18px;
}

.sre29-doctheque__iconbtn:hover {
	border-color: var(--sre29-border);
	background: var(--sre29-surface-2);
	color: var(--sre29-accent);
}

.sre29-doctheque__iconbtn.is-danger:hover {
	border-color: #fecdca;
	background: var(--sre29-danger-soft);
	color: var(--sre29-danger);
}

/* Vue grille */

.sre29-doctheque__list.is-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
	gap: 14px;
}

.is-grid .sre29-doctheque__item {
	display: grid;
	grid-template-areas:
		"media media"
		"name name"
		"size date";
	grid-template-columns: auto minmax(0, 1fr);
	align-content: start;
	border: 1px solid var(--sre29-border);
	border-radius: 12px;
	overflow: hidden;
}

.is-grid .sre29-doctheque__item:hover {
	border-color: #c8cdd4;
	box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
}

.is-grid .sre29-doctheque__item.is-selected {
	border-color: var(--sre29-accent);
	box-shadow: 0 0 0 2px var(--sre29-accent);
}

.is-grid .sre29-doctheque__check {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	width: 20px;
	height: 20px;
}

.is-grid .sre29-doctheque__media {
	grid-area: media;
	aspect-ratio: 4 / 3;
}

.is-grid .sre29-doctheque__name {
	grid-area: name;
	display: -webkit-box;
	padding: 10px 12px 3px;
	white-space: normal;
	overflow-wrap: anywhere;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.is-grid .sre29-doctheque__size {
	grid-area: size;
	padding: 0 0 12px 12px;
}

.is-grid .sre29-doctheque__size:not(:empty)::after {
	content: " · ";
	white-space: pre;
}

.is-grid .sre29-doctheque__date {
	grid-area: date;
	padding: 0 12px 12px 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.is-grid .sre29-doctheque__size:empty {
	padding: 0;
}

.is-grid .sre29-doctheque__size:empty + .sre29-doctheque__date {
	padding-left: 12px;
}

/* Actions en surimpression sur la vignette, au survol ou au clavier. */

.is-grid .sre29-doctheque__actions {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	gap: 6px;
	opacity: 0;
	transition: opacity 0.12s ease;
}

.is-grid .sre29-doctheque__item:hover .sre29-doctheque__actions,
.is-grid .sre29-doctheque__item:focus-within .sre29-doctheque__actions {
	opacity: 1;
}

.is-grid .sre29-doctheque__iconbtn {
	border-color: var(--sre29-border);
	background: rgba(255, 255, 255, 0.96);
	color: var(--sre29-ink);
	box-shadow: 0 1px 4px rgba(16, 24, 40, 0.16);
}

/* Ecrans tactiles : pas de survol. Les actions passent sous la carte au lieu
   de recouvrir la vignette, et les cases n apparaissent qu en mode selection. */

@media (hover: none) {

	.is-grid .sre29-doctheque__item {
		grid-template-areas:
			"media media"
			"name name"
			"size date"
			"actions actions";
	}

	.is-grid .sre29-doctheque__actions {
		position: static;
		grid-area: actions;
		justify-content: flex-end;
		padding: 0 8px 8px;
		opacity: 1;
	}

	.is-grid .sre29-doctheque__iconbtn {
		border-color: transparent;
		background: var(--sre29-surface-2);
		box-shadow: none;
	}

	.is-grid .sre29-doctheque__date {
		padding-bottom: 6px;
	}

	.is-grid .sre29-doctheque__size {
		padding-bottom: 6px;
	}

	.sre29-doctheque:not(.is-selecting) .is-grid .sre29-doctheque__check {
		visibility: hidden;
	}
}

/* Vue liste */

.sre29-doctheque__listhead,
.is-list .sre29-doctheque__item {
	display: grid;
	grid-template-columns: 24px 40px minmax(0, 1fr) 100px 150px 120px;
	gap: 12px;
	align-items: center;
}

/* Lecture seule (notamment la racine) : pas de case a cocher, donc pas de
   colonne pour elle. Sans cela, chaque cellule glissait d'un cran : l'icone
   prenait la place de la case et le nom etait comprime dans celle de l'icone. */

.sre29-doctheque:not(.is-writable) .sre29-doctheque__listhead,
.sre29-doctheque:not(.is-writable) .is-list .sre29-doctheque__item {
	grid-template-columns: 40px minmax(0, 1fr) 100px 150px 120px;
}

.sre29-doctheque:not(.is-writable) .sre29-doctheque__listhead > :first-child {
	display: none;
}

.sre29-doctheque__listhead {
	padding: 0 12px 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--sre29-muted);
}

.sre29-doctheque__listhead button {
	padding: 6px 0;
	border: 0;
	background: none;
	font: inherit;
	letter-spacing: inherit;
	text-align: left;
	text-transform: inherit;
	cursor: pointer;
}

.sre29-doctheque__listhead button.is-sorted {
	color: var(--sre29-ink);
}

.sre29-doctheque__listhead button[data-dir="asc"]::after {
	content: " ↑";
}

.sre29-doctheque__listhead button[data-dir="desc"]::after {
	content: " ↓";
}

.sre29-doctheque__list.is-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--sre29-border);
	border-radius: 12px;
	overflow: hidden;
}

.is-list .sre29-doctheque__item {
	min-height: 54px;
	padding: 6px 12px;
	border-bottom: 1px solid var(--sre29-border);
}

.is-list .sre29-doctheque__item:last-child {
	border-bottom: 0;
}

.is-list .sre29-doctheque__item:hover {
	background: var(--sre29-surface-2);
}

.is-list .sre29-doctheque__item.is-selected {
	background: var(--sre29-accent-soft);
	box-shadow: inset 3px 0 0 var(--sre29-accent);
}

.is-list .sre29-doctheque__media {
	width: 40px;
	height: 40px;
	border-radius: 8px;
}

.is-list .sre29-doctheque__media.is-icon .sre29-icon {
	width: 26px;
	height: 26px;
}

.is-list .sre29-doctheque__ext {
	bottom: 2px;
	padding: 0 4px;
	font-size: 9px;
}

.is-list .sre29-doctheque__size,
.is-list .sre29-doctheque__date {
	font-size: 13px;
}

.is-list .sre29-doctheque__actions {
	justify-content: flex-end;
}

.is-list .sre29-doctheque__check {
	opacity: 1;
}

/* Elements en cours d ecriture : affiches avant la reponse de Nextcloud. */

.sre29-doctheque__item.is-pending {
	cursor: progress;
}

.sre29-doctheque__item.is-pending .sre29-doctheque__media,
.sre29-doctheque__item.is-pending .sre29-doctheque__name {
	opacity: 0.55;
}

.sre29-doctheque__itembar {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background: var(--sre29-accent-soft);
	overflow: hidden;
	pointer-events: none;
}

.sre29-doctheque__itembar span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--sre29-accent);
	transition: width 0.2s ease;
}

.sre29-doctheque__itembar.is-indeterminate span {
	width: 40%;
	animation: sre29-slide 1s ease-in-out infinite;
}

/* Glisser-deposer depuis l ordinateur */

.sre29-doctheque__drop {
	position: absolute;
	inset: 8px;
	z-index: 5;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 24px;
	border: 3px dashed var(--sre29-accent);
	border-radius: 14px;
	background: rgba(29, 78, 216, 0.05);
	pointer-events: none;
}

.sre29-doctheque__drop-inner {
	position: sticky;
	bottom: 32px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 22px;
	border-radius: 12px;
	background: var(--sre29-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	box-shadow: 0 8px 30px rgba(29, 78, 216, 0.35);
}

.sre29-doctheque__drop.is-denied {
	border-color: var(--sre29-danger);
	background: rgba(180, 35, 24, 0.05);
}

.sre29-doctheque__drop.is-denied .sre29-doctheque__drop-inner {
	background: var(--sre29-danger);
}

.sre29-doctheque__dragbadge {
	position: fixed;
	top: -100px;
	left: -100px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #1d4ed8;
	color: #fff;
	font: 600 15px/1.2 sans-serif;
}

/* Pagination */

.sre29-doctheque__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}

.sre29-doctheque__page {
	font-size: 15px;
	color: var(--sre29-muted);
}

/* Panneau des transferts */

.sre29-doctheque__transfers {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	width: min(420px, calc(100vw - 32px));
	max-height: 60vh;
	border: 1px solid var(--sre29-border);
	border-radius: 14px;
	background: var(--sre29-surface);
	box-shadow: 0 16px 48px rgba(16, 24, 40, 0.2);
	overflow: hidden;
	font-size: 15px;
}

.sre29-doctheque__transfers-head {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 8px 8px 18px;
	background: var(--sre29-ink);
	color: #fff;
}

.sre29-doctheque__transfers.has-errors .sre29-doctheque__transfers-head {
	background: #7a271a;
}

.sre29-doctheque__transfers-head strong {
	flex: 1;
	font-size: 15px;
}

.sre29-doctheque__transfers-head .sre29-doctheque__iconbtn:hover {
	border-color: transparent;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.sre29-doctheque__transfers.is-collapsed [data-transfers-toggle] .sre29-icon {
	transform: rotate(180deg);
}

.sre29-doctheque__transfers.is-collapsed .sre29-doctheque__transfers-list {
	display: none;
}

.sre29-doctheque__transfers-list {
	padding: 6px 0;
	overflow: auto;
}

.sre29-doctheque__transfer {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	padding: 10px 16px;
}

.sre29-doctheque__transfer-icon .sre29-icon {
	width: 20px;
	height: 20px;
	color: var(--sre29-muted);
}

.sre29-doctheque__transfer.is-done .sre29-doctheque__transfer-icon .sre29-icon {
	color: var(--sre29-success);
}

.sre29-doctheque__transfer.is-error .sre29-doctheque__transfer-icon .sre29-icon,
.sre29-doctheque__transfer.is-error .sre29-doctheque__transfer-status {
	color: var(--sre29-danger);
}

.sre29-doctheque__transfer-name {
	display: block;
	line-height: 1.35;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sre29-doctheque__transfer-status {
	display: block;
	line-height: 1.35;
	font-size: 13px;
	color: var(--sre29-muted);
}

.sre29-doctheque__transfer-bar {
	display: block;
	height: 4px;
	margin-top: 6px;
	border-radius: 4px;
	background: var(--sre29-surface-2);
	overflow: hidden;
}

.sre29-doctheque__transfer-bar span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--sre29-accent);
	transition: width 0.2s ease;
}

.sre29-doctheque__transfer.is-done .sre29-doctheque__transfer-bar span {
	background: var(--sre29-success);
}

.sre29-doctheque__transfer.is-error .sre29-doctheque__transfer-bar {
	display: none;
}

/* Boites de dialogue */

.sre29-doctheque__dialog {
	position: fixed;
	inset: 0;
	max-height: calc(100vh - 32px);
	height: fit-content;
	margin: auto;
	overflow: auto;
	width: min(440px, calc(100vw - 32px));
	padding: 24px;
	border: 0;
	border-radius: 16px;
	background: var(--sre29-surface);
	color: var(--sre29-ink);
	font-size: 16px;
	box-shadow: 0 24px 64px rgba(16, 24, 40, 0.3);
}

.sre29-doctheque__dialog.is-wide {
	width: min(560px, calc(100vw - 32px));
}

.sre29-doctheque__dialog::backdrop {
	background: rgba(16, 24, 40, 0.45);
}

.sre29-doctheque__dialog h2 {
	font-family: inherit;
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

.sre29-doctheque__dialog label {
	display: block;
	margin-bottom: 8px;
	font-size: 15px;
	font-weight: 600;
}

.sre29-doctheque__dialog input[type="text"] {
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid var(--sre29-border);
	border-radius: 10px;
	font-size: 16px;
}

.sre29-doctheque__dialog input[type="text"]:focus {
	border-color: var(--sre29-accent);
	outline: 2px solid var(--sre29-accent);
}

.sre29-doctheque__dialog-hint {
	margin-bottom: 12px;
	font-size: 15px;
	color: var(--sre29-muted);
}

.sre29-doctheque__dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 22px;
}

.sre29-doctheque__picker {
	max-height: 50vh;
	padding: 6px;
	border: 1px solid var(--sre29-border);
	border-radius: 12px;
	overflow: auto;
}

/* Notification */

.sre29-doctheque__toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 1001;
	max-width: min(560px, calc(100vw - 32px));
	padding: 14px 20px;
	border-radius: 10px;
	background: var(--sre29-ink);
	color: #fff !important;
	font-size: 15px;
	transform: translateX(-50%);
	box-shadow: 0 8px 28px rgba(16, 24, 40, 0.25);
}

.sre29-doctheque__toast.is-error {
	background: var(--sre29-danger);
}

/* Notification avec action (« Annuler » apres une mise a la corbeille). */

.sre29-doctheque__toast.has-action {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 8px 8px 8px 20px;
}

.sre29-doctheque__toast.has-action[hidden] {
	display: none;
}

.sre29-doctheque .sre29-doctheque__toast-action {
	flex: none;
	width: auto;
	min-height: 36px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

.sre29-doctheque .sre29-doctheque__toast-action:hover {
	background: rgba(255, 255, 255, 0.14);
}

/* Etats hors navigation */

.sre29-doctheque--locked,
.sre29-doctheque--empty {
	padding: 32px;
	border: 1px dashed var(--sre29-border);
	border-radius: 12px;
	font-size: 16px;
	text-align: center;
	color: var(--sre29-muted);
}

/* Tablette : l arborescence devient un panneau a ouvrir */

@media (max-width: 900px) {

	.sre29-doctheque__frame {
		grid-template-columns: minmax(0, 1fr);
	}

	.sre29-doctheque__sidebar {
		display: none;
		max-height: 55vh;
		overflow: auto;
		border-right: 0;
		border-bottom: 1px solid var(--sre29-border);
		border-radius: 16px 16px 0 0;
	}

	.sre29-doctheque.is-tree-open .sre29-doctheque__sidebar {
		display: block;
	}

	.sre29-doctheque__navbtn[data-nav="tree"] {
		display: inline-flex;
	}

	.sre29-doctheque__listhead,
	.is-list .sre29-doctheque__item {
		grid-template-columns: 24px 40px minmax(0, 1fr) 100px auto;
	}

	.sre29-doctheque:not(.is-writable) .sre29-doctheque__listhead,
	.sre29-doctheque:not(.is-writable) .is-list .sre29-doctheque__item {
		grid-template-columns: 40px minmax(0, 1fr) 100px auto;
	}

	.sre29-doctheque__listhead > :nth-child(5),
	.is-list .sre29-doctheque__date {
		display: none;
	}
}

/* Mobile */

@media (max-width: 600px) {

	.sre29-doctheque.is-wide {
		width: 100vw;
		margin-left: calc(50% - 50vw);
	}

	.sre29-doctheque__frame {
		border-right: 0;
		border-left: 0;
		border-radius: 0;
	}

	.sre29-doctheque__main {
		padding: 14px;
	}

	.sre29-doctheque__nav-buttons {
		width: 100%;
		justify-content: space-between;
	}

	.sre29-doctheque__toolbar-start .sre29-doctheque__btn:not(.is-primary) .sre29-doctheque__btn-label {
		display: none;
	}

	.sre29-doctheque__toolbar-start .sre29-doctheque__btn:not(.is-primary) {
		width: 40px;
		padding: 0;
	}

	.sre29-doctheque__list.is-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.sre29-doctheque__listhead {
		display: none !important;
	}

	.is-list .sre29-doctheque__item {
		grid-template-columns: 24px 40px minmax(0, 1fr) auto;
		gap: 10px;
	}

	.sre29-doctheque:not(.is-writable) .is-list .sre29-doctheque__item {
		grid-template-columns: 40px minmax(0, 1fr) auto;
	}

	.is-list .sre29-doctheque__size {
		display: none;
	}

	.is-list .sre29-doctheque__check {
		opacity: 1;
	}

	/* Le bouton principal passe en tete, avec son libelle court : la rangee
	   tient sur une ligne. Le libelle complet reste lu par les lecteurs d ecran. */
	.sre29-doctheque__toolbar-start .sre29-doctheque__btn.is-primary {
		order: -1;
	}

	.sre29-doctheque__btn-label.has-short {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.sre29-doctheque__btn-short {
		display: inline;
	}

	.sre29-doctheque__toolbar-end {
		width: 100%;
		justify-content: space-between;
	}

	.sre29-doctheque__toolbar-end {
		flex-wrap: nowrap;
	}

	.sre29-doctheque__count {
		white-space: nowrap;
	}

	.sre29-doctheque__sort {
		flex: 0 1 auto;
		min-width: 0;
	}

	/* Le menu suit la largeur de son label, qui peut retrecir : il ne passe
	   plus sous le selecteur de vue. */
	.sre29-doctheque__sort select {
		width: 100%;
		max-width: 150px;
		font-size: 14px;
	}

	/* Barre de selection : une seule rangee, libelles courts, croix seule. */
	.sre29-doctheque__selection-actions {
		flex-wrap: nowrap;
		width: 100%;
		margin-left: 0;
	}

	.sre29-doctheque__selection-actions .sre29-doctheque__btn {
		padding: 0 12px;
	}

	.sre29-doctheque .sre29-doctheque__btn.is-icon-mobile {
		width: 40px;
		margin-left: auto;
		padding: 0;
	}

	.sre29-doctheque__btn.is-icon-mobile .sre29-doctheque__btn-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	/* Liste : seul le telechargement reste par ligne ; deplacer et mettre a la
	   corbeille passent par le mode selection. Les noms gardent la place. */
	.is-list .sre29-doctheque__actions .sre29-doctheque__iconbtn:not(.is-download) {
		display: none;
	}

	.sre29-doctheque__transfers {
		right: 0;
		bottom: 0;
		width: 100%;
		border-radius: 14px 14px 0 0;
	}

	.sre29-doctheque__toast {
		bottom: 96px;
	}
}

@media (prefers-reduced-motion: no-preference) {

	.sre29-doctheque__item {
		transition: box-shadow 0.15s ease, opacity 0.16s ease, transform 0.16s ease, background-color 0.15s ease;
	}

	.sre29-doctheque__list {
		transition: opacity 0.12s ease;
	}
}

@media (prefers-reduced-motion: reduce) {

	.sre29-doctheque__progress::after {
		width: 100%;
		animation: none;
	}
}
