/* FP Pour Quand — porté verbatim depuis components/PourQuand.jsx
   4 variantes : Editorial / Grid / Carousel / Mosaic.
   Header commun + items 8 par défaut. */

/* ============================================================
   COMMON — section + inner + header
   ============================================================ */
.fp-pq {
	background: var(--paper-warm);
	position: relative;
	padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 56px);
}
.fp-pq--carousel {
	padding-left: 0;
	padding-right: 0;
}

.fp-pq__inner.wp-block-group,
.fp-pq__inner {
	max-width: 1080px; /* Editorial */
	margin: 0 auto;
}
.fp-pq--grid .fp-pq__inner,
.fp-pq--mosaic .fp-pq__inner,
.fp-pq--carousel .fp-pq__inner {
	max-width: 1320px;
}
.fp-pq--carousel .fp-pq__inner {
	padding: 0 clamp(20px, 5vw, 56px);
}

.fp-pq__head.wp-block-group,
.fp-pq__head {
	display: flex !important;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 56px;
}
.fp-pq__head-eyebrow {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--accent);
}
.fp-pq__title {
	margin: 14px 0 0;
	font-family: var(--font-serif);
	font-weight: 500;
	font-size: clamp(2rem, 4.5vw, 3.6rem);
	line-height: 1.02;
	letter-spacing: -0.015em;
	text-transform: lowercase;
	color: var(--ink);
	text-wrap: balance;
	/* max-width: 22ch; */
}

/* Couleur univers via classe modifier (reused for tags) */
.is-univers-emotions  { --u-color: #C8344B; }
.is-univers-relations { --u-color: #1F4E78; }
.is-univers-rituels   { --u-color: #6E9B7E; }
.is-univers-quotidien { --u-color: #C68A2E; }
.is-univers-evasion   { --u-color: #2D7A86; }


/* ============================================================
   VARIANT 1 — EDITORIAL : liste verticale poétique
   ============================================================ */
.fp-pq__list.wp-block-group,
.fp-pq__list {
	display: flex !important;
	flex-direction: column;
	margin: 0;
}
.fp-pq__row.wp-block-group,
.fp-pq__row {
	display: grid !important;
	grid-template-columns: 60px 1fr auto;
	align-items: center;
	padding: clamp(20px, 3vw, 36px) 0;
	border-top: 1px solid var(--rule);
	cursor: pointer;
	gap: 20px;
	position: relative;
	margin: 0;
}
.fp-pq__row-index {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	line-height: 1;
	color: var(--ink-3);
	transition: color 280ms cubic-bezier(.2, .7, .2, 1);
	position: relative;
	z-index: 2;
}
.fp-pq__row:hover .fp-pq__row-index {
	color: var(--u-color, var(--accent));
}
.fp-pq__row-label {
	margin: 0;
	font-family: var(--font-serif);
	font-size: clamp(1.6rem, 4vw, 3rem);
	line-height: 1.02;
	text-transform: lowercase;
	color: var(--ink);
	font-style: normal;
	transition: all 360ms cubic-bezier(.2, .7, .2, 1);
	padding-left: 0;
	position: relative;
	z-index: 2;
}
.fp-pq__row:hover .fp-pq__row-label {
	font-style: italic;
	padding-left: 16px;
}
.fp-pq__row-univers {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--u-color, var(--ink-3));
	opacity: 0.6;
	transition: opacity 280ms ease;
	position: relative;
	z-index: 2;
}
.fp-pq__row:hover .fp-pq__row-univers {
	opacity: 1;
}

/* Photo flottante au hover — position inchangée (right) mais derrière le texte (z-index 0) */
.fp-pq__row-photo {
	position: absolute;
	right: clamp(140px, 20vw, 280px);
	top: 50%;
	width: 200px;
	height: 240px;
	transform: translateY(-50%) rotate(-8deg) scale(0.8);
	opacity: 0;
	transition: all 480ms cubic-bezier(.2, .7, .2, 1);
	pointer-events: none;
	z-index: 0;
	box-shadow: var(--sh-card);
	background: #1a1411;
	overflow: hidden;
	margin: 0;
}
.fp-pq__row:hover .fp-pq__row-photo {
	transform: translateY(-50%) rotate(-3deg) scale(1);
	opacity: 1;
}
.fp-pq__row-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
@media (max-width: 720px) {
	.fp-pq__row-photo { display: none; }
}


/* ============================================================
   VARIANT 2 — GRID : 4 colonnes vignettes
   ============================================================ */
.fp-pq__grid.wp-block-group,
.fp-pq__grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(12px, 2vw, 24px);
}
@media (max-width: 880px) {
	.fp-pq__grid.wp-block-group,
	.fp-pq__grid { grid-template-columns: repeat(2, 1fr); }
}

.fp-pq__cell.wp-block-group,
.fp-pq__cell {
	cursor: pointer;
	display: flex !important;
	flex-direction: column;
	margin: 0;
}
.fp-pq__cell-photo.wp-block-group,
.fp-pq__cell-photo {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #1a1411;
	margin: 0 !important;
	display: block;
}
.fp-pq__cell.is-photo-tall .fp-pq__cell-photo { aspect-ratio: 3 / 5; }
.fp-pq__cell.is-photo-short .fp-pq__cell-photo { aspect-ratio: 4 / 3; }

.fp-pq__cell-photo .wp-block-image,
.fp-pq__cell-photo figure {
	margin: 0;
	width: 100%;
	height: 100%;
}
.fp-pq__cell-photo img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	transition: transform 720ms cubic-bezier(.2, .7, .2, 1);
}
.fp-pq__cell:hover .fp-pq__cell-photo img {
	transform: scale(1.04);
}

.fp-pq__cell-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--u-color, var(--ink));
	color: var(--paper);
	padding: 4px 8px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
	margin: 0;
	z-index: 2;
}

