/*
 * Passion Musique v2
 * Bandeau jaune + fanions, héros sur le fond vert « baguette », Gérard sur un disque jaune,
 * trophées posés sur des nuages, actualités en cartes, pages intérieures en feuille claire.
 */

:root {
	--jaune: #fadc27;
	--jaune-2: #f9d80e;
	--orange: #ea5a0b;
	--orange-fonce: #a83c03;
	--vert: #10996d;
	--vert-fonce: #0b5e2c;
	--encre: #2a1d12;
	--texte-doux: #5a4a3a;
	--gris: #7a6a5a;
	--papier: #fffaf0;
	--creme: #f4ecd8;
	--f-display: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
	--f-texte: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--r: 22px;
	--ressort: cubic-bezier(.3, 1.6, .5, 1);
}

/* ---------- Base ---------- */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--papier);
	color: var(--encre);
	font-family: var(--f-texte);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--vert);
	outline-offset: 3px;
	border-radius: 6px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--f-display);
	color: var(--orange);
	line-height: 1.1;
	text-wrap: balance;
	margin: 0;
}

.wrap {
	max-width: 1180px;
	margin-inline: auto;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	background: var(--encre);
	color: #fff;
	padding: 10px 16px;
	border-radius: 0 0 10px 10px;
	text-decoration: none;
	font-weight: 700;
}

.skip-link:focus {
	top: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Boutons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	text-decoration: none;
	padding: 14px 22px;
	border-radius: 99px;
	font-size: 17px;
	line-height: 1.2;
	transition: transform .2s, box-shadow .2s;
}

.btn svg {
	width: 18px;
	height: 18px;
}

.btn-o {
	background: var(--orange);
	color: #fff;
	box-shadow: 0 6px 0 var(--orange-fonce);
}

.btn-o:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 0 var(--orange-fonce);
}

.btn-l {
	background: #fff;
	color: var(--vert-fonce);
}

.btn-l:hover {
	transform: translateY(-2px);
}

/* ---------- En-tête et fanions ---------- */

.header {
	background: var(--jaune);
	position: relative;
	z-index: 5;
}

.header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	padding-block: 22px 0;
}

.logo {
	display: block;
	width: 190px;
	height: auto;
	margin-bottom: 22px;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav li {
	position: relative;
	width: 132px;
	height: 66px;
	margin-top: 52px;
	margin-bottom: -22px;
}

/* Les icônes suivent l'ordre du menu, comme dans la v1 (5 icônes, puis on recommence). */
.nav li:nth-child(5n + 1) { --ico: url('../assets/images/logo-p-blanche.svg'); }
.nav li:nth-child(5n + 2) { --ico: url('../assets/images/logo-croche-blanche.svg'); }
.nav li:nth-child(5n + 3) { --ico: url('../assets/images/baguette-blanche.svg'); }
.nav li:nth-child(5n + 4) { --ico: url('../assets/images/micro-blanc.svg'); }
.nav li:nth-child(5n + 5) { --ico: url('../assets/images/point-orgue.svg'); }

.nav a {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 2px 8px 0;
	text-align: center;
	text-decoration: none;
	font-family: var(--f-display);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.1;
	outline: none;
	/* Le lien forme son propre empilement : la bulle et le fanion sont dedans, donc
	   toute la bulle est cliquable, même hors survol. */
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
	transition: transform .12s ease-in;
}

/* Le fanion, sous le texte. */
.nav a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url('../assets/images/music.webp') center / 100% 100% no-repeat;
}

/* La bulle : derrière le fanion, elle monte au survol et redescend aussitôt après. */
.nav a::before {
	content: '';
	position: absolute;
	width: 74px;
	height: 74px;
	left: 50%;
	top: -50px;
	translate: -50% 0;
	border-radius: 50%;
	background: var(--orange) var(--ico) center / 48% auto no-repeat;
	box-shadow: 0 0 0 5px var(--jaune);
	z-index: -2;
	transition: transform .12s ease-in;
}

