/* ==========================================================================
   Coin des Princesses — V3 : commande en 1 minute,
   galerie photo/vidéo, avis vérifiés, look complet.
   ========================================================================== */

:root { --stars-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E"); }

/* Boutons secondaires de la fiche ------------------------------------------- */
.cdp-btn--express { flex: 1 1 100%; background: #fff; border: 1.5px solid var(--plum); color: var(--plum); }
.cdp-btn--express:hover { background: var(--rose-tint); color: var(--plum-deep); }
.cdp-btn--wa { flex: 1 1 100%; background: #fff; border: 1.5px solid var(--green); color: var(--green); }
.cdp-btn--wa:hover { background: var(--success-soft); color: var(--green); }
body.cdp div.product form.cart .woocommerce-variation-add-to-cart .cdp-btn--express,
body.cdp div.product form.cart .woocommerce-variation-add-to-cart .cdp-btn--wa { order: 3; }
body.cdp div.product form.cart .cdp-choose-hint { order: 2; }

/* Fenêtres (commande express) -------------------------------------------------- */
.cdp-modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 16px; background: rgba(43,37,48,.62); backdrop-filter: blur(5px); }
.cdp-modal__card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: 24px; border: 1px solid var(--gold-line); box-shadow: var(--shadow); padding: 26px 24px 22px; animation: cdp-rise .3s ease-out; }
.cdp-modal__close { position: absolute; top: 10px; right: 10px; }
.cdp-express h2 { font-size: 28px; margin: 0 0 14px; }
.cdp-express__item { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 16px; }
.cdp-express__item img { width: 56px; height: 70px; object-fit: cover; border-radius: 10px; }
.cdp-express__item div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cdp-express__item .cdp-price { font-size: 17px; }
.cdp-express__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cdp-field--full { grid-column: 1 / -1; }
.cdp-express [aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.cdp-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cdp-express__totals { margin: 16px 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--paper-soft); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cdp-express__totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.cdp-express__totals dt { color: var(--muted); }
.cdp-express__totals dd { margin: 0; font-weight: 700; }
.cdp-express__total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px !important; }
.cdp-express__total dt { color: var(--ink) !important; font-weight: 800; }
.cdp-express__total dd { font-family: var(--font-serif); color: var(--plum); font-size: 22px; }
.cdp-express__error { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 600; }
.cdp-express__submit { width: 100%; min-height: 56px; font-size: 16px; }
.cdp-express__help { display: block; text-align: center; }
.cdp-express__done { text-align: center; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cdp-express__done .cdp-btn { margin-top: 10px; width: 100%; }
@media (max-width: 520px) {
	.cdp-modal { padding: 0; align-items: end; }
	.cdp-modal__card { border-radius: 24px 24px 0 0; max-height: 94vh; padding: 22px 16px calc(16px + env(safe-area-inset-bottom)); }
	.cdp-express__grid { grid-template-columns: 1fr; }
}

.cdp-fitting { margin-top: 4px; }
.cdp-fitting .cdp-chips + .cdp-chips { margin-top: 8px; }

/* Galerie produit ----------------------------------------------------------------- */
body.cdp div.product div.cdp-gallery.images { position: relative !important; top: auto; min-width: 0; }
.cdp-gallery__stage { position: relative; border-radius: 26px; overflow: hidden; background: var(--rose-tint); }
.cdp-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline-offset: -3px; }
.cdp-gallery__track::-webkit-scrollbar { display: none; }
.cdp-gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; position: relative; }
.cdp-gallery__slide img, .cdp-gallery__slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdp-gallery__zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.cdp-gallery__vtag { position: absolute; top: 14px; left: 14px; display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 999px; background: rgba(43,37,48,.7); color: #fff; font-size: 12px; font-weight: 700; }
.cdp-gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--plum); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); z-index: 2; }
.cdp-gallery__nav--prev { left: 12px; }
.cdp-gallery__nav--next { right: 12px; }
.cdp-gallery__count { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(43,37,48,.7); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cdp-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.cdp-gallery__thumb { position: relative; flex: none; width: 68px; height: 85px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; opacity: .6; background: var(--rose-tint); }
.cdp-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cdp-gallery__thumb[aria-selected="true"] { opacity: 1; outline: 2px solid var(--plum); outline-offset: 1px; }
.cdp-gallery__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(43,37,48,.35); }
@media (max-width: 900px) {
	.cdp-gallery { position: static; margin-inline: calc(var(--gutter) * -1); }
	.cdp-gallery__stage { border-radius: 0; }
	.cdp-gallery__nav { display: none; }
	.cdp-gallery__thumbs { padding-inline: var(--gutter); }
}
.cdp-lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(20,16,22,.94); display: grid; place-items: center; }
.cdp-lightbox__stage { width: 100%; height: 100%; display: grid; place-items: center; overflow: auto; padding: 56px 16px; }
.cdp-lightbox__stage img { max-width: min(100%, 900px); max-height: calc(100vh - 112px); object-fit: contain; border-radius: 12px; cursor: zoom-in; }
.cdp-lightbox.is-zoomed .cdp-lightbox__stage { place-items: start center; }
.cdp-lightbox.is-zoomed .cdp-lightbox__stage img { max-width: none; max-height: none; width: min(1600px, 200vw); cursor: zoom-out; }
.cdp-lightbox__close { position: absolute; top: 10px; right: 10px; z-index: 3; color: #fff; }
.cdp-lightbox__close:hover { background: rgba(255,255,255,.12); color: #fff; }
.cdp-lightbox .cdp-gallery__nav { position: fixed; }

/* Avis vérifiés ----------------------------------------------------------------------- */
.cdp-rating-link { display: inline-flex; align-items: center; gap: 6px; margin: -2px 0 10px; font-size: 14px; color: var(--ink); text-decoration: none; }
.cdp-rating-link span { color: var(--muted); text-decoration: underline; }
.cdp-stars { position: relative; display: inline-flex; color: var(--line-strong); --rating: 0%; }
.cdp-stars .cdp-icon { fill: currentColor; stroke: none; }
.cdp-stars::after { content: ""; position: absolute; inset: 0; width: var(--rating); background: var(--gold); -webkit-mask: var(--stars-mask) left center / auto 100% repeat-x; mask: var(--stars-mask) left center / auto 100% repeat-x; }
.cdp-reviews { grid-column: 1 / -1; margin-top: clamp(32px, 5vw, 56px); padding-top: 8px; }
.cdp-reviews__empty { display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; color: var(--muted); margin-top: 14px; }
.cdp-reviews__summary { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; max-width: 620px; margin: 22px auto; padding: 18px 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.cdp-reviews__score { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cdp-reviews__avg { font-family: var(--font-display); font-size: 46px; line-height: 1; color: var(--plum); }
.cdp-reviews__bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.cdp-reviews__bars li { display: grid; grid-template-columns: 42px 1fr 28px; gap: 8px; align-items: center; }
.cdp-reviews__bars .cdp-icon { color: var(--gold); fill: var(--gold); stroke: none; }
.cdp-reviews__bar { height: 8px; border-radius: 999px; background: var(--paper-soft); overflow: hidden; }
.cdp-reviews__bar span { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.cdp-reviews__photos { list-style: none; display: flex; gap: 8px; justify-content: center; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.cdp-reviews__photos button, .cdp-review__photo { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; width: 84px; height: 84px; display: block; }
.cdp-reviews__photos img, .cdp-review__photo img { width: 100%; height: 100%; object-fit: cover; }
.cdp-reviews__list { list-style: none; margin: 0 auto; padding: 0; max-width: 780px; display: grid; gap: 12px; }
.cdp-review { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.cdp-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.cdp-review__verified { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--success-soft); color: var(--green); font-size: 12px; font-weight: 800; }
.cdp-review p { margin: 0 0 8px; }
.cdp-card-product__rating { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.cdp-card-product__rating .cdp-icon { color: var(--gold); fill: var(--gold); stroke: none; }
.cdp-card-product__rating span { color: var(--muted); font-weight: 600; }

/* Formulaire d'avis */
.cdp-reviewform { margin: 16px 0; display: grid; gap: 12px; }
.cdp-reviewform__head { display: flex; gap: 12px; align-items: center; }
.cdp-reviewform__head img { width: 56px; height: 70px; object-fit: cover; border-radius: 10px; }
.cdp-reviewform__head h2 { font-size: 20px; margin: 0; }
.cdp-stars-input { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.cdp-stars-input legend { width: 100%; }
.cdp-stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cdp-stars-input label { cursor: pointer; color: var(--line-strong); width: 44px; height: 44px; display: grid; place-items: center; }
.cdp-stars-input label .cdp-icon { fill: currentColor; stroke: none; }
.cdp-stars-input input:checked ~ label, .cdp-stars-input label:hover, .cdp-stars-input label:hover ~ label { color: var(--gold); }
.cdp-stars-input input:focus-visible + label { outline: 3px solid rgba(56,116,90,.38); border-radius: 8px; }

/* Look complet ----------------------------------------------------------------------- */
.cdp-look { grid-column: 1 / -1; margin-top: clamp(28px, 4vw, 44px); display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; align-items: center; padding: 22px; border: 1px solid var(--gold-line); border-radius: 26px; background: var(--paper); }
.cdp-look__head h2 { font-size: 26px; margin: 0 0 4px; }
.cdp-look__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cdp-look__item, .cdp-look__item label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; cursor: pointer; position: relative; }
.cdp-look__item input { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; accent-color: var(--plum); z-index: 1; }
.cdp-look__img { display: block; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--rose-tint); border: 2px solid transparent; }
.cdp-look__img img { width: 100%; height: 100%; object-fit: cover; }
.cdp-look__item label:has(input:checked) .cdp-look__img, .cdp-look__item.is-main .cdp-look__img { border-color: var(--plum); }
.cdp-look__item label:has(input:not(:checked)) { opacity: .55; }
.cdp-look__name { font-weight: 600; line-height: 1.3; display: flex; flex-direction: column; }
.cdp-look__name small { color: var(--muted); font-weight: 600; }
.cdp-look__price { font-family: var(--font-serif); color: var(--plum); font-weight: 700; }
.cdp-look__price del { color: var(--muted); font-weight: 400; font-size: .85em; }
.cdp-look__foot { display: flex; flex-direction: column; gap: 8px; }
.cdp-look__total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.cdp-look__total strong { font-family: var(--font-serif); color: var(--plum); font-size: 24px; }
.cdp-look__save { color: var(--green); font-size: 13px; font-weight: 800; flex-basis: 100%; }
.cdp-look__foot .cdp-btn { width: 100%; }
@media (max-width: 1080px) { .cdp-look { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cdp-look { padding: 16px; } .cdp-look__list { grid-template-columns: repeat(4, 42%); overflow-x: auto; scroll-snap-type: x mandatory; } .cdp-look__item { scroll-snap-align: start; } }