.fp-pq__cell-caption.wp-block-group,
.fp-pq__cell-caption {
	padding-top: 16px;
	margin: 0;
	display: block;
}
.fp-pq__cell-pour {
	margin: 0;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 14px;
	color: var(--ink-3);
}
.fp-pq__cell-label {
	margin: 4px 0 0 !important;
	font-family: var(--font-serif);
	font-size: clamp(1.1rem, 1.6vw, 1.4rem);
	line-height: 1.15;
	text-transform: lowercase;
	color: var(--ink);
}


/* ============================================================
   VARIANT 3 — CAROUSEL : scroll horizontal x-mandatory
   ============================================================ */
.fp-pq__carousel {
	display: flex !important;
	overflow-x: auto;
	gap: 20px;
	scroll-snap-type: x mandatory;
	padding: 0 clamp(20px, 5vw, 56px) 20px;
	margin: 0;
	scrollbar-width: none;
}
.fp-pq__carousel::-webkit-scrollbar { display: none; }

.fp-pq__carousel .fp-pq__cell {
	flex: 0 0 320px;
	scroll-snap-align: start;
}


/* ============================================================
   VARIANT 5 — PANTONE : puce colorée qui glisse de la droite
   + soulignement dynamique du label (emprunté à Manuscrit V2)
   Markup réutilisé : .fp-pq__row / .fp-pq__row-index / .fp-pq__row-label
   (pour bénéficier du wrapping en lien produit dans home-card-links.php)
   Toutes les règles sont préfixées par .fp-pq--pantone pour ne PAS
   affecter les autres variantes.
   ============================================================ */
.fp-pq--pantone .fp-pq__row.wp-block-group,
.fp-pq--pantone .fp-pq__row {
	grid-template-columns: 60px 1fr minmax(180px, 280px);
	padding: clamp(22px, 3vw, 36px) 0;
}
/* Pas de photo flottante en pantone — overrides explicites au cas où. */
.fp-pq--pantone .fp-pq__row-photo { display: none; }

