/* ==========================================================================
   responsive.css — Editions Sources du Nil
   Chargé en DERNIER sur chaque page (après style.css, logo.css et le CSS de la page).

   - À partir de 1280 px : le CSS d'origine s'applique tel quel. Ce fichier n'y
     ajoute que des corrections de défauts (section 1).
   - En dessous de 1280 px : mise en page fluide, écrite « mobile d'abord »
     (section 2 = téléphone, puis paliers 480 / 768 / 1024 px).

   La charte ne change pas : les couleurs et polices d'origine sont seulement
   nommées ci-dessous.
   ========================================================================== */

:root {
	/* Charte (valeurs d'origine, inchangées) */
	--sdn-creme: #FFC;
	--sdn-blanc: #fff;
	--sdn-bleu-nuit: #292E46;
	--sdn-encre: #252940;
	--sdn-bordeaux: #900;
	--sdn-orange-titre: #ed8e11;
	--sdn-orange-bouton: #FF9900;
	--sdn-orange-prix: #ea6f05;
	--sdn-accent: #E15C3A;
	--sdn-vert: #3CB411;
	--sdn-lien: #4D8EFF;
	--sdn-gris-fond: #E5E5E5;
	--sdn-gris-libelle: #C8C2C2;
	--sdn-gris: #858585;
	--sdn-bordure: rgb(200 200 200);
	--sdn-police: 'Roboto', Arial, sans-serif;
	--sdn-police-titre: 'Roboto Slab', Georgia, serif;

	/* Mise en page mobile */
	--sdn-marge: 16px;          /* marge latérale */
	--sdn-tactile: 44px;        /* taille minimale d'une zone tactile */
	--sdn-entete: 64px;         /* hauteur de la barre de menu sur mobile */
	--sdn-hero: 270px;          /* hauteur de l'en-tête image de l'accueil */
	--sdn-titre-page: clamp(26px, 7vw, 36px);

	/* Facteur d'échelle des blocs « ordinateur » d'origine (calc((largeur/1280)*…)) */
	--sdn-k: 1;
}

/* Les blocs d'origine sont dans l'ordre 1920, 1366, 1440, 1536, 1600, 1680, 2560 :
   le bloc 1920 est donc écrasé par le 1680 ; on suit la même logique. */
@media only screen and (min-width: 1366px) { :root { --sdn-k: calc(1366 / 1280); } }
@media only screen and (min-width: 1440px) { :root { --sdn-k: calc(1440 / 1280); } }
@media only screen and (min-width: 1536px) { :root { --sdn-k: calc(1536 / 1280); } }
@media only screen and (min-width: 1600px) { :root { --sdn-k: calc(1600 / 1280); } }
@media only screen and (min-width: 1680px) { :root { --sdn-k: calc(1680 / 1280); } }
@media only screen and (min-width: 2560px) { :root { --sdn-k: calc(2560 / 1280); } }


/* ==========================================================================
   1. CORRECTIONS VALABLES À TOUTES LES LARGEURS
   ========================================================================== */

/* Bouton burger : seulement sur mobile et tablette portrait (voir section 2) */
.burger { display: none; }

/* Focus clavier visible (style.css le supprimait sur tous les boutons) */
.burger:focus-visible,
.nav-links:focus-visible,
.dropbtn:focus-visible,
.modal .close:focus-visible,
#bouttons a:focus-visible,
.searchButton:focus-visible {
	outline: 2px solid var(--sdn-orange-bouton);
	outline-offset: 2px;
}

/* Fenêtre « Qui sommes-nous ? » : au-dessus de tout (le titre, le logo et le menu
   de l'accueil ont des z-index très élevés et passaient devant la fenêtre) */
.modal { z-index: 2147483000; }

/* Fenêtre « Qui sommes-nous ? » : la croix de fermeture était masquée */
.modal .close {
	display: block;
	float: right;
	width: var(--sdn-tactile);
	height: var(--sdn-tactile);
	margin: -12px -12px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: #aaa;
	font: bold 28px/1 var(--sdn-police);
	cursor: pointer;
}
.modal .close:hover,
.modal .close:focus { color: #000; }

/* Pied de page : voir la section 6 en fin de fichier */

/* Menus déroulants du catalogue : s'ouvrent aussi au toucher / clavier */
.dropdown.ouvert .dropdown-content,
.dropdown2.ouvert .dropdown-content { display: block; }

/* Commandes : les 4 icônes (magasin, PayPal, liste, Amazon) étaient écrasées à 0 px */
#poss #boxes { flex: 1 1 0; min-width: 0; }
#poss #img-wrap { justify-content: center; }
#poss #img-wrap img { flex: none; }

/* Carrousel : un clic menait toujours au 3ᵉ livre (la diapositive invisible
   restait au-dessus). La diapositive la plus visible passe maintenant devant. */
.slider .slide1 { animation: fade 24s infinite, sdn-devant1 24s infinite; }
.slider .slide2 { animation: fade2 24s infinite, sdn-devant2 24s infinite; }
.slider .slide3 { animation: fade3 24s infinite, sdn-devant3 24s infinite; }
@keyframes sdn-devant1 { 0%, 16.6% { z-index: 3; } 16.7%, 83.3% { z-index: 1; } 83.4%, 100% { z-index: 3; } }
@keyframes sdn-devant2 { 0%, 16.6% { z-index: 1; } 16.7%, 49.9% { z-index: 3; } 50%, 100% { z-index: 1; } }
@keyframes sdn-devant3 { 0%, 49.9% { z-index: 1; } 50%, 83.3% { z-index: 3; } 83.4%, 100% { z-index: 1; } }

/* Tarifs cachés lus par pay.js : inutile qu'ils réservent de la place */
#hid { display: none; }


/* --- Ordinateur uniquement (1280 px et plus) ----------------------------- */
@media only screen and (min-width: 1280px) {

	/* Accueil : le grand vide entre l'image d'en-tête et le carrousel venait du
	   bas de page réservé de #main, fermé trop tôt par logo.php. L'en-tête prend
	   désormais exactement la hauteur de son image. */
	#main.main-accueil { padding-bottom: 0; }
	.main-accueil #top { height: auto; aspect-ratio: 2580 / 586; }

	/* Carrousel : la position des textes dépendait de la hauteur de l'image
	   (couverture manquante ou image spéciale => textes au-dessus du bandeau).
	   L'image sort du flux, les textes gardent leur place d'origine. */
	.slider #new-book {
		position: absolute;
		top: calc(20px * var(--sdn-k));
		left: 20%;
		z-index: 1;
	}
	.slider h1 { margin-top: calc(251px * var(--sdn-k)); }

	/* Livre : message « paiement en plusieurs fois » juste sous le prix,
	   l'espace d'origine sous le bouton Acheter est conservé */
	#infos-livres #achat { margin-bottom: 14px; }
	.pp-message-livre { margin-bottom: calc(86px * var(--sdn-k)); }

	/* Paiement : « De la même collection » était élargi à 140 % pour pousser
	   « Tout voir » à droite, ce qui débordait de l'écran selon les livres */
	#wrap-all ~ #partie #length { width: 100%; }
	#wrap-all ~ #partie #top-livres { width: auto; }

	/* Livre : vignettes « même collection » illisibles (texte en 6 et 8 px) */
	#informations #liste-livres img { width: 90px; }
	#informations #liste-livres p { font-size: 13px; max-width: 120px; }
	#informations #liste-livres p + p { font-size: 12px; }
}