.nav a:hover,
.nav a:focus-visible {
	transform: translateY(-6px) rotate(-2deg);
}

.nav a:hover::before,
.nav a:focus-visible::before {
	transform: translateY(-4px) scale(1.06);
}

.nav a:hover,
.nav a:hover::before,
.nav a:focus-visible,
.nav a:focus-visible::before {
	transition: transform .35s var(--ressort);
}

.nav a:focus-visible {
	text-decoration: underline 3px var(--orange);
	text-underline-offset: 4px;
}

/* Page en cours : bulle cerclée de blanc (un texte orange se perdrait dans le liseré du fanion). */
.nav .current-menu-item > a::before,
.nav .current_page_item > a::before,
.nav a[aria-current]::before {
	box-shadow: 0 0 0 5px #fff;
}

/* ---------- Héros ---------- */

.hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: var(--vert-fonce) var(--fond) center / 520px repeat;
	border-bottom: 8px solid var(--jaune);
}

.hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 75% 60%, transparent 0 30%, rgb(8 60 28 / .55) 80%);
	pointer-events: none;
}

.hero .wrap {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 24px;
	align-items: center;
	padding-block: 80px 0;
}

.hero-txt {
	min-width: 0;
	padding-bottom: 70px;
}

.kicker {
	display: inline-flex;
	background: var(--jaune);
	color: var(--encre);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 99px;
}

.hero h1 {
	color: #fff;
	font-size: clamp(40px, 6.4vw, 78px);
	font-weight: 800;
	letter-spacing: -.02em;
	margin: 18px 0;
}

.hero h1 em {
	position: relative;
	font-style: normal;
	color: var(--jaune);
	white-space: nowrap;
}

.hero h1 em svg {
	position: absolute;
	left: 0;
	bottom: -.12em;
	width: 100%;
	height: .28em;
	color: var(--orange);
}

.hero .lead {
	font-size: 19px;
	max-width: 34ch;
	color: #eaf6ec;
	margin: 0 0 28px;
}

.ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.portrait {
	position: relative;
	align-self: end;
	justify-self: center;
	width: min(440px, 100%);
}

.portrait .disque {
	position: absolute;
	inset: 8% 2% -12% 2%;
	background: var(--jaune);
	border-radius: 50%;
	box-shadow: 0 0 0 14px rgb(250 220 39 / .25);
}

.portrait img {
	position: relative;
	display: block;
	width: 100%;
}

.portrait .note {
	position: absolute;
	right: -16%;
	top: 8%;
	background: #fff;
	color: var(--encre);
	border-radius: 16px;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.3;
	box-shadow: 0 10px 30px rgb(0 0 0 / .25);
	rotate: 4deg;
}

.portrait .note b {
	display: block;
	font-family: var(--f-display);
	color: var(--orange);
	font-size: 18px;
}

/* ---------- Présentation ---------- */

.intro {
	padding-block: 56px 70px;
	scroll-margin-top: 20px;
}

/* À gauche le titre puis le palmarès, à droite le texte de la page d'accueil. */
.intro .wrap {
	display: grid;
	grid-template-columns: 1fr 1.3fr;
	grid-template-areas:
		'titre    texte'
		'palmares texte';
	grid-template-rows: auto 1fr;
	gap: 28px 48px;
	align-items: start;
}

.intro-titre {
	grid-area: titre;
	font-size: clamp(30px, 3.6vw, 44px);
}

.intro .txt {
	grid-area: texte;
	min-width: 0;
}

.intro .palmares {
	grid-area: palmares;
	min-width: 0;
}

.intro-seule .wrap {
	grid-template-columns: 1fr;
	grid-template-areas: 'palmares';
}

/* ---------- Palmarès ---------- */

.palmares-head,
.actus-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: end;
	gap: 12px;
}

.palmares-head {
	margin-bottom: 10px;
}

.palmares h2 {
	font-size: clamp(22px, 2.2vw, 28px);
}

.actus h2,
.liste h1 {
	font-size: clamp(28px, 3.4vw, 40px);
}

