/**
 * Thème Cécile Chabloz — styles des sections et composants.
 *
 * Les couleurs, polices, tailles et espacements viennent de theme.json
 * (variables --wp--preset--*). Ce fichier ne contient que ce que theme.json
 * ne sait pas exprimer : formes des sections, bouton MENU, grilles, cartes.
 *
 * Version 0.2.0
 */

/* -------------------------------------------------------------------------
 * 1. Formes des sections (séparateurs en V et en pente)
 *    La couleur de la forme est celle de la section voisine :
 *    --ccphotos-forme-couleur (blanc par défaut).
 * ---------------------------------------------------------------------- */
.ccphotos-forme-v-bas,
.ccphotos-forme-v-haut,
.ccphotos-forme-pente-haut {
	position: relative;
	--ccphotos-forme-couleur: var(--wp--preset--color--blanc);
	--ccphotos-forme-hauteur: clamp(1.25rem, 3vw, 2.5rem);
}

.ccphotos-forme-v-bas::after,
.ccphotos-forme-v-haut::before,
.ccphotos-forme-pente-haut::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: var(--ccphotos-forme-hauteur);
	background: var(--ccphotos-forme-couleur);
	pointer-events: none;
	z-index: 1;
}

/* V vers le bas : la section du dessus « entre » dans la suivante. */
.ccphotos-forme-v-bas::after {
	bottom: 0;
	clip-path: polygon(0 0, 50% 94.7%, 100% 0, 100% 100%, 0 100%);
}

/* V vers le haut : pointe de la section précédente. */
.ccphotos-forme-v-haut::before {
	top: 0;
	clip-path: polygon(0 0, 100% 0, 50% 94.7%);
}

/* Pente du pied de page. Approximation de la forme Elementor actuelle. */
.ccphotos-forme-pente-haut::before {
	top: -1px;
	height: calc(var(--ccphotos-forme-hauteur) * 1.6);
	clip-path: polygon(0 0, 100% 0, 100% 45%, 79% 100%, 16% 18%, 0 50%);
}

/* -------------------------------------------------------------------------
 * 2. En-tête
 * ---------------------------------------------------------------------- */
.ccphotos-entete {
	z-index: 20;
}

.ccphotos-entete-accueil {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0);
	left: 0;
	right: 0;
	z-index: 20;
}

.ccphotos-entete__droite {
	gap: var(--wp--preset--spacing--m);
}

/* Bouton « ☰ MENU » noir, comme sur le site actuel.
   Sélecteur à 3 classes : le bloc Navigation impose sa propre couleur de texte. */
.ccphotos-entete .ccphotos-menu .wp-block-navigation__responsive-container-open {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1.25rem;
	background: var(--wp--preset--color--primaire);
	color: var(--wp--preset--color--blanc);
	font-family: var(--wp--preset--font-family--exo-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 2px;
}

.ccphotos-entete .ccphotos-menu .wp-block-navigation__responsive-container-open::after {
	content: "Menu";
}

.ccphotos-entete .ccphotos-menu .wp-block-navigation__responsive-container-open svg {
	width: 1.25rem;
	height: 1.25rem;
	fill: currentColor;
}

.ccphotos-entete .ccphotos-menu .wp-block-navigation__responsive-container-open:hover,
.ccphotos-entete .ccphotos-menu .wp-block-navigation__responsive-container-open:focus-visible {
	background: var(--wp--preset--color--secondaire);
	color: var(--wp--preset--color--blanc);
}

/* Menu ouvert : grands liens centrés sur fond aubergine. */
.ccphotos-menu .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--l);
}

.ccphotos-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center;
}

.ccphotos-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--large);
	font-family: var(--wp--preset--font-family--julius-sans-one);
}

/* Panier de l'en-tête transparent (accueil) : icône blanche sur la photo. */
.ccphotos-panier-clair .wc-block-mini-cart__button {
	color: var(--wp--preset--color--blanc);
}

/* Logo blanc : le logo du site (foncé) est passé en blanc. */
.ccphotos-logo--blanc img {
	filter: brightness(0) invert(1);
}

/* -------------------------------------------------------------------------
 * 3. Accueil
 * ---------------------------------------------------------------------- */
.ccphotos-hero .wp-block-cover__inner-container {
	display: flex;
	justify-content: center;
}

.ccphotos-hero__logo img {
	width: min(480px, 70vw);
	height: auto;
}

.ccphotos-mosaique.wp-block-gallery.has-nested-images figure.wp-block-image img {
	object-fit: cover;
}

/* -------------------------------------------------------------------------
 * 4. Fiche œuvre
 * ---------------------------------------------------------------------- */