/* ==========================================================================
   2. MOBILE ET TABLETTE (moins de 1280 px) — base « téléphone »
   ========================================================================== */
@media only screen and (max-width: 1279.98px) {

	html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
	body { line-height: 1.45; }
	img { max-width: 100%; }

	/* #main est fermé juste après l'en-tête (logo.php) : son grand bas de page
	   ne sert qu'à créer un vide */
	#main { padding-bottom: 0; }

	/* ---------- En-tête : logo, bouton soutien, burger, navigation ---------- */

	#menu { height: var(--sdn-entete); }

	#logoAnim {
		top: 7px;
		left: var(--sdn-marge);
		width: auto;
		display: grid;
		grid-template-columns: 50px auto;
		column-gap: 12px;
		align-items: center;
	}
	#logoAnim #haut, #logoAnim #bas { grid-column: 1; width: 50px; }
	#logoAnim #haut { grid-row: 1; }
	#logoAnim #bas { grid-row: 2; }
	#logoAnim .bouton-soutien {
		grid-column: 2;
		grid-row: 1 / span 2;
		margin: 0;
		min-height: var(--sdn-tactile);
		display: inline-flex;
		align-items: center;
		padding: 0 14px;
		font-size: 14px;
	}

	.burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		position: absolute;
		top: 10px;
		right: 12px;
		z-index: 10000002;
		width: var(--sdn-tactile);
		height: var(--sdn-tactile);
		padding: 10px;
		border: 0;
		border-radius: 4px;
		background: transparent;
		cursor: pointer;
		filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45));
	}
	.burger span {
		display: block;
		height: 2px;
		border-radius: 1px;
		background: var(--sdn-blanc);
		transition: transform .2s, opacity .2s;
	}
	.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	#nav-principale {
		display: none;
		position: absolute;
		top: var(--sdn-entete);
		left: 0;
		right: 0;
		width: auto;
		z-index: 10000001;
		padding: 4px 0 12px;
		background: var(--sdn-bleu-nuit);
		box-shadow: 0 8px 16px rgba(0, 0, 0, .25);
	}
	#nav-principale.ouvert { display: flex; flex-direction: column; }
	#nav-principale .nav-links {
		display: flex;
		align-items: center;
		min-height: 48px;
		padding: 0 var(--sdn-marge);
		font-size: 16px;
		border-bottom: 1px solid rgba(255, 255, 255, .08);
	}
	#nav-principale .nav-links:hover { border-bottom: 1px solid var(--sdn-accent); }

	/* Bandeau image des pages intérieures */
	#head-img {
		display: block;
		top: 0;
		height: clamp(80px, 20vw, 177px);
		object-fit: cover;
	}

	/* ---------- Fenêtre « Qui sommes-nous ? » ---------- */
	.modal-content {
		width: auto;
		margin: 72px var(--sdn-marge) 32px;
		padding: 20px 20px 24px;
		box-sizing: border-box;
	}
	.modal-content h1 { font-size: clamp(22px, 6vw, 32px); margin: 0 0 24px; }
	.modal-content p { font-size: 16px; margin: 0 0 14px; }

	/* ---------- ACCUEIL : en-tête image, titre, recherche ---------- */
	.main-accueil #top { position: relative; height: var(--sdn-hero); }
	#banner {
		min-width: 0;
		width: 100%;
		max-width: none;
		height: var(--sdn-hero);
		object-fit: cover;
		object-position: center 40%;
	}
	#top-text {
		top: 70px;
		left: var(--sdn-marge);
		right: var(--sdn-marge);
		transform: none;
		text-align: center;
	}
	#top-text h1 {
		margin: 0;
		font-size: clamp(30px, 8.6vw, 52px);
		line-height: 1.1;
	}
	marquee {
		top: 0;
		height: auto;
		margin-top: 6px;
		font-size: clamp(17px, 4.6vw, 25px);
	}
	.wrap {
		top: calc(var(--sdn-hero) - 64px);
		left: var(--sdn-marge);
		right: var(--sdn-marge);
		width: auto;
		transform: none;
	}
	.searchTerm {
		height: var(--sdn-tactile);
		box-sizing: border-box;
		padding: 0 12px;
		font-size: 16px;
	}
	.searchButton { width: 48px; height: var(--sdn-tactile); flex: none; }

	/* ---------- ACCUEIL : carrousel ---------- */
	.slider {
		display: grid;
		height: auto;
		margin: 28px 0 0;
	}
	.slider .slide1, .slider .slide2, .slider .slide3 {
		grid-area: 1 / 1;
		position: relative;
		height: auto;
		display: grid;
		grid-template-columns: minmax(96px, 30%) 1fr;
		grid-auto-rows: min-content;
		align-content: center;
		column-gap: 16px;
		padding: 20px var(--sdn-marge);
		min-height: 210px;
		box-sizing: border-box;
	}
	.slider .slide1 > a, .slider .slide2 > a, .slider .slide3 > a { display: contents; }
	.slider #new-back {
		position: absolute;
		inset: 0;
		height: auto;
		margin: 0;
		z-index: 0;
	}
	.slider #new-book {
		position: relative;
		top: 0;
		left: 0;
		z-index: 1;
		grid-column: 1;
		grid-row: 1 / span 6;
		align-self: center;
		width: 100%;
		height: auto;
	}
	.slider h1, .slider h5, .slider #ligne, .slider p {
		grid-column: 2;
		position: relative;
		top: 0;
		z-index: 1;
		margin: 0;
	}
	.slider h1 { font-size: clamp(17px, 4.6vw, 25px); line-height: 1.25; }
	.slider h5 { font-size: 16px; margin-top: 4px; }
	.slider #ligne { width: 100%; max-width: 244px; height: auto; padding: 10px 0; }
	.slider p { font-size: 15px; overflow-wrap: anywhere; }

	.paypal-banner-wrapper { margin: 24px auto; }
	.pp-carte { padding: 14px 16px; }
	.pp-message-livre { margin: -4px 0 24px; }

	/* ---------- ACCUEIL : recherche par auteur ---------- */
	#auteurs {
		width: auto;
		margin: 24px var(--sdn-marge) 0;
		padding: 24px 16px;
		box-sizing: border-box;
	}
	#auteurs h1 { font-size: var(--sdn-titre-page); margin: 0 0 16px; }

	/* ---------- Grilles de livres (accueil, catalogue, résultats) ---------- */
	#titre-section { font-size: var(--sdn-titre-page); margin: 40px var(--sdn-marge) 20px; }
	#section-wrap { width: auto; margin: 0 var(--sdn-marge); overflow: visible; }

	#titres-parues {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0;
	}
	/* Téléphone : cartes horizontales (couverture à gauche, infos à droite) */
	#titres-parues article {
		width: auto;
		margin: 0;
		padding: 16px 0;
		border-bottom: 1px solid rgba(37, 41, 64, .1);
		display: grid;
		grid-template-columns: 104px 1fr;
		grid-template-areas:
			"img texte"
			"img prix"
			"img format"
			"img boutons";
		grid-template-rows: auto auto auto 1fr;
		column-gap: 16px;
	}
	#titres-parues #wrap-img { grid-area: img; height: auto; }
	#titres-parues .img-livre {
		display: block;
		overflow: hidden;
		color: var(--sdn-gris);
		font: 13px/1.3 var(--sdn-police);
		width: 100%;
		height: auto;
		aspect-ratio: 2 / 3;
		object-fit: contain;
		object-position: center top;
	}
	#titres-parues #wrap-text { grid-area: texte; height: auto; min-width: 0; }
	#titres-parues h2 {
		width: auto;
		max-height: none;
		font-size: 16px;
		line-height: 1.3;
		padding-bottom: 4px;
	}
	#titres-parues #auteur { font-size: 15px; }
	#titres-parues #date, #titres-parues #collection { font-size: 14px; }
	#titres-parues #auteur, #titres-parues #collection { padding: 2px 0; }
	#titres-parues #prix { grid-area: prix; top: 0; margin-top: 8px; font-size: 22px; }
	#titres-parues #format {
		grid-area: format;
		float: none;
		width: fit-content;
		margin: 6px 0 0;
		padding: 4px 8px;
		font-size: 12px;
	}
	#titres-parues #bouttons {
		grid-area: boutons;
		align-self: end;
		justify-content: flex-start;
		gap: 8px;
		margin-top: 6px;
	}
	#bouttons a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 96px;
		min-height: var(--sdn-tactile);
	}

	/* ---------- ACCUEIL : collections ---------- */
	#col-wrap { height: auto !important; margin-top: 40px; padding: 0 var(--sdn-marge) 40px !important; }
	#collections {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
	#collections > div { display: contents; }
	#collections h1 {
		order: -1;
		grid-column: 1 / -1;
		position: static;
		width: auto;
		margin: 0 0 4px;
		font-size: var(--sdn-titre-page);
	}
	#collections a { display: block; }
	#col1-back {
		display: block;
		width: 100%;
		height: auto;
		margin: 0;
		aspect-ratio: 302 / 250;
		object-fit: cover;
	}

	/* ---------- CATALOGUE / RÉSULTATS : titre et filtres ---------- */
	#filtres { width: auto; margin: 0 var(--sdn-marge); }
	#filtres h1, #libPage { top: 0; margin: 24px 0 4px; font-size: var(--sdn-titre-page); line-height: 1.2; }
	#filtres h6 { top: 0; margin: 0 0 4px; font-size: 14px; }
	#dropdowns { gap: 12px; align-items: center; }
	.dropdown, .dropdown2 {
		width: auto;
		top: 0;
		align-items: center;
		gap: 6px;
		min-height: var(--sdn-tactile);
		cursor: pointer;
	}
	#filtres .dropdown > p, #filtres .dropdown2 > p { margin: 0; font-size: 16px; }
	.dropbtn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--sdn-tactile);
		height: var(--sdn-tactile);
		padding: 0;
		border-radius: 4px;
	}
	.dropdown-content {
		top: 100%;
		left: 0;
		min-width: 220px;
		max-width: calc(100vw - 2 * var(--sdn-marge));
		max-height: 60vh;
		overflow-y: auto;
		font-size: 16px;
		z-index: 50;
	}
	.dropdown2 .dropdown-content { left: auto; right: 0; }
	.dropdown-content a { padding: 12px 16px; }
	#sep {
		display: block;
		position: static;
		width: calc(100% - 2 * var(--sdn-marge));
		margin: 8px auto 4px;
	}

	/* ---------- Fil d'Ariane (livre, paiement) ---------- */
	#coll, #aut {
		display: inline-block;
		top: 0;
		padding: 12px 0;
		font-size: 14px;
	}
	#coll { margin-left: var(--sdn-marge); }
	#aut { margin-left: .3em; }                 /* l'espace après « > » disparaissait */

	/* ---------- LIVRE ---------- */
	#couverture { flex-direction: column; padding: 0 var(--sdn-marge); }
	#image-wrap { width: auto; padding: 8px 0 16px; box-sizing: border-box; }
	#couvGrand { display: block; width: min(52vw, 260px); margin: 0 auto; }
	#infos-livres { width: auto; padding: 0 0 24px; }
	#infos-livres h1 { font-size: 22px; line-height: 1.3; }
	#infos-livres h1 + h1 { font-size: 18px; margin-top: 4px; }
	#achat { margin: 16px 0 20px; gap: 20px; flex-wrap: wrap; }
	#prix-livre { margin: 0; font-size: 28px; }
	#achat a { display: inline-flex; }
	#achat img { height: 48px; margin-left: 0; }
	#rubrique { gap: 12px; }
	#rubrique p { width: auto; margin: 4px 0; }
	#infos-livres #variable { flex: 0 0 38%; font-size: 16px; }
	#infos-livres #valeur { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }

	#informations { flex-direction: column; margin: 0 var(--sdn-marge); }
	#informations #partie { width: auto; }
	#informations h2 { font-size: 22px; margin: 8px 0 12px; }
	#informations p { font-size: 16px; line-height: 1.6; }

	/* Vignettes « même collection » (livre et paiement) */
	#length { width: auto; float: none; padding-bottom: 32px; }
	#top-livres { width: auto; gap: 12px; }
	#top-livres h5 { font-size: 20px; margin: 16px 0; }
	#top-livres a { display: inline-flex; align-items: center; min-height: var(--sdn-tactile); flex: none; }
	#liste-livres {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 20px 16px;
	}
	#liste-livres div { width: auto; margin: 0; }
	#liste-livres img {
		display: block;
		width: 100%;
		max-width: 160px;
		height: auto;
		aspect-ratio: 2 / 3;
		object-fit: contain;
		object-position: left top;
		margin: 0 0 8px;
	}
	#liste-livres p { width: auto; max-width: none; max-height: none; font-size: 15px; padding-bottom: 2px; }
	#liste-livres p + p { font-size: 14px; }

	/* ---------- PAIEMENT ---------- */
	#wrap-all { flex-direction: column; top: 0; padding: 0 var(--sdn-marge); }
	#payement-container-1 { display: contents; }
	#p1 {
		order: 1;
		display: grid;
		grid-template-columns: 112px 1fr;
		grid-template-rows: auto 1fr;
		column-gap: 16px;
		align-items: start;
	}
	#image-livre { width: auto; grid-column: 1; grid-row: 1 / span 2; }
	#image-livre img { display: block; width: 100%; margin: 0; }
	#desc-livre { display: contents; }
	#desc-livre h1 { grid-column: 2; font-size: 20px; line-height: 1.3; }
	#desc-livre h6 { grid-column: 2; font-size: 15px; margin: 4px 0 0; }
	#p1 .ligne { grid-column: 1 / -1; margin: 16px 0 8px; }
	.shipmentSelector {
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}
	.shipmentSelector .radio { width: 22px; height: 22px; margin: 0 8px 0 0; flex: none; }
	.shipmentSelector label {
		display: inline-flex;
		align-items: center;
		min-height: var(--sdn-tactile);
		margin-right: 20px;
		font-size: 16px;
		cursor: pointer;
	}
	#price-box {
		grid-column: 1 / -1;
		position: static;
		width: auto;
		margin-top: 8px;
		box-sizing: border-box;
	}
	#payment-box { order: 2; width: auto; margin-top: 16px; }
	#boxe { width: auto; box-sizing: border-box; padding: 12px 16px; margin-bottom: 16px; }
	#livrai { font-size: 13px; }
	#payment-box #infos-livres { padding: 0; }
	#payment-box #infos-livres #variable,
	#payment-box #infos-livres #valeur { font-size: 15px; }
	/* Bouton PayPal juste sous le choix de livraison et le prix (sauf livre épuisé) */
	#paypal-button-container { width: 100%; min-height: 50px; order: -1; margin-bottom: 16px; }
	#paypal-button-container[style*="hidden"] { order: 0; min-height: 0; }
	#payement-container-2 { order: 3; padding: 24px 0 0; }
	#payement-container-2 h2 { font-size: 20px; }
	#payement-container-2 p { font-size: 16px; line-height: 1.6; }
	#wrap-all ~ #partie { width: auto; margin: 16px var(--sdn-marge) 0; }

	/* ---------- COMMANDES ---------- */
	#poss {
		width: auto;
		margin: 24px var(--sdn-marge) 32px;
		display: grid;
		grid-template-columns: 1fr;
		gap: 16px;
	}
	#poss #boxes { margin: 0; display: flex; align-items: center; gap: 16px; }
	#poss #img-wrap { height: auto; flex: 0 0 64px; }
	#poss #boxes img { width: 64px; margin: 0; }
	#poss #boxes p { margin: 0; text-align: left; font-size: 16px; }
	#poss ~ h2 { margin: 0 var(--sdn-marge) 8px; font-size: 22px; line-height: 1.3; }
	#poss ~ h5 { margin: 0 var(--sdn-marge) 24px; font-size: 16px; }


	/* ---------- DOCUMENTS ---------- */
	#head-img ~ h1 { margin: 24px var(--sdn-marge) 16px; font-size: var(--sdn-titre-page); }
	#document {
		width: auto;
		margin: 0 var(--sdn-marge);
		padding-bottom: 28px;
		display: grid;
		grid-template-columns: 72px 1fr;
		column-gap: 14px;
		align-items: start;
	}
	#document > :first-child { width: 72px; margin: 0; }
	#document img { display: block; width: 100%; height: auto; }
	#text-doc { margin-left: 0; min-width: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
	#text-doc p, #text-doc > div { margin: 0 0 10px; }
	#text-doc > a { display: block; padding: 2px 0; }

	/* ---------- MENTIONS LÉGALES ---------- */
	#mentions { width: auto; margin: 0 var(--sdn-marge) 40px; font-size: 16px; }
	#mentions h2 { font-size: 20px; margin: 28px 0 8px; }
}


