/* =========================================================================
   Maureen Gerby — feuille de style
   Charte : prune, mauve, rose bois et rose clair sur neutres teintés mauve.
   Layout inspiré de marclevy.com : le livre d'abord, en très grand.
   ========================================================================= */

:root {
	/* Les quatre couleurs de la charte */
	--prune:         #785589;   /* action principale, barre de navigation */
	--mauve:         #977390;   /* action secondaire */
	--rose:          #AC7B7D;   /* accent chaud */
	--rose-clair:    #BB8A89;   /* survol, pastilles */

	/* Déclinaisons */
	--prune-sombre:  #63456F;
	--prune-tres-sombre: #2E2530;
	--prune-voile:   #EEE6F1;
	--mauve-voile:   #EDE5EC;
	--rose-voile:    #F7ECEC;

	/* Neutres teintés vers le mauve : un gris neutre jurerait avec la charte */
	--fond:          #FAF7F9;
	--fond-chaud:    #F2EAEF;
	--surface:       #FFFFFF;
	--encre:         #2E2530;
	--encre-douce:   #665C69;
	--discret:       #7B707E;
	--filet:         #E8DFE6;

	--or:            #BE9552;   /* étoiles d'avis, et rien d'autre */
	--lueur-rose:    #F3E2E6;
	--lueur-mauve:   #EBE0F0;

	/* Ombres teintées prune : un gris neutre trahirait la palette. */
	--ombre-douce:   0 6px 20px rgba(70, 50, 75, .08);
	--ombre-carte:   0 10px 30px rgba(70, 50, 75, .10);
	--ombre-livre:   0 18px 40px rgba(55, 38, 62, .30);

	--rayon:         18px;
	--rayon-large:   24px;

	--serif:         "Marcellus", "Optima", Palatino, Georgia, serif;
	--sans:          "Nunito Sans", "Avenir Next", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

	/* Aucune cible tactile sous 44 px. */
	--touche:        44px;
	--touche-large:  56px;

	--gouttiere:     22px;
	--largeur-max:   1180px;
	--hauteur-nav:   64px;
}

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

body {
	margin: 0;
	background: var(--fond);
	color: var(--encre);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--prune); text-decoration: none; }
a:hover { color: var(--mauve); }

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--prune);
	outline-offset: 2px;
	border-radius: 4px;
}

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.18;
	margin: 0;
	text-wrap: balance;
}

p { margin: 0 0 1em; }

.conteneur {
	width: 100%;
	max-width: var(--largeur-max);
	margin-inline: auto;
	padding-inline: var(--gouttiere);
}

.evitement {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--encre);
	color: var(--fond);
}
.evitement:focus { left: 0; color: var(--fond); }

.surtitre {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--discret);
	margin: 0;
	/* La classe doit rendre pareil quelle que soit la balise qui la porte :
	   posée sur un titre, elle hériterait sinon de la police à empattements. */
	font-family: inherit;
}

/* Surtitre qui tient lieu de titre de section.
   Ailleurs, un surtitre est une étiquette posée au-dessus d'un grand titre et
   onze pixels lui suffisent. Quand il est seul — « L'histoire » sur la fiche
   produit — il porte le titre à lui tout seul et doit peser davantage. */
.surtitre--section {
	font-size: 14px;
	color: var(--encre-douce);
}

/* =========================================================================
   Bandeau d'ouverture
   ========================================================================= */

.banniere {
	position: relative;
	/* Trois quarts de l'écran : le dernier quart laisse voir la barre de
	   navigation, ce qui invite à descendre. 100svh tient compte de la barre
	   d'adresse des navigateurs mobiles, qui fausse 100vh. */
	min-height: 75svh;
	display: flex;
	align-items: center;
	padding: 40px 0 32px;
	background: var(--fond-chaud);
	text-align: center;
	overflow: hidden;
}

.banniere__lueur {
	position: absolute;
	top: -20%;
	left: 50%;
	width: min(900px, 140%);
	height: 90%;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center, var(--lueur-rose) 0%, rgba(243, 226, 230, 0) 70%);
	pointer-events: none;
}

.banniere__interieur { position: relative; }

/* Sans aucun livre, le bandeau se resserre : sinon il garderait la hauteur
   prévue pour des couvertures absentes. */
.banniere__interieur[data-livres="0"] { padding-block: 10px; }
.banniere[data-vide] { min-height: 0; }

/* Les couvertures, en éventail. Elles se chevauchent légèrement pour former
   un seul objet, comme une pile posée. */
.banniere__livres {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 0;
	margin-bottom: 30px;
}
.banniere__livre { display: block; flex: none; }
.banniere__livre img {
	display: block;
	width: min(38vw, 190px);
	height: auto;
	/* Les visuels sont détourés, au format du livre : aucun recadrage, et une
	   ombre qui suit la forme plutôt que la boîte. Une box-shadow dessinerait
	   un rectangle autour du livre. */
	filter: drop-shadow(0 14px 22px rgba(55, 38, 62, .34));
	transition: transform .25s ease;
}
.banniere__livre:hover img { transform: translateY(-6px); }

/* La composition suit le nombre de livres choisis dans l'administration.
   Un livre seul se présente de face et en grand ; à plusieurs, ils se
   chevauchent en éventail, le central devant. */