.ccphotos-oeuvre__nom {
	margin-top: var(--wp--preset--spacing--m);
	font-family: var(--wp--preset--font-family--julius-sans-one);
	font-size: var(--wp--preset--font-size--medium);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ccphotos-oeuvre__texte {
	font-style: italic;
}

.ccphotos-configurer__titre {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.5rem;
}

/* Formulaire d'achat : libellés et listes comme sur le site actuel. */
.ccphotos-configurer .variations {
	width: 100%;
	border: 0;
	margin: var(--wp--preset--spacing--m) 0;
}

.ccphotos-configurer .variations th,
.ccphotos-configurer .variations td {
	padding: 0.375rem 0;
	border: 0;
	vertical-align: middle;
	background: transparent;
}

.ccphotos-configurer .variations th label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.ccphotos-configurer .variations select {
	width: 100%;
	min-height: 2.6rem;
	padding: 0.5rem 1rem;
	font-family: var(--wp--preset--font-family--exo-2);
	font-size: 1rem;
	color: var(--wp--preset--color--primaire);
	background-color: var(--wp--preset--color--blanc);
	border: 1px solid var(--wp--preset--color--gris);
	border-radius: 5px;
}

.ccphotos-configurer .reset_variations {
	font-size: var(--wp--preset--font-size--small);
}

.ccphotos-configurer form.cart,
.ccphotos-configurer .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: stretch;
}

.ccphotos-configurer .quantity .qty {
	width: 3.5rem;
	min-height: 2.9rem;
	text-align: center;
	border: 1px solid var(--wp--preset--color--primaire);
}

.ccphotos-configurer .single_add_to_cart_button {
	flex: 1 1 12rem;
}

.ccphotos-configurer .single_add_to_cart_button.disabled {
	opacity: 1;
	cursor: not-allowed;
}

/* Informations complémentaires (blocs Détails). */
.ccphotos-infos .wp-block-details summary {
	font-weight: 600;
	cursor: pointer;
}

.ccphotos-infos .wp-block-details[open] summary {
	margin-bottom: 0.5rem;
}

/* Étiquettes et localisations (bloc ccphotos/oeuvre-termes). */
.ccphotos-termes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: var(--wp--preset--spacing--m) 0 0;
	padding: 0;
	list-style: none;
}

.ccphotos-termes a,
.ccphotos-termes span {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	background: var(--wp--preset--color--gris-clair);
	border-radius: 3px;
	color: var(--wp--preset--color--primaire);
	text-decoration: none;
}

.ccphotos-termes a:hover {
	background: var(--wp--preset--color--or-clair);
}

/* Bandeau « En savoir plus ». */
.ccphotos-savoir-plus h3 {
	font-size: var(--wp--preset--font-size--base);
	margin-top: var(--wp--preset--spacing--l);
}

/* -------------------------------------------------------------------------
 * 5. Grilles d'œuvres et cartes
 * ---------------------------------------------------------------------- */
/* Mosaïque en colonnes, comme sur les pages de collection actuelles. */
.ccphotos-grille__liste {
	columns: 3 18rem;
	column-gap: var(--wp--preset--spacing--l);
	margin: var(--wp--preset--spacing--l) 0 0;
	padding: 0;
	list-style: none;
}

.ccphotos-grille__liste > li {
	break-inside: avoid;
	margin: 0 0 var(--wp--preset--spacing--l);
}

.ccphotos-carte__image img {
	display: block;
	width: 100%;
	height: auto;
}

.ccphotos-carte__nom {
	margin-top: 0.5rem;
	font-family: var(--wp--preset--font-family--julius-sans-one);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ccphotos-carte__nom a {
	text-decoration: none;
}

/* Bande horizontale défilante (sélection d'œuvres de l'accueil). */
.ccphotos-bande__liste {
	display: flex;
	gap: var(--wp--preset--spacing--m);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin: var(--wp--preset--spacing--l) 0 0;
	padding: 0 0 var(--wp--preset--spacing--s);
	list-style: none;
}

.ccphotos-bande__liste > li {
	flex: 0 0 clamp(11rem, 22vw, 15rem);
	scroll-snap-align: start;
}

/* Médaillons des collections. */
.ccphotos-medaillon__image {
	display: block;
	width: min(9.5rem, 100%);
	aspect-ratio: 1;
	margin: 0 auto;
	border: 3px solid var(--wp--preset--color--primaire);
	border-radius: 50%;
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--photo);
}

.ccphotos-medaillon__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ccphotos-medaillon__nom {
	margin-top: 0.75rem;
	text-transform: uppercase;
}