/* ==========================================================================
   3. PALIER 480 px — grands téléphones, petites tablettes
   ========================================================================== */
@media only screen and (min-width: 480px) and (max-width: 1279.98px) {

	/* Grilles de livres : 2 colonnes, cartes verticales comme sur ordinateur */
	#titres-parues { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
	#titres-parues article {
		padding: 0;
		border-bottom: 0;
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"img img"
			"texte texte"
			"prix format"
			"boutons boutons";
		grid-template-rows: auto 1fr auto auto;
	}
	#titres-parues #wrap-img { margin-bottom: 10px; }
	#titres-parues #format { justify-self: end; align-self: end; margin: 0 0 4px; }
	#titres-parues #bouttons { justify-content: space-between; }
	#bouttons a { min-width: 0; flex: 1 1 0; }

	#liste-livres { grid-template-columns: repeat(3, 1fr); }
}


/* ==========================================================================
   4. PALIER 768 px — tablette portrait
   ========================================================================== */
@media only screen and (min-width: 768px) and (max-width: 1279.98px) {

	:root { --sdn-marge: 32px; --sdn-hero: 320px; }

	#menu { height: 80px; }
	:root { --sdn-entete: 80px; }
	#logoAnim { top: 14px; }
	.burger { top: 18px; right: 24px; }

	#top-text { top: 80px; }

	/* Carrousel */
	.slider .slide1, .slider .slide2, .slider .slide3 {
		grid-template-columns: 200px 1fr;
		column-gap: 32px;
		padding: 32px 8%;
		min-height: 300px;
	}

	#auteurs { padding: 40px 6%; }

	/* Grilles de livres : 3 colonnes */
	#titres-parues { grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }

	#collections { grid-template-columns: repeat(3, 1fr); gap: 24px; }

	.modal-content { width: 80%; margin: 12% auto; }

	/* Livre : couverture à gauche, infos à droite */
	#couverture { flex-direction: row; gap: 40px; align-items: flex-start; }
	#image-wrap { flex: 0 0 38%; padding-top: 16px; }
	#couvGrand { width: 100%; max-width: 300px; }
	#infos-livres { padding-top: 16px; }
	#liste-livres { grid-template-columns: repeat(4, 1fr); }

	/* Paiement */
	#p1 { grid-template-columns: 180px 1fr; column-gap: 28px; }
	#image-livre { grid-row: 1 / span 5; }
	#desc-livre h1, #desc-livre h6, #p1 .ligne, .shipmentSelector, #price-box { grid-column: 2; }
	#price-box { max-width: 320px; }

	/* Commandes : encarts sur 2 colonnes */
	#poss { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }

	/* Documents */
	#document { grid-template-columns: 110px 1fr; column-gap: 24px; }
	#document > :first-child { width: 110px; }
}


/* ==========================================================================
   5. PALIER 1024 px — tablette paysage, petits portables
   ========================================================================== */
@media only screen and (min-width: 1024px) and (max-width: 1279.98px) {

	/* Menu horizontal d'origine, avec des zones tactiles plus confortables */
	.burger { display: none; }
	#nav-principale {
		display: block;
		position: absolute;
		top: 18px;
		left: auto;
		right: 4%;
		padding: 0;
		background: none;
		box-shadow: none;
	}
	#nav-principale .nav-links {
		display: inline-flex;
		min-height: var(--sdn-tactile);
		padding: 0 10px;
		font-size: 14px;
		border-bottom: 0;
	}
	#nav-principale .nav-links:hover { border-bottom: solid; }

	:root { --sdn-hero: 330px; }

	#titres-parues { grid-template-columns: repeat(4, 1fr); }
	#collections { grid-template-columns: repeat(4, 1fr); }

	/* Commandes : encarts sur 4 colonnes */
	#poss { grid-template-columns: repeat(4, 1fr); }
	#poss #boxes { flex-direction: column; text-align: center; }
	#poss #boxes p { text-align: center; }

	/* Paiement : encart de prix à droite comme sur ordinateur */
	#wrap-all { display: grid; grid-template-columns: 1fr 300px; column-gap: 32px; align-items: start; }
	#p1 { grid-column: 1; }
	#payment-box { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
	#payement-container-2 { grid-column: 1; }
}


