/**
 * InfinitePAL — styles du thème
 *
 * Direction : un coin lecture clair et posé. Papier gris chaud, sauge, bois
 * blond, plantes. La couleur vive est réservée aux bougies et à la progression.
 *
 * 1. Jetons
 * 2. Base & atmosphère
 * 3. En-tête
 * 3 bis. La progression
 * 4. Les meubles & les plantes
 * 5. Les étagères
 * 6. Les livres de face
 * 7. La fiche du livre
 * 8. Suivi de lecture & personnalisation
 * 9. Panneau d'ajout (Google Books)
 * 10. Pages simples & pied
 * 11. Accessibilité & responsive
 */

/* ============ 1. JETONS ============ */
:root {
	/* Fonds */
	--ip-papier: #f5f4f0;
	--ip-brume: #e9ebe4;
	--ip-brume-creuse: #dfe2d9;

	/* Surfaces posées sur le fond : panneaux, cartes, champs. Les avoir en
	   jetons est ce qui permet à un décor de tout repeindre d'un coup. */
	--ip-surface: #fdfdfb;
	--ip-surface-vive: #ffffff;
	--ip-bordure: rgba(157, 176, 143, .34);

	/* Verts */
	--ip-sauge: #9db08f;
	--ip-sauge-pale: #c4d0ba;
	--ip-sauge-profonde: #5f7358;

	/* Bois blond */
	--ip-bois: #dcc9ae;
	--ip-bois-clair: #ead9c1;
	--ip-bois-sombre: #c3ac8c;

	/* Texte */
	--ip-encre: #3c4038;
	--ip-encre-douce: #6d7369;
	--ip-encre-tenue: #9aa094;

	/* Chaleur, employée avec parcimonie */
	--ip-cire: #dcb377;
	--ip-flamme: #f0b95e;

	/* Typographie */
	--ip-display: 'Fraunces', Georgia, serif;
	--ip-texte: 'Karla', 'Helvetica Neue', Arial, sans-serif;

	/* Fond des champs de saisie, distinct de celui des cartes. */
	--ip-champ: #ffffff;

	--ip-max: 1160px;
	--ip-rayon: 10px;
	--ip-ombre-douce: 0 2px 6px rgba(60, 64, 56, .06), 0 10px 28px rgba(60, 64, 56, .07);
}

/* ============ 2. BASE & ATMOSPHÈRE ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background:
		radial-gradient(900px 520px at 50% -6%, rgba(220, 179, 119, .10), transparent 62%),
		radial-gradient(760px 620px at 96% 78%, rgba(157, 176, 143, .16), transparent 68%),
		radial-gradient(640px 540px at 2% 92%, rgba(157, 176, 143, .12), transparent 70%),
		var(--ip-papier);
	color: var(--ip-encre);
	font-family: var(--ip-texte);
	font-size: 16.5px;
	line-height: 1.6;
	min-height: 100vh;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

/* Grain de papier, très léger : on doit le deviner, pas le voir. */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 60;
	opacity: .30;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.23 0 0 0 0 0.25 0 0 0 0 0.21 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--ip-sauge-profonde); }

.ip-skip {
	position: absolute;
	left: -9999px;
	background: var(--ip-sauge-profonde);
	color: #fff;
	padding: 10px 18px;
	border-radius: 6px;
	z-index: 200;
}
.ip-skip:focus { left: 12px; top: 12px; }

/* ============ 3. EN-TÊTE ============ */
.ip-entete {
	max-width: var(--ip-max);
	margin: 0 auto;
	padding: 62px 22px 6px;
	text-align: center;
	position: relative;
	z-index: 1;
}

.ip-eyebrow {
	font-family: var(--ip-texte);
	font-weight: 600;
	letter-spacing: .3em;
	font-size: 11.5px;
	text-transform: uppercase;
	color: var(--ip-sauge);
}

.ip-titre {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 120;
	font-weight: 600;
	font-size: clamp(38px, 6.4vw, 66px);
	line-height: 1.05;
	letter-spacing: -.015em;
	margin: 12px 0 8px;
	color: var(--ip-encre);
}
.ip-titre-fin { color: var(--ip-sauge-profonde); }

.ip-tagline {
	font-family: var(--ip-display);
	font-style: italic;
	font-size: 17px;
	color: var(--ip-encre-douce);
}

.ip-flourish {
	width: 168px;
	margin: 16px auto 0;
	display: block;
	color: var(--ip-sauge);
	opacity: .7;
}

.ip-stats {
	display: flex;
	justify-content: center;
	gap: 10px 30px;
	flex-wrap: wrap;
	margin: 26px auto 4px;
	font-size: 14px;
	color: var(--ip-encre-douce);
}
.ip-stats b {
	font-family: var(--ip-display);
	font-weight: 600;
	color: var(--ip-sauge-profonde);
	font-size: 20px;
	margin-right: 7px;
}

.ip-actions {
	margin: 26px 0 6px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.ip-btn {
	font-family: var(--ip-texte);
	font-weight: 600;
	font-size: 14.5px;
	letter-spacing: .02em;
	background: var(--ip-sauge-profonde);
	color: #fbfcfa;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 11px 26px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	box-shadow: 0 2px 5px rgba(60, 64, 56, .1);
	transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ip-btn:hover {
	background: #52654c;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(95, 115, 88, .24);
}

.ip-btn--secondaire {
	background: transparent;
	color: var(--ip-sauge-profonde);
	border-color: var(--ip-sauge);
	box-shadow: none;
}
.ip-btn--secondaire:hover {
	background: rgba(157, 176, 143, .16);
	color: var(--ip-sauge-profonde);
}

.ip-hint {
	margin: 14px 0 34px;
	font-size: 14px;
	color: var(--ip-encre-tenue);
}

/* ============ 3 bis. LA PROGRESSION ============ */
.ip-progres-bandeau {
	max-width: var(--ip-max);
	margin: 0 auto 46px;
	padding: 24px 30px 20px;
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .34);
	border-radius: var(--ip-rayon);
	box-shadow: var(--ip-ombre-douce);
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 20px 34px;
	position: relative;
	z-index: 1;
}

/* La série : une pousse qui se redresse le jour où l'on a lu. */
.ip-serie {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ip-serie-pousse { width: 34px; flex: 0 0 auto; }
.ip-serie-pousse svg { width: 100%; height: auto; display: block; }

.ip-pousse-tige {
	stroke: var(--ip-sauge-profonde);
	stroke-width: 2.5;
	stroke-linecap: round;
	opacity: .45;
}
.ip-pousse-feuille,
.ip-pousse-bourgeon {
	fill: var(--ip-sauge);
	opacity: .45;
	transition: opacity .3s ease, fill .3s ease;
}

/* Le jour où l'on a lu, la pousse verdit franchement. */
.ip-serie--vive .ip-pousse-tige { opacity: .85; }
.ip-serie--vive .ip-pousse-feuille { opacity: .9; }
.ip-serie--vive .ip-pousse-bourgeon { fill: var(--ip-cire); opacity: 1; }

.ip-serie-chiffre {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 46px;
	line-height: 1;
	color: var(--ip-sauge-profonde);
}

.ip-serie-texte { display: flex; flex-direction: column; }
.ip-serie-texte strong {
	font-size: 15px;
	font-weight: 600;
	color: var(--ip-encre);
}
.ip-serie-note {
	font-size: 13px;
	color: var(--ip-encre-tenue);
}

.ip-progres-chiffres {
	display: flex;
	gap: 12px 30px;
	flex-wrap: wrap;
	justify-content: center;
}
.ip-progres-chiffres dt {
	font-size: 10.5px;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
	margin-bottom: 3px;
}
.ip-progres-chiffres dd {
	margin: 0;
	font-family: var(--ip-display);
	font-weight: 600;
	font-size: 21px;
	color: var(--ip-encre);
	line-height: 1.1;
}
.ip-progres-chiffres dd span {
	font-family: var(--ip-texte);
	font-weight: 400;
	font-size: 12px;
	color: var(--ip-encre-tenue);
}

/* La frise des quatorze derniers jours. */
.ip-frise {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 46px;
}
.ip-frise-jour {
	width: 9px;
	height: var(--ip-h, 4%);
	border-radius: 3px;
	background: var(--ip-brume-creuse);
}
.ip-frise-jour--lu {
	background: linear-gradient(180deg, var(--ip-sauge), var(--ip-sauge-profonde));
}

.ip-frise-legende {
	grid-column: 3;
	margin-top: -8px;
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
	text-align: center;
}

@media (max-width: 900px) {
	.ip-progres-bandeau {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
		gap: 18px;
		padding: 22px 20px 18px;
	}
	.ip-frise-legende { grid-column: 1; margin-top: -10px; }
}

/* ============ 4. LES MEUBLES & LES PLANTES ============ */
.ip-meuble {
	position: relative;
	padding: 32px 40px 28px;
	background: linear-gradient(180deg, var(--ip-surface), var(--ip-brume) 92%);
	border: 1px solid rgba(157, 176, 143, .34);
	border-radius: var(--ip-rayon);
	box-shadow: var(--ip-ombre-douce);
	z-index: 1;
}

/* Le meuble des lectures finies est légèrement plus sourd : la pile à lire
   est ce qu'on vient consulter, les livres lus ce qu'on vient contempler. */
.ip-meuble--lus {
	background: linear-gradient(180deg, var(--ip-surface), var(--ip-brume-creuse) 92%);
}

/* Montants : deux traits de bois blond, discrets. */
.ip-montant {
	position: absolute;
	top: 14px;
	bottom: 14px;
	width: 8px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--ip-bois-clair), var(--ip-bois) 55%, var(--ip-bois-sombre));
	opacity: .85;
	z-index: 3;
}
.ip-montant--gauche { left: 14px; }
.ip-montant--droit { right: 14px; }