.ccphotos-medaillon__nom a {
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * 6. Pied de page
 * ---------------------------------------------------------------------- */
.ccphotos-hommage__titre {
	margin-bottom: 0.5rem;
}

.ccphotos-pied {
	--ccphotos-forme-couleur: var(--wp--preset--color--blanc);
	margin-block-start: 0;
}

.ccphotos-pied__trait {
	width: 100%;
	max-width: none;
	height: 1px;
	border: 0;
	opacity: 1;
}

.ccphotos-pied__menu .wp-block-navigation-item + .wp-block-navigation-item::before {
	content: "|";
	margin-right: 0.75rem;
	color: var(--wp--preset--color--gris);
}

.ccphotos-pied__menu a {
	text-decoration: none;
}

.ccphotos-pied__bas p {
	margin: 0;
}

/* -------------------------------------------------------------------------
 * 7. Recherche
 * ---------------------------------------------------------------------- */
.ccphotos-recherche {
	max-width: 40rem;
	margin-inline: auto;
}

/* -------------------------------------------------------------------------
 * 8. Accessibilité
 * ---------------------------------------------------------------------- */
:where(a, button, input, select, summary, textarea):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* -------------------------------------------------------------------------
 * 9. Mobile
 * ---------------------------------------------------------------------- */
@media (max-width: 781px) {
	.ccphotos-oeuvre__colonnes {
		gap: var(--wp--preset--spacing--l);
	}

	.ccphotos-pied__menu .wp-block-navigation-item + .wp-block-navigation-item::before {
		content: none;
	}
}

/* -------------------------------------------------------------------------
 * 10. Collections de produits WooCommerce (grille et bande), depuis 0.3.0
 * ---------------------------------------------------------------------- */
/* Le bloc « Collection de produits » pose sa propre grille : on garde la mosaïque du thème. */
.wp-block-woocommerce-product-template.ccphotos-grille__liste {
	display: block;
}

.wp-block-woocommerce-product-template.ccphotos-bande__liste {
	display: flex;
}

.ccphotos-carte .wc-block-components-product-image {
	margin: 0;
}

.ccphotos-carte .wc-block-components-product-image img {
	display: block;
	width: 100%;
	height: auto;
}

.ccphotos-grille .wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--l);
}

/* -------------------------------------------------------------------------
 * 11. Pages de contenu, recherche par lieu, contact, livre d'or (0.3.0)
 * ---------------------------------------------------------------------- */
.ccphotos-texte {
	padding-block: var(--wp--preset--spacing--l);
}

.ccphotos-recherche-lieux {
	padding-block: var(--wp--preset--spacing--l);
}

.ccphotos-recherche {
	max-width: 32rem;
	margin-inline: auto;
}

.ccphotos-lieux .wp-block-term-template {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: var(--wp--preset--spacing--s) 0 0;
	padding: 0;
	list-style: none;
}

.ccphotos-lieux .wp-block-term-name a {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--wp--preset--color--gris-clair);
	text-decoration: none;
}

.ccphotos-lieux .wp-block-term-name a:hover {
	background: var(--wp--preset--color--or-clair);
}

.ccphotos-contact__form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.ccphotos-contact__form input[type="text"],
.ccphotos-contact__form input[type="email"],
.ccphotos-contact__form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--gris);
	background: var(--wp--preset--color--blanc);
	font: inherit;
}

/* Champ piège anti-spam : invisible pour les visiteurs, présent pour les robots. */
.ccphotos-contact__piege {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ccphotos-contact__retour {
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--wp--preset--color--or);
	background: var(--wp--preset--color--gris-clair);
}

.ccphotos-contact__retour--erreur {
	border-left-color: var(--wp--preset--color--primaire);
}

.ccphotos-messages .comment-form input[type="text"],
.ccphotos-messages .comment-form input[type="email"],
.ccphotos-messages .comment-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--gris);
	font: inherit;
}

.ccphotos-message {
	padding-block: var(--wp--preset--spacing--m);
	border-top: 1px solid var(--wp--preset--color--gris-clair);
}

.ccphotos-message .wp-block-comment-author-name {
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * 12. Correctifs 0.3.1
 * ---------------------------------------------------------------------- */
/* Bande défilante : sans contexte de positionnement, des éléments internes des cartes
   WooCommerce débordaient de la bande et élargissaient toute la page. */
.wp-block-woocommerce-product-template.ccphotos-bande__liste {
	position: relative;
}

/* Liste des lieux : compacte. */
.ccphotos-lieux .wp-block-term-template > li {
	margin: 0;
}

.ccphotos-lieux .wp-block-term-name {
	margin: 0;
}

.ccphotos-lieux-details {
	max-width: 60rem;
	margin-inline: auto;
	text-align: center;
}

.ccphotos-lieux-details > summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--julius-sans-one);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------------
 * 13. Bouton « ☰ MENU » et panneau du menu (0.4.0), comme sur le site 2023
 * ---------------------------------------------------------------------- */
.ccphotos-menu-bouton .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1.25rem;
	background: var(--wp--preset--color--primaire);
	color: var(--wp--preset--color--blanc);
	font-family: var(--wp--preset--font-family--exo-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 2px;
}

.ccphotos-menu-bouton .wp-block-button__link::before {
	content: "";
	width: 1.1rem;
	height: 0.75rem;
	background:
		linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
}

.ccphotos-menu-bouton .wp-block-button__link:hover,
.ccphotos-menu-bouton .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--secondaire);
	color: var(--wp--preset--color--blanc);
}

/* Panneau : masqué sauf ouvert (JavaScript) ou ciblé par l'ancre (sans JavaScript). */
.ccphotos-panneau:not(.is-open):not(:target) {
	display: none;
}

.ccphotos-panneau {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--wp--preset--spacing--m);
	background: rgba(30, 22, 36, 0.55);
	overflow-y: auto;
}

html.ccphotos-menu-ouvert {
	overflow: hidden;
}

.ccphotos-panneau__boite {
	position: relative;
	box-sizing: border-box;
	width: min(75rem, 100%);
	max-height: 100%;
	overflow-y: auto;
	padding: var(--wp--preset--spacing--l);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.ccphotos-panneau__fermer {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	padding: 0.25rem 0.5rem;
	border: 0;
	background: none;
	color: var(--wp--preset--color--blanc);
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.ccphotos-panneau__logo {
	margin-bottom: var(--wp--preset--spacing--m);
}

.ccphotos-panneau__liens .wp-block-navigation-item__content,
.ccphotos-panneau__panier a {
	display: block;
	padding: 0.2rem 0.75rem;
	color: var(--wp--preset--color--blanc);
	text-decoration: none;
}

.ccphotos-panneau__liens .wp-block-navigation-item__content:hover,
.ccphotos-panneau__liens .current-menu-item > .wp-block-navigation-item__content,
.ccphotos-panneau__panier a:hover {
	background: var(--wp--preset--color--secondaire);
}

.ccphotos-panneau__liens.wp-block-navigation {
	gap: 0.25rem;
}

.ccphotos-panneau__panier {
	margin-top: 0.25rem;
}

.ccphotos-panneau__collections {
	height: 100%;
	padding: var(--wp--preset--spacing--l) var(--wp--preset--spacing--m);
}

.ccphotos-panneau__titre {
	margin-top: 0;
	font-family: var(--wp--preset--font-family--julius-sans-one);
	font-size: var(--wp--preset--font-size--large);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ccphotos-panneau .ccphotos-medaillon__image {
	width: min(6.5rem, 100%);
}

.ccphotos-panneau__recherche {
	margin-top: var(--wp--preset--spacing--l);
}

.ccphotos-panneau__recherche .wp-block-search__input {
	border: 0;
	padding: 0.5rem 0.75rem;
}

@media (max-width: 781px) {
	.ccphotos-panneau {
		align-items: flex-start;
		padding: 0;
	}

	.ccphotos-panneau__boite {
		min-height: 100%;
	}
}

/* À propos : cadre gris de l'album, comme sur le site 2023. */
.ccphotos-album-cadre {
	padding: var(--wp--preset--spacing--m);
	background: var(--wp--preset--color--gris-clair);
}

/* -------------------------------------------------------------------------
 * 14. Panneau du menu — finitions (0.4.1), au plus près du site 2023
 * ---------------------------------------------------------------------- */
.ccphotos-panneau {
	align-items: flex-start;
	padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 5rem);
	background: rgba(30, 22, 36, 0.35);
}

.ccphotos-panneau__boite {
	width: min(68rem, 100%);
	max-height: none;
	overflow: visible;
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--l) var(--wp--preset--spacing--l);
}

/* C'est le fond du panneau qui défile sur les petits écrans, pas la boîte. */
.ccphotos-panneau__panier {
	margin-top: 0;
}

/* × en haut à droite de l'écran, hors de la boîte. */
.ccphotos-panneau__fermer {
	position: fixed;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 1rem);
	right: 1.5rem;
	font-size: 2.25rem;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.ccphotos-panneau__gauche {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ccphotos-panneau__gauche > * {
	width: 100%;
	max-width: 18rem;
}

.ccphotos-panneau__logo {
	display: flex;
	justify-content: center;
}

.ccphotos-panneau__liens .wp-block-navigation-item,
.ccphotos-panneau__panier {
	font-size: 1.05rem;
}

.ccphotos-panneau__liens.wp-block-navigation {
	gap: 0;
}

.ccphotos-panneau__liens .wp-block-navigation-item {
	width: 100%;
}

.ccphotos-panneau__liens .wp-block-navigation-item__content,
.ccphotos-panneau__panier a {
	width: 100%;
	box-sizing: border-box;
	padding: 0.15rem 0.4rem;
}

.ccphotos-panneau__liens .current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--secondaire);
}

.ccphotos-panneau__collections {
	border-radius: 6px;
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--m);
}

.ccphotos-panneau__titre {
	text-transform: none;
	letter-spacing: 0;
	font-size: 1.6rem;
	margin-bottom: var(--wp--preset--spacing--l);
}

.ccphotos-panneau .ccphotos-medaillon__image {
	width: min(7.5rem, 100%);
	border: 0;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.ccphotos-panneau .ccphotos-medaillon__nom {
	text-transform: uppercase;
}

/* Recherche : champ et bouton accolés, bouton foncé. */
.ccphotos-panneau__recherche .wp-block-search__inside-wrapper {
	gap: 0;
}

.ccphotos-panneau__recherche .wp-block-search__input {
	min-height: 2.75rem;
	background: var(--wp--preset--color--blanc);
}

.ccphotos-panneau__recherche .wp-block-search__button {
	margin-left: 0;
	padding: 0 0.9rem;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--secondaire);
	color: var(--wp--preset--color--blanc);
}