.palmares-head p {
	margin: 0;
	color: var(--gris);
	max-width: 44ch;
}

.scene {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	align-items: end;
	gap: 64px 20px;
	padding: 24px 6% 34px;
}

.intro-seule .scene {
	grid-template-columns: repeat(4, 1fr);
}

.trophee {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: transform .35s var(--ressort);
}

.trophee:hover {
	transform: translateY(-10px) rotate(-2deg);
}

/* Chaque trophée est posé sur son nuage. */
.trophee::before {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -26px;
	translate: -50% 0;
	width: min(260px, 125%);
	aspect-ratio: 543 / 194;
	background: url('../assets/images/nuages.svg') center / contain no-repeat;
	z-index: 0;
}

.trophee img {
	position: relative;
	z-index: 1;
	width: auto;
	height: 150px;
	filter: drop-shadow(0 14px 12px rgb(60 40 0 / .25));
}

.trophee:nth-child(odd) img {
	height: 175px;
}

.annee {
	position: relative;
	z-index: 2;
	margin-top: -6px;
	font-family: var(--f-display);
	font-weight: 800;
	font-size: 22px;
	color: var(--encre);
	background: #fff;
	border-radius: 99px;
	padding: 2px 14px;
	font-variant-numeric: tabular-nums;
}

/* ---------- Actualités ---------- */

.actus {
	background: var(--jaune);
	padding-block: 100px 70px;
}

.actus-head {
	margin-bottom: 28px;
}

.actus h2 {
	color: var(--encre);
}

.lien {
	font-weight: 700;
	color: var(--encre);
	text-decoration-color: var(--orange);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.cartes {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 18px;
}

.carte {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	background: var(--papier);
	border-radius: var(--r);
	padding: 22px;
	text-decoration: none;
	transition: transform .2s, box-shadow .2s;
}

.carte:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 0 var(--orange);
}

.date {
	align-self: flex-start;
	display: inline-block;
	background: var(--vert);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 99px;
	font-variant-numeric: tabular-nums;
}

.carte h3 {
	font-size: 22px;
	overflow-wrap: anywhere;
}

.carte p {
	margin: 0;
	color: var(--texte-doux);
}

.carte .plus {
	margin-top: auto;
	font-weight: 700;
	color: var(--orange);
}

.carte.une {
	background: var(--vert-fonce) url('../assets/images/passion_musique_fonds-baguette.webp') center / 360px;
	color: #fff;
}

.carte.une h3 {
	color: var(--jaune);
	font-size: 28px;
}

.carte.une p {
	color: #e3f2e6;
}

.carte.une .plus {
	color: var(--jaune);
}

/* Moins de trois articles : les cartes se partagent la largeur. */
.cartes:has(> .carte:only-child) {
	grid-template-columns: 1fr;
}

.cartes:has(> .carte:nth-child(2):last-child) {
	grid-template-columns: 1.4fr 1fr;
}

/* Page des actualités */
.liste {
	padding-block: 50px 70px;
}

.liste h1 {
	margin-bottom: 28px;
}

.cartes-liste {
	grid-template-columns: repeat(3, 1fr) !important;
}

.cartes-liste .carte {
	background: #fff;
	border: 2px solid var(--jaune);
}

.vide {
	color: var(--gris);
}

.pagination {
	margin-top: 36px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 99px;
	background: #fff;
	border: 2px solid var(--jaune);
	font-weight: 700;
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--orange);
	border-color: var(--orange);
	color: #fff;
}

/* ---------- Bandeau contact ---------- */

.contact {
	padding-block: 60px;
}

.contact .wrap {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 28px;
	align-items: center;
}

.contact-ico {
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: var(--orange) url('../assets/images/point-orgue.svg') center / 50% auto no-repeat;
}

.contact h2 {
	font-size: clamp(26px, 3vw, 36px);
}

.contact p {
	margin: 6px 0 0;
	color: var(--gris);
}