/* Un seul : il occupe toute la place. */
.banniere__livres[data-nb="1"] .banniere__livre img { width: min(52vw, 250px); }

/* Deux : légèrement inclinés l'un vers l'autre. */
.banniere__livres[data-nb="2"] .banniere__livre:nth-child(1) img { transform: rotate(-4deg) translateX(8%); }
.banniere__livres[data-nb="2"] .banniere__livre:nth-child(2) img { transform: rotate(4deg) translateX(-8%); }
.banniere__livres[data-nb="2"] .banniere__livre:nth-child(1):hover img { transform: rotate(-4deg) translateX(8%) translateY(-6px); }
.banniere__livres[data-nb="2"] .banniere__livre:nth-child(2):hover img { transform: rotate(4deg) translateX(-8%) translateY(-6px); }

/* Trois : celui du milieu devant, les deux autres inclinés derrière. */
.banniere__livres[data-nb="3"] .banniere__livre:nth-child(1) img { transform: rotate(-5deg) translateX(14%); width: min(30vw, 150px); }
.banniere__livres[data-nb="3"] .banniere__livre:nth-child(2) img { position: relative; z-index: 2; }
.banniere__livres[data-nb="3"] .banniere__livre:nth-child(3) img { transform: rotate(5deg) translateX(-14%); width: min(30vw, 150px); }
.banniere__livres[data-nb="3"] .banniere__livre:nth-child(1):hover img { transform: rotate(-5deg) translateX(14%) translateY(-6px); }
.banniere__livres[data-nb="3"] .banniere__livre:nth-child(3):hover img { transform: rotate(5deg) translateX(-14%) translateY(-6px); }

/* Quatre ou cinq sur un téléphone : ils se chevauchent franchement, comme des
   livres posés en pile. Côte à côte ils sortiraient de l'écran — cinq fois
   20 vw dépassent déjà la largeur utile une fois les marges retirées. */
.banniere__livres[data-nb="4"] .banniere__livre img { width: min(21vw, 118px); }
.banniere__livres[data-nb="5"] .banniere__livre img { width: min(18vw, 100px); }
.banniere__livres[data-nb="4"] .banniere__livre + .banniere__livre img { margin-left: -14%; }
.banniere__livres[data-nb="5"] .banniere__livre + .banniere__livre img { margin-left: -18%; }

/* Le premier livre passe devant, puis chacun derrière le précédent : la pile
   se lit de gauche à droite au lieu de s'empiler au hasard. */
.banniere__livres[data-nb="4"] .banniere__livre,
.banniere__livres[data-nb="5"] .banniere__livre { position: relative; }
.banniere__livres[data-nb="4"] .banniere__livre:nth-child(1),
.banniere__livres[data-nb="5"] .banniere__livre:nth-child(1) { z-index: 5; }
.banniere__livres[data-nb="4"] .banniere__livre:nth-child(2),
.banniere__livres[data-nb="5"] .banniere__livre:nth-child(2) { z-index: 4; }
.banniere__livres[data-nb="4"] .banniere__livre:nth-child(3),
.banniere__livres[data-nb="5"] .banniere__livre:nth-child(3) { z-index: 3; }
.banniere__livres[data-nb="4"] .banniere__livre:nth-child(4),
.banniere__livres[data-nb="5"] .banniere__livre:nth-child(4) { z-index: 2; }

/* Filet de sécurité, quel que soit le nombre : la rangée ne sort jamais. */
.banniere__livres { max-width: 100%; flex-wrap: nowrap; }

.banniere__surtitre {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--prune);
	margin: 0;
}
.banniere__titre {
	font-size: clamp(32px, 7vw, 58px);
	letter-spacing: .01em;
	margin-top: 12px;
}
.banniere__accroche {
	font-size: clamp(15px, 2.2vw, 18px);
	line-height: 1.6;
	color: var(--encre-douce);
	max-width: 46ch;
	margin: 0 auto;
}
.banniere__action { margin-top: 26px; max-width: 340px; }

/* =========================================================================
   Barre de navigation
   Elle vit dans le flux — donc sous le bandeau sur l'accueil — puis se colle
   en haut au défilement, en reprenant le fond de la page.
   ========================================================================= */

.nav-repere { height: 0; }

.nav {
	position: sticky;
	top: 0;
	z-index: 40;
	/* La prune de la charte, en aplat plein : c'est la couleur la plus foncée
	   des quatre, donc la seule qui porte du texte blanc lisiblement (6,07). */
	background: var(--prune);
	color: #FFF3E9;
	border-block: 1px solid transparent;
	transition: background-color .25s ease, box-shadow .25s ease;
}

/* Une fois collée, la même prune assombrie, détachée d'une ombre pour se
   distinguer du contenu qui défile dessous. */
.nav--collee {
	background: var(--prune-sombre);
	box-shadow: 0 4px 20px rgba(55, 38, 62, .26);
}