.ccphotos-panneau__recherche .wp-block-search__button svg {
	fill: currentColor;
}

@media (max-width: 781px) {
	.ccphotos-panneau {
		padding-top: 0;
	}

	.ccphotos-panneau__boite {
		padding-top: var(--wp--preset--spacing--xl);
	}

	.ccphotos-panneau__fermer {
		position: absolute;
		top: 0.5rem;
	}
}

/* -------------------------------------------------------------------------
 * 15. Correctif 0.4.2 — bande blanche en haut de l'accueil
 * ---------------------------------------------------------------------- */
/* L'en-tête de l'accueil est posé sur la photo (hors flux) : le contenu ne doit pas
   garder l'espacement automatique entre blocs, sinon une bande blanche apparaît. */
.wp-site-blocks > .ccphotos-entete-accueil + * {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
 * 16. 0.5.0 — menu sans recherche, recherche dans l'en-tête, titres des pages
 * ---------------------------------------------------------------------- */
/* Panneau du menu : coins arrondis, moins d'espace en haut. */
.ccphotos-panneau {
	padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 3rem);
}

.ccphotos-panneau__boite {
	border-radius: 10px;
	padding-top: var(--wp--preset--spacing--l);
}

/* Recherche de l'en-tête : loupe qui déplie le champ. */
.ccphotos-entete__recherche .wp-block-search__inside-wrapper {
	gap: 0;
	border: 0;
	padding: 0;
}

.ccphotos-entete__recherche .wp-block-search__input {
	min-width: 14rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--wp--preset--color--gris);
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--primaire);
}

.ccphotos-entete__recherche .wp-block-search__button {
	margin-left: 0;
	padding: 0.4rem;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--primaire);
}

.ccphotos-entete__recherche .wp-block-search__button svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: currentColor;
}

/* Sur la photo de l'accueil : loupe blanche. */
.ccphotos-recherche-claire .wp-block-search__button {
	color: var(--wp--preset--color--blanc);
}

/* Titres des pages : un peu plus petits, espacés, filet doré sous le titre principal. */
.ccphotos-page h1,
.ccphotos-page .wp-block-post-title {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	letter-spacing: 0.02em;
	margin-bottom: var(--wp--preset--spacing--l);
}

.ccphotos-page h1::after,
.ccphotos-page .wp-block-post-title::after {
	content: "";
	display: block;
	width: 4rem;
	height: 2px;
	margin: var(--wp--preset--spacing--s) auto 0;
	background: var(--wp--preset--color--or);
}

.ccphotos-page .wp-block-post-content h2 {
	margin-top: var(--wp--preset--spacing--l);
	margin-bottom: var(--wp--preset--spacing--s);
}

.ccphotos-page .wp-block-post-content h3 {
	margin-top: var(--wp--preset--spacing--m);
}

/* Largeur de lecture : les paragraphes et titres posés directement dans la page ne dépassent
   pas ~75 caractères par ligne ; colonnes, galeries et sections pleine largeur ne changent pas. */
.ccphotos-page .wp-block-post-content > :is(p, h2, h3, h4, ul, ol) {
	max-width: 48rem;
	margin-left: auto;
	margin-right: auto;
}

/* Dans les blocs de texte placés entre des sections « texte + photo » : lignes limitées
   mais alignées à gauche avec les sections (le titre principal reste centré). */
.ccphotos-page .ccphotos-texte > :is(p, h2, h3, h4, ul, ol):not(.has-text-align-center) {
	max-width: 48rem;
	margin-left: 0;
}

/* Moins de vide entre l'en-tête et le titre. */
main.ccphotos-page {
	padding-top: var(--wp--preset--spacing--m) !important;
}

/* -------------------------------------------------------------------------
 * 17. 0.5.1 — en-tête plus bas avec dégradé, titre des œuvres, formulaire d'achat
 * ---------------------------------------------------------------------- */
/* En-tête des pages intérieures : léger dégradé, du blanc cassé en haut au gris en bas. */
.ccphotos-entete.ccphotos-forme-v-bas {
	background-image: linear-gradient(180deg, #f8f8f8 0%, var(--wp--preset--color--gris-clair) 100%);
}

/* Fiche œuvre : titre plus léger, « Tirage d’art limité » en petit sur sa propre ligne. */
.wp-block-ccphotos-oeuvre-titre {
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	line-height: 1.25;
}

.ccphotos-titre__suffixe {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.5em;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--gris);
}

/* Formulaire d'achat : listes blanches (WooCommerce les rendait transparentes sur le gris),
   libellés alignés sur la liste, bouton toujours foncé. */
.ccphotos-configurer .variations select,
.ccphotos-configurer .wc-block-add-to-cart-form .variations select {
	background-color: var(--wp--preset--color--blanc) !important;
	color: var(--wp--preset--color--primaire);
}

/* WooCommerce centre verticalement : la 2e ligne contient aussi le lien « Effacer »,
   le libellé « Dimensions » descendait donc sous la liste. */
.ccphotos-configurer table.variations th.label,
.ccphotos-configurer table.variations td.value {
	vertical-align: top !important;
}