.coord {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.tel {
	font-family: var(--f-display);
	font-weight: 800;
	font-size: clamp(26px, 3.2vw, 38px);
	color: var(--encre);
	text-decoration: none;
	font-variant-numeric: tabular-nums;
	letter-spacing: .01em;
}

.mail {
	font-weight: 600;
	color: var(--vert);
	overflow-wrap: anywhere;
}

/* ---------- Pied de page ---------- */

.pied {
	position: relative;
	background: var(--jaune-2);
}

.vague-h {
	position: absolute;
	bottom: 100%;
	left: 0;
	width: 100%;
	height: 36px;
	fill: var(--jaune-2);
	display: block;
}

.pied .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-block: 28px;
}

.pied img {
	display: block;
	width: 120px;
}

.pied-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-weight: 600;
}

.pied-menu a {
	text-decoration: none;
}

.pied-menu a:hover {
	text-decoration: underline 2px var(--orange);
	text-underline-offset: 4px;
}

.facebook {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	text-decoration: none;
	background: var(--encre);
	color: #fff;
	padding: 8px 16px 8px 10px;
	border-radius: 99px;
	transition: transform .2s;
}

.facebook:hover {
	transform: translateY(-2px);
}

.facebook svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.pied small {
	color: #6b5a00;
}

/* ---------- Pages intérieures : la feuille ---------- */

.fond-vert {
	background: var(--vert-fonce) var(--fond) center / 520px;
	padding-block: 60px 90px;
}

/* Fond propre à chaque page (passion_background()) : motif en mosaïque ou photo plein cadre. */
.hero,
.fond-vert {
	--fond: url('../assets/images/passion_musique_fonds-baguette.webp');
}

.fond-tuile {
	background-size: 520px;
	background-repeat: repeat;
}

.fond-photo {
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
}

/* Une photo derrière le héros (le pêle-mêle des élèves sur l'accueil) passe sous un voile vert :
   le haut de page garde sa couleur et le titre reste lisible. */
.hero.fond-photo::after {
	background:
		linear-gradient(90deg, rgb(11 94 44 / .94) 0 38%, rgb(11 94 44 / .72) 60%, rgb(11 94 44 / .55)),
		radial-gradient(ellipse at 75% 60%, transparent 0 30%, rgb(8 60 28 / .55) 80%);
}

.feuille {
	max-width: 760px;
	margin-inline: auto;
	background: var(--papier);
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 30px 60px rgb(0 0 0 / .3);
}

.feuille-head {
	position: relative;
	background: var(--jaune);
	padding: 30px clamp(20px, 5vw, 48px) 26px;
}

.feuille-head .date {
	margin-bottom: 10px;
}

.ariane {
	font-size: 14px;
	color: #6b5a00;
	margin-bottom: 6px;
}

.ariane a {
	text-decoration: none;
}

.ariane a:hover {
	text-decoration: underline;
}

.feuille h1 {
	font-size: clamp(34px, 5vw, 52px);
	overflow-wrap: anywhere;
}

/* Une portée orange en bas de l'en-tête. */
.portee {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 18px;
	background: repeating-linear-gradient(to bottom, var(--orange) 0 2px, transparent 2px 4px);
	opacity: .35;
}

.corps {
	padding: 30px clamp(20px, 5vw, 48px) 40px;
}

.suite {
	max-width: 760px;
	margin: 22px auto 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
}

.suite a {
	background: var(--papier);
	padding: 10px 16px;
	border-radius: 99px;
	font-weight: 700;
	text-decoration: none;
	max-width: 100%;
}

.suite a:hover {
	background: var(--jaune);
}

/* ---------- Contenu Gutenberg (.entry) ---------- */

.entry > * {
	margin-block: 0 16px;
}

.entry > :last-child {
	margin-bottom: 0;
}

.entry p,
.entry li {
	max-width: 64ch;
}

.entry h2 {
	font-size: 26px;
	margin-top: 32px;
	margin-bottom: 10px;
}

.entry h3 {
	font-size: 21px;
	margin-top: 24px;
	margin-bottom: 8px;
}