/* Texte blanc pur au repos : le meilleur contraste possible sur la prune. */
.nav__logo, .nav__liens a, .nav .bouton-icone { color: #FFFFFF; }

/* Au survol, on ne peut pas simplement foncer le texte : du noir sur la prune
   tomberait à 2,87, moins lisible que le blanc. Le lien reçoit donc une
   pastille rose clair et un texte prune très sombre — 4,99, et le changement
   se voit d'autant mieux qu'il porte sur le fond. */
.nav__liens a {
	border-radius: 22px;
	padding: 9px 16px;
	transition: background-color .18s ease, color .18s ease;
}
.nav__liens a:hover,
.nav__liens a:focus-visible {
	background: var(--rose-clair);
	color: var(--prune-tres-sombre);
}
.nav__liens a[aria-current="page"] {
	background: rgba(255, 255, 255, .16);
	color: #FFFFFF;
}
.nav__liens a[aria-current="page"]:hover {
	background: var(--rose-clair);
	color: var(--prune-tres-sombre);
}

.nav .bouton-icone:hover,
.nav .bouton-icone:focus-visible {
	background: var(--rose-clair);
	color: var(--prune-tres-sombre);
}
.nav__logo:hover { color: var(--rose-clair); }

.nav .pastille { background: #FFFFFF; color: var(--prune); }

.nav__interieur {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: var(--hauteur-nav);
}

.nav__logo {
	font-family: var(--serif);
	font-size: clamp(16px, 4.4vw, 20px);
	letter-spacing: .02em;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav__liens { display: none; }
.nav__liens ul {
	display: flex;
	align-items: center;
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nav__liens a {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.nav__actions { display: flex; align-items: center; gap: 4px; flex: none; }

.bouton-icone {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--touche);
	height: var(--touche);
	color: var(--mauve);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.bouton-icone:hover { color: var(--prune); }

.pastille {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: var(--prune);
	color: #FFFFFF;
	border-radius: 9px;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

/* Menu mobile */
.menu-mobile {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: var(--fond);
	overflow-y: auto;
}
.menu-mobile[hidden] { display: none; }
.menu-mobile__haut {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--hauteur-nav);
}
.menu-mobile ul { list-style: none; margin: 0; padding: 0; }
.menu-mobile li + li { border-top: 1px solid var(--filet); }
.menu-mobile a {
	display: block;
	padding: 20px 0;
	font-family: var(--serif);
	font-size: 24px;
	color: var(--encre);
}

/* =========================================================================
   Boutons
   ========================================================================= */

.bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: var(--touche-large);
	padding: 0 26px;
	font-family: var(--sans);
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	border: 0;
	border-radius: calc(var(--touche-large) / 2);
	cursor: pointer;
	transition: background-color .2s ease, transform .12s ease;
}
.bouton:active { transform: translateY(1px); }

.bouton--principal {
	background: var(--prune);
	color: #FFFFFF;
	box-shadow: 0 10px 22px rgba(120, 85, 137, .30);
}
.bouton--principal:hover { background: var(--prune-sombre); color: #FFFFFF; }

.bouton--mauve { background: var(--mauve); color: #FFFFFF; }
.bouton--mauve:hover { background: #7E5F7A; color: #FFFFFF; }

.bouton--doux {
	min-height: var(--touche);
	width: auto;
	padding: 0 18px;
	font-size: 13px;
	background: var(--prune-voile);
	color: var(--prune);
	border-radius: calc(var(--touche) / 2);
}
.bouton--doux:hover { background: #E3D6E6; color: var(--prune); }

/* =========================================================================
   Sections courantes
   ========================================================================= */

.section { padding: 56px 0; }
.section--chaude { background: var(--fond-chaud); }
.section__titre { font-size: clamp(26px, 4vw, 34px); }
.section__intro {
	font-size: 15.5px;
	line-height: 1.72;
	color: var(--encre-douce);
	max-width: 52ch;
	margin: 12px auto 0;
}
.centre { text-align: center; }

/* Grille de couvertures, à la manière des « dernières parutions » */
.grille-livres {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 28px 20px;
	margin-top: 34px;
}
.carte-livre { text-align: center; }
.carte-livre img {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 10px 18px rgba(55, 38, 62, .28));
	transition: transform .25s ease;
}
.carte-livre:hover img { transform: translateY(-6px); }
.carte-livre__surtitre {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--discret);
	margin: 14px 0 0;
}
.carte-livre__titre {
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.26;
	margin: 5px 0 0;
	color: var(--encre);
}
.carte-livre__prix {
	font-size: 15px;
	font-weight: 700;
	color: var(--prune);
	margin: 8px 0 0;
	font-variant-numeric: tabular-nums;
}
.carte-livre__prix del { color: var(--discret); font-weight: 400; margin-right: 6px; }
.carte-livre__prix ins { text-decoration: none; }

/* L'autrice */
.autrice {
	display: flex;
	flex-direction: column;
	gap: 26px;
	align-items: center;
	text-align: center;
}
.autrice__photo img {
	width: min(70vw, 300px);
	border-radius: var(--rayon-large);
	box-shadow: var(--ombre-carte);
}
.autrice__texte p {
	font-size: 15.5px;
	line-height: 1.78;
	color: var(--encre-douce);
	max-width: 56ch;
	margin-inline: auto;
}

/* Avis */
.avis {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin-top: 30px;
}
.avis__carte {
	margin: 0;
	padding: 24px;
	background: var(--surface);
	border-radius: var(--rayon);
	box-shadow: var(--ombre-douce);
}
.etoiles { display: flex; gap: 2px; color: var(--or); }
.avis__titre { font-family: var(--serif); font-size: 18px; line-height: 1.4; margin: 12px 0 0; }
.avis__texte { font-size: 14px; line-height: 1.66; color: var(--encre-douce); margin: 8px 0 0; }
.avis__auteur { font-size: 12px; color: var(--discret); margin: 12px 0 0; letter-spacing: .04em; }

/* Pied de page */
.pied {
	margin-top: 60px;
	padding: 40px 0 44px;
	background: var(--fond-chaud);
	text-align: center;
}
.pied__nom { font-family: var(--serif); font-size: 18px; }
.pied__ligne { font-size: 12.5px; color: var(--discret); margin: 8px 0 0; }
.pied nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 24px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}
.pied nav a { font-size: 13px; color: var(--encre-douce); }
.pied nav a:hover { color: var(--prune); }

/* =========================================================================
   Grand écran
   ========================================================================= */

@media (min-width: 900px) {
	:root { --gouttiere: 40px; --hauteur-nav: 72px; }

	.nav__liens { display: block; }
	.nav__burger { display: none; }

	/* Sur grand écran : les couvertures à gauche, le texte à droite.
	   Les livres sont bornés à 40 % de la hauteur d'écran — c'est la hauteur
	   qui commande, la largeur suit le format 3/5. */
	.banniere { min-height: 0; padding: 56px 0; }
	.banniere__interieur {
		display: grid;
		/* La colonne des livres se dimensionnait sur la largeur NATURELLE des
		   fichiers — 530 px chacun — et laissait 156 px au texte, qui débordait.
		   On borne donc les livres et on garantit au texte une largeur minimale
		   quel que soit le nombre de couvertures. */
		grid-template-columns: minmax(0, auto) minmax(340px, 1fr);
		gap: 56px;
		align-items: center;
		text-align: left;
	}
	.banniere__livres { max-width: 52vw; }

	/* Un ou deux livres : on garde la ligne unique — couvertures à gauche,
	   texte et bouton à droite — mais le couple est plus étroit qu'à trois
	   livres. Les deux colonnes se dimensionnent donc sur leur contenu et
	   l'ensemble est centré dans la page, au lieu d'être poussé à gauche par
	   une colonne de texte élastique. */
	.banniere__interieur[data-livres="1"],
	.banniere__interieur[data-livres="2"] {
		grid-template-columns: auto minmax(300px, 440px);
		justify-content: center;
		gap: 48px;
	}

	/* Aucun livre : là seulement, une colonne unique centrée — il n'y a plus
	   rien à mettre en regard. */
	.banniere__interieur[data-livres="0"] {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}
	.banniere__interieur[data-livres="0"] .banniere__texte { max-width: 56ch; }
	.banniere__interieur[data-livres="0"] .banniere__accroche { margin-inline: auto; }
	.banniere__livres { margin-bottom: 0; }
	.banniere__livre img { width: auto; height: 40svh; }
	.banniere__livres[data-nb="1"] .banniere__livre img { width: auto; height: 44svh; }
	.banniere__livres[data-nb="3"] .banniere__livre:nth-child(1) img,
	.banniere__livres[data-nb="3"] .banniere__livre:nth-child(3) img { width: auto; height: 33svh; }
	.banniere__livres[data-nb="4"] .banniere__livre img { width: auto; height: 32svh; }
	.banniere__livres[data-nb="5"] .banniere__livre img { width: auto; height: 28svh; }

	.banniere__texte { max-width: 46ch; }
	.banniere__accroche { margin-inline: 0; }
	.banniere__action { max-width: 320px; }

	.grille-livres { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 40px 28px; }

	.autrice { flex-direction: row; gap: 60px; text-align: left; }
	.autrice__texte p { margin-inline: 0; }

	.avis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}

/* =========================================================================
   Boutique et fiche produit
   ========================================================================= */

.bandeau-franco {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 18px 0 0;
	padding: 12px 18px;
	background: var(--mauve-voile);
	color: var(--encre);
	border-radius: var(--rayon);
	font-size: 13.5px;
	font-weight: 600;
}
.bandeau-franco svg { color: var(--mauve); flex: none; }

.filtres {
	display: flex;
	gap: 8px;
	margin-top: 22px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
}
.filtres::-webkit-scrollbar { display: none; }
.filtre {
	display: inline-flex;
	align-items: center;
	flex: none;
	min-height: var(--touche);
	padding: 0 18px;
	background: var(--surface);
	border: 1px solid var(--filet);
	border-radius: calc(var(--touche) / 2);
	font-size: 13px;
	font-weight: 700;
	color: var(--encre-douce);
	white-space: nowrap;
}
.filtre:hover { color: var(--prune); border-color: var(--prune-voile); }
.filtre--actif { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.filtre--actif:hover { color: var(--fond); }

.fiche__grille { display: grid; gap: 30px; }
.fiche__visuel { display: flex; justify-content: center; }
.fiche__visuel img {
	width: min(64vw, 280px);
	height: auto;
	filter: drop-shadow(0 18px 30px rgba(55, 38, 62, .34));
}
.fiche__titre { font-size: clamp(28px, 6vw, 40px); margin-top: 10px; }
.fiche__note { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; }
.fiche__accroche {
	font-size: 15.5px;
	line-height: 1.72;
	color: var(--encre-douce);
	margin-top: 16px;
}

.carte-achat {
	margin-top: 22px;
	padding: 24px;
	background: var(--surface);
	border-radius: var(--rayon-large);
	box-shadow: var(--ombre-carte);
}
.carte-achat__prix {
	font-family: var(--serif);
	font-size: 32px;
	margin: 0;
	font-variant-numeric: tabular-nums;
}
.carte-achat__prix del { font-size: 20px; color: var(--discret); margin-right: 10px; }
.carte-achat__prix ins { text-decoration: none; }

.promesses {
	list-style: none;
	margin: 18px 0 0;
	padding: 18px 0 0;
	border-top: 1px solid var(--filet);
	display: flex;
	flex-direction: column;
	gap: 11px;
}
.promesses li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 600;
}
.promesses svg { color: var(--prune); flex: none; }

.champ-dedicace {
	margin: 20px 0 0;
	padding: 18px;
	background: var(--prune-voile);
	border-radius: var(--rayon);
}
.champ-dedicace label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 700;
	color: var(--prune);
}
.champ-dedicace__aide { font-size: 13px; line-height: 1.5; color: var(--encre-douce); margin: 8px 0 0; }
.champ-dedicace input {
	width: 100%;
	height: 48px;
	margin-top: 12px;
	padding: 0 16px;
	font: inherit;
	font-size: 15px;
	color: var(--encre);
	background: var(--surface);
	border: 1px solid transparent;
	border-radius: 14px;
}
.champ-dedicace input:focus {
	outline: none;
	border-color: var(--prune);
	box-shadow: 0 0 0 3px rgba(120, 85, 137, .20);
}

.ligne-achat { display: flex; gap: 10px; margin-top: 18px; }
.ligne-achat .bouton { flex: 1; }

.quantite {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--filet);
	border-radius: calc(var(--touche) / 2);
}
.quantite select {
	height: var(--touche);
	min-width: 78px;
	padding: 0 36px 0 18px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--encre);
	background: none;
	border: 0;
	border-radius: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.quantite svg {
	position: absolute;
	right: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--encre-douce);
	pointer-events: none;
}

.rupture { margin: 18px 0 0; font-size: 14px; font-weight: 700; color: var(--prune); }

.texte-riche { font-size: 16px; line-height: 1.78; color: var(--encre-douce); }
.texte-riche > * { max-width: 68ch; }
.texte-riche--centre > * { margin-inline: auto; }
.texte-riche h2, .texte-riche h3 { color: var(--encre); margin: 30px 0 12px; }
/* Les descriptions reprises de WordPress portent des styles collés depuis un
   traitement de texte : le système de design doit l'emporter. */
.texte-riche [style] {
	font-family: inherit !important;
	font-size: inherit !important;
	color: inherit !important;
	background: none !important;
}

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

@media (min-width: 900px) {
	.fiche__grille { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 60px; align-items: start; }
	.fiche__visuel img { width: 100%; max-width: 400px; }
}

/* =========================================================================
   Panier
   ========================================================================= */

.jauge {
	margin: 24px 0 26px;
	padding: 18px 20px;
	background: linear-gradient(150deg, var(--mauve-voile) 0%, var(--prune-voile) 100%);
	border-radius: var(--rayon);
}
.jauge__texte { font-size: 13.5px; font-weight: 600; margin: 0; }
.jauge__texte strong { color: var(--mauve); }
.jauge__texte--atteint { color: var(--mauve); }
.jauge__piste {
	height: 7px;
	margin-top: 12px;
	background: var(--surface);
	border-radius: 4px;
	overflow: hidden;
}
.jauge__remplissage { height: 100%; background: var(--mauve); border-radius: 4px; }
.jauge__echelle {
	display: flex;
	justify-content: space-between;
	margin-top: 7px;
	font-size: 11px;
	color: var(--encre-douce);
	font-variant-numeric: tabular-nums;
}

.panier { list-style: none; margin: 0; padding: 0; }
.panier__ligne {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 4px 16px;
	padding: 18px;
	background: var(--surface);
	border-radius: var(--rayon);
	box-shadow: var(--ombre-douce);
}
.panier__ligne + .panier__ligne { margin-top: 12px; }
.panier__visuel { grid-row: span 2; align-self: start; }
.panier__visuel img {
	width: 76px;
	height: auto;
	filter: drop-shadow(0 6px 10px rgba(55, 38, 62, .26));
}
.panier__titre { font-family: var(--serif); font-size: 17px; line-height: 1.3; margin: 0; }
.panier__titre a { color: var(--encre); }
.panier__titre a:hover { color: var(--prune); }
.panier__dedicace {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 8px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--prune);
}
.panier__pied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
}
.panier__prix { font-family: var(--serif); font-size: 19px; font-variant-numeric: tabular-nums; }

.totaux {
	margin-top: 22px;
	padding: 22px;
	background: var(--surface);
	border-radius: var(--rayon-large);
	box-shadow: var(--ombre-carte);
	max-width: 420px;
	margin-left: auto;
}
.totaux__ligne {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 14.5px;
	color: var(--encre-douce);
	font-variant-numeric: tabular-nums;
}
.totaux__ligne + .totaux__ligne { margin-top: 11px; }
.totaux__ligne--total {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--filet);
	font-family: var(--serif);
	font-size: 20px;
	color: var(--encre);
}
.totaux__ligne--total span:last-child { font-size: 26px; }
.totaux .bouton { margin-top: 20px; }
.totaux__note { text-align: center; font-size: 13.5px; margin: 12px 0 0; }

/* =========================================================================
   13. Contenu rédigé dans l'éditeur
   Les pages écrites depuis l'administration peuvent contenir titres, listes,
   citations et images. Elles doivent rester lisibles sans réglage manuel.
   ========================================================================= */

.texte-riche h2 { font-size: clamp(22px, 3.4vw, 28px); color: var(--encre); margin: 34px 0 12px; }
.texte-riche h3 { font-size: clamp(19px, 2.8vw, 22px); color: var(--encre); margin: 28px 0 10px; }
.texte-riche ul, .texte-riche ol { margin: 0 0 16px; padding-left: 24px; max-width: 68ch; }
.texte-riche li { margin-bottom: 6px; }
.texte-riche blockquote {
	margin: 24px 0;
	padding: 6px 0 6px 20px;
	border-left: 3px solid var(--prune);
	font-family: var(--serif);
	font-size: clamp(17px, 2.4vw, 20px);
	line-height: 1.5;
	color: var(--encre);
	max-width: 62ch;
}
.texte-riche hr { border: 0; border-top: 1px solid var(--filet); margin: 32px 0; max-width: 68ch; }

/* Les images insérées dans le texte : jamais plus larges que la colonne, et
   accompagnées de leur légende quand il y en a une. */
.texte-riche figure { margin: 28px 0; max-width: 100%; }
.texte-riche figure img,
.texte-riche > img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--rayon);
	box-shadow: var(--ombre-douce);
}
/* Le conteneur doit englober ses images flottantes.
   Sans cela, une image placée en fin de texte dépasse de sa section et vient
   chevaucher ce qui suit. */
.texte-riche::after {
	content: "";
	display: block;
	clear: both;
}

/* Tailles d'image posées depuis l'éditeur.
   En pourcentage et non en pixels : une largeur fixe choisie sur un grand
   écran déborderait sur un téléphone. */
.texte-riche figure.mg-img--petite { max-width: min(38%, 320px); }
.texte-riche figure.mg-img--moyenne { max-width: min(68%, 560px); }
.texte-riche figure.mg-img--pleine { max-width: 100%; }

/* Habillage : à gauche ou à droite, le texte coule autour de l'image.
   C'est ce qu'on attend d'une image posée dans un article — sans float, elle
   se contente de s'aligner et laisse une bande vide en face. */
.texte-riche figure.mg-img--gauche {
	float: left;
	margin: 6px 28px 18px 0;
}
.texte-riche figure.mg-img--droite {
	float: right;
	margin: 6px 0 18px 28px;
}
.texte-riche figure.mg-img--centre {
	float: none;
	margin-inline: auto;
}

