/* Jean-Pierre Rochat – feuille de style (une seule page qui défile) */

@font-face {
	font-family: "Wire One";
	src: url("../fonts/wire-one.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	--encre: #222;
	--texte: rgba(0, 0, 0, .8);
	--doux: rgba(0, 0, 0, .6);
	--papier: rgba(252, 250, 246, .92);
	--carte: rgba(255, 255, 255, .85);
	--bouton: rgba(0, 0, 0, .6);
	--bouton-survol: rgba(0, 0, 0, .78);
	--largeur: 1000px;
	--hauteur-nav: 64px;
	--titre: "Wire One", Helvetica, Arial, sans-serif;
}

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

html {
	background: #505D6E;
	scroll-behavior: smooth;
	scroll-padding-top: var(--hauteur-nav);
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	font: 16px/1.65 Helvetica, Arial, sans-serif;
	color: var(--texte);
	-webkit-font-smoothing: antialiased;
}

/* Fond fixe (calque, compatible iPhone/iPad) */
.fond {
	position: fixed;
	inset: 0;
	z-index: -1;
	background: #505D6E url("../images/fond.jpg") center / cover no-repeat;
	background-image: image-set(url("../images/fond.webp") type("image/webp"), url("../images/fond.jpg") type("image/jpeg"));
}

a { color: #000; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

.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;
}
.evitement {
	position: absolute; left: 1rem; top: -4rem; z-index: 100;
	padding: .5rem 1rem; background: #fff; border-radius: 3px;
}
.evitement:focus { top: 1rem; }

/* ---------- Barre de navigation (toujours visible) ---------- */
.entete {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	height: var(--hauteur-nav);
	transition: background .4s, box-shadow .4s;
}
.entete.defilee {
	background: rgba(252, 250, 246, .82);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: var(--largeur);
	height: 100%;
	margin: 0 auto;
	padding: 0 20px;
}
.nav-nom {
	font-family: var(--titre);
	font-size: 30px;
	line-height: 1;
	color: var(--encre);
	text-decoration: none;
	white-space: nowrap;
	transition: opacity .4s;
}
/* Avec JavaScript : le nom n'apparaît dans la barre qu'après l'accueil */
.js .entete:not(.defilee) .nav-nom { opacity: 0; pointer-events: none; }
.nav-liens {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
}
.nav-liens a {
	display: block;
	padding: 8px 12px;
	color: #000;
	text-decoration: none;
	border-radius: 3px;
	transition: background .2s;
}
.nav-liens a:hover { background: rgba(0, 0, 0, .08); }
.nav-liens a[aria-current="true"] { font-weight: bold; }

@media (max-width: 520px) {
	.nav { padding: 0 10px; }
	.nav-nom { font-size: 24px; }
	.nav-liens a { padding: 8px 8px; font-size: 13px; }
}
@media (max-width: 360px) {
	.nav-nom { display: none; }
	.nav { justify-content: center; }
}

/* ---------- Accueil : plein écran, comme l'original ---------- */
.accueil {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	padding: var(--hauteur-nav) 20px 80px;
	text-align: center;
}
.titre {
	margin: 0;
	font-family: var(--titre);
	font-weight: normal;
	font-size: min(112px, 21vw);
	line-height: 1;
	color: var(--encre);
}
.sous-titre {
	margin: .6em 0 0;
	font-size: 15px;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--doux);
}
.defiler {
	position: absolute;
	bottom: 28px;
	left: 50%;
	translate: -50% 0;
	padding: 8px;
	color: var(--encre);
	opacity: .7;
	animation: flotter 2.4s ease-in-out infinite;
}
.defiler:hover { opacity: 1; }
@keyframes flotter {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(6px); }
}

/* ---------- Contenu : un voile clair sur la photo ---------- */
.contenu {
	/* pas de backdrop-filter ici : sur une zone aussi haute, certains navigateurs ne l'affichent plus */
	background: var(--papier);
}
.bloc {
	max-width: var(--largeur);
	margin: 0 auto;
	padding: 90px 20px;
}
.bloc + .bloc { border-top: 1px solid rgba(0, 0, 0, .08); }

.titre-bloc {
	margin: 0 0 40px;
	font-family: var(--titre);
	font-weight: normal;
	font-size: clamp(48px, 9vw, 72px);
	line-height: 1;
	color: var(--encre);
	text-align: center;
}

.texte {
	max-width: 36em;
	margin: 0 auto;
	font-size: 18px;
}
.texte p { margin: 0 0 1em; }

/* Livres */
.livres {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
	gap: 24px;
}
.livre {
	display: flex;
	gap: 20px;
	padding: 20px;
	background: var(--carte);
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.livre img {
	flex: none;
	align-self: flex-start;
	width: 120px;
	height: 172px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.livre-texte {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}
.livre h4 {
	margin: 0 0 8px;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--encre);
}
.livre p {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.55;
}
.bouton {
	margin-top: auto;
	padding: 7px 14px;
	font-size: 14px;
	color: #fff;
	text-decoration: none;
	background: var(--bouton);
	border-radius: 3px;
	transition: background .2s;
}
.bouton:hover, .bouton:focus-visible { background: var(--bouton-survol); }

@media (max-width: 480px) {
	.livre { flex-direction: column; align-items: center; text-align: center; }
	.livre img { align-self: center; }
	.livre-texte { align-items: center; }
}

/* Sous-titres de la section Livres */
.sous-bloc {
	margin: 64px 0 24px;
	font-family: var(--titre);
	font-weight: normal;
	font-size: 40px;
	line-height: 1;
	color: var(--encre);
}
.sous-bloc:first-of-type { margin-top: 0; }
.periode {
	margin: 36px 0 14px;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--doux);
}
.st { font-weight: normal; font-style: italic; color: var(--doux); }
.meta { margin: 0 0 8px !important; font-size: 13px !important; color: var(--doux); }
.prix {
	display: inline-block;
	margin: 0 0 10px !important;
	padding: 2px 10px;
	font-size: 12.5px !important;
	color: #5a4520;
	background: #efe6d2;
	border-radius: 12px;
}
.livre img, .fiche img, .traductions img { background: #eee; object-fit: cover; }

/* Bibliographie : fiches compactes */
.fiches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 14px;
}
.fiche {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 12px;
	background: var(--carte);
	border-radius: 3px;
}
.fiche img {
	flex: none;
	width: 72px;
	height: 103px;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .15);
}
.fiche-texte { min-width: 0; }
.fiche h5 {
	margin: 2px 0 4px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--encre);
}
.fiche details { font-size: 14px; line-height: 1.5; }
.fiche summary {
	cursor: pointer;
	font-size: 13px;
	color: #000;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(0, 0, 0, .3);
}
.fiche details p { margin: 8px 0 10px; }
.fiche .bouton { font-size: 13px; padding: 5px 11px; }

/* Traductions */
.traductions {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}
.traductions li { display: flex; gap: 14px; align-items: center; }
.traductions img { flex: none; width: 48px; height: 69px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }

/* Distinctions */
.distinctions { max-width: 36em; margin: 40px auto 0; }
.distinctions h3 {
	margin: 0 0 12px;
	font-family: var(--titre);
	font-weight: normal;
	font-size: 34px;
	color: var(--encre);
}
.distinctions ul { margin: 0; padding: 0; list-style: none; }
.distinctions li {
	display: flex;
	gap: 16px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.distinctions .annee { flex: none; width: 3em; font-weight: bold; color: var(--encre); }

/* Contact */
.courriel {
	margin: 0;
	text-align: center;
	font-size: 20px;
}
.courriel a { text-decoration: none; border-bottom: 1px solid rgba(0, 0, 0, .3); }
.courriel a:hover { border-color: #000; }

/* Pied de page */
.pied {
	padding: 24px 20px;
	font-size: 13px;
	text-align: center;
	color: var(--doux);
	background: rgba(245, 242, 237, .95);
}
.pied p { margin: 0; }
.pied a { color: inherit; }

/* ---------- Page d'un livre (livre.html) ---------- */
.page-livre .contenu { min-height: 100vh; padding-top: var(--hauteur-nav); }
.page-livre .entete .nav-nom { opacity: 1; pointer-events: auto; }
.fiche-livre { max-width: 860px; padding-top: 40px; }
.retour { margin: 0 0 32px; font-size: 14px; }
.retour a { color: var(--doux); text-decoration: none; }
.retour a:hover { color: #000; text-decoration: underline; }

.fiche-tete {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 40px;
	align-items: start;
}
.fiche-couv {
	width: 240px;
	height: auto;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
	background: #eee;
}
.fiche-auteur {
	margin: 0 0 6px;
	font-size: 13px;
	letter-spacing: .25em;
	text-transform: uppercase;
	color: var(--doux);
}
.fiche-titre {
	margin: 0 0 6px;
	font-family: var(--titre);
	font-weight: normal;
	font-size: clamp(44px, 7vw, 68px);
	line-height: 1;
	color: var(--encre);
}
.fiche-st { margin: 0 0 14px; font-size: 18px; font-style: italic; color: var(--doux); }
.fiche-infos {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 18px;
	margin: 18px 0 0;
	font-size: 15px;
}
.fiche-infos dt { color: var(--doux); }
.fiche-infos dd { margin: 0; color: var(--encre); }

.fiche-section { margin-top: 52px; }
.fiche-section h2 {
	margin: 0 0 16px;
	font-family: var(--titre);
	font-weight: normal;
	font-size: 38px;
	line-height: 1;
	color: var(--encre);
}
.fiche-section > p, .fiche-section blockquote p { font-size: 17.5px; line-height: 1.7; margin: 0 0 1em; }
.fiche-section blockquote { margin: 0; padding-left: 22px; border-left: 2px solid rgba(0, 0, 0, .2); }
.extrait p { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.liste { margin: 0; padding-left: 1.2em; font-size: 16px; }
.liste li { margin-bottom: 6px; }

.presse { margin: 0; padding: 0; list-style: none; }
.presse li {
	margin-bottom: 14px;
	padding: 16px 20px;
	background: var(--carte);
	border-radius: 3px;
}
.presse li p { margin: 0; font-size: 16px; }
.presse .presse-source { margin-top: 8px; font-size: 13.5px; color: var(--doux); }
.presse .presse-source b { color: var(--encre); font-weight: 600; }

.liens { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.lien-discret { font-size: 14px; color: var(--doux); }

.fiche-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 64px;
	padding-top: 24px;
	border-top: 1px solid rgba(0, 0, 0, .1);
}
.fiche-nav a {
	display: block;
	padding: 12px 0;
	font-size: 17px;
	color: var(--encre);
	text-decoration: none;
}
.fiche-nav a:hover { text-decoration: underline; }
.fiche-nav a span { display: block; margin-bottom: 2px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.fiche-nav .suiv { text-align: right; }

@media (max-width: 640px) {
	.fiche-tete { grid-template-columns: 1fr; gap: 24px; justify-items: center; text-align: center; }
	.fiche-couv { width: 190px; }
	.fiche-infos { text-align: left; }
	.fiche-livre { padding-top: 24px; }
}

/* Titres cliquables dans la bibliographie */
.fiche h5 a, .livre h4 a { color: inherit; text-decoration: none; }
.fiche h5 a:hover, .livre h4 a:hover { text-decoration: underline; }
