/* Coin des Princesses — pages catégorie / boutique / Promos / Nouveautés (V3.21).
   Bannière avec photo, familles en vignettes, filtres rapides, grille qui remplit la largeur,
   cartes qui arrivent en cascade. Chargé uniquement sur les listes de produits. */

/* =========================================================================
 * Ordinateur
 * ====================================================================== */
@media (min-width: 761px) {
	.cdp-shophead { display: grid; gap: 18px; padding-top: 18px !important; }
	.cdp-shophead .cdp-crumbs { margin: 0; }

	/* Bannière */
	.cdp-dcat { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 260px; overflow: hidden; border-radius: 28px; background: radial-gradient(120% 140% at 0% 0%, #fbeef3 0%, #fff8f5 55%, #fff 100%); border: 1px solid #efdde4; isolation: isolate; }
	.cdp-dcat__body { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 34px 40px; }
	.cdp-dcat__body > * { margin: 0 !important; animation: cdp-c-up .6s both cubic-bezier(.2, .8, .3, 1); }
	.cdp-dcat__body > *:nth-child(2) { animation-delay: .08s; }
	.cdp-dcat__body > *:nth-child(3) { animation-delay: .16s; }
	.cdp-dcat__body > *:nth-child(4) { animation-delay: .24s; }
	.cdp-dcat h1 { font-family: var(--font-display, var(--font-serif)); font-weight: 400; font-size: clamp(40px, 4.4vw, 60px); line-height: 1.02; color: var(--plum); }
	.cdp-dcat .cdp-shophead__desc { max-width: 520px; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
	.cdp-dcat .cdp-shophead__desc p { margin: 0; }
	.cdp-dcat__count { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
	.cdp-dcat__count strong { color: var(--plum); font-size: 15px; font-variant-numeric: tabular-nums; }
	.cdp-dcat__media { position: relative; overflow: hidden; }
	.cdp-dcat__media { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
	.cdp-dcat__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; animation: cdp-c-kb 9s ease-out both; }
	@keyframes cdp-c-kb { from { transform: scale(1.14); } to { transform: scale(1); } }

	/* Familles */
	.cdp-dfam { display: flex; flex-wrap: wrap; gap: 10px; }
	.cdp-dfam__item { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 4px 18px 4px 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink) !important; font: 700 14px var(--font-sans); text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; animation: cdp-c-pop .45s both cubic-bezier(.3, 1.5, .5, 1); }
	.cdp-dfam__item:nth-child(2) { animation-delay: .04s; } .cdp-dfam__item:nth-child(3) { animation-delay: .08s; } .cdp-dfam__item:nth-child(4) { animation-delay: .12s; }
	.cdp-dfam__item:nth-child(5) { animation-delay: .16s; } .cdp-dfam__item:nth-child(6) { animation-delay: .2s; } .cdp-dfam__item:nth-child(n+7) { animation-delay: .24s; }
	.cdp-dfam__item:hover { transform: translateY(-2px); border-color: var(--plum); box-shadow: 0 6px 16px rgba(115, 48, 74, .12); }
	.cdp-dfam__img { display: grid; place-items: center; width: 36px; height: 36px; flex: none; overflow: hidden; border-radius: 50%; background: var(--rose-tint, #f8e9ef); color: var(--plum); }
	.cdp-dfam__img img { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; }
	.cdp-dfam__item--promo { color: var(--rose, #c2557f) !important; }
	.cdp-dfam__item[aria-current="page"] { background: var(--plum); border-color: var(--plum); color: #fff !important; box-shadow: 0 6px 16px rgba(115, 48, 74, .25); }
	.cdp-dfam__item[aria-current="page"] .cdp-dfam__img { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }

	/* Filtres rapides */
	.cdp-dquick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
	.cdp-dquick__label { margin-right: 2px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
	.cdp-dquick__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 10px; background: transparent; border: 1px solid var(--line); color: var(--ink) !important; font: 700 13px var(--font-sans); text-decoration: none !important; transition: background .2s, border-color .2s, color .2s, transform .15s; animation: cdp-c-pop .4s .25s both cubic-bezier(.3, 1.5, .5, 1); }
	.cdp-dquick__chip--size { min-width: 40px; justify-content: center; padding: 0 10px; }
	.cdp-dquick__chip:hover { border-color: var(--plum); color: var(--plum) !important; }
	.cdp-dquick__chip:active { transform: scale(.95); }
	.cdp-dquick__chip[aria-pressed="true"] { background: var(--ink, #2b2530); border-color: var(--ink, #2b2530); color: #fff !important; }
	.cdp-dquick__sep { width: 1px; height: 22px; margin: 0 6px; background: var(--line); }
	.cdp-dquick__reset { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; font-size: 13px; font-weight: 700; color: var(--rose, #c2557f) !important; }
	.cdp-shophead > .cdp-chips { display: none; }

	/* Compte + tri */
	body.cdp .cdp-shop .woocommerce-result-count { color: var(--muted); font-size: 13.5px; }
	body.cdp .cdp-shop .woocommerce-ordering select { min-height: 40px; padding: 0 36px 0 16px; border-radius: 999px; border: 1px solid var(--line); background-color: #fff; font: 700 13.5px var(--font-sans); cursor: pointer; }

	/* Grille : 4 colonnes au plus, et peu d'articles occupent toute la largeur. */
	body.cdp.post-type-archive-product ul.products, body.cdp.tax-product_cat ul.products, body.cdp.tax-product_tag ul.products { grid-template-columns: repeat(auto-fit, minmax(max(220px, calc((100% - 3 * 22px) / 4)), 1fr)) !important; gap: 34px 22px !important; }
}
@keyframes cdp-c-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cdp-c-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Pied de page ordinateur : plus de petit triangle devant les titres. */
.cdp-footer summary, details.cdp-footer__col > summary { list-style: none; }
.cdp-footer summary::-webkit-details-marker { display: none; }

/* =========================================================================
 * Mobile : bannière vivante, pastilles qui arrivent
 * ====================================================================== */
@media (max-width: 760px) {
	.cdp-mcat__hero { overflow: hidden; }
	.cdp-mcat__hero img { animation: cdp-c-kb 8s ease-out both; }
	@keyframes cdp-c-kb { from { transform: scale(1.14); } to { transform: scale(1); } }
	.cdp-mcat__body > * { animation: cdp-c-up .55s both cubic-bezier(.2, .8, .3, 1); }
	.cdp-mcat__body > *:nth-child(2) { animation-delay: .1s; }
	.cdp-mcat__body > *:nth-child(3) { animation-delay: .18s; }
	.cdp-mbar a, .cdp-mbar button { animation: cdp-c-pop .4s both cubic-bezier(.3, 1.5, .5, 1); }
}

/* =========================================================================
 * Cartes : cascade au chargement, puis au défilement
 * ====================================================================== */
.cdp-shop ul.products > li.cdp-c-in { animation: cdp-c-card .55s both cubic-bezier(.2, .8, .3, 1); animation-delay: calc(var(--ci, 0) * 60ms); }
.cdp-shop ul.products > li.cdp-c-wait { opacity: 0; }
@keyframes cdp-c-card { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.cdp-dcat *, .cdp-dfam__item, .cdp-dquick__chip, .cdp-mcat *, .cdp-mbar *, .cdp-shop ul.products > li { animation: none !important; }
	.cdp-shop ul.products > li.cdp-c-wait { opacity: 1; }
}