.entry a:not(.btn):not(.wp-block-button__link):not(.wp-block-file__button) {
	color: var(--vert);
	font-weight: 600;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.entry ul,
.entry ol {
	padding-left: 1.3em;
}

.entry ul li::marker {
	color: var(--orange);
}

.entry blockquote {
	margin-inline: 0;
	padding: 14px 20px;
	border-left: 4px solid var(--jaune);
	background: #fff;
	border-radius: 0 14px 14px 0;
	font-style: italic;
}

.entry .divider {
	height: 2px;
	background: var(--jaune);
	margin-block: 32px;
}

.entry hr {
	border: 0;
	height: 2px;
	background: var(--jaune);
	margin-block: 28px;
}

.entry img {
	border-radius: 14px;
}

.entry figure {
	margin-inline: 0;
}

.entry figcaption {
	font-size: 14px;
	color: var(--gris);
	margin-top: 6px;
	text-align: center;
}

.entry table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.entry .wp-block-table {
	overflow-x: auto;
}

.entry iframe {
	display: block;
	max-width: 100%;
	border: 0;
	border-radius: 14px;
}

.entry th,
.entry td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--creme);
	text-align: left;
}

.entry th {
	font-family: var(--f-display);
	color: var(--orange);
}

/* Alignements */
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }
.aligncenter { margin-inline: auto; text-align: center; }
.aligncenter img { margin-inline: auto; }
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.entry::after { content: ''; display: block; clear: both; }

/* Colonnes, groupes, galeries */
.wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.wp-block-column {
	flex: 1 1 220px;
	min-width: 0;
}

.is-layout-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.is-vertical {
	flex-direction: column;
}

.is-content-justification-center {
	justify-content: center;
}

/*
 * Galeries : une grille de vignettes de même forme. Les photos du site font
 * 300 à 500 px de large : étirées sur toute la feuille, elles pixelisaient.
 * « .entry » en tête l'emporte sur « body .is-layout-flex » que WordPress écrit
 * en ligne (la galerie y passerait en flex, une photo par ligne). Un clic
 * ouvre la photo en grand (js/lightbox.js).
 */
.entry .wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
	gap: 12px;
	margin-block: 24px;
	padding: 0;
}

/* 2 ou 4 photos : deux colonnes plutôt qu'une ligne bancale. */
.entry .wp-block-gallery:has(> figure:nth-child(2):last-child),
.entry .wp-block-gallery:has(> figure:nth-child(4):last-child) {
	grid-template-columns: repeat(2, 1fr);
}

.entry .wp-block-gallery > figure {
	position: relative;
	/* la CSS de galerie de WordPress (quand elle est chargée) donne aux photos
	   une largeur en % avec un sélecteur :not(#id) : on reprend la main */
	width: auto !important;
	max-width: none;
	margin: 0 !important;
	overflow: hidden;
	border-radius: 14px;
	background: var(--creme);
	box-shadow: 0 6px 16px rgb(42 29 18 / .14);
}

.entry .wp-block-gallery img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	/* les visages sont plutôt en haut des photos */
	object-position: 50% 30%;
	border-radius: 0;
	transition: transform .5s ease;
}

.entry .wp-block-gallery:not(.is-cropped) img {
	aspect-ratio: auto;
	height: auto;
}

.entry .wp-block-gallery [data-zoom] {
	cursor: zoom-in;
}

.entry .wp-block-gallery figure:hover img,
.entry .wp-block-gallery figure:focus-visible img {
	transform: scale(1.05);
}

.entry .wp-block-gallery figcaption {
	position: absolute;
	inset: auto 0 0;
	margin: 0;
	padding: 24px 10px 8px;
	background: linear-gradient(transparent, rgb(0 0 0 / .65));
	color: #fff;
	font-size: 13px;
}

/* Une seule photo : à sa taille réelle, centrée, jamais agrandie. */
.entry .wp-block-gallery:has(> figure:only-child) {
	display: flex;
	justify-content: center;
}

