/* Coin des Princesses — fiche produit animée (V3.18). Chargé uniquement sur les fiches produit. */

/* Double-tap : gros cœur sur la photo. */
.cdp-gallery__slide { position: relative; }
.cdp-pd-like { position: absolute; z-index: 3; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #fff; pointer-events: none; filter: drop-shadow(0 6px 18px rgba(115, 48, 74, .45)); animation: cdp-pd-like .85s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.cdp-pd-like svg { fill: currentColor; }
@keyframes cdp-pd-like { 0% { transform: scale(0) rotate(-15deg); opacity: 0; } 25% { transform: scale(1.15) rotate(0); opacity: 1; } 45% { transform: scale(.95); } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1) translateY(-40px); opacity: 0; } }

/* Astuce « Touchez deux fois pour aimer » (une seule fois). */
.cdp-pd-tip { position: absolute; z-index: 3; left: 50%; bottom: 58px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(43, 37, 48, .72); backdrop-filter: blur(6px); color: #fff; font: 700 12.5px var(--font-sans); white-space: nowrap; transform: translateX(-50%); animation: cdp-pd-tipin .5s .6s both cubic-bezier(.3, 1.4, .5, 1); transition: opacity .4s, transform .4s; pointer-events: none; }
.cdp-pd-tip.is-out { opacity: 0; transform: translate(-50%, 8px); }
.cdp-pd-tip__h { width: 16px; height: 16px; color: #ff8fb4; animation: cdp-pd-tap 1.1s 1.1s infinite; }
@keyframes cdp-pd-tipin { from { opacity: 0; transform: translate(-50%, 10px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes cdp-pd-tap { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.35); } 30% { transform: scale(1); } 45% { transform: scale(1.35); } 60% { transform: scale(1); } }

/* La fiche glisse en place au chargement. */
@media (max-width: 760px) {
	body.single-product div.product .summary { animation: cdp-pd-sheet .6s .05s both cubic-bezier(.2, .8, .3, 1); }
	body.single-product div.product .summary > * { animation: cdp-pd-up .5s both cubic-bezier(.2, .8, .3, 1); }
	body.single-product div.product .summary > *:nth-child(1) { animation-delay: .12s; }
	body.single-product div.product .summary > *:nth-child(2) { animation-delay: .16s; }
	body.single-product div.product .summary > *:nth-child(3) { animation-delay: .2s; }
	body.single-product div.product .summary > *:nth-child(4) { animation-delay: .24s; }
	body.single-product div.product .summary > *:nth-child(5) { animation-delay: .28s; }
	body.single-product div.product .summary > *:nth-child(6) { animation-delay: .32s; }
	body.single-product div.product .summary > *:nth-child(n+7) { animation-delay: .36s; }
}
@keyframes cdp-pd-sheet { from { transform: translateY(40px); } to { transform: none; } }
@keyframes cdp-pd-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Tailles : sélection qui « pop », secousse si on a oublié. */
body.single-product .cdp-chip { transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s; }
body.single-product .cdp-chip:active { transform: scale(.94); }
body.single-product .cdp-chip[aria-checked="true"] { animation: cdp-pd-chip .35s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 6px 14px rgba(115, 48, 74, .22); }
@keyframes cdp-pd-chip { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.cdp-chips.is-shake, .variations.is-shake { animation: cdp-pd-shake .6s cubic-bezier(.36, .07, .19, .97); }
.cdp-chips.is-shake .cdp-chip:not(.is-disabled) { border-color: var(--rose, #c2557f); box-shadow: 0 0 0 3px rgba(194, 85, 127, .18); }
@keyframes cdp-pd-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }

/* Bouton d'ajout : chargement scintillant, puis « Ajouté ✓ » vert. */
body.single-product .single_add_to_cart_button, .cdp-stickycta [data-cdp-sticky-btn] { position: relative; overflow: hidden; transition: background .25s, transform .15s; }
body.single-product .single_add_to_cart_button:active, .cdp-stickycta [data-cdp-sticky-btn]:active { transform: scale(.97); }
.single_add_to_cart_button.is-loading, [data-cdp-sticky-btn].is-loading { pointer-events: none; }
.single_add_to_cart_button.is-loading::after, [data-cdp-sticky-btn].is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent); animation: cdp-pd-shine .9s infinite; }
.single_add_to_cart_button.is-done, [data-cdp-sticky-btn].is-done { background: #2e7d4f !important; border-color: #2e7d4f !important; animation: cdp-pd-chip .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cdp-pd-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* La photo s'envole vers le panier. */
.cdp-pd-fly { position: fixed; z-index: 9999; width: 120px; height: 120px; object-fit: cover; border-radius: 24px; box-shadow: 0 14px 34px rgba(43, 37, 48, .3); pointer-events: none; }
.cdp-cartbtn.is-bump .cdp-cartbtn__count, .cdp-cartbtn.is-bump .cdp-icon { animation: cdp-fx-bump .45s cubic-bezier(.3, 1.6, .5, 1); }

/* Barre du bas : prix + taille, sans chevauchement. */
@media (max-width: 760px) {
	.cdp-stickycta__info { flex: 1 1 auto; min-width: 0; display: grid !important; gap: 1px; }
	.cdp-stickycta__price { font-size: 16px !important; overflow: hidden; text-overflow: ellipsis; }
	.cdp-stickycta__price ins { text-decoration: none; }
	.cdp-stickycta__opt { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.cdp-stickycta__opt:empty { display: none; }
	.cdp-stickycta__opt.is-set { color: var(--plum); }
	.cdp-stickycta__opt.is-set::before { content: "✓ "; color: #2e7d4f; }
	.cdp-stickycta__express { flex: none; }
	.cdp-stickycta .cdp-btn--primary { flex: 0 1 auto !important; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Blocs sous la fiche : apparition au défilement. */
.cdp-rv { opacity: 0; transform: translateY(28px); transition: opacity .6s cubic-bezier(.2, .8, .3, 1), transform .6s cubic-bezier(.2, .8, .3, 1); }
.cdp-rv.is-in { opacity: 1; transform: none; }
.cdp-rv .products > li { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.cdp-rv.is-in .products > li { opacity: 1; transform: none; }
.cdp-rv.is-in .products > li:nth-child(2) { transition-delay: .07s; }
.cdp-rv.is-in .products > li:nth-child(3) { transition-delay: .14s; }
.cdp-rv.is-in .products > li:nth-child(4) { transition-delay: .21s; }
.cdp-rv.is-in .products > li:nth-child(n+5) { transition-delay: .28s; }

/* Prix promo : un éclat qui passe sur le badge. */
body.single-product .cdp-saving .cdp-badge--promo { position: relative; overflow: hidden; }
body.single-product .cdp-saving .cdp-badge--promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .65) 50%, transparent 70%); transform: translateX(-120%); animation: cdp-pd-glint 3.2s 1s infinite; }
@keyframes cdp-pd-glint { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
	body.single-product *, body.single-product *::before, body.single-product *::after { animation: none !important; transition: none !important; }
	.cdp-rv, .cdp-rv .products > li { opacity: 1 !important; transform: none !important; }
	.cdp-pd-tip { display: none; }
}
@media (min-width: 761px) { body.single-product .variations th .cdp-sizeguide { margin-left: 12px; } }

/* =========================================================================
 * V3.25 — Fiche mobile : feuille sur toute la largeur, hiérarchie plus nette, barre équilibrée
 * ====================================================================== */
@media (max-width: 760px) {
	body.cdp div.product > .summary, body.cdp div.product > .images, body.cdp div.product > .cdp-gallery { width: 100% !important; align-self: stretch !important; }
	body.cdp div.product > .summary { margin-top: -22px !important; padding: 18px 16px 8px !important; border-radius: 26px 26px 0 0 !important; background: #fffdfb; box-shadow: 0 -8px 24px rgba(43, 37, 48, .08); position: relative; z-index: 2; }
	body.cdp div.product .cdp-gallery__slide { height: min(118vw, 64svh) !important; }

	/* En-tête de la fiche : famille + badge, puis nom et prix, cœur à droite. */
	body.cdp div.product .summary .cdp-summary__top { display: flex; align-items: center; gap: 8px; margin: 0 52px 6px 0 !important; }
	body.cdp div.product .summary .product_title { margin: 0 52px 2px 0 !important; font-size: clamp(26px, 7.4vw, 32px) !important; line-height: 1.1 !important; }
	body.cdp div.product .summary .cdp-heart--summary { top: 16px !important; right: 14px !important; width: 44px !important; height: 44px !important; border: 1px solid var(--line) !important; background: #fff !important; box-shadow: 0 4px 12px rgba(43, 37, 48, .08) !important; }
	body.cdp div.product .summary > .price { margin: 4px 0 10px !important; font-size: 24px !important; }

	/* Repères (stock, dernières tailles) : petites pastilles sur une ligne. */
	body.cdp div.product .summary .cdp-stock, body.cdp div.product .summary .cdp-urgency { display: inline-flex !important; width: auto !important; margin: 0 6px 8px 0 !important; padding: 5px 10px !important; font-size: 12px !important; border-radius: 999px !important; vertical-align: middle; }
	body.cdp div.product .summary .cdp-crowns-hint { margin: 2px 0 12px !important; padding: 8px 12px !important; font-size: 12.5px !important; border-radius: 12px !important; }
	body.cdp div.product .summary .woocommerce-product-details__short-description { margin: 0 0 14px !important; font-size: 14px; line-height: 1.6; color: var(--muted); }

	/* Tailles : grandes pastilles régulières. */
	body.cdp div.product .summary .variations { margin-bottom: 6px !important; }
	body.cdp div.product .summary .variations th, body.cdp div.product .summary .variations .label { padding: 0 0 8px !important; }
	body.cdp div.product .summary .cdp-chips { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px !important; }
	body.cdp div.product .summary .cdp-chip { min-height: 48px !important; border-radius: 14px !important; font-size: 15px !important; }
	body.cdp div.product .summary .reset_variations { display: none !important; }

	/* Livraison + engagements : une carte compacte. */
	body.cdp div.product .summary .cdp-eta { margin: 12px 0 0 !important; border-radius: 14px 14px 0 0 !important; font-size: 13px !important; }
	body.cdp div.product .summary .cdp-eta + .cdp-reassure { margin-bottom: 8px !important; }
	body.cdp div.product .summary .cdp-reassure li { font-size: 12.5px !important; padding: 8px 0 !important; }

	/* Barre du bas : prix entier, deux boutons proportionnés. */
	body.single-product .cdp-stickycta { display: flex !important; align-items: center; gap: 8px !important; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important; }
	body.single-product .cdp-stickycta__info { order: 1; flex: 0 0 auto !important; max-width: none !important; min-width: 0; }
	body.single-product .cdp-stickycta__price { font-size: 16px !important; white-space: nowrap; overflow: visible !important; text-overflow: clip !important; }
	body.single-product .cdp-stickycta [data-cdp-sticky-btn] { order: 2; flex: 1 1 0 !important; max-width: none !important; min-height: 50px; white-space: nowrap; }
	body.single-product .cdp-stickycta__express { order: 3; flex: 1.35 1 0 !important; min-height: 50px; }
}
@media (max-width: 480px) {
	body.single-product .cdp-stickycta__info { display: none !important; }
	body.single-product .cdp-stickycta [data-cdp-sticky-btn] { flex: 0 0 40% !important; }
	body.single-product .cdp-stickycta__express { flex: 1 1 0 !important; }
}
@media (max-width: 760px) {
	/* Pastilles qui s'étirent sans déborder, même avec « 2.000 MAD ». */
	body.cdp div.product .summary .cdp-chips { display: flex !important; flex-wrap: wrap; }
	body.cdp div.product .summary .cdp-chip { flex: 1 1 64px; min-width: max-content; padding: 0 12px !important; }
	body.cdp div.product .summary table.variations, body.cdp div.product .summary table.variations td { width: 100% !important; max-width: 100%; }
}