/* Décalage du label au hover : 12px (variante Pantone exacte).
   Override la transition héritée de l'éditorial (`all 360ms`) :
   on garde une animation très courte pour éviter le « décalage »
   ressenti — l'italique apparaît quasi instantanément. */
.fp-pq--pantone .fp-pq__row-label {
	transition: padding-left 120ms cubic-bezier(.2, .7, .2, 1);
}
.fp-pq--pantone .fp-pq__row:hover .fp-pq__row-label {
	padding-left: 12px;
}

/* Trait fin de couleur univers qui se déploie sous le texte du label.
   Le wrapper .fp-pq-pant__label-text isole le pseudo pour qu'il
   suive la largeur du texte (pas du <p> padding inclus).
   `min-height: 2.04em` (= 2 × line-height 1.02) réserve toujours
   la place de deux lignes : le trait reste donc à la même position
   verticale, qu'il y ait 1 ou 2 lignes de texte. */
.fp-pq--pantone .fp-pq-pant__label-text {
	position: relative;
	display: inline-block;
	min-height: 2.04em;
	line-height: 1.02;
}
.fp-pq--pantone .fp-pq-pant__label-text::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 2px;
	background: var(--u-color, var(--accent));
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 520ms cubic-bezier(.2, .7, .2, 1);
	pointer-events: none;
}
.fp-pq--pantone .fp-pq__row:hover .fp-pq-pant__label-text::after {
	transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
	.fp-pq--pantone .fp-pq-pant__label-text::after { transition: none; }
}

/* Puce Pantone — viewport qui clippe la puce en translation. */
.fp-pq--pantone .fp-pq-pant__chip-wrap {
	position: relative;
	height: 72px;
	overflow: hidden;
}
.fp-pq--pantone .fp-pq-pant__chip {
	position: absolute;
	inset: 0 0 0 auto;
	width: 100%;
	background: var(--u-color, var(--ink));
	color: var(--paper);
	padding: 12px 16px 14px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transform: translateX(105%);
	opacity: 0;
	transition: transform 520ms cubic-bezier(.2, .7, .2, 1), opacity 320ms ease;
	box-shadow: 0 12px 28px -18px rgba(31, 26, 23, .45);
}
.fp-pq--pantone .fp-pq__row:hover .fp-pq-pant__chip {
	transform: translateX(0%);
	opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
	.fp-pq--pantone .fp-pq-pant__chip { transition: opacity 200ms ease; transform: none; }
}
.fp-pq--pantone .fp-pq-pant__chip-eyebrow {
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 0.22em;
	line-height: 1;
	text-transform: uppercase;
	opacity: 0.75;
}
.fp-pq--pantone .fp-pq-pant__chip-label {
	font-family: var(--font-serif);
	font-size: 22px;
	line-height: 1;
	text-transform: lowercase;
	font-weight: 500;
}

/* Responsive : sur petits écrans la puce passe sous le label.
   On garde l'effet glissement mais on libère la place verticale. */
@media (max-width: 720px) {
	.fp-pq--pantone .fp-pq__row.wp-block-group,
	.fp-pq--pantone .fp-pq__row {
		grid-template-columns: 44px 1fr;
		row-gap: 12px;
	}
	.fp-pq--pantone .fp-pq-pant__chip-wrap {
		grid-column: 1 / -1;
		height: 56px;
	}
}


/* ============================================================
   VARIANT 4 — MOSAIC : grid 4 col tall/short asymétrique
   ============================================================ */
/* Réutilise .fp-pq__grid + classes .is-photo-tall / .is-photo-short.
   Le caption-pour est en italique inline (pas de "pour" séparé). */
.fp-pq--mosaic .fp-pq__cell-pour {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: clamp(0.95rem, 1.4vw, 1.2rem);
	line-height: 1.2;
	color: var(--ink);
	margin: 0;
}
.fp-pq--mosaic .fp-pq__cell-label {
	display: none; /* en mosaic, le "pour {label}" est tout en un */
}
.fp-pq--mosaic .fp-pq__cell-caption {
	padding-top: 14px;
}