.entry .wp-block-gallery > figure:only-child img {
	width: auto;
	height: auto;
	aspect-ratio: auto;
}

@media (max-width: 480px) {
	.entry .wp-block-gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
}

/* Image seule : jamais plus large que son fichier, centrée. */
.entry .wp-block-image:not(.alignleft):not(.alignright) {
	text-align: center;
}

/* ---------- Visionneuse (js/lightbox.js) ---------- */

.visionneuse {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	grid-template-columns: 56px 1fr 56px;
	grid-template-rows: 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 24px 12px 16px;
	background: rgb(20 14 8 / .92);
	color: #fff;
	opacity: 0;
	transition: opacity .2s;
}

.visionneuse.est-ouverte {
	opacity: 1;
}

.visionneuse[hidden] {
	display: none;
}

.visionneuse-image {
	grid-column: 2;
	justify-self: center;
	max-width: 100%;
	max-height: calc(100vh - 110px);
	border-radius: 10px;
	box-shadow: 0 20px 50px rgb(0 0 0 / .5);
	object-fit: contain;
}

.visionneuse-pied {
	grid-column: 1 / -1;
	text-align: center;
	font-size: 14px;
	opacity: .85;
}

.visionneuse button {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / .12);
	color: #fff;
	cursor: pointer;
	transition: background .2s;
}

.visionneuse button:hover,
.visionneuse button:focus-visible {
	background: var(--orange);
}

.visionneuse button svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.visionneuse-prec { grid-column: 1; grid-row: 1; }
.visionneuse-suiv { grid-column: 3; grid-row: 1; }

.visionneuse-fermer {
	position: absolute;
	top: 14px;
	right: 14px;
}

.visionneuse.est-seule .visionneuse-prec,
.visionneuse.est-seule .visionneuse-suiv {
	visibility: hidden;
}

@media (max-width: 600px) {
	.visionneuse {
		grid-template-columns: 1fr;
		padding-inline: 8px;
	}
	.visionneuse-image { grid-column: 1; }
	/* sur mobile : on balaie l'image, les flèches passent en bas */
	.visionneuse-prec,
	.visionneuse-suiv {
		position: absolute;
		bottom: 12px;
	}
	.visionneuse-prec { left: 12px; }
	.visionneuse-suiv { right: 12px; }
}

/* Boutons */
.wp-block-button__link {
	display: inline-flex;
	background: var(--orange);
	color: #fff;
	padding: 12px 22px;
	border-radius: 99px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 5px 0 var(--orange-fonce);
	transition: transform .2s;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
}

.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--orange);
	border: 2px solid var(--orange);
	box-shadow: none;
}

/* Fichiers à télécharger */
.wp-block-file {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	background: var(--vert);
	color: #fff;
	border-radius: 14px;
	padding: 14px 18px;
	font-weight: 600;
}

.wp-block-file a:not(.wp-block-file__button) {
	color: #fff !important;
}

.wp-block-file__button {
	background: #fff;
	color: var(--vert-fonce);
	padding: 6px 14px;
	border-radius: 99px;
	text-decoration: none;
	font-weight: 700;
}

.wp-block-embed iframe,
.wp-block-video video {
	width: 100%;
	border-radius: 14px;
}

/* Vidéo YouTube en attente du clic (inc/performance.php, js/youtube.js) */
.yt {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 14px;
	background: var(--encre);
}

.yt img,
.yt iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

.yt-play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: rgb(0 0 0 / .12);
	cursor: pointer;
	transition: background .2s;
}

.yt-play svg {
	width: 68px;
	height: 48px;
}

.yt-fond {
	fill: #212121;
	fill-opacity: .85;
	transition: fill .2s, fill-opacity .2s;
}

.yt-play:hover,
.yt-play:focus-visible {
	background: rgb(0 0 0 / 0);
}

.yt-play:hover .yt-fond,
.yt-play:focus-visible .yt-fond {
	fill: #f00;
	fill-opacity: 1;
}

.wp-block-audio audio {
	width: 100%;
}

