/*
 * La page « Mode d'emploi » (page-mode-demploi.php), 13 novembre 2026 :
 * quatre étapes, une par geste (lire, télécharger, écouter, regarder), les
 * explications par appareil repliées, les rubriques, puis l'abonnement.
 * La palette du site : turquoise, encre #0B3B39, blanc.
 */

/* Les ancres passent sous l'en-tête collant : on garde de quoi respirer. */
.ebooks-mode [id] {
	scroll-margin-top: 110px;
}

@media (prefers-reduced-motion: no-preference) {
	html:has(.ebooks-mode) {
		scroll-behavior: smooth;
	}
}

/* --- L'introduction ----------------------------------------------------- */

.ebooks-mode__intro {
	max-width: 760px;
	margin: 0 auto clamp(2rem, 5vw, 3rem);
	text-align: center;
}

.ebooks-mode__intro p {
	margin: 0 0 0.8rem;
	padding: 0;
	color: #3C4A49;
	font-size: clamp(1.05rem, 1.6vw, 1.2rem);
	line-height: 1.65;
}

.ebooks-mode__intro .ebooks-mode__auteurs {
	color: #5A6B6A;
	font-size: 0.95rem;
}

/* --- Les quatre usages, en sommaire (sans ordre ni numéro) ----------- */

.ebooks-mode__etapes ul {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 0 0 clamp(2.5rem, 6vw, 4rem);
	padding: 0;
	list-style: none;
}

.ebooks-mode__etapes li {
	list-style: none;
}