/* Une image pleine largeur ne s'habille pas : il ne resterait pas de place
   pour le texte à côté. */
.texte-riche figure.mg-img--pleine {
	float: none;
	margin-inline: auto;
}

.texte-riche figure.mg-img--centre figcaption { text-align: center; }

/* Le texte qui suit ne doit jamais chevaucher une image flottante plus haute
   que lui : les titres et les blocs suivants repartent sous l'image. */
.texte-riche h2,
.texte-riche h3,
.texte-riche blockquote,
.texte-riche hr { clear: both; }

/* Sur téléphone, une image à 38 % de large devient illisible et le texte qui
   l'habille tombe à trois mots par ligne : tout repasse pleine largeur. */
@media (max-width: 620px) {
	.texte-riche figure.mg-img--petite,
	.texte-riche figure.mg-img--moyenne { max-width: 100%; }
	.texte-riche figure.mg-img--gauche,
	.texte-riche figure.mg-img--droite {
		float: none;
		margin-inline: auto;
	}
}

.texte-riche figcaption {
	margin-top: 10px;
	font-size: 13.5px;
	font-style: italic;
	color: var(--discret);
	max-width: 62ch;
}

@media (min-width: 900px) {
	/* Une image seule respire mieux légèrement débordante de la colonne de
	   lecture, sans jamais sortir du conteneur. */
	.texte-riche figure { max-width: min(80ch, 100%); }
}

/* --- Bandeau de consentement -------------------------------------------- */

/* Une barre posée en bas, pas un panneau qui recouvre la page : une lectrice
   arrivée par une publicité doit pouvoir commencer à lire sans rien fermer. */
.cookies {
	position: fixed;
	left: 50%;
	bottom: 16px;
	z-index: 80;
	width: min(680px, calc(100vw - 32px));
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 14px 18px;
	border: 1px solid var(--filet);
	border-radius: 14px;
	background: var(--surface);
	box-shadow: 0 12px 40px rgba(60, 34, 62, .18);

	/* Point de départ de l'animation. La barre monte doucement plutôt que
	   d'apparaître d'un coup. */
	transform: translate(-50%, calc(100% + 24px));
	opacity: 0;
	transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .45s ease;
}

.cookies.est-visible { transform: translate(-50%, 0); opacity: 1; }

.cookies__texte {
	flex: 1;
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--encre-douce);
}

.cookies__texte a { color: var(--prune); }

.cookies__actions { display: flex; gap: 8px; flex: none; }

.cookies__bouton {
	appearance: none;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	/* 44 px de haut : en dessous, la cible devient difficile à viser au doigt. */
	min-height: 44px;
	padding: 0 18px;
	border-radius: 10px;
	border: 1px solid var(--filet);
	background: transparent;
	color: var(--encre-douce);
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s ease, color .2s ease;
}

.cookies__bouton:hover { background: var(--fond); }

.cookies__bouton--oui {
	background: var(--prune);
	border-color: var(--prune);
	color: #fff;
}

.cookies__bouton--oui:hover { background: var(--prune-sombre); color: #fff; }

/* Sur téléphone, la barre passe en colonne et les deux boutons se partagent
   la largeur — côte à côte ils deviendraient trop étroits pour le pouce. */
@media (max-width: 620px) {
	.cookies {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		bottom: 10px;
		width: calc(100vw - 20px);
	}
	.cookies__actions > * { flex: 1; }
}

/* Refuser doit rester aussi lisible qu'accepter : on ne baisse jamais son
   contraste pour pousser à l'acceptation. */
@media (prefers-reduced-motion: reduce) {
	.cookies { transition: opacity .01ms; transform: translate(-50%, 0); }
}

/* =========================================================================
   Tunnel de commande
   ========================================================================= */

.conteneur--etroit { max-width: 720px; }

.alerte {
	padding: 16px 20px;
	border-radius: var(--rayon);
	margin-bottom: 26px;
}
.alerte p { margin: 0 0 6px; }
.alerte ul { margin: 0; padding-left: 20px; }
.alerte--erreur {
	background: var(--rose-voile);
	border: 1px solid var(--rose-clair);
	color: var(--encre);
}

/* Saisie à gauche, récapitulatif à droite : ne plus voir ce qu'on achète au
   moment de donner son adresse fait renoncer. */
.commande__colonnes {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
	gap: 40px;
	align-items: start;
	margin-top: 32px;
}

.commande__bloc {
	border: 1px solid var(--filet);
	border-radius: var(--rayon);
	background: var(--surface);
	padding: 24px 26px 8px;
	margin: 0 0 22px;
}
.commande__bloc legend {
	font-family: var(--serif);
	font-size: 20px;
	padding: 0 10px;
	color: var(--encre);
}

.champ { margin: 0 0 18px; }
.champ label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--encre);
}
.champ input,
.champ select,
.champ textarea {
	width: 100%;
	font: inherit;
	font-size: 15px;
	/* 44 px : en dessous, un champ se vise mal au doigt et se remplit mal. */
	min-height: var(--touche);
	padding: 10px 14px;
	border: 1px solid var(--filet);
	border-radius: 10px;
	background: var(--fond);
	color: var(--encre);
}
.champ textarea { min-height: 90px; resize: vertical; }
.champ input:focus,
.champ select:focus,
.champ textarea:focus { border-color: var(--mauve); background: var(--surface); }

.champ__aide { display: block; margin-top: 6px; font-size: 13px; color: var(--discret); }
.champ__facultatif { font-weight: 400; color: var(--discret); }

.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.champ-duo .champ--court { max-width: 100%; }

/* La case des conditions de vente : cible large, et la case elle-même reste
   alignée sur la première ligne quand le texte passe à la ligne. */
.champ--case label {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	align-items: start;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}
.champ--case input {
	width: 20px;
	height: 20px;
	min-height: 0;
	margin-top: 2px;
	accent-color: var(--prune);
}

.commande__recap {
	position: sticky;
	top: calc(var(--hauteur-nav) + 16px);
	border: 1px solid var(--filet);
	border-radius: var(--rayon);
	background: var(--surface);
	padding: 24px 26px;
}
.commande__recap-titre {
	font-family: var(--serif);
	font-size: 20px;
	margin: 0 0 18px;
}

.recap-lignes { list-style: none; margin: 0 0 18px; padding: 0; }
.recap-ligne {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid var(--filet);
	font-size: 14.5px;
}
.recap-ligne__q { color: var(--discret); }
.recap-ligne__dedicace {
	display: block;
	font-size: 13px;
	color: var(--discret);
	font-style: italic;
}
.recap-ligne__prix { white-space: nowrap; font-variant-numeric: tabular-nums; }

.recap-totaux { margin: 0 0 20px; }
.recap-totaux > div {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14.5px;
}
.recap-totaux dt, .recap-totaux dd { margin: 0; }
.recap-totaux dd { font-variant-numeric: tabular-nums; }
.recap-totaux__total {
	border-top: 1px solid var(--filet);
	margin-top: 8px;
	padding-top: 12px !important;
	font-size: 18px !important;
	font-weight: 700;
	color: var(--encre);
}

.commande__payer { width: 100%; justify-content: center; margin-top: 4px; }
.commande__rassurance {
	margin: 14px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--discret);
	text-align: center;
}
.commande__retour { margin: 14px 0 0; text-align: center; font-size: 14px; }

/* --- Confirmation ------------------------------------------------------- */

.carte-merci {
	text-align: left;
	border: 1px solid var(--filet);
	border-radius: var(--rayon);
	background: var(--surface);
	padding: 24px 26px;
	margin: 30px 0 24px;
}
.merci-livraison { color: var(--encre-douce); font-size: 15px; line-height: 1.7; }
.merci-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 28px;
}

@media (max-width: 900px) {
	.commande__colonnes { grid-template-columns: minmax(0, 1fr); gap: 26px; }
	/* Collé en haut, le récapitulatif mangerait l'écran d'un téléphone. */
	.commande__recap { position: static; }
}

@media (max-width: 520px) {
	.champ-duo { grid-template-columns: 1fr; }
}

/* =========================================================================
   Espace acheteur
   ========================================================================= */

.formulaire-etroit {
	max-width: 420px;
	margin: 28px auto 0;
	text-align: left;
}

.largeur-pleine { width: 100%; justify-content: center; }

.bouton--danger {
	background: #A6414B;
	color: #FFFFFF;
	border-color: #A6414B;
}
.bouton--danger:hover { background: #8E3540; color: #FFFFFF; }

.compte-liens {
	display: flex;
	gap: 22px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 30px;
	font-size: 14.5px;
}
.compte-liens__danger { color: #A6414B; }
.compte-liens__danger:hover { color: #8E3540; }

/* --- Liste des commandes ------------------------------------------------ */

.commandes-liste { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }

.commande-carte {
	border: 1px solid var(--filet);
	border-radius: var(--rayon);
	background: var(--surface);
	padding: 18px 22px;
}
.commande-carte__haut,
.commande-carte__bas {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.commande-carte__bas { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--filet); }
.commande-carte__date { color: var(--discret); margin-left: 10px; font-size: 14px; }
.commande-carte__total { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Reprise des étiquettes de l'administration : même sens, même apparence. */
.etiquette {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
}
.etiquette--ok { background: var(--mauve-voile); color: #4A3A52; }
.etiquette--brouillon { background: var(--fond-chaud); color: var(--discret); }

/* --- Encadré d'information ---------------------------------------------- */

.carte-info {
	border: 1px solid var(--filet);
	border-radius: var(--rayon);
	background: var(--surface);
	padding: 22px 26px;
	margin: 26px 0;
}
.carte-info p { margin: 0 0 8px; }
.carte-info ul { margin: 0 0 18px; padding-left: 20px; color: var(--encre-douce); }
.carte-info li { margin-bottom: 4px; }
.carte-info__note {
	margin: 0;
	padding-top: 14px;
	border-top: 1px solid var(--filet);
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--discret);
}

.merci-compte {
	margin: 26px auto 0;
	max-width: 46ch;
	padding: 16px 20px;
	border: 1px dashed var(--filet);
	border-radius: var(--rayon);
	font-size: 14.5px;
	color: var(--encre-douce);
}

/* Bandeau de mode test. Rouge franc et pleine largeur : il doit être
   impossible de le confondre avec un élément de la charte. */
.bandeau-essai {
	position: relative;
	z-index: 90;
	margin: 0;
	padding: 10px 20px;
	background: #A6414B;
	color: #FFFFFF;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
}
.bandeau-essai strong { text-transform: uppercase; letter-spacing: .06em; }

/* Champ leurre anti-robot.
   Ni display:none ni hidden : certains robots ignorent précisément ces
   déclarations pour repérer les pièges. On le sort de l'écran, ce qui le rend
   invisible sans l'annoncer. */
.leurre {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* La signature du pied de page : plus discrète que le reste, mais lisible.
   L'émoji garde sa couleur propre quand la ligne est atténuée. */
.pied__signature {
	margin-top: 18px;
	font-size: 13.5px;
	opacity: .82;
}

/* --- Pastille « PDF gratuit » -------------------------------------------- */

/* L'enveloppe se règle sur l'image et non sur son conteneur : sur la fiche
   produit, le conteneur est centré et plus large que le livre, si bien qu'une
   pastille calée sur lui flotterait à côté du vide. */
.visuel-produit {
	position: relative;
	display: inline-block;
	max-width: 100%;
}

/* Dans les listes, la carte occupe toute la colonne : l'enveloppe aussi. */
.carte-livre .visuel-produit { display: block; }

.pastille-freebie {
	position: absolute;
	top: 6%;
	right: -6px;
	z-index: 2;

	padding: 6px 14px;
	border-radius: 999px;
	background: #C0392B;
	color: #FFFFFF;

	font-size: 11px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	white-space: nowrap;
	line-height: 1;

	transform: rotate(15deg);
	transform-origin: center;
	/* L'ombre suit la pilule et non sa boîte : sans elle, la pastille semble
	   collée à plat sur la couverture. */
	box-shadow: 0 4px 10px rgba(70, 20, 20, .32);
	pointer-events: none;
}

/* La carte soulève son image au survol ; la pastille doit suivre, sinon elle
   se décroche du livre. */
.carte-livre .visuel-produit { transition: transform .25s ease; }
.carte-livre:hover .visuel-produit { transform: translateY(-6px); }
.carte-livre:hover img { transform: none; }

@media (prefers-reduced-motion: reduce) {
	.carte-livre .visuel-produit { transition: none; }
	.carte-livre:hover .visuel-produit { transform: none; }
}

@media (max-width: 520px) {
	.pastille-freebie { font-size: 10px; padding: 5px 11px; letter-spacing: .07em; }
}

/* Sur une fiche payante, la liste des promesses est suivie d'un bloc quantité
   qui porte sa propre marge. Le formulaire de téléchargement n'en a pas : sans
   cette règle, la promesse et le premier champ se touchent. */
.carte-achat--freebie .promesses { margin-bottom: 20px; }
.carte-achat--freebie .champ:last-of-type { margin-bottom: 22px; }