.ccphotos-configurer table.variations th.label {
	padding-top: 0.95rem !important;
}

.ccphotos-configurer .single_add_to_cart_button,
.ccphotos-configurer .single_add_to_cart_button.disabled {
	background-color: var(--wp--preset--color--primaire) !important;
	color: var(--wp--preset--color--blanc) !important;
	opacity: 1 !important;
}

.ccphotos-configurer .single_add_to_cart_button:not(.disabled):hover {
	background-color: var(--wp--preset--color--secondaire);
}

/* -------------------------------------------------------------------------
 * 18. 0.6.0 — mosaïques, apparition au défilement, finitions de la fiche œuvre
 * ---------------------------------------------------------------------- */
/* Mosaïque serrée en colonnes (bloc Galerie avec la classe ccphotos-mosaique ou ccphotos-album) :
   les photos gardent leurs proportions et se suivent sans trou, comme sur le site 2023. */
.wp-block-gallery.has-nested-images.ccphotos-mosaique,
.wp-block-gallery.has-nested-images.ccphotos-album {
	display: block;
	column-count: 4;
	column-gap: 0.5rem;
}

.wp-block-gallery.has-nested-images.ccphotos-mosaique.columns-3,
.wp-block-gallery.has-nested-images.ccphotos-album.columns-3 {
	column-count: 3;
}

.wp-block-gallery.has-nested-images.ccphotos-mosaique.columns-5 {
	column-count: 5;
}

.wp-block-gallery.has-nested-images.ccphotos-mosaique figure.wp-block-image,
.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image {
	display: block !important;
	width: 100% !important;
	margin: 0 0 0.5rem !important;
	break-inside: avoid;
}

.wp-block-gallery.has-nested-images.ccphotos-mosaique figure.wp-block-image img,
.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image img {
	display: block;
	width: 100% !important;
	height: auto !important;
}

/* Album de l'A propos : photos encadrées de blanc sur le cadre gris. */
.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image {
	padding: 4px;
	background: var(--wp--preset--color--blanc);
	box-sizing: border-box;
}

@media (max-width: 599px) {
	.wp-block-gallery.has-nested-images.ccphotos-mosaique,
	.wp-block-gallery.has-nested-images.ccphotos-mosaique.columns-5,
	.wp-block-gallery.has-nested-images.ccphotos-album,
	.wp-block-gallery.has-nested-images.ccphotos-album.columns-3 {
		column-count: 2;
	}
}

/* Légendes des photos. */
.wp-block-image .wp-element-caption {
	margin-top: 0.4rem;
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	text-align: center;
}

/* Accueil : titre « Mes Collections » plus présent. */
.ccphotos-collections > h2.wp-block-heading {
	font-size: clamp(1.6rem, 3.2vw, 2.25rem);
}

/* Apparition au défilement (classes posées par assets/js/apparition.js uniquement). */
.ccphotos-apparait {
	opacity: 0;
	transform: translateY(2.5rem);
	transition: opacity 1s ease-out, transform 1s ease-out;
}