/* Corniche : un simple bandeau, sans moulure. */
.ip-corniche {
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	height: 5px;
	border-radius: var(--ip-rayon) var(--ip-rayon) 0 0;
	background: linear-gradient(90deg, transparent, var(--ip-sauge) 22%, var(--ip-sauge) 78%, transparent);
	opacity: .5;
	z-index: 4;
}
.ip-corniche-orn { display: none; }

/* Deux bougies posées sur le dessus, à gauche. */
.ip-bougies {
	position: absolute;
	top: -32px;
	left: 128px;
	display: flex;
	align-items: flex-end;
	gap: 11px;
	pointer-events: none;
	z-index: 2;
}

.ip-bougie {
	position: relative;
	width: 13px;
	height: 34px;
	border-radius: 3px 3px 2px 2px;
	background: linear-gradient(90deg, #fbf8f1, #eee6d6 60%, #ddd2bd);
	box-shadow: 0 2px 5px rgba(60, 64, 56, .12);
}
.ip-bougie::after {
	content: "";
	position: absolute;
	bottom: -3px;
	left: -4px;
	right: -4px;
	height: 5px;
	border-radius: 50%;
	background: rgba(60, 64, 56, .16);
	filter: blur(2px);
}
.ip-bougie--courte { height: 24px; }

.ip-bougie::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	width: 7px;
	height: 13px;
	border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
	background: radial-gradient(circle at 50% 72%, #fff6e2, var(--ip-flamme) 58%, #e09a3c);
	filter: drop-shadow(0 0 7px rgba(240, 185, 94, .55));
	transform-origin: 50% 100%;
	animation: ip-flamme 3.6s ease-in-out infinite;
}

@keyframes ip-flamme {
	0%, 100% { transform: translateX(-50%) scale(1) rotate(-1.5deg); }
	34% { transform: translateX(-50%) scale(1.05, .96) rotate(1.5deg); }
	67% { transform: translateX(-50%) scale(.96, 1.04) rotate(-2deg); }
}

/* Les plantes : la signature de la page. */
.ip-plante {
	position: absolute;
	pointer-events: none;
	z-index: 0;
}
.ip-plante svg { width: 100%; height: 100%; overflow: visible; }

.ip-plante .ip-tige {
	stroke: var(--ip-sauge-profonde);
	stroke-width: 2;
	stroke-linecap: round;
	opacity: .5;
	fill: none;
}
.ip-plante .ip-feuille path:first-child,
.ip-plante .ip-rond {
	fill: var(--ip-sauge);
	opacity: .5;
}
.ip-plante .ip-rond {
	stroke: var(--ip-sauge-profonde);
	stroke-width: 1;
	stroke-opacity: .35;
}
.ip-plante .ip-nervure {
	stroke: var(--ip-sauge-profonde);
	stroke-width: 1;
	opacity: .4;
	fill: none;
}
.ip-plante .ip-pot {
	fill: #d8cdbd;
	stroke: #bfb2a0;
	stroke-width: 1.5;
}
.ip-plante .ip-pot-bord {
	fill: #e2d8ca;
	stroke: #bfb2a0;
	stroke-width: 1.5;
}

/* Un balancement lent, presque imperceptible. */
.ip-balance {
	transform-origin: 70px 0;
	animation: ip-souffle 11s ease-in-out infinite;
}
.ip-balance--lent {
	transform-origin: 70px 330px;
	animation-duration: 15s;
}
.ip-feuille {
	transform-origin: center;
	animation: ip-frisson 7s ease-in-out infinite;
	animation-delay: var(--ip-retard, 0s);
}

@keyframes ip-souffle {
	0%, 100% { transform: rotate(-.8deg); }
	50% { transform: rotate(.9deg); }
}
@keyframes ip-frisson {
	0%, 100% { transform: rotate(-1.4deg); }
	50% { transform: rotate(1.6deg); }
}

.ip-plante--pothos {
	top: -30px;
	left: -74px;
	width: 108px;
	height: 420px;
}
.ip-plante--eucalyptus {
	bottom: -18px;
	right: -92px;
	width: 132px;
	height: 400px;
}

/* ============ 5. LES MEUBLES & LES ÉTAGÈRES ============ */
.ip-bibliotheque {
	max-width: var(--ip-max);
	margin: 0 auto 96px;
	padding: 0 22px;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	/* Un vrai vide entre les deux meubles : on doit les lire séparément. */
	gap: 76px;
}

.ip-meuble-tete {
	position: relative;
	z-index: 2;
	margin-bottom: 22px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(157, 176, 143, .3);
}

.ip-meuble-titre {
	display: flex;
	align-items: baseline;
	gap: 9px;
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 23px;
	line-height: 1.2;
	color: var(--ip-encre);
}
.ip-rayon-orn {
	color: var(--ip-sauge);
	font-size: 15px;
	position: relative;
	top: -2px;
}
.ip-meuble-titre small {
	font-family: var(--ip-texte);
	font-weight: 600;
	font-size: 11.5px;
	color: var(--ip-sauge-profonde);
	background: rgba(157, 176, 143, .2);
	border-radius: 999px;
	padding: 2px 9px;
}

.ip-meuble-accroche {
	margin-top: 4px;
	font-size: 13.5px;
	color: var(--ip-encre-tenue);
}

/* Le groupe contient toutes les étagères d'un même rayon. */
.ip-groupe {
	--ip-par-vue: 6;
	--ip-espace: 20px;

	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 30px;
	border-radius: 8px;
	transition: background .16s ease;
}
.ip-groupe.ip-survol { background: rgba(157, 176, 143, .16); }

/* Une étagère : une ligne de livres, et sa planche. */
.ip-etagere {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--ip-par-vue), minmax(0, 1fr));
	gap: var(--ip-espace);
	align-items: start;
}

/*
 * Sans cette règle, l'attribut hidden posé par JS (pour la pagination des
 * étagères) reste sans effet : le display:grid ci-dessus, à spécificité
 * égale, l'emporte sur le display:none par défaut du navigateur pour un
 * élément masqué. Il faut le redire explicitement, à une spécificité plus
 * forte, pour que masquer une rangée la masque vraiment.
 */