/* ==========================================================================
   6. PIED DE PAGE (toutes largeurs)
   Fond blanc, filet orange du logo, survol orangé comme le menu.
   Téléphone : une colonne · 768 px : 2 colonnes · 1024 px et plus : 4 colonnes.
   ========================================================================== */
.pied {
	display: block;
	margin: 0;
	padding: 0;
	border-top: 3px solid #f6851f;
	background: var(--sdn-blanc);
	color: var(--sdn-encre);
	font-family: var(--sdn-police);
}
.pied-contenu {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 36px var(--sdn-marge) 28px;
	box-sizing: border-box;
}
.pied h6 {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	color: #666666;
}
.pied p { margin: 0; font-size: 16px; line-height: 1.4; }
.pied a {
	margin: 0;
	color: var(--sdn-encre);
	text-decoration: none;
	transition: color .2s, background-color .2s;
}
.pied a:hover { color: var(--sdn-accent); }
.pied a:focus-visible { outline: 2px solid var(--sdn-orange-bouton); outline-offset: 3px; border-radius: 2px; }
.pied-bloc p a {
	display: inline-flex;
	align-items: center;
	min-height: var(--sdn-tactile);
	overflow-wrap: anywhere;
}

/* Liens CGV / Mentions légales (annule la règle générique « nav » de style.css) */
.pied .pied-liens {
	position: static;
	top: auto;
	right: auto;
	z-index: auto;
	width: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.pied-liens a {
	display: inline-flex;
	align-items: center;
	min-height: var(--sdn-tactile);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--sdn-bleu-nuit);
}

/* Réseaux sociaux : pastilles rondes, icônes passées en blanc */
.pied-reseaux { display: flex; gap: 12px; }
.pied-reseaux a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--sdn-tactile);
	height: var(--sdn-tactile);
	border-radius: 50%;
	background: #F5F5F5;
}
.pied-reseaux a:hover { background: var(--sdn-accent); }
.pied-reseaux a:hover img { filter: brightness(0) invert(1); }
.pied-reseaux img {
	width: auto;
	height: 20px;
}

.pied .pied-copyright {
	margin: 0;
	padding: 14px var(--sdn-marge);
	border-top: 1px solid #E5E5E5;
	text-align: center;
	font-size: 13px;
	color: #666666;
}

@media only screen and (min-width: 768px) {
	.pied-contenu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
}
@media only screen and (min-width: 1024px) {
	.pied-contenu {
		grid-template-columns: auto auto auto auto;
		justify-content: space-between;
		align-items: start;
		padding: 44px 5% 36px;
	}
	.pied-reseaux { align-self: center; }
}