.ccphotos-apparait.est-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.ccphotos-apparait {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Fiche œuvre : texte des listes rogné (hauteur fixée par WooCommerce + marges intérieures). */
.ccphotos-configurer table.variations select {
	height: auto !important;
	min-height: 2.75rem;
	padding: 0 2.25rem 0 1rem !important;
	line-height: normal !important;
}

/* Bouton sur toute la largeur du cadre, aligné avec les listes. */
.ccphotos-configurer .single_variation_wrap,
.ccphotos-configurer .woocommerce-variation-add-to-cart {
	width: 100%;
}

.ccphotos-configurer .single_add_to_cart_button {
	flex: 1 1 100%;
	width: 100%;
	min-height: 2.9rem;
}

/* Lien vers la collection : sans puce, en gras. */
.ccphotos-collection-lien ul {
	margin: 0.4rem 0 0;
	padding: 0;
	list-style: none;
}

.ccphotos-collection-lien li a {
	font-weight: 700;
	text-decoration: none;
}

.ccphotos-collection-lien li a::before {
	content: "▸";
	margin-right: 0.4rem;
}

.ccphotos-collection-lien li a:hover,
.ccphotos-collection-lien li a:focus-visible {
	text-decoration: underline;
}

/* Lettrine discrète (deux lignes), comme sur le site 2023 ; le paragraphe contient toujours sa lettrine. */
.has-drop-cap:not(:focus)::first-letter {
	float: left;
	margin: 0.08em 0.12em 0 0;
	font-family: var(--wp--preset--font-family--julius-sans-one);
	font-size: 2.6em;
	font-weight: 400;
	line-height: 0.85;
	text-transform: uppercase;
}

.has-drop-cap {
	min-height: 2.4em;
}

.has-drop-cap::after {
	content: "";
	display: block;
	clear: both;
}

/* -------------------------------------------------------------------------
 * 19. 0.7.0 — alignement sur le site 2023 : polices, gras, carrousel, effets
 * ---------------------------------------------------------------------- */
/* Titres de section : 25 px sur l'accueil (réglé dans theme.json), 20 px en gras sur les autres pages,
   comme sur le site actuel. */
body:not(.home) main .wp-block-post-content h2.wp-block-heading,
body:not(.home) main .ccphotos-texte h2.wp-block-heading,
.ccphotos-savoir-plus > h2.wp-block-heading {
	font-size: 1.25rem;
	font-weight: 700;
}

/* Sous-titres des sections « Supports d'impression… » : Exo 2, comme sur le site actuel. */
.ccphotos-section h3.wp-block-heading {
	font-family: var(--wp--preset--font-family--exo-2);
	font-size: 1.25rem;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

/* Titre principal des pages : 35 px, sans espacement de lettres. */
.ccphotos-page h1,
.ccphotos-page .wp-block-post-title {
	font-size: clamp(1.75rem, 3vw, 2.1875rem);
	letter-spacing: 0;
}

/* Accueil : « Mes Collections » à 40 px. */
.ccphotos-collections > h2.wp-block-heading {
	font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

/* Lettrine : Exo 2, 50 px. */
.has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--exo-2);
	font-size: 2.78em;
	font-weight: 400;
}

/* Cartes d'œuvres (grilles, carrousel) : nom 13 px gras en capitales, prix 12 px. */
.ccphotos-carte__nom,
.ccphotos-carte .wp-block-post-title {
	font-size: 0.8125rem !important;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.ccphotos-carte .wc-block-components-product-price,
.ccphotos-carte .wp-block-woocommerce-product-price {
	font-size: 0.75rem !important;
	font-weight: 300 !important;
}

/* Médaillons des collections : 150 px, ombre, sans bordure ; nom 15 px en capitales. */
.ccphotos-medaillon__image {
	width: min(150px, 100%);
	border: 0;
	box-shadow: 0 0 16px rgba(0, 0, 0, 0.74);
}

.ccphotos-medaillon__nom {
	font-size: 0.9375rem !important;
	font-weight: 400;
}

/* ---- Carrousel des œuvres de l'accueil (assets/js/carrousel.js) ---- */
.ccphotos-bande {
	position: relative;
}

.wp-block-woocommerce-product-template.ccphotos-bande__liste {
	align-items: flex-start;
	gap: 1.5rem;
	scroll-behavior: smooth;
}

/* Photos dans leurs proportions : surtout pas de « aspect-ratio » ici. Le déclarer (même « auto »)
   annule le rapport largeur/hauteur que le navigateur tire des attributs width/height de l'image,
   et une image pas encore chargée (chargement différé) prenait alors 1500 px de haut. */

/* Six œuvres visibles sur ordinateur, quatre sur tablette, deux sur téléphone. */
.wp-block-woocommerce-product-template.ccphotos-bande__liste > li {
	flex: 0 0 calc((100% - 5 * 1.5rem) / 6);
	max-width: none;
	margin: 0;
}

@media (max-width: 1023px) {
	.wp-block-woocommerce-product-template.ccphotos-bande__liste > li {
		flex-basis: calc((100% - 3 * 1.5rem) / 4);
	}
}

@media (max-width: 599px) {
	.wp-block-woocommerce-product-template.ccphotos-bande__liste > li {
		flex-basis: calc((100% - 1.5rem) / 2);
	}
}

/* Avec le script : barre de défilement masquée, flèches et pause. */
.ccphotos-carrousel--actif .ccphotos-bande__liste {
	scrollbar-width: none;
}

.ccphotos-carrousel--actif .ccphotos-bande__liste::-webkit-scrollbar {
	display: none;
}

.ccphotos-carrousel__fleche {
	position: absolute;
	top: var(--ccphotos-fleche-haut, 35%);
	z-index: 2;
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	padding: 0;
	color: var(--wp--preset--color--blanc);
	background: #111;
	border: 0;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease;
}

.ccphotos-carrousel__fleche--prec {
	left: 0;
}

.ccphotos-carrousel__fleche--suiv {
	right: 0;
}

.ccphotos-carrousel__fleche:hover,
.ccphotos-carrousel__fleche:focus-visible,
.ccphotos-carrousel__pause:hover,
.ccphotos-carrousel__pause:focus-visible {
	background: var(--wp--preset--color--secondaire);
}

.ccphotos-carrousel__fleche:focus-visible,
.ccphotos-carrousel__pause:focus-visible {
	outline: 2px solid var(--wp--preset--color--or);
	outline-offset: 2px;
}

.ccphotos-carrousel__pause {
	display: block;
	width: 2rem;
	height: 2rem;
	margin: 0.5rem 0 0 auto;
	padding: 0;
	font-size: 0.7rem;
	color: var(--wp--preset--color--blanc);
	background: #111;
	border: 0;
	cursor: pointer;
}

/* ---- Galeries : voile sombre au survol (800 ms), comme sur le site actuel ---- */
.wp-block-gallery.ccphotos-mosaique figure.wp-block-image,
.wp-block-gallery.ccphotos-album figure.wp-block-image {
	position: relative;
	overflow: hidden;
}

.wp-block-gallery.ccphotos-mosaique figure.wp-block-image::after,
.wp-block-gallery.ccphotos-album figure.wp-block-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.8s ease;
	pointer-events: none;
}

.wp-block-gallery.ccphotos-mosaique figure.wp-block-image:hover::after,
.wp-block-gallery.ccphotos-album figure.wp-block-image:hover::after,
.wp-block-gallery.ccphotos-album figure.wp-block-image:focus-within::after {
	opacity: 1;
}

/* Album de l'A propos : cadre blanc de 7 px, photo qui grossit au survol, légende au centre. */
.wp-block-gallery.has-nested-images.ccphotos-album {
	column-gap: 11px;
}

.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image {
	margin-bottom: 11px !important;
	padding: 0;
	border: 7px solid var(--wp--preset--color--blanc);
	border-radius: 3px;
}

.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image img {
	transition: transform 0.8s ease;
}

.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image:hover img {
	transform: scale(1.1);
}

.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image figcaption.wp-element-caption {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 20px;
	max-height: none;
	font-size: 0.75rem;
	font-style: normal;
	line-height: 1.3;
	text-align: center;
	color: var(--wp--preset--color--blanc);
	background: none;
	opacity: 0;
	transition: opacity 0.8s ease;
	pointer-events: none;
}

.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image:hover figcaption.wp-element-caption,
.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image:focus-within figcaption.wp-element-caption {
	opacity: 1;
}

.ccphotos-album-cadre {
	padding: 25px;
}

/* La colonne de l'album reste visible pendant la lecture du texte (ordinateur et tablette). */
@media (min-width: 782px) {
	.wp-block-column:has(> .ccphotos-album-cadre) {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 20px);
		align-self: flex-start;
	}
}