.ip-etagere[hidden] { display: none; }

/* La planche court sous toute la largeur, sous la dernière ligne. */
.ip-planche {
	grid-column: 1 / -1;
	height: 8px;
	margin: 2px -20px 0;
	border-radius: 4px;
	background: linear-gradient(180deg, var(--ip-bois-clair), var(--ip-bois));
	box-shadow: 0 5px 12px rgba(60, 64, 56, .1);
}

/*
 * Les onglets de page : numérotés sous la collection, et sous chaque étagère
 * trop longue (pile à lire, lus…). Quatre rangées par page.
 */
.ip-onglets-collection {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	position: relative;
	z-index: 2;
	margin-top: 26px;
}
.ip-onglets-collection[hidden] { display: none; }

.ip-onglet-page {
	min-width: 34px;
	height: 34px;
	padding: 0 4px;
	font-family: var(--ip-texte);
	font-size: 13px;
	font-weight: 600;
	color: var(--ip-encre-douce);
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .4);
	border-radius: 999px;
	cursor: pointer;
	transition: background .16s ease, color .16s ease;
}
.ip-onglet-page:hover { background: rgba(157, 176, 143, .16); }
.ip-onglet-page--actif {
	color: #fbfcfa;
	background: var(--ip-sauge-profonde);
	border-color: var(--ip-sauge-profonde);
	cursor: default;
}

.ip-rangee-vide {
	grid-column: 1 / -1;
	color: var(--ip-encre-tenue);
	padding: 40px 4px;
}

.ip-lien-nu {
	background: none;
	border: none;
	color: var(--ip-sauge-profonde);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Nombre de livres par étagère : c'est cette variable que lit le script. */
@media (max-width: 1200px) { .ip-groupe { --ip-par-vue: 5; } }
@media (max-width: 980px)  { .ip-groupe { --ip-par-vue: 4; --ip-espace: 16px; } }
@media (max-width: 760px)  { .ip-groupe { --ip-par-vue: 3; } }
@media (max-width: 520px)  { .ip-groupe { --ip-par-vue: 2; --ip-espace: 13px; } }

/* Le volet des abandons : présent, mais en retrait. */
.ip-volet {
	margin-top: -34px;
	border-top: 1px dashed rgba(157, 176, 143, .5);
	padding-top: 20px;
}

.ip-volet-onglet {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	list-style: none;
	cursor: pointer;
	font-size: 13.5px;
	color: var(--ip-encre-tenue);
	padding: 6px 14px 6px 4px;
	border-radius: 999px;
	transition: color .16s ease, background .16s ease;
	user-select: none;
}
.ip-volet-onglet::-webkit-details-marker { display: none; }
.ip-volet-onglet:hover { color: var(--ip-sauge-profonde); background: rgba(157, 176, 143, .12); }

/* Le chevron pivote à l'ouverture. */
.ip-volet-onglet::after {
	content: "›";
	font-size: 16px;
	line-height: 1;
	transition: transform .2s ease;
}
.ip-volet[open] > .ip-volet-onglet::after { transform: rotate(90deg); }
.ip-volet[open] > .ip-volet-onglet { color: var(--ip-sauge-profonde); }

.ip-volet-orn { font-size: 15px; opacity: .7; }

.ip-volet-compte {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ip-encre-tenue);
	background: var(--ip-brume-creuse);
	border-radius: 999px;
	padding: 1px 8px;
}

.ip-volet-corps {
	margin-top: 22px;
	animation: ip-volet-ouvre .3s ease;
}

@keyframes ip-volet-ouvre {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: none; }
}

/* Le meuble des abandons est plus sourd que les autres. */
.ip-meuble--dnf {
	background: linear-gradient(180deg, #fbfbf8, var(--ip-brume-creuse) 92%);
	opacity: .88;
}
.ip-meuble--dnf .ip-couv { filter: saturate(.72); }

/* Celui des lectures en cours est le seul à porter un liseré. */
.ip-meuble--en-cours { border-color: rgba(157, 176, 143, .6); }
.ip-meuble--en-cours .ip-corniche { opacity: .8; }

/* ============ 6. LES LIVRES DE FACE ============ */
.ip-livre {
	position: relative;
	min-width: 0;
}
/*
 * Sur écran tactile, un appui long sur une image déclenche le menu du
 * navigateur (« enregistrer l'image »), ce qui rend la saisie impossible.
 * On coupe ce menu et la sélection sur les cartes, sans toucher au reste.
 */
.ip-livre {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}
.ip-livre img {
	-webkit-touch-callout: none;
	-webkit-user-drag: none;
	pointer-events: none;
}

.ip-livre[draggable="true"] { cursor: grab; }
.ip-livre[draggable="true"]:active { cursor: grabbing; }
.ip-livre.ip-glisse { opacity: .35; }

.ip-livre-declencheur {
	display: block;
	width: 100%;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	color: inherit;
	font: inherit;
}

.ip-couv {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 2 / 3;
	border-radius: 2px 6px 6px 2px;
	overflow: hidden;
	color: var(--ip-encre);
	box-shadow:
		0 1px 2px rgba(60, 64, 56, .12),
		0 8px 18px rgba(60, 64, 56, .14);
	transition: transform .26s cubic-bezier(.2, .8, .3, 1), box-shadow .26s ease;
}

/* Tranche de pages sur le bord gauche. */
.ip-couv::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	z-index: 2;
	background: linear-gradient(90deg, rgba(60, 64, 56, .26), rgba(255, 255, 255, .5) 62%, rgba(60, 64, 56, .12));
}

.ip-livre-declencheur:hover .ip-couv,
.ip-livre-declencheur:focus-visible .ip-couv {
	transform: translateY(-7px);
	box-shadow:
		0 2px 4px rgba(60, 64, 56, .12),
		0 18px 30px rgba(60, 64, 56, .2);
}

.ip-couv-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

.ip-couv-generee {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	height: 100%;
	padding: 18px 15px;
	text-align: center;
	color: rgba(48, 52, 44, .82);
}
.ip-couv-generee .ip-cadre {
	position: absolute;
	inset: 9px;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 1px 4px 4px 1px;
	pointer-events: none;
}
.ip-couv-generee .ip-cadre::after {
	content: "";
	position: absolute;
	inset: 4px;
	border: 1px solid rgba(48, 52, 44, .16);
	border-radius: 1px 3px 3px 1px;
}
.ip-couv-g-titre {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: clamp(11px, 1.1vw, 15px);
	line-height: 1.28;
}
.ip-couv-g-orn { font-size: clamp(13px, 1.4vw, 19px); opacity: .5; }
.ip-couv-g-auteur {
	font-size: clamp(9px, .8vw, 11.5px);
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .7;
}

.ip-priorite {
	position: absolute;
	top: 8px;
	left: 11px;
	z-index: 3;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ip-texte);
	font-weight: 700;
	font-size: 12px;
	color: #fff;
	background: var(--ip-sauge-profonde);
	border-radius: 999px;
	box-shadow: 0 2px 5px rgba(60, 64, 56, .28);
}

.ip-sceau {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #fff;
	background: var(--ip-sauge-profonde);
	border-radius: 50%;
	box-shadow: 0 2px 5px rgba(60, 64, 56, .28);
}

.ip-progres {
	position: absolute;
	left: 4px;
	right: 0;
	bottom: 0;
	height: 4px;
	z-index: 3;
	background: rgba(60, 64, 56, .2);
}
.ip-progres-remplissage {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--ip-cire), var(--ip-flamme));
	transition: width .3s ease;
}

.ip-livre-legende { display: block; margin-top: 11px; }
.ip-livre-titre {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13.5px;
	line-height: 1.35;
	color: var(--ip-encre);
}
.ip-livre-note {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	letter-spacing: 1.5px;
	color: var(--ip-cire);
}

/*
 * La demi-étoile compacte (carte, statistiques) : un dégradé de texte sur le
 * glyphe plein. La couleur du dégradé suit celle du badge qui l'entoure via
 * une propriété personnalisée, plutôt qu'une couleur unique — la carte est
 * dorée, la vignette des statistiques est sauge, et les deux doivent
 * afficher une demi-étoile de la même teinte que ses voisines pleines.
 */