/* Couleurs de la palette de l'éditeur */
.has-jaune-color { color: var(--jaune); }
.has-orange-color { color: var(--orange); }
.has-vert-color { color: var(--vert); }
.has-vert-fonce-color { color: var(--vert-fonce); }
.has-encre-color { color: var(--encre); }
.has-papier-color { color: var(--papier); }
.has-jaune-background-color { background-color: var(--jaune); }
.has-orange-background-color { background-color: var(--orange); }
.has-vert-background-color { background-color: var(--vert); }
.has-vert-fonce-background-color { background-color: var(--vert-fonce); }
.has-encre-background-color { background-color: var(--encre); }
.has-papier-background-color { background-color: var(--papier); }
.has-background { padding: 16px 20px; border-radius: 14px; }

/* ---------- Lecteur d'album (js/player.js) ---------- */

.album {
	--cover: 200px;
	display: grid;
	grid-template-columns: var(--cover) 1fr;
	gap: 22px 34px;
	align-items: center;
	margin-block: 24px;
	padding: 22px;
	background: var(--encre);
	color: #fff7e0;
	border-radius: 20px;
	max-width: none !important;
}

/* La pochette, et le disque qui en sort pendant la lecture. */
.album-cover {
	position: relative;
	width: var(--cover);
	aspect-ratio: 1;
	margin-right: 18px;
}

.album-cover img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px !important;
	box-shadow: 0 12px 26px rgb(0 0 0 / .45);
}

.album-vinyle {
	position: absolute;
	inset: 4%;
	border-radius: 50%;
	background:
		radial-gradient(circle, var(--orange) 0 15%, var(--jaune) 15% 17%, transparent 17%),
		repeating-radial-gradient(circle, #1a1410 0 2px, #2d241c 2px 3px);
	box-shadow: 0 6px 16px rgb(0 0 0 / .5);
	transition: transform .6s var(--ressort);
}

.album-vinyle::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 5%;
	aspect-ratio: 1;
	translate: -50% -50%;
	border-radius: 50%;
	background: var(--encre);
}

.sans-pochette {
	background: var(--orange) url('../assets/images/logo-croche-blanche.svg') center / 40% no-repeat;
	border-radius: 6px;
}

.album.is-playing .album-vinyle {
	transform: translateX(28%);
	animation: passion-tourne 2.4s linear infinite;
	animation-delay: .6s;
}

@keyframes passion-tourne {
	from { transform: translateX(28%) rotate(0); }
	to { transform: translateX(28%) rotate(360deg); }
}

.album-main {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.album-count {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jaune);
}

.album-now {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 1.15;
	color: #fff;
	overflow-wrap: anywhere;
}

.album-now-num {
	margin-right: 10px;
	color: var(--orange);
	font-variant-numeric: tabular-nums;
}

.album-controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

.album-btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / .1);
	color: #fff;
	cursor: pointer;
	transition: background .2s, transform .2s;
}

.album-btn:hover {
	background: rgb(255 255 255 / .2);
}

.album-btn svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.album-play {
	width: 58px;
	height: 58px;
	background: var(--orange);
	box-shadow: 0 4px 0 var(--orange-fonce);
}

.album-play:hover {
	background: var(--orange);
	transform: translateY(-2px);
}

.album-play svg {
	width: 26px;
	height: 26px;
}

.album-bar {
	display: flex;
	align-items: center;
	gap: 10px;
}

.album-time {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: #d9cdb5;
	min-width: 34px;
}

.album-range {
	--p: 0%;
	flex: 1;
	min-width: 0;
	height: 6px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	border-radius: 99px;
	background: linear-gradient(90deg, var(--jaune) var(--p), rgb(255 255 255 / .18) var(--p));
	cursor: pointer;
}

.album-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--jaune);
	border: 0;
}

.album-range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--jaune);
	border: 0;
}

.album-tracks {
	grid-column: 1 / -1;
	list-style: none;
	margin: 0 !important;
	padding: 6px 0 0 !important;
	border-top: 1px solid rgb(255 255 255 / .12);
	max-width: none !important;
	columns: 2;
	column-gap: 18px;
}