body .ebooks-mode__etapes a {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	height: 100%;
	padding: 1.4rem 1.3rem 1.3rem;
	border: 1px solid #E0ECEB;
	border-radius: 18px;
	background: #fff;
	color: #0B3B39;
	text-decoration: none;
	box-shadow: 0 14px 34px -26px rgba(11, 59, 57, 0.5);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body .ebooks-mode__etapes a:hover,
body .ebooks-mode__etapes a:focus-visible {
	border-color: var(--ebooks-turquoise, #10CFC9);
	box-shadow: 0 20px 40px -24px rgba(11, 59, 57, 0.55);
	transform: translateY(-3px);
}

.ebooks-mode__etapes i {
	display: block;
	width: 44px;
	height: 44px;
	margin-bottom: 0.6rem;
	border-radius: 50%;
	background: var(--ebooks-turquoise, #10CFC9);
	color: #0B3B39;
	font-size: 19px;
	line-height: 44px;
	text-align: center;
}

.ebooks-mode__etapes b {
	font-size: 1.1rem;
}

.ebooks-mode__etapes a > span:last-child {
	color: #5A6B6A;
	font-size: 0.9rem;
}

/* --- Une étape : le texte d'un côté, l'image de l'autre ----------------- */

.ebooks-mode__etape {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
	padding: clamp(3rem, 7vw, 5rem) 0;
}

/* Une étape sur deux sur fond clair, l'image passe à gauche. */
.ebooks-mode__etape:nth-of-type(even) {
	box-shadow: 0 0 0 100vmax #F2F7F7;
	clip-path: inset(0 -100vmax);
	background: #F2F7F7;
}

.ebooks-mode__etape:nth-of-type(even) .ebooks-mode__visuel {
	order: -1;
}

.ebooks-mode__surtitre {
	margin: 0 0 0.3rem;
	padding: 0;
	color: var(--ebooks-turquoise-texte, #0D827E);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

body .ebooks-mode__titre {
	margin: 0 0 1rem;
	color: #000;
	font-family: Anton, var(--nectar-body-font, sans-serif);
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.ebooks-mode__chapo {
	margin: 0 0 1.4rem;
	padding: 0;
	color: #3C4A49;
	font-size: 1.1rem;
	line-height: 1.65;
}

.ebooks-mode__atouts {
	display: grid;
	gap: 0.8rem;
	margin: 0 0 1.6rem;
	padding: 0;
	list-style: none;
}

.ebooks-mode__atouts li {
	display: flex;
	gap: 0.85rem;
	align-items: center;
	list-style: none;
	color: #3C4A49;
}

.ebooks-mode__atouts i {
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #E3EEEE;
	color: #0B3B39;
	font-size: 16px;
	line-height: 38px;
	text-align: center;
}

.ebooks-mode__liens {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin: 0;
	padding: 0;
}

body .ebooks-mode__bouton {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 1.5rem;
	border: 2px solid #0B3B39;
	border-radius: 999px;
	background: #0B3B39;
	color: #fff;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

body .ebooks-mode__bouton:hover,
body .ebooks-mode__bouton:focus-visible {
	background: #fff;
	color: #0B3B39;
	transform: translateY(-2px);
}

body .ebooks-mode__bouton--discret {
	background: transparent;
	color: #0B3B39;
}

body .ebooks-mode__bouton--discret:hover,
body .ebooks-mode__bouton--discret:focus-visible {
	background: #0B3B39;
	color: #fff;
}

body .ebooks-mode__bouton--plein {
	border-color: var(--ebooks-turquoise, #10CFC9);
	background: var(--ebooks-turquoise, #10CFC9);
	color: #0B3B39;
}

/* --- Les images des étapes ------------------------------------------- */

.ebooks-mode__visuel {
	display: grid;
	place-items: center;
	min-height: 320px;
}

/* Un livre posé dans un halo turquoise. */
.ebooks-mode__scene {
	position: relative;
	display: grid;
	place-items: center;
	width: min(100%, 380px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(16, 207, 201, 0.32) 0%, rgba(16, 207, 201, 0.08) 55%, rgba(16, 207, 201, 0) 70%);
}

body .ebooks-mode__scene .ebooks-livre {
	width: auto;
	height: 260px;
}

/* L'onde sonore sous le livre audio. */
.ebooks-mode__onde {
	position: absolute;
	right: 8%;
	bottom: 10%;
	left: 8%;
	display: flex;
	gap: 4px;
	align-items: center;
	height: 42px;
}

.ebooks-mode__onde i {
	flex: 1;
	height: calc(20% + var(--h, 40%));
	border-radius: 3px;
	background: #0D827E;
	opacity: 0.85;
}

.ebooks-mode__onde i:nth-child(3n) { --h: 70%; }
.ebooks-mode__onde i:nth-child(4n) { --h: 20%; }
.ebooks-mode__onde i:nth-child(5n) { --h: 80%; }
.ebooks-mode__onde i:nth-child(7n) { --h: 55%; }

@media (prefers-reduced-motion: no-preference) {
	.ebooks-mode__onde i {
		animation: ebooks-onde 1.6s ease-in-out infinite alternate;
		transform-origin: center;
	}

	.ebooks-mode__onde i:nth-child(2n) { animation-delay: -0.4s; }
	.ebooks-mode__onde i:nth-child(3n) { animation-delay: -0.9s; }
	.ebooks-mode__onde i:nth-child(5n) { animation-delay: -1.3s; }
}

@keyframes ebooks-onde {
	from { transform: scaleY(0.45); }
	to { transform: scaleY(1); }
}

/* Les quatre boutons de téléchargement des fiches, en image. */
.ebooks-mode__formats-visuel {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
	width: min(100%, 420px);
	margin: 0;
	padding: 2rem;
	border-radius: 22px;
	background: #6EC1E4;
	box-shadow: 0 24px 50px -28px rgba(11, 59, 57, 0.6);
	list-style: none;
}

.ebooks-mode__formats-visuel li {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 999px;
	color: #fff;
	font-weight: 700;
	list-style: none;
}

/* Deux vidéos qui se chevauchent. */
.ebooks-mode__videos {
	position: relative;
	width: min(100%, 440px);
	aspect-ratio: 16 / 12;
}

.ebooks-mode__videos span {
	position: absolute;
	width: 78%;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	box-shadow: 0 22px 44px -22px rgba(11, 59, 57, 0.7);
}

.ebooks-mode__videos span:first-child {
	top: 0;
	left: 0;
	transform: rotate(-3deg);
}

.ebooks-mode__videos span:last-child {
	right: 0;
	bottom: 0;
	transform: rotate(2deg);
}

body .ebooks-mode__videos img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.ebooks-mode__videos i {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	transform: translate(-50%, -50%);
}

.ebooks-mode__videos i::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	border-style: solid;
	border-width: 9px 0 9px 14px;
	border-color: transparent transparent transparent #0D827E;
	transform: translate(-50%, -50%);
}

/* --- Les formats, puis les explications par appareil ----------------- */

.ebooks-mode__formats,
.ebooks-mode__details {
	grid-column: 1 / -1;
}

.ebooks-mode__formats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ebooks-mode__formats li {
	padding: 1.5rem;
	border: 1px solid #E0ECEB;
	border-radius: 18px;
	background: #fff;
	list-style: none;
}

.ebooks-mode__formats i {
	color: var(--ebooks-turquoise-texte, #0D827E);
	font-size: 26px;
}

body .ebooks-mode__formats h3 {
	margin: 0.6rem 0 0.4rem;
	color: #0B3B39;
	font-size: 1.1rem;
	font-weight: 700;
}

.ebooks-mode__formats p {
	margin: 0;
	padding: 0;
	color: #5A6B6A;
	font-size: 0.95rem;
	line-height: 1.6;
}

.ebooks-mode__details {
	display: grid;
	gap: 0.7rem;
}

.ebooks-mode__details details {
	border: 1px solid #E0ECEB;
	border-radius: 14px;
	background: #fff;
}

.ebooks-mode__details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.05rem 1.4rem;
	color: #0B3B39;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.ebooks-mode__details summary::-webkit-details-marker {
	display: none;
}

.ebooks-mode__details summary::after {
	content: "+";
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #E3EEEE;
	font-size: 20px;
	font-weight: 400;
	line-height: 30px;
	text-align: center;
	transition: transform 0.25s ease;
}

.ebooks-mode__details details[open] summary::after {
	transform: rotate(45deg);
}

.ebooks-mode__details ol {
	display: grid;
	gap: 1.4rem;
	margin: 0;
	padding: 0 1.4rem 1.4rem;
	counter-reset: ebooks-pas;
	list-style: none;
}

.ebooks-mode__details li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.2rem;
	align-items: center;
	list-style: none;
	counter-increment: ebooks-pas;
}

.ebooks-mode__details li p {
	margin: 0;
	padding: 0;
	color: #3C4A49;
}

.ebooks-mode__details li p::before {
	content: counter(ebooks-pas);
	display: inline-block;
	width: 26px;
	height: 26px;
	margin-right: 0.6rem;
	border-radius: 50%;
	background: var(--ebooks-turquoise, #10CFC9);
	color: #0B3B39;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 26px;
	text-align: center;
}

body .ebooks-mode__details li img {
	width: 100%;
	max-width: 440px;
	height: auto;
	margin: 0;
	border-radius: 10px;
	box-shadow: 0 10px 26px -18px rgba(0, 0, 0, 0.5);
}

body .ebooks-mode__details li.ebooks-mode__portrait img {
	max-width: 220px;
}

/* --- Où trouver quoi -------------------------------------------------- */

.ebooks-mode__rubriques {
	padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
	text-align: center;
}

.ebooks-mode__rubriques ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 1rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.ebooks-mode__rubriques li {
	list-style: none;
}

body .ebooks-mode__rubriques a {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	align-content: start;
	gap: 0.2rem 0.9rem;
	height: 100%;
	padding: 1.1rem 1.2rem;
	border: 1px solid #E0ECEB;
	border-radius: 16px;
	background: #fff;
	color: #0B3B39;
	text-decoration: none;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

body .ebooks-mode__rubriques a:hover,
body .ebooks-mode__rubriques a:focus-visible {
	border-color: var(--ebooks-turquoise, #10CFC9);
	transform: translateY(-2px);
}

.ebooks-mode__rubriques i {
	grid-row: span 2;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #E3EEEE;
	font-size: 18px;
	line-height: 42px;
	text-align: center;
}

.ebooks-mode__rubriques a span {
	color: #5A6B6A;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* --- L'abonnement ----------------------------------------------------- */

.ebooks-mode__abonnement {
	margin: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 7vw, 5rem);
	padding: clamp(2rem, 5vw, 3.5rem);
	border-radius: 22px;
	background:
		radial-gradient(ellipse 60% 90% at 100% 100%, rgba(16, 207, 201, 0.35), rgba(16, 207, 201, 0) 70%),
		#0B3B39;
	color: #fff;
	text-align: center;
}

.ebooks-mode__abonnement > i {
	display: inline-block;
	width: 50px;
	height: 50px;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: var(--ebooks-turquoise, #10CFC9);
	color: #0B3B39;
	font-size: 21px;
	line-height: 50px;
	text-align: center;
}

body .ebooks-mode__abonnement h2 {
	margin: 0 0 0.6rem;
	color: #fff;
	font-family: Anton, var(--nectar-body-font, sans-serif);
	font-size: clamp(1.8rem, 3.6vw, 2.6rem);
	font-weight: 400;
	line-height: 1.1;
	text-transform: uppercase;
}

.ebooks-mode__abonnement p {
	max-width: 52ch;
	margin: 0 auto 1.4rem;
	padding: 0;
	color: #CFE9E8;
}

/* --- Tablette et téléphone ------------------------------------------- */

@media (max-width: 999px) {
	.ebooks-mode__etapes ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.ebooks-mode__etape:nth-of-type(even) .ebooks-mode__visuel {
		order: 0;
	}

	.ebooks-mode__visuel {
		min-height: 0;
	}

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

@media (max-width: 600px) {
	.ebooks-mode__details li {
		grid-template-columns: minmax(0, 1fr);
	}

	body .ebooks-mode__scene .ebooks-livre {
		height: 210px;
	}

	.ebooks-mode__formats-visuel {
		padding: 1.3rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .ebooks-mode__etapes a,
	body .ebooks-mode__bouton,
	body .ebooks-mode__rubriques a,
	.ebooks-mode__details summary::after {
		transition: none;
	}

	body .ebooks-mode__etapes a:hover,
	body .ebooks-mode__bouton:hover,
	body .ebooks-mode__rubriques a:hover {
		transform: none;
	}
}