/* ==========================================================================
   7. PAIEMENT EN PLUSIEURS FOIS (message officiel PayPal)
   Le contenu du message ne doit pas être modifié (règles PayPal) :
   seul son encadrement est mis en forme ici.
   ========================================================================== */
.paypal-banner-wrapper {
	max-width: 720px;
	margin: 40px auto 8px;
	padding: 0 var(--sdn-marge);
	box-sizing: border-box;
}
.pp-carte {
	min-height: 24px;
	padding: 18px 28px;
	border-top: 3px solid #f6851f;
	border-radius: 2px;
	background: var(--sdn-blanc);
	box-shadow: 0 2px 10px rgba(41, 46, 70, .08);
}
.pp-message-livre { min-height: 20px; max-width: 420px; }


/* ==========================================================================
   8. RECHERCHE PAR AUTEUR (accueil) : texte continu compact, centré,
   noms séparés par un point médian, initiale de chaque lettre en orange.
   Chaque nom (avec son point et, le cas échéant, son initiale) reste d'un bloc.
   ========================================================================== */
#auteurs .auteurs-index {
	max-width: 1000px;
	margin: 4px auto 0;
	padding: 0;
	list-style: none;
	text-align: center;
	line-height: 1.9;
}
#auteurs .auteurs-index li {
	display: inline;
	margin: 0;
	white-space: nowrap;
}
#auteurs .auteurs-index li:not(:last-child)::after {
	content: "\00B7";
	margin-left: 9px;
	color: var(--sdn-gris-libelle);
	font-weight: 700;
}
#auteurs .auteurs-lettre {
	margin: 0 6px 0 12px;
	font-family: var(--sdn-police-titre);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	color: var(--sdn-orange-titre);
}
#auteurs .auteurs-index li:first-child .auteurs-lettre { margin-left: 0; }
#auteurs .auteurs-index a {
	margin: 0;
	padding: 4px 0;
	font-family: var(--sdn-police-titre);
	font-size: 15px;
	color: var(--sdn-bordeaux);
	text-decoration: none;
	transition: color .15s;
}
#auteurs .auteurs-index a:hover,
#auteurs .auteurs-index a:focus-visible { color: var(--sdn-accent); text-decoration: underline; }

@media only screen and (max-width: 767.98px) {
	#auteurs .auteurs-index { line-height: 1.3; }
	/* un bloc par nom ; seul un nom plus large que l'écran se coupe */
	#auteurs .auteurs-index li {
		display: inline-block;
		max-width: 100%;
		white-space: normal;
		padding: 5px 0;
	}
	#auteurs .auteurs-index a { font-size: 14px; }
	#auteurs .auteurs-lettre { font-size: 16px; margin-left: 8px; }
}

/* Ordinateur : bloc resserré autour des noms (la marge intérieure de 5 %
   de la largeur d'écran laissait de grands blancs) */
@media only screen and (min-width: 1280px) {
	#auteurs {
		width: auto;
		max-width: 1100px;
		margin: 24px auto 0;
		padding: 36px 56px 40px;
		box-sizing: border-box;
	}
	#auteurs h1 { margin: 0 0 18px; }
}


/* ==========================================================================
   9. BOUTONS D'ACTION (cartes de livres, fiche livre)
   Texte visible plutôt qu'icône seule ; une action principale mise en avant :
   « Acheter » plein orange (texte bleu nuit, contraste 7:1),
   « Détails » secondaire, fin contour gris clair (allégé à la demande).
   ========================================================================== */
.btn-sdn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-sizing: border-box;
	min-height: 36px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-family: var(--sdn-police);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-sdn--principal {
	background: var(--sdn-orange-bouton);
	border-color: var(--sdn-orange-bouton);
	color: var(--sdn-encre);
	box-shadow: 0 1px 2px rgba(37, 41, 64, .12);
}
.btn-sdn--principal:hover {
	background: #F28C00;
	border-color: #F28C00;
	color: var(--sdn-encre);
	box-shadow: 0 2px 6px rgba(37, 41, 64, .18);
}
/* Icône panier (dessinée en CSS, prend la couleur du texte) */
.btn-sdn--principal::before {
	content: "";
	flex: none;
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM1 2v2h2.6l3.3 9.6-1.3 2.3A2 2 0 0 0 7.4 19H19v-2H7.6l1.1-2h7.9a2 2 0 0 0 1.8-1.1L22 6H5.2l-.7-2.1A2 2 0 0 0 2.6 2z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM1 2v2h2.6l3.3 9.6-1.3 2.3A2 2 0 0 0 7.4 19H19v-2H7.6l1.1-2h7.9a2 2 0 0 0 1.8-1.1L22 6H5.2l-.7-2.1A2 2 0 0 0 2.6 2z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.btn-sdn--secondaire {
	background: var(--sdn-blanc);
	border-color: var(--sdn-gris-libelle);
	color: var(--sdn-bleu-nuit);
}
.btn-sdn--secondaire:hover {
	border-color: var(--sdn-bleu-nuit);
	color: var(--sdn-bleu-nuit);
}
/* Icône « information » (i dans un cercle), même dessin que le panier */
.btn-sdn--secondaire::before {
	content: "";
	flex: none;
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 4.5v2h2v-2zm0 3.5v5.5h2V12z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 4.5v2h2v-2zm0 3.5v5.5h2V12z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.btn-sdn:focus-visible { outline: 2px solid var(--sdn-bleu-nuit); outline-offset: 2px; }

/* Dans les cartes : les deux boutons se partagent la largeur */
#bouttons { gap: 8px; }
#bouttons .btn-sdn { flex: 1 1 0; min-width: 0; padding: 0 8px; font-size: 13px; }

/* Fiche livre : grand bouton à côté du prix */
.btn-sdn--grand { min-height: 48px; padding: 0 28px; font-size: 17px; gap: 8px; }
.btn-sdn--grand::before { width: 20px; height: 20px; }

@media only screen and (min-width: 1280px) {
	#achat .btn-sdn { margin-left: 50px; }
}
@media only screen and (max-width: 1279.98px) {
	#bouttons .btn-sdn { min-height: var(--sdn-tactile); font-size: 14px; }
}


/* ==========================================================================
   10. HARMONISATION TYPOGRAPHIQUE
   Même hiérarchie d'une page à l'autre : titre de page > intertitre >
   texte ; plus aucun texte sous 11 px.
   ========================================================================== */

/* Toutes largeurs */
.montant { font-family: var(--sdn-police); }                 /* était en Arial */
#soutien h1 { font-size: var(--sdn-titre-page); line-height: 1.2; }
#payement-container-2 h2 { font-weight: 700; }                /* comme la fiche livre */
#liste-livres p { font-weight: 500; }
#liste-livres p + p { font-weight: 400; }

/* Téléphone et tablette */
@media only screen and (max-width: 1279.98px) {
	#desc-livre h1 { font-size: 22px; }                        /* = titre de la fiche livre */
	#informations h2, #payement-container-2 h2 { font-size: 20px; }
	#titres-parues #format { font-size: 12px; }
}

/* Ordinateur : mêmes tailles d'origine mises à l'échelle (--sdn-k) */
@media only screen and (min-width: 1280px) {
	/* Titres de page identiques partout (catalogue, documents, mentions, soutien) */
	#head-img ~ h1, #soutien h1 { font-size: calc(36px * var(--sdn-k)); }

	/* Petits textes illisibles */
	#titres-parues #format { font-size: 11px; line-height: 1.25; }
	#livrai { font-size: 12px; }

	/* Fiche livre : vraie hiérarchie titre > auteur > caractéristiques */
	#couverture #infos-livres h1 { font-size: calc(26px * var(--sdn-k)); line-height: 1.25; }
	#couverture #infos-livres h1 + h1 { font-size: calc(18px * var(--sdn-k)); margin-top: 6px; }
	#couverture #infos-livres #variable,
	#couverture #infos-livres #valeur { font-size: calc(16px * var(--sdn-k)); }

	/* Intertitres identiques sur la fiche livre et la page de paiement */
	#informations h2, #payement-container-2 h2 { font-size: calc(24px * var(--sdn-k)); }
	#top-livres h5 { font-size: calc(22px * var(--sdn-k)); font-weight: 700; }
	#top-livres a { font-size: calc(16px * var(--sdn-k)); }
	#informations #liste-livres p { font-size: calc(14px * var(--sdn-k)); }
	#informations #liste-livres p + p { font-size: calc(12px * var(--sdn-k)); }
}


/* ==========================================================================
   11. ALIGNEMENTS ET ESPACEMENTS (ordinateur)
   ========================================================================== */
@media only screen and (min-width: 1280px) {

	/* Commandes : largeur des icônes négative dans le CSS d'origine (≥ 1366 px) */
	#poss #boxes img { width: calc(80px * var(--sdn-k)); }

	/* Titres de section alignés sur le bord gauche des cartes de livres
	   (grille à 5 % du bord + 20 px de marge des cartes) */
	#titre-section { margin-left: calc(5% + 20px * var(--sdn-k)); }
	#filtres { width: auto; margin-left: calc(5% + 20px * var(--sdn-k)); margin-right: calc(5% + 20px * var(--sdn-k)); }
	#sep { left: 0; width: calc(90% - 40px * var(--sdn-k)); margin-left: calc(5% + 20px * var(--sdn-k)); }
	/* Documents : titre aligné sur la colonne des documents (80 % centrée) */
	#head-img ~ h1 { width: 80%; margin-left: auto; margin-right: auto; }
	/* Mentions légales : titre dans la même colonne que le texte */
	#head-img ~ h1:has(~ #mentions) { max-width: 900px; }

	/* Fil d'Ariane (livre, paiement) aligné sur la marge des pages */
	#coll { margin-left: 5%; }

	/* Fiche livre : suppression du vide laissé sous le bandeau, espacements resserrés */
	#head-img:has(~ #couverture) { margin-bottom: -84px; }
	#head-img ~ #coll, #head-img ~ #aut { padding-top: 6px; }
	#couverture #image-wrap { padding: 32px 60px 40px; box-sizing: border-box; }
	#couverture #infos-livres { padding: 32px 0 40px; }
	#couverture #achat { margin-top: 28px; }
	.pp-message-livre { margin-bottom: 36px; }

	/* Fiche livre : « même collection » en grille 2 × 2 lisible
	   (les vignettes faisaient un ou deux mots par ligne) */
	#informations #partie:first-child { flex: 3 1 0; width: auto; padding-right: 48px; }
	#informations #partie + #partie { flex: 2 1 0; width: auto; }
	#informations #length { width: 100%; float: none; }
	#informations #liste-livres {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 20px;
	}
	#informations #liste-livres div { width: auto; margin: 0; }
	#informations #liste-livres img { width: 100px; margin: 0 0 8px; }
	#informations #liste-livres p { max-width: none; }

	/* Une seule marge gauche (5 %) pour fil d'Ariane, couverture, textes */
	#couverture #image-wrap { flex: 0 0 auto; width: auto; padding: 32px 0 40px; }
	#couverture #couvGrand { margin: 0; }
	#couverture #infos-livres { flex: 1 1 auto; padding-left: 64px; }
	#informations { margin: 0 5%; }
	#image-livre img { margin-left: 26.667%; }               /* 5 % de la page */
	#payement-container-2 { padding-left: 6.667%; padding-right: 6.667%; }
	#wrap-all ~ #partie { width: 90%; }

	/* Paiement : libellés de livraison lisibles, vides resserrés */
	.shipmentSelector label { font-size: 14px; margin-right: 14px; cursor: pointer; }
	.shipmentSelector .radio { margin: 0 6px 0 0; vertical-align: -2px; }
	#wrap-all { margin-bottom: -50px; }
	#wrap-all ~ #partie #liste-livres div { margin: 16px 0 0; width: 22%; }
}


/* ==========================================================================
   12. FORMULAIRE DE COMMANDE (commandes.php)
   Carte blanche, 3 étapes numérotées, libellés visibles au-dessus des champs,
   encadré « Après réception du payement » en colonne (ordinateur).
   Préfixe #formulaire.cmd : passe devant les règles d'origine de commandes.css.
   ========================================================================== */
#formulaire.cmd {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	box-sizing: border-box;
	width: auto;
	max-width: 1040px;
	margin: 0 var(--sdn-marge) 48px;
	padding: 24px 18px 28px;
	border-top: 3px solid #f6851f;
	border-radius: 10px;
	background: var(--sdn-blanc);
	box-shadow: 0 2px 14px rgba(41, 46, 70, .08);
	font-family: var(--sdn-police);
	color: var(--sdn-encre);
}