/* ---- Accueil : apparition du logo ---- */
@keyframes ccphotos-fondu {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.ccphotos-hero__logo {
	animation: ccphotos-fondu 1.25s ease both;
}

/* ---- Bouton « Menu » fixé au défilement (assets/js/menu.js) ---- */
@media (min-width: 768px) {
	.ccphotos-menu-bouton.est-fixe .wp-block-button {
		position: fixed;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 45px);
		left: var(--wp--preset--spacing--l);
		z-index: 50;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	}
}

/* ---- Bouton « Menu » : 15 px, comme sur le site actuel ---- */
.ccphotos-menu-bouton .wp-block-button__link {
	font-size: 0.9375rem;
	font-weight: 300;
}

/* ---- Fiche œuvre ---- */
.ccphotos-oeuvre__nom {
	font-size: 1.25rem;
	font-weight: 700;
}

.ccphotos-oeuvre .wc-block-components-product-price,
.ccphotos-oeuvre .price {
	font-size: 1.25rem;
	font-weight: 700;
}

.ccphotos-configurer table.variations th.label label {
	font-size: 1rem;
	font-weight: 700;
}

.ccphotos-configurer table.variations select {
	min-height: 2.625rem;
	border: 1px solid var(--wp--preset--color--gris);
	border-radius: 5px;
}

/* Informations complémentaires : bandeaux gris, titres en gras. */
.ccphotos-infos .wp-block-details {
	padding: 0;
}

.ccphotos-infos .wp-block-details summary {
	padding: 0.9rem 1rem;
	font-size: 1rem;
	font-weight: 700;
}

.ccphotos-infos .wp-block-details > :not(summary) {
	padding: 0 1rem;
}

.ccphotos-infos .wp-block-details[open] > :last-child {
	padding-bottom: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
	.ccphotos-hero__logo {
		animation: none;
	}

	.wp-block-gallery.has-nested-images.ccphotos-album figure.wp-block-image img,
	.wp-block-gallery.ccphotos-mosaique figure.wp-block-image::after,
	.wp-block-gallery.ccphotos-album figure.wp-block-image::after {
		transition: none;
	}

	.wp-block-woocommerce-product-template.ccphotos-bande__liste {
		scroll-behavior: auto;
	}
}

/* -------------------------------------------------------------------------
 * 20. 0.7.2 — légende dans l'agrandissement des photos
 * ---------------------------------------------------------------------- */
/* Légende dans l'agrandissement des photos (assets/js/lightbox-legende.js). */
.wp-lightbox-overlay .ccphotos-lightbox-legende {
	position: absolute;
	bottom: 0.5rem;
	left: 50%;
	z-index: 3000001; /* Au-dessus du fond (2000000) et de l'image (3000000) de la lightbox. */
	max-width: min(90vw, 48rem);
	margin: 0;
	padding: 0.35rem 0.9rem;
	font-family: var(--wp--preset--font-family--exo-2);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.3;
	text-align: center;
	color: var(--wp--preset--color--primaire);
	background: rgba(255, 255, 255, 0.9);
	transform: translateX(-50%);
	pointer-events: none;
}

.wp-lightbox-overlay:not(.active) .ccphotos-lightbox-legende {
	display: none;
}
