/* Junior Photo : styles complémentaires à theme.json (en-tête, pied de page, slider, portfolio, boutique). */

:root {
	--pj-t: var(--wp--preset--color--terracotta, #A84F4C);
	--pj-b: var(--wp--preset--color--brique, #7A3533);
	--pj-p: var(--wp--preset--color--papier, #FAF5EF);
	--pj-e: var(--wp--preset--color--encre, #2A2321);
	--pj-s: var(--wp--preset--color--sable, #E6D5C3);
	--pj-bebas: 'Bebas Neue', Impact, sans-serif;
	--pj-zilla: 'Zilla Slab', Georgia, serif;
	--pj-g: clamp(20px, 5.5vw, 80px);
	--pj-cut: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

/* ---------- Éléments communs ---------- */
.pj-label,
.pj-crumbs,
.pj-siblings,
.pj-footer .pj-links {
	font-size: 0.75rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
}
.pj-label { color: var(--pj-t); margin: 0 0 1rem; }
.pj-small { font-size: 0.8rem; color: #CBBBAA; max-width: 34rem; }
.pj-center { text-align: center; }

/* Coin coupé du logo sur tous les boutons */
.wp-element-button,
.wp-block-button__link,
.wc-block-components-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce button.single_add_to_cart_button {
	clip-path: var(--pj-cut);
	border-radius: 0;
}

/* Champs de formulaire */
input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='number'],
textarea,
select {
	border: 1px solid var(--pj-s);
	background: #fff;
	border-radius: 0;
	padding: 0.9rem;
	font: inherit;
	box-sizing: border-box;
	max-width: 100%;
}
textarea, .wpcf7 input[type='text'], .wpcf7 input[type='email'] { width: 100%; }

/* ---------- En-tête ---------- */
.pj-header {
	background: var(--pj-t);
	color: #fff;
	padding: 2rem var(--pj-g);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 2rem;
}
.pj-header a { color: #fff; text-decoration: none; }
.pj-header a:hover { color: var(--pj-s); }
.pj-header .wp-block-navigation { font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; }
.pj-header .wp-block-site-title { margin: 0; font-family: var(--pj-bebas); font-size: 1.9rem; letter-spacing: 0.3em; font-weight: 400; }
.pj-header .pj-header-right { justify-self: end; display: flex; align-items: center; gap: 1.5rem; }
.pj-header .wc-block-mini-cart__button { color: #fff; }

/* ---------- Pied de page ---------- */
.pj-footer { background: var(--pj-e); color: var(--pj-p); padding: 4.5rem var(--pj-g) 2.5rem; }
.pj-footer a { color: var(--pj-p); text-decoration: none; }
.pj-footer a:hover { color: var(--pj-s); }
.pj-footer .pj-label { color: var(--pj-s); }
.pj-footer-title { font-family: var(--pj-zilla); font-style: italic; font-size: 2rem; color: var(--pj-p); margin: 0 0 1.5rem; }
.pj-footer .pj-links { line-height: 2.4; margin: 0; }
.pj-footer .pj-copy { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid #4A3F3B; color: #CBBBAA; font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; }

/* ---------- Pages ---------- */
.pj-main .wp-block-post-title {
	font-size: clamp(3rem, 8vw, 6.5rem);
	letter-spacing: 0.12em;
	margin: 0 0 2.5rem;
}
.pj-main.pj-text, .pj-main.pj-portfolio { padding: 4rem var(--pj-g) 3rem; box-sizing: border-box; }
.pj-narrow { max-width: 880px; }
.pj-narrow h2 { font-family: var(--pj-zilla); font-size: 1.75rem; letter-spacing: 0; line-height: 1.2; margin: 2.5rem 0 0.75rem; padding-top: 2rem; border-top: 1px solid var(--pj-s); }
.pj-crumbs { margin: 3rem 0 1.5rem; color: #7A6A60; }
.pj-crumbs a { color: var(--pj-t); text-decoration: none; }
.pj-crumbs i { font-style: normal; margin: 0 0.4em; }

/* ---------- Slider d'ouverture ---------- */
.pj-slider { position: relative; overflow: hidden; }
.pj-slide {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 700px;
	padding: 4rem 1.5rem;
	background: var(--pj-s) center / cover no-repeat;
	box-sizing: border-box;
}
.pj-slide:nth-child(2) { background-color: #DDCAB5; }
.pj-slide h1 { font-size: clamp(3rem, 8vw, 7rem); margin: 0; }
.pj-slide .pj-sub { font-family: var(--pj-zilla); font-style: italic; font-size: 1.5rem; margin: 1.5rem 0 3rem; color: #5A4A44; }
.pj-js .pj-slider:not(.is-ready) .pj-slide:nth-child(n + 2) { display: none; }
.pj-track { display: flex; }
.pj-track > .pj-slide { flex: 0 0 auto; }
.pj-dots { position: absolute; left: 0; right: 0; bottom: 1.2rem; display: flex; justify-content: center; gap: 14px; z-index: 3; }
.pj-dot { width: 40px; height: 3px; padding: 14px 0; border: 0; background: var(--pj-t); background-clip: content-box; opacity: 0.3; cursor: pointer; box-sizing: content-box; }
.pj-dot.is-active { opacity: 1; }

/* ---------- La sélection (accueil) ---------- */
.pj-selection { padding: 7rem var(--pj-g) 5rem; }
.pj-selection .price,
.pj-selection .button,
.pj-selection .add_to_cart_button,
.pj-selection .star-rating { display: none !important; }
.pj-selection ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5rem; margin: 0; padding: 0; list-style: none; }
.pj-selection ul.products li.product { width: auto; float: none; margin: 0; }
.pj-selection ul.products li.product img { width: 100%; height: 480px; object-fit: cover; }

/* ---------- Bandeau « Un tirage, trois engagements » ---------- */
.pj-engagements { background: var(--pj-t); color: #fff; padding: 5.5rem var(--pj-g); }
.pj-engagements h2 { font-size: clamp(2.5rem, 5vw, 4rem); margin: 0 0 2.5rem; color: #fff; }
.pj-engagements h3 { font-size: 1.5rem; color: #fff; margin: 0 0 0.75rem; }
.pj-engagements p { color: #fff; font-size: 0.95rem; }

/* ---------- Citation ---------- */
.pj-quote-section { padding: 7rem var(--pj-g); }
.pj-quote { font-family: var(--pj-zilla); font-style: italic; font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.4; max-width: 820px; margin: 0 auto; text-align: center; }
.pj-sign { text-align: center; color: var(--pj-t); font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; margin-top: 2rem; }

/* ---------- Bloc d'appel à l'action ---------- */
.pj-cta { text-align: center; padding: 6rem 0 7rem; }
.pj-cta .pj-line { font-family: var(--pj-zilla); font-style: italic; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.4; max-width: 760px; margin: 0 auto 2.5rem; }
.pj-cta .wp-block-buttons { justify-content: center; }

/* ---------- Portfolio : vignettes ---------- */
.pj-tiles { display: grid; gap: 3.5rem; grid-template-columns: repeat(3, 1fr); margin: 0 0 8rem; }
.pj-tiles.pj-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pj-tiles.pj-cols-1 { grid-template-columns: 1fr; }
.pj-tile {
	position: relative;
	display: block;
	overflow: hidden;
	height: var(--pj-h, 560px);
	background: var(--pj-s);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}
.pj-tiles.pj-cols-2 .pj-tile { height: var(--pj-h, 640px); }
.pj-ph { position: absolute; inset: 0; display: block; transition: transform 0.6s ease; }
.pj-tile:hover .pj-ph { transform: scale(1.06); }
.pj-sl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 1s ease; font-size: 0.8rem; color: var(--pj-b); }
.pj-sl.is-on { opacity: 1; }
.pj-sl img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pj-ov {
	position: absolute;
	inset: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 1.5rem;
	text-align: center;
	border: 2px solid var(--pj-p);
	background: rgba(168, 79, 76, 0.3);
	color: #fff;
	font-family: var(--pj-bebas);
	font-size: 3.5rem;
	letter-spacing: 0.14em;
	opacity: 0;
	transition: opacity 0.35s ease;
}
.pj-tile:hover .pj-ov,
.pj-tile:focus-visible .pj-ov { opacity: 1; }

/* Galerie d'une série en mosaïque */
.pj-masonry { display: block !important; column-count: 3; column-gap: 3.5rem; }
.pj-masonry .wp-block-image { break-inside: avoid; width: 100% !important; margin: 0 0 3.5rem !important; }
.pj-masonry img { width: 100%; height: auto !important; aspect-ratio: auto !important; }
.pj-siblings { display: flex; justify-content: space-between; border-top: 1px solid var(--pj-s); padding: 2.2rem 0; margin-top: 2.5rem; }
.pj-siblings a { color: var(--pj-t); text-decoration: none; }

/* ---------- Boutique WooCommerce ---------- */
.wc-block-product-template .wp-block-post-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--pj-zilla);
	font-style: italic;
	font-weight: 400;
	font-size: 1.6rem;
	letter-spacing: 0;
}
.wc-block-product-template .wp-block-woocommerce-product-price,
.woocommerce ul.products li.product .price { color: #7A6A60; font-size: 0.95rem; }
.single-product .product_title,
.single-product .wp-block-post-title {
	font-family: var(--pj-zilla);
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0;
	font-size: clamp(2.2rem, 4vw, 3.5rem);
	line-height: 1.1;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--pj-e); font-family: var(--pj-zilla); font-size: 1.6rem; }
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.single_add_to_cart_button {
	background: var(--pj-t);
	color: #fff;
	font-family: var(--pj-bebas);
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.wc-block-components-button:not(.is-link):hover,
.single_add_to_cart_button:hover { background: var(--pj-b); color: #fff; }
.woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner { border-radius: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.pj-header { grid-template-columns: 1fr; text-align: center; gap: 1rem; }
	.pj-header .pj-header-right { justify-self: center; }
	.pj-tiles, .pj-tiles.pj-cols-2 { grid-template-columns: 1fr; }
	.pj-tile, .pj-tiles.pj-cols-2 .pj-tile { height: 420px; }
	.pj-masonry { column-count: 1; }
	.pj-selection ul.products { grid-template-columns: 1fr; }
	.pj-slide { min-height: 560px; }
	.pj-ov { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.pj-ph, .pj-sl, .pj-ov, .pj-track { transition: none !important; }
}

/* ---------- La sélection : produits les plus consultés ---------- */
.pj-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5rem; margin: 0; padding: 0; list-style: none; }
.pj-top a { display: block; color: var(--pj-e); text-decoration: none; }
.pj-top-img { display: block; aspect-ratio: 3 / 2; background: var(--pj-s); overflow: hidden; }
.pj-top-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.pj-top a:hover .pj-top-img img { transform: scale(1.04); }
.pj-top-title { display: block; margin-top: 1.5rem; font-family: var(--pj-zilla); font-style: italic; font-size: 1.6rem; line-height: 1.2; }
@media (max-width: 781px) { .pj-top { grid-template-columns: 1fr; } }

/* ---------- Engagements encadrés (coin coupé comme les boutons) ---------- */
.pj-engagements .wp-block-column {
	position: relative;
	padding: calc(2.25rem + 2px) calc(2rem + 2px) calc(2.75rem + 2px);
	background: var(--pj-p);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.pj-engagements .wp-block-column::before {
	content: '';
	position: absolute;
	inset: 2px;
	background: var(--pj-t);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12.8px), calc(100% - 12.8px) 100%, 0 100%);
}
.pj-engagements .wp-block-column > * { position: relative; z-index: 1; }

/* ---------- Espace sous les derniers produits de la boutique ---------- */
.wc-block-product-template,
.woocommerce ul.products { margin-bottom: 8rem; }