/* Étapes */
#formulaire.cmd .cmd-etape {
	min-width: 0;
	margin: 0 0 26px;
	padding: 0 0 24px;
	border: 0;
	border-bottom: 1px solid #EEE7D9;
}
#formulaire.cmd .cmd-etape:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
#formulaire.cmd legend {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 0;
	font-family: var(--sdn-police-titre);
	font-size: 19px;
	font-weight: 700;
	color: var(--sdn-bleu-nuit);
}
#formulaire.cmd .cmd-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--sdn-bleu-nuit);
	color: var(--sdn-blanc);
	font-family: var(--sdn-police);
	font-size: 14px;
	font-weight: 700;
}

/* Champs */
#formulaire.cmd .cmd-grille { display: grid; grid-template-columns: 1fr; gap: 16px; }
#formulaire.cmd .cmd-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#formulaire.cmd label {
	font-size: 14px;
	font-weight: 500;
	color: var(--sdn-bleu-nuit);
}
#formulaire.cmd .cmd-requis { margin-left: 2px; color: var(--sdn-orange-prix); }
#formulaire.cmd input[type="text"],
#formulaire.cmd input[type="email"],
#formulaire.cmd input[type="tel"],
#formulaire.cmd textarea {
	display: block;
	width: 100%;
	max-width: none;
	height: 48px;
	max-height: none;
	margin: 0;
	padding: 0 14px;
	box-sizing: border-box;
	border: 1px solid var(--sdn-gris-libelle);
	border-radius: 6px;
	background: var(--sdn-blanc);
	font: 16px/1.4 var(--sdn-police);
	color: var(--sdn-encre);
	transition: border-color .15s, box-shadow .15s;
}
#formulaire.cmd textarea { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; }
#formulaire.cmd input:hover,
#formulaire.cmd textarea:hover { border: 1px solid var(--sdn-gris); }
#formulaire.cmd input:focus,
#formulaire.cmd textarea:focus {
	outline: none;
	border: 1px solid var(--sdn-bleu-nuit);
	box-shadow: 0 0 0 3px rgba(255, 153, 0, .35);
}
#formulaire.cmd input:user-invalid,
#formulaire.cmd textarea:user-invalid { border-color: #C0392B; }

/* Commentaire facultatif : bouton discret, zone affichée au clic */
#formulaire.cmd .com {
	display: inline-flex;
	align-items: center;
	position: static;
	min-height: var(--sdn-tactile);
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--sdn-bleu-nuit);
	font: 500 15px var(--sdn-police);
	cursor: pointer;
}
#formulaire.cmd .com:hover { color: var(--sdn-accent); text-decoration: underline; }
#formulaire.cmd .com:focus-visible { outline: 2px solid var(--sdn-orange-bouton); outline-offset: 2px; }
#formulaire.cmd .comment { display: none; margin-top: 8px; }
#formulaire.cmd .comment[style*="visible"] { display: block; }

/* Envoi : même style que le bouton « Acheter » */
#formulaire.cmd .cmd-actions { margin-top: 28px; }
#formulaire.cmd .send {
	display: block;
	position: static;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 32px;
	border: 0;
	border-radius: 6px;
	background: var(--sdn-orange-bouton);
	box-shadow: 0 1px 2px rgba(37, 41, 64, .12);
	color: var(--sdn-encre);
	font: 700 16px var(--sdn-police);
	letter-spacing: .04em;
	cursor: pointer;
	transition: background-color .15s, box-shadow .15s;
}
#formulaire.cmd .send:hover { background: #F28C00; box-shadow: 0 2px 6px rgba(37, 41, 64, .18); }
#formulaire.cmd .send:focus-visible { outline: 2px solid var(--sdn-bleu-nuit); outline-offset: 2px; }

/* Encadré « Après réception du payement » */
#formulaire.cmd #info-livraisons {
	width: auto;
	height: auto;
	margin: 0;
	padding: 20px 22px;
	border-left: 3px solid #f6851f;
	border-radius: 6px;
	background: #FFFBE0;
	align-self: start;
}
#formulaire.cmd #info-livraisons h6 {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: var(--sdn-bleu-nuit);
}
#formulaire.cmd #info-livraisons ul { margin: 0; padding: 0; list-style: none; }
#formulaire.cmd #info-livraisons li {
	position: relative;
	margin: 0 0 10px;
	padding-left: 22px;
	font-size: 15px;
	line-height: 1.45;
}
#formulaire.cmd #info-livraisons li:last-child { margin-bottom: 0; }
#formulaire.cmd #info-livraisons li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .45em;
	width: 7px;
	height: 7px;
	border-top: 2px solid #f6851f;
	border-right: 2px solid #f6851f;
	transform: rotate(45deg);
}

@media only screen and (min-width: 600px) {
	#formulaire.cmd { padding: 32px 32px 36px; }
	#formulaire.cmd .cmd-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
	#formulaire.cmd .send { display: inline-block; width: auto; }
}
@media only screen and (min-width: 1024px) {
	#formulaire.cmd {
		grid-template-columns: minmax(0, 1fr) 280px;
		gap: 40px;
		margin: 0 auto 64px;
		padding: 40px 44px 44px;
	}
}
@media only screen and (min-width: 1280px) {
	#poss ~ h5 { margin-bottom: 36px; }       /* le vide de 100 px sous l'introduction */
}


/* ==========================================================================
   13. ACCUEIL SUR TÉLÉPHONE : « Titres récemment parus » avant
   « Recherche par auteur » (ordre d'affichage seulement, < 768 px)
   ========================================================================== */
@media only screen and (max-width: 767.98px) {
	#container:has(> #auteurs) { display: flex; flex-direction: column; }
	#container > #auteurs,
	#container > #auteurs ~ * { order: 2; }
	#container > #titre-section,
	#container > #section-wrap { order: 1; }
	#container > #titre-section { margin-top: 32px; }
	#container > #auteurs { margin-top: 40px; }
	#container > .paypal-banner-wrapper { width: 100%; }     /* sinon rétréci par le mode flex */
}