.ip-etoile-demi {
	--ip-etoile-teinte: var(--ip-cire);
	background: linear-gradient(90deg, var(--ip-etoile-teinte) 50%, var(--ip-brume-creuse) 50%);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
.ip-livre-date,
.ip-livre-auteur {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	color: var(--ip-encre-tenue);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ip-livre--arrive { animation: ip-arrivee .5s cubic-bezier(.2, .8, .3, 1); }

@keyframes ip-arrivee {
	from { transform: translateY(-22px) scale(.96); opacity: 0; }
	to { transform: none; opacity: 1; }
}

/* Pendant un glissement au doigt, la page ne doit plus défiler d'elle-même. */
body.ip-glissage {
	touch-action: none;
	overscroll-behavior: contain;
}
body.ip-glissage .ip-livre { cursor: grabbing; }

/* La vignette qui suit le doigt. */
.ip-fantome {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 150;
	pointer-events: none;
	opacity: .92;
	transform-origin: center;
	filter: drop-shadow(0 14px 24px rgba(60, 64, 56, .35));
	animation: ip-saisie .16s ease;
}
.ip-fantome .ip-couv {
	transform: rotate(-3deg) scale(1.04);
	box-shadow: 0 2px 5px rgba(60, 64, 56, .2), 0 18px 30px rgba(60, 64, 56, .3);
}
.ip-fantome .ip-priorite,
.ip-fantome .ip-top-retirer { display: none; }

@keyframes ip-saisie {
	from { transform: scale(.94); opacity: .5; }
	to { opacity: .92; }
}

/* ---------- Une série, groupée en une seule entrée ---------- */
.ip-livre-declencheur--serie { position: relative; }

/*
 * Le conteneur des aperçus vit hors de .ip-couv (qui masque son
 * dépassement, pour ses coins arrondis) mais couvre exactement la même
 * zone, un cran derrière elle : les tomes glissent dessous, invisibles,
 * jusqu'à dépasser son contour au survol. Réduits à rien par défaut,
 * plutôt que juste transparents, pour ne jamais gêner le survol de la
 * vraie couverture au-dessus.
 */
.ip-serie-apercus {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.ip-couv--serie { position: relative; z-index: 1; }

.ip-serie-apercu {
	position: absolute;
	top: 10%;
	left: 50%;
	width: 34%;
	height: 80%;
	overflow: hidden;
	border-radius: 2px 5px 5px 2px;
	box-shadow: 0 3px 8px rgba(60, 64, 56, .22);
	transform: translate(-50%, 0) scale(.4);
	opacity: 0;
	transition: transform .38s cubic-bezier(.2, .8, .3, 1.15), opacity .28s ease;
}

/* La vraie couverture du tome, si on en a une — le fond de couleur posé en
   style="" (voir serie-face.php) ne sert plus alors que de couche d'attente
   pendant le chargement de l'image. */
.ip-serie-apercu img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* À défaut d'image pour ce tome, son titre, en tout petit — la même idée
   que la couverture générée d'un livre, réduite à l'essentiel. */
.ip-serie-apercu-titre {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 4px;
	font-family: var(--ip-display);
	font-size: 9px;
	line-height: 1.15;
	text-align: center;
	color: rgba(255, 255, 255, .92);
	text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

/* Deux directions de sortie — gauche et droite seulement, pas en dessous. */
.ip-livre-declencheur--serie:hover .ip-serie-apercu--1,
.ip-livre-declencheur--serie:focus-visible .ip-serie-apercu--1 {
	transform: translate(-172%, -6%) rotate(-9deg) scale(1);
	opacity: .95;
}
.ip-livre-declencheur--serie:hover .ip-serie-apercu--2,
.ip-livre-declencheur--serie:focus-visible .ip-serie-apercu--2 {
	transform: translate(72%, -10%) rotate(8deg) scale(1);
	opacity: .95;
	transition-delay: .04s;
}

@media (prefers-reduced-motion: reduce) {
	.ip-serie-apercu { transition: none; }
}

/* Un petit fanion, pour distinguer une série d'un livre au premier regard,
   avant même de lire la légende. */
.ip-serie-etiquette {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 2px 8px;
	font-family: var(--ip-texte);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fbfcfa;
	background: rgba(60, 64, 56, .55);
	border-radius: 999px;
	backdrop-filter: blur(2px);
}

.ip-serie-annonce {
	display: block;
	font-size: 12.5px;
	color: var(--ip-encre-tenue);
}

/* ============ 7. LA FICHE DU LIVRE ============ */
.ip-voile {
	position: fixed;
	inset: 0;
	background: rgba(233, 235, 228, .82);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 24px;
	overflow-y: auto;
}
.ip-voile[hidden] { display: none; }

/* L'attribut « hidden » ne pèse rien face à un display explicite : il faut
   le rétablir, sinon la fiche reste visible sous le volet de correction. */
.ip-fiche-corps[hidden] { display: none; }

.ip-fiche-corps {
	display: flex;
	gap: 44px;
	align-items: flex-start;
	flex-wrap: wrap;
	justify-content: center;
	max-width: 900px;
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .34);
	border-radius: var(--ip-rayon);
	box-shadow: 0 20px 50px rgba(60, 64, 56, .16);
	padding: 34px 38px;
	margin: auto;
	position: relative;
}

.ip-colonne-livre {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	flex: 0 0 auto;
}

.ip-scene { width: 250px; flex: 0 0 auto; }

.ip-fiche-couverture {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 3;
	padding: 26px 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	text-align: center;
	overflow: hidden;
	color: rgba(48, 52, 44, .84);
	border-radius: 2px 7px 7px 2px;
	box-shadow: 0 3px 8px rgba(60, 64, 56, .14), 0 16px 34px rgba(60, 64, 56, .16);
}

.ip-fiche-couverture::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 5px;
	z-index: 3;
	background: linear-gradient(90deg, rgba(60, 64, 56, .26), rgba(255, 255, 255, .5) 62%, rgba(60, 64, 56, .12));
}

.ip-fiche-couverture.ip-apparait {
	animation: ip-couverture-entre .42s cubic-bezier(.2, .8, .3, 1);
}

@keyframes ip-couverture-entre {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: none; }
}

.ip-cadre {
	position: absolute;
	inset: 11px;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 1px 5px 5px 1px;
	pointer-events: none;
	z-index: 2;
}
.ip-cadre::after {
	content: "";
	position: absolute;
	inset: 5px;
	border: 1px solid rgba(48, 52, 44, .16);
	border-radius: 1px 4px 4px 1px;
}

.ip-couv-titre {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 21px;
	line-height: 1.28;
	margin-top: 26px;
}
.ip-couv-orn { font-size: 30px; margin: 6px 0; opacity: .5; }
.ip-couv-auteur {
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	opacity: .75;
}
.ip-couv-note { font-size: 12px; opacity: .55; margin-bottom: 20px; }

.ip-couv-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 2px 7px 7px 2px;
	z-index: 4;
}

.ip-details { max-width: 360px; flex: 1 1 320px; }
.ip-details h3 {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 26px;
	line-height: 1.2;
	color: var(--ip-encre);
	margin: 6px 0 4px;
}
.ip-details-auteur {
	font-family: var(--ip-display);
	font-style: italic;
	color: var(--ip-encre-douce);
	margin-bottom: 18px;
}

.ip-details-liste {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 18px;
	font-size: 14.5px;
	margin: 4px 0 22px;
}
.ip-details-liste dt {
	font-size: 11.5px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
	align-self: center;
}
.ip-details-liste dd { margin: 0; }

.ip-badge {
	display: inline-block;
	border: 1px solid rgba(157, 176, 143, .6);
	background: rgba(157, 176, 143, .14);
	color: var(--ip-sauge-profonde);
	border-radius: 999px;
	padding: 2px 12px;
	font-size: 12.5px;
	font-weight: 600;
}

.ip-details-actions {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}
.ip-lien-edition { font-size: 13.5px; color: var(--ip-encre-tenue); }
.ip-lien-edition:hover { color: var(--ip-sauge-profonde); }

.ip-fermer {
	position: fixed;
	top: 22px;
	right: 26px;
	width: 38px;
	height: 38px;
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .5);
	border-radius: 50%;
	color: var(--ip-encre-douce);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 2px 6px rgba(60, 64, 56, .1);
}
.ip-fermer:hover { color: var(--ip-sauge-profonde); background: rgba(157, 176, 143, .14); }

.ip-annonce {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%) translateY(16px);
	background: var(--ip-sauge-profonde);
	color: #fbfcfa;
	font-size: 13.5px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(60, 64, 56, .2);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
	z-index: 120;
}
.ip-annonce.ip-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 8. SUIVI DE LECTURE & PERSONNALISATION ============ */
body.ip-fige { overflow: hidden; }

.ip-visuellement-cache {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ip-personnalisation {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: center;
	width: 250px;
}

.ip-perso-ligne {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

.ip-mini-btn {
	font-family: var(--ip-texte);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ip-sauge-profonde);
	background: rgba(157, 176, 143, .14);
	border: 1px solid rgba(157, 176, 143, .5);
	border-radius: 999px;
	padding: 6px 14px;
	cursor: pointer;
	transition: background .16s ease;
}
.ip-mini-btn:hover { background: rgba(157, 176, 143, .28); }
.ip-mini-btn:disabled { opacity: .45; cursor: default; }
.ip-mini-btn--discret {
	background: none;
	border-color: transparent;
	color: var(--ip-encre-tenue);
	text-decoration: underline;
	text-underline-offset: 3px;
	padding: 6px 4px;
}
.ip-mini-btn--discret:hover { background: none; color: var(--ip-sauge-profonde); }

.ip-couleurs {
	display: flex;
	flex-direction: column;
	gap: 9px;
	align-items: center;
	width: 100%;
}
.ip-couleurs-titre {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
}

.ip-nuancier {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 4px;
	width: 100%;
}
.ip-nuance {
	aspect-ratio: 1;
	border: 1px solid rgba(60, 64, 56, .14);
	border-radius: 3px;
	cursor: pointer;
	padding: 0;
	transition: transform .12s ease, box-shadow .12s ease;
}
.ip-nuance:hover { transform: scale(1.22); }
.ip-nuance--active {
	box-shadow: 0 0 0 2px var(--ip-sauge-profonde);
	transform: scale(1.14);
}

.ip-couleur-libre {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	color: var(--ip-encre-douce);
	cursor: pointer;
}
.ip-couleur-libre input[type="color"] {
	width: 30px;
	height: 24px;
	border: 1px solid rgba(157, 176, 143, .6);
	border-radius: 4px;
	background: none;
	padding: 2px;
	cursor: pointer;
}

.ip-bloc { margin-bottom: 22px; }

.ip-bloc-titre {
	display: block;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
	margin-bottom: 9px;
}

.ip-progression { margin: 20px 0 24px; }

.ip-progression-tete {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}
.ip-progression-tete .ip-bloc-titre { margin-bottom: 0; }

.ip-progression-chiffre {
	font-family: var(--ip-display);
	font-weight: 600;
	font-size: 18px;
	color: var(--ip-sauge-profonde);
}

.ip-jauge {
	height: 8px;
	margin: 10px 0 12px;
	border-radius: 999px;
	background: var(--ip-brume-creuse);
	overflow: hidden;
}
.ip-jauge-remplissage {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ip-cire), var(--ip-flamme));
	transition: width .35s cubic-bezier(.3, .8, .3, 1);
}
.ip-jauge--terminee .ip-jauge-remplissage {
	background: linear-gradient(90deg, var(--ip-sauge), var(--ip-sauge-profonde));
}

.ip-progression-pieds {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	font-size: 14px;
	color: var(--ip-encre-douce);
}

.ip-pages-saisie { display: inline-flex; align-items: center; gap: 7px; }
.ip-pages-saisie input {
	width: 66px;
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .55);
	border-radius: 6px;
	color: var(--ip-encre);
	font-family: var(--ip-texte);
	font-size: 14.5px;
	padding: 6px 8px;
	text-align: center;
}

.ip-coche {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	color: var(--ip-encre);
}
.ip-coche input { accent-color: var(--ip-sauge-profonde); width: 17px; height: 17px; cursor: pointer; }

.ip-choix { display: flex; gap: 8px; flex-wrap: wrap; }

.ip-puce {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--ip-texte);
	font-size: 13px;
	color: var(--ip-encre-douce);
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .5);
	border-radius: 999px;
	padding: 6px 14px;
	cursor: pointer;
	transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.ip-puce:hover { background: rgba(157, 176, 143, .16); color: var(--ip-encre); }
.ip-puce--active {
	color: #fbfcfa;
	background: var(--ip-sauge-profonde);
	border-color: var(--ip-sauge-profonde);
}

.ip-etoiles { display: flex; align-items: center; gap: 3px; }
.ip-etoile {
	background: none;
	border: none;
	padding: 0 2px;
	font-size: 23px;
	line-height: 1;
	color: var(--ip-brume-creuse);
	cursor: pointer;
	transition: color .12s ease, transform .12s ease;
}
button.ip-etoile:hover { transform: scale(1.14); }
.ip-etoile--pleine { color: var(--ip-cire); }

/*
 * La demi-étoile : un dégradé appliqué au texte lui-même plutôt qu'un second
 * glyphe superposé — un seul caractère ★, à moitié doré, à moitié terne.
 */
.ip-etoile--demi {
	background: linear-gradient(90deg, var(--ip-cire) 50%, var(--ip-brume-creuse) 50%);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
#ip-note-reset { margin-left: 8px; }

.ip-bloc textarea {
	width: 100%;
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .55);
	border-radius: 8px;
	color: var(--ip-encre);
	font-family: var(--ip-texte);
	font-size: 14.5px;
	padding: 10px 12px;
	resize: vertical;
	margin-bottom: 9px;
}
.ip-bloc textarea::placeholder { color: var(--ip-encre-tenue); }

.ip-avis-lecture {
	font-family: var(--ip-display);
	font-style: italic;
	color: var(--ip-encre-douce);
	font-size: 15px;
}
.ip-avis-lecture:empty::before { content: "—"; opacity: .4; }

.ip-classement { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ip-champ { display: flex; flex-direction: column; gap: 4px; flex: 1 1 130px; }
.ip-champ--court { flex: 0 0 74px; }
.ip-champ label {
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
}
.ip-champ input,
.ip-champ select {
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .55);
	border-radius: 6px;
	color: var(--ip-encre);
	font-family: var(--ip-texte);
	font-size: 14px;
	padding: 7px 9px;
	width: 100%;
}
.ip-classement-lecture { font-size: 14.5px; color: var(--ip-encre-douce); }
.ip-classement-lecture:empty::before { content: "—"; opacity: .4; }

/* Retrait d'un livre : discret, en pied de fiche, loin des actions courantes. */
.ip-retrait {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid rgba(157, 176, 143, .3);
}

.ip-lien-retrait {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--ip-encre-tenue);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ip-lien-retrait:hover { color: #a8503f; }

.ip-retrait-confirme p {
	font-size: 13.5px;
	color: var(--ip-encre-douce);
	margin-bottom: 10px;
}
.ip-retrait-confirme[hidden] { display: none; }

.ip-mini-btn--danger {
	color: #fbfcfa;
	background: #a8503f;
	border-color: #a8503f;
}
.ip-mini-btn--danger:hover { background: #94422f; }

/* Action de rattrapage dans l'annonce. */
.ip-annonce-action {
	margin-left: 14px;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-weight: 700;
	color: #fbfcfa;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ---------- Onglets, partagés par les comptes et le panneau d'ajout ---------- */
.ip-onglets {
	display: flex;
	gap: 4px;
	padding: 4px;
	margin-bottom: 24px;
	background: var(--ip-brume);
	border: 1px solid rgba(157, 176, 143, .4);
	border-radius: 999px;
}

.ip-onglet {
	flex: 1;
	text-align: center;
	padding: 9px 14px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ip-encre-douce);
	text-decoration: none;
	transition: background .16s ease, color .16s ease;
}
.ip-onglet:hover { color: var(--ip-encre); }
.ip-onglet--actif {
	color: #fbfcfa;
	background: var(--ip-sauge-profonde);
	box-shadow: 0 2px 5px rgba(60, 64, 56, .12);
}


/* ---------- Le formulaire de fiche ---------- */
.ip-formulaire-grille {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}

.ip-champ-saisie { display: flex; flex-direction: column; gap: 5px; }
.ip-champ-saisie--plein { grid-column: 1 / -1; }
.ip-champ-saisie--court { max-width: 130px; }

.ip-champ-saisie label {
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
}
.ip-requis { color: var(--ip-sauge); }

.ip-champ-saisie input,
.ip-champ-saisie select,
.ip-champ-saisie textarea {
	background: var(--ip-champ);
	border: 1px solid rgba(157, 176, 143, .55);
	border-radius: 8px;
	color: var(--ip-encre);
	font-family: var(--ip-texte);
	font-size: 14.5px;
	padding: 9px 12px;
	width: 100%;
}
.ip-champ-saisie textarea { resize: vertical; }
.ip-champ-saisie input[type="file"] { padding: 8px 10px; font-size: 13px; }
.ip-champ-saisie .ip-aide { font-size: 12px; color: var(--ip-encre-tenue); }
.ip-retirer-couverture[hidden] { display: none; }

/*
 * Le curseur de priorité de lecture, partagé par la fiche (bascule rapide)
 * et le formulaire de saisie/correction. Le dégradé de la piste va du
 * sauge (peu pressé) à la cire dorée (priorité maximale), pour lire d'un
 * coup d'œil où on se situe sans regarder le chiffre.
 */
.ip-priorite-lecture-controle {
	display: flex;
	align-items: center;
	gap: 12px;
}
.ip-priorite-lecture-controle input[type="range"] {
	flex: 1 1 auto;
	appearance: none;
	-webkit-appearance: none;
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ip-sauge-pale), var(--ip-cire) 60%, var(--ip-flamme));
	outline: none;
}
.ip-priorite-lecture-controle input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--ip-surface-vive);
	border: 2px solid var(--ip-sauge-profonde);
	box-shadow: var(--ip-ombre-douce);
	cursor: pointer;
}
.ip-priorite-lecture-controle input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--ip-surface-vive);
	border: 2px solid var(--ip-sauge-profonde);
	box-shadow: var(--ip-ombre-douce);
	cursor: pointer;
}
.ip-priorite-lecture-valeur {
	min-width: 22px;
	text-align: center;
	font-family: var(--ip-display);
	font-size: 17px;
	font-weight: 600;
	color: var(--ip-sauge-profonde);
}
#ip-bloc-priorite .ip-priorite-lecture-controle { margin-top: 4px; }
#ip-bloc-priorite .ip-aide { display: block; margin-top: 6px; font-size: 12px; color: var(--ip-encre-tenue); }

.ip-formulaire-erreur {
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	color: #7d3a2d;
	background: rgba(168, 80, 63, .12);
	border: 1px solid rgba(168, 80, 63, .35);
}
.ip-formulaire-erreur[hidden] { display: none; }

.ip-formulaire-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.ip-onglets--ajout { margin-bottom: 20px; }
.ip-onglets--ajout .ip-onglet {
	flex: 1;
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--ip-texte);
}

/*
 * Bug corrigé : cette règle (deux classes) est plus spécifique que
 * .ip-onglet--actif seul, donc elle effaçait son fond sombre sans toucher
 * à sa couleur de texte claire — du blanc sur le fond clair du panneau,
 * illisible. On remet le même fond ici, à la même spécificité, en dernier.
 */
.ip-onglets--ajout .ip-onglet--actif {
	background: var(--ip-sauge-profonde);
	color: #fbfcfa;
}

.ip-manuel-intro { text-align: left; margin-bottom: 20px; }

/*
 * Le volet de correction prend la place de la fiche plutôt que de la
 * recouvrir : même carte, même largeur, même position. On en revient par
 * « Annuler » comme par l'enregistrement.
 */
.ip-edition {
	width: 100%;
	max-width: 620px;
	margin: auto;
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .34);
	border-radius: var(--ip-rayon);
	box-shadow: 0 20px 50px rgba(60, 64, 56, .16);
	padding: 30px 34px 32px;
	animation: ip-edition-entre .22s ease;
}
.ip-edition[hidden] { display: none; }

/* Un fil d'Ariane discret : on sait d'où l'on vient. */
.ip-edition-retour {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: none;
	border: none;
	padding: 0;
	margin-bottom: 14px;
	font: inherit;
	font-size: 13px;
	color: var(--ip-encre-tenue);
	cursor: pointer;
}
.ip-edition-retour:hover { color: var(--ip-sauge-profonde); }

@keyframes ip-edition-entre {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

.ip-edition-tete { margin-bottom: 20px; }
.ip-edition-tete h3 {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 22px;
	color: var(--ip-encre);
	margin-top: 4px;
}

/* Le lien de correction : discret, sous les actions courantes. */
.ip-editer { margin-top: 18px; }

.ip-lien-editer {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--ip-encre-tenue);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ip-lien-editer:hover { color: var(--ip-sauge-profonde); }

@media (max-width: 640px) {
	.ip-formulaire-grille { grid-template-columns: 1fr; }
	.ip-champ-saisie--court { max-width: none; }
	.ip-edition { padding: 24px 20px 26px; }
}

/* ============ 9. PANNEAU D'AJOUT (GOOGLE BOOKS) ============ */
.ip-voile--recherche { align-items: flex-start; }

.ip-panneau {
	width: 100%;
	max-width: 760px;
	margin: 34px auto;
	padding: 32px 34px 34px;
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .34);
	border-radius: var(--ip-rayon);
	box-shadow: 0 20px 50px rgba(60, 64, 56, .16);
}

.ip-panneau-tete { text-align: center; margin-bottom: 22px; }
.ip-panneau-tete h2 {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 28px;
	color: var(--ip-encre);
	margin: 8px 0 4px;
}
.ip-panneau-sous { color: var(--ip-encre-douce); font-size: 14.5px; }

.ip-barre-recherche { display: flex; gap: 10px; margin-bottom: 14px; }
.ip-barre-recherche input {
	flex: 1;
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .55);
	border-radius: 999px;
	color: var(--ip-encre);
	font-family: var(--ip-texte);
	font-size: 16px;
	padding: 12px 20px;
}
.ip-barre-recherche input::placeholder { color: var(--ip-encre-tenue); }

.ip-choix--sources {
	justify-content: center;
	margin-bottom: 12px;
}
.ip-choix--sources .ip-puce { font-size: 12px; padding: 5px 13px; }

.ip-choix--langue { justify-content: flex-end; margin-bottom: 14px; }
.ip-choix--langue .ip-puce { font-size: 12px; padding: 5px 13px; }

.ip-options-ajout {
	display: flex;
	align-items: center;
	gap: 10px 14px;
	flex-wrap: wrap;
	padding: 16px 0;
	border-top: 1px solid rgba(157, 176, 143, .3);
	border-bottom: 1px solid rgba(157, 176, 143, .3);
	margin-bottom: 18px;
}
.ip-options-label {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ip-encre-tenue);
}

.ip-etat-recherche {
	text-align: center;
	color: var(--ip-encre-douce);
	font-size: 14.5px;
	min-height: 22px;
	margin-bottom: 8px;
}

.ip-resultats {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 52vh;
	overflow-y: auto;
	padding-right: 6px;
	scrollbar-width: thin;
	scrollbar-color: var(--ip-sauge) transparent;
}
.ip-resultats::-webkit-scrollbar { width: 6px; }
.ip-resultats::-webkit-scrollbar-thumb { background: var(--ip-sauge); border-radius: 3px; }

.ip-resultat {
	display: flex;
	gap: 16px;
	padding: 14px;
	background: var(--ip-brume);
	border: 1px solid transparent;
	border-radius: 8px;
	transition: border-color .16s ease, background .16s ease;
}
.ip-resultat:hover { border-color: rgba(157, 176, 143, .6); background: #f2f4ee; }
.ip-resultat--present { opacity: .5; }

.ip-resultat-vignette {
	flex: 0 0 68px;
	width: 68px;
	height: 102px;
	border-radius: 2px 4px 4px 2px;
	overflow: hidden;
	background: var(--ip-brume-creuse);
	box-shadow: 0 3px 8px rgba(60, 64, 56, .14);
}
.ip-resultat-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-resultat-vignette--vide {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ip-sauge);
	font-size: 22px;
}

.ip-resultat-corps { flex: 1; min-width: 0; }
.ip-resultat-corps h3 {
	font-family: var(--ip-display);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.3;
	color: var(--ip-encre);
	margin-bottom: 2px;
}
.ip-resultat-auteur { color: var(--ip-sauge-profonde); font-size: 14px; }
.ip-resultat-meta {
	font-size: 12.5px;
	color: var(--ip-encre-tenue);
	margin: 4px 0 6px;
}
.ip-resultat-resume {
	font-size: 13.5px;
	color: var(--ip-encre-douce);
	margin-bottom: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ip-plus { text-align: center; margin-top: 14px; }
.ip-plus button[hidden] { display: none; }

.ip-resultat-source {
	display: inline-block;
	margin-left: 8px;
	vertical-align: middle;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ip-encre-douce);
	background: var(--ip-brume-creuse);
	border-radius: 4px;
	padding: 1px 6px;
}
/* Les catalogues les plus fiables sur l'édition française sont mis en avant. */
.ip-resultat-source--bnf,
.ip-resultat-source--isbndb {
	color: #fbfcfa;
	background: var(--ip-sauge-profonde);
}

.ip-resultat-langue {
	display: inline-block;
	margin-left: 8px;
	vertical-align: middle;
	font-family: var(--ip-texte);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	color: var(--ip-encre-tenue);
	background: var(--ip-surface-vive);
	border: 1px solid rgba(157, 176, 143, .5);
	border-radius: 4px;
	padding: 1px 6px;
}
.ip-resultat-langue--preferee {
	color: #fbfcfa;
	background: var(--ip-sauge);
	border-color: var(--ip-sauge);
}

/* ============ 10. PAGES SIMPLES & PIED ============ */
.ip-simple {
	max-width: 700px;
	margin: 0 auto;
	padding: 76px 22px;
	position: relative;
	z-index: 1;
}
.ip-simple h1 {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 34px;
	color: var(--ip-encre);
	margin-bottom: 20px;
}
.ip-simple-contenu p { margin-bottom: 16px; }

.ip-pied {
	text-align: center;
	padding: 0 20px 58px;
	color: var(--ip-encre-tenue);
	font-size: 13.5px;
	position: relative;
	z-index: 1;
}

/* ============ 11. ACCESSIBILITÉ & RESPONSIVE ============ */
.ip-livre-declencheur:focus-visible,
.ip-btn:focus-visible,
.ip-mini-btn:focus-visible,
.ip-puce:focus-visible,
.ip-fermer:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
	outline: 2px solid var(--ip-sauge-profonde);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
	html { scroll-behavior: auto; }
}

/* Les plantes débordent : elles disparaissent quand la place manque. */
@media (max-width: 1340px) {
	.ip-plante--pothos { left: -46px; opacity: .75; }
	.ip-plante--eucalyptus { right: -58px; opacity: .75; }
}
@media (max-width: 1100px) {
	.ip-plante { display: none; }
}

@media (max-width: 780px) {
	.ip-bibliotheque { gap: 52px; padding: 0 16px; margin-bottom: 64px; }
	.ip-meuble { padding: 24px 20px 22px; }
	.ip-groupe { gap: 24px; }
	.ip-planche { margin: 2px -10px 0; }
	.ip-meuble-titre { font-size: 20px; }
	.ip-montant { display: none; }
	.ip-bougies { left: 30px; }
	.ip-fiche-corps { gap: 26px; padding: 26px 22px; }
	.ip-personnalisation { width: 100%; max-width: 300px; }
	.ip-details { max-width: 100%; }
	.ip-panneau { margin: 14px auto; padding: 26px 20px 28px; }
	.ip-resultats { max-height: none; }
}

@media (max-width: 520px) {
	body { font-size: 16px; }
	.ip-entete { padding-top: 40px; }
	.ip-bougies { display: none; }
	.ip-scene { width: 180px; }
	.ip-resultat { flex-direction: column; }
	.ip-resultat-vignette { width: 60px; height: 90px; flex-basis: auto; }
	.ip-barre-recherche { flex-direction: column; }
	.ip-barre-recherche input { border-radius: 12px; }
	.ip-progression-pieds { flex-direction: column; align-items: flex-start; }
	.ip-nuancier { grid-template-columns: repeat(6, 1fr); }
	.ip-fermer { top: 12px; right: 14px; }
}

/* L'appel à créer une fiche, là où l'on constate que le catalogue n'a rien. */
.ip-secours {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px dashed rgba(157, 176, 143, .5);
	text-align: center;
}

.ip-secours-texte {
	font-size: 14px;
	color: var(--ip-encre-douce);
	margin-bottom: 12px;
}

/* ============ LE LECTEUR DE CODES-BARRES ============ */

/* Le bouton, glissé dans la barre de recherche. */
.ip-scan-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: var(--ip-champ);
	border: 1px solid rgba(157, 176, 143, .55);
	border-radius: 999px;
	color: var(--ip-sauge-profonde);
	cursor: pointer;
	transition: background .16s ease, transform .12s ease;
}
.ip-scan-btn[hidden] { display: none; }
.ip-scan-btn:hover { background: var(--ip-brume); transform: scale(1.05); }
.ip-scan-btn svg { width: 22px; height: 22px; }

/* La fenêtre : sombre, pour que l'œil aille à l'image. */
.ip-voile--scan { background: rgba(18, 20, 17, .92); }

.ip-scanner-corps {
	width: 100%;
	max-width: 520px;
	margin: auto;
	padding: 0 18px;
}

.ip-scanner-tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.ip-scanner-tete h2 {
	font-family: var(--ip-display);
	font-variation-settings: 'SOFT' 100, 'WONK' 1;
	font-weight: 600;
	font-size: 20px;
	color: #f2f0ea;
}

.ip-scanner-fermer {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	padding: 6px 10px;
	color: rgba(242, 240, 234, .75);
	cursor: pointer;
	border-radius: 999px;
}
.ip-scanner-fermer:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.ip-scanner-vue {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ip-rayon);
	background: #000;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.ip-scanner-vue video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* La mire : quatre coins plutôt qu'un cadre, plus lisible sur une image. */
.ip-mire {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 74%;
	height: 46%;
	pointer-events: none;
}

.ip-mire-coin {
	position: absolute;
	width: 26px;
	height: 26px;
	border: 3px solid var(--ip-cire);
	border-radius: 3px;
}
.ip-mire-coin--hg { top: 0; left: 0; border-right: none; border-bottom: none; }
.ip-mire-coin--hd { top: 0; right: 0; border-left: none; border-bottom: none; }
.ip-mire-coin--bg { bottom: 0; left: 0; border-right: none; border-top: none; }
.ip-mire-coin--bd { bottom: 0; right: 0; border-left: none; border-top: none; }

/* Un trait qui balaie la mire : on voit que ça cherche. */
.ip-mire-trait {
	position: absolute;
	left: 6%;
	right: 6%;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, var(--ip-cire), transparent);
	animation: ip-balayage 2.4s ease-in-out infinite;
}

@keyframes ip-balayage {
	0%, 100% { top: 8%; opacity: .35; }
	50% { top: 88%; opacity: .95; }
}

.ip-scanner-torche {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 22, 19, .6);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	color: rgba(255, 255, 255, .8);
	cursor: pointer;
}
.ip-scanner-torche[hidden] { display: none; }
.ip-scanner-torche svg { width: 20px; height: 20px; }
.ip-torche--active {
	background: var(--ip-cire);
	color: #2a2c26;
	border-color: var(--ip-cire);
}

.ip-scanner-etat {
	margin-top: 16px;
	text-align: center;
	font-size: 14.5px;
	color: #f2f0ea;
	min-height: 1.4em;
}

.ip-scanner-note {
	margin-top: 8px;
	text-align: center;
	font-size: 12.5px;
	color: rgba(242, 240, 234, .6);
}

@media (prefers-reduced-motion: reduce) {
	.ip-mire-trait { animation: none; top: 48%; }
}

/* ============ LE MOT DOUX ============ */

/*
 * Un cœur planté dans le coin de l'écran, qui ne révèle son message qu'à qui
 * s'y arrête : au survol, au clavier, ou au toucher. Discret par nature —
 * ce n'est pas une bannière, c'est une chose à trouver.
 */
.ip-mot-doux {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 60;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .4);
	border-radius: 999px;
	padding: 9px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(60, 64, 56, .12);
	transition: padding .22s ease, box-shadow .18s ease, transform .18s ease;
}

.ip-mot-doux-coeur {
	flex: 0 0 auto;
	font-size: 15px;
	line-height: 1;
	color: #a8503f;
	opacity: .55;
	transition: opacity .18s ease, transform .18s ease;
}

.ip-mot-doux-texte {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	font-family: var(--ip-display);
	font-style: italic;
	font-size: 14px;
	color: var(--ip-encre-douce);
	transition: max-width .28s ease;
}

/* Au survol, au clavier ou après un tapotement : le message se déplie. */
.ip-mot-doux:hover,
.ip-mot-doux:focus-visible,
.ip-mot-doux--ouvert {
	box-shadow: 0 8px 22px rgba(60, 64, 56, .18);
	transform: translateY(-1px);
}

.ip-mot-doux:hover .ip-mot-doux-coeur,
.ip-mot-doux:focus-visible .ip-mot-doux-coeur,
.ip-mot-doux--ouvert .ip-mot-doux-coeur {
	opacity: 1;
	transform: scale(1.15);
}

.ip-mot-doux:hover .ip-mot-doux-texte,
.ip-mot-doux:focus-visible .ip-mot-doux-texte,
.ip-mot-doux--ouvert .ip-mot-doux-texte {
	max-width: 240px;
	padding-right: 4px;
}

/* Un battement à peine perceptible, pour qu'on remarque qu'il y a quelque
   chose à découvrir sans que ce soit une animation criarde. */
@keyframes ip-mot-doux-respire {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.08); }
}
.ip-mot-doux:not(:hover):not(:focus-visible):not(.ip-mot-doux--ouvert) .ip-mot-doux-coeur {
	animation: ip-mot-doux-respire 3.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.ip-mot-doux-coeur { animation: none !important; }
}

@media (max-width: 480px) {
	.ip-mot-doux { right: 14px; bottom: 14px; }
	.ip-mot-doux-texte { font-size: 13px; }
}

/* ============ BLUEBOO ============ */

.ip-blueboo {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	pointer-events: none;
	user-select: none;
}

/*
 * Le grand Blueboo d'en-tête : une pose différente par page, à la hauteur
 * du bloc de titre, posée au bord gauche ou droit de la colonne de contenu.
 * Le texte de l'en-tête reste centré ; Blueboo se pose à côté, jamais dessus.
 */
.ip-blueboo--header {
	position: absolute;
	top: 50%;
	left: auto;
	right: auto;
	height: clamp(96px, 11vw, 168px);
	width: auto;
	z-index: 0;
	pointer-events: none;
	animation: ip-blueboo-flotte 5.5s ease-in-out infinite;
}
.ip-blueboo--header.ip-blueboo--gauche { left: 6px; transform: translateY(-50%); }
.ip-blueboo--header.ip-blueboo--droite { right: 6px; transform: translateY(-50%); }

@keyframes ip-blueboo-flotte {
	0%, 100% { margin-top: 0; }
	50% { margin-top: -8px; }
}

@media (prefers-reduced-motion: reduce) {
	.ip-blueboo--header { animation: none; }
}

/*
 * En dessous, plus la place de le poser à côté sans risquer de mordre sur
 * le titre : il redevient un petit ornement centré, sous le fil rouge,
 * comme demandé — présent, mais qui ne gêne plus la lecture.
 */
@media (max-width: 980px) {
	.ip-blueboo--header {
		position: static;
		transform: none;
		height: 70px;
		margin: 8px auto 0;
		animation: none;
	}
	.ip-blueboo--header.ip-blueboo--gauche,
	.ip-blueboo--header.ip-blueboo--droite {
		left: auto;
		right: auto;
	}
}

@media (max-width: 480px) {
	.ip-blueboo--header { height: 56px; }
}

/* Dans les étagères et volets vides : à côté du texte, pas au-dessus. */
.ip-rangee-vide {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.ip-blueboo--vide { width: 70px; }

/* À côté du statut de recherche : petit, discret, jamais intrusif. */
.ip-blueboo-recherche {
	display: flex;
	justify-content: center;
	margin: 10px 0 0;
}
.ip-blueboo-recherche[hidden] { display: none; }
.ip-blueboo--recherche {
	width: 84px;
	animation: ip-blueboo-entre .25s ease;
}

@keyframes ip-blueboo-entre {
	from { opacity: 0; transform: translateY(4px) scale(.94); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ip-blueboo--recherche { animation: none; }
}

@media (max-width: 480px) {
	.ip-blueboo--vide { width: 58px; }
	.ip-blueboo--recherche { width: 68px; }
}

/* ============ LE RAPPEL DU CHRONOMÈTRE ============ */

/*
 * En bas à gauche : le mot doux occupe déjà l'autre coin. Discret par
 * défaut — ce n'est qu'un rappel — et un peu plus affirmé pendant que le
 * temps tourne réellement.
 */
.ip-chrono-mini {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 60;
	display: flex;
	align-items: center;
	gap: 7px;
	background: var(--ip-surface);
	border: 1px solid rgba(157, 176, 143, .4);
	border-radius: 999px;
	padding: 8px 14px 8px 12px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(60, 64, 56, .12);
	transition: box-shadow .18s ease, transform .18s ease, opacity .18s ease;
	opacity: .82;
}
.ip-chrono-mini[hidden] { display: none; }
.ip-chrono-mini:hover {
	opacity: 1;
	box-shadow: 0 8px 22px rgba(60, 64, 56, .18);
	transform: translateY(-1px);
}

.ip-chrono-mini-point {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ip-encre-tenue);
	flex: 0 0 auto;
}

/* En pause : le point reste fixe. En marche : il bat comme un pouls. */
.ip-chrono-mini--marche .ip-chrono-mini-point {
	background: #a8503f;
	animation: ip-chrono-mini-pouls 1.4s ease-in-out infinite;
}

@keyframes ip-chrono-mini-pouls {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .45; transform: scale(.75); }
}

.ip-chrono-mini-temps {
	font-family: var(--ip-display);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	font-size: 13.5px;
	color: var(--ip-encre-douce);
}

@media (prefers-reduced-motion: reduce) {
	.ip-chrono-mini-point { animation: none !important; }
}

/* Sur mobile, le mot doux est déjà dans ce coin-ci sur les petits écrans
   les plus étroits : on remonte légèrement pour ne jamais les superposer. */
@media (max-width: 480px) {
	.ip-chrono-mini {
		left: 14px;
		bottom: 14px;
		padding: 7px 12px 7px 10px;
	}
	.ip-chrono-mini-temps { font-size: 12.5px; }
}