.album-tracks li {
	break-inside: avoid;
	max-width: none !important;
}

.album-track {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #f1e6cf;
	font: inherit;
	font-size: 15px;
	text-align: left;
	cursor: pointer;
}

.album-track:hover {
	background: rgb(255 255 255 / .07);
}

.album-num {
	min-width: 20px;
	color: #a8987c;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.album-name {
	flex: 1;
	min-width: 0;
}

.album-track.is-current {
	background: rgb(250 220 39 / .14);
	color: var(--jaune);
	font-weight: 700;
}

.album-track.is-current .album-num {
	color: var(--orange);
}

/* Petit égaliseur sur le morceau en cours de lecture. */
.album-eq {
	display: none;
	align-items: flex-end;
	gap: 2px;
	height: 14px;
}

.album-eq i {
	width: 3px;
	height: 100%;
	background: var(--orange);
	border-radius: 2px;
	animation: passion-eq .9s ease-in-out infinite alternate;
}

.album-eq i:nth-child(2) { animation-delay: -.3s; }
.album-eq i:nth-child(3) { animation-delay: -.6s; }

.album.is-playing .album-track.is-current .album-eq {
	display: flex;
}

@keyframes passion-eq {
	from { transform: scaleY(.25); }
	to { transform: scaleY(1); }
}

.album-eq i {
	transform-origin: bottom;
}

/* ---------- Écrans moyens ---------- */

@media (max-width: 900px) {
	.header .wrap {
		justify-content: center;
	}

	.logo {
		margin-bottom: 0;
	}

	.hero .wrap,
	.intro .wrap {
		grid-template-columns: 1fr;
	}

	.intro .wrap {
		gap: 20px;
		grid-template-rows: none;
		grid-template-areas: 'titre' 'texte' 'palmares';
	}

	.intro .palmares {
		margin-top: 20px;
	}

	.hero-txt {
		padding-bottom: 10px;
	}

	.portrait {
		width: min(340px, 90%);
	}

	.cartes,
	.cartes-liste,
	.cartes:has(> .carte:nth-child(2):last-child) {
		grid-template-columns: 1fr !important;
	}

	.contact .wrap {
		grid-template-columns: 1fr;
		justify-items: start;
	}
}

/* ---------- Téléphones ---------- */

@media (max-width: 620px) {
	.header .wrap {
		padding-bottom: 16px;
	}

	.nav li {
		width: 31%;
		min-width: 96px;
		height: 52px;
		margin-top: 44px;
		margin-bottom: 0;
	}

	.nav a {
		font-size: 13px;
	}

	.header nav {
		flex-basis: 100%;
	}

	/* Quatre entrées (le menu actuel) : une seule rangée plutôt que trois plus une. */
	.nav:has(> li:nth-child(4):last-child) li {
		width: calc(25% - 3px);
		min-width: 0;
	}

	.nav:has(> li:nth-child(4):last-child) a {
		font-size: 12px;
	}

	.nav a::before {
		width: 54px;
		height: 54px;
		top: -38px;
		box-shadow: 0 0 0 4px var(--jaune);
	}

	.portrait .note {
		right: -8%;
		top: 4%;
	}

	.scene,
	.intro-seule .scene {
		grid-template-columns: repeat(2, 1fr);
		row-gap: 70px;
	}

	.trophee::before {
		width: 125%;
	}

	.trophee img,
	.trophee:nth-child(odd) img {
		height: 140px;
	}

	.fond-vert {
		padding-block: 30px 60px;
	}

	.alignleft,
	.alignright {
		float: none;
		margin-inline: auto;
	}

	.album {
		--cover: 150px;
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
		padding: 18px;
	}

	.album-main {
		width: 100%;
		align-items: center;
	}

	.album-bar {
		width: 100%;
	}

	.album-tracks {
		columns: 1;
		max-height: 330px;
		overflow-y: auto;
		width: 100%;
	}
}

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