/* ============================================================
   BOHEME DE DIOR - Design system global
   Extension STRICTE de theme.css (Glowing / Bootstrap 5.3).
   Regles :
   - On NE surcharge PAS les classes de base du theme
     (.btn, .form-control, .badge, .product-actions, .card-product...).
   - On reutilise les tokens du theme : --bs-primary (#4e7661),
     --bs-emphasis-color, --bs-tertiary-bg, rayons, Urbanist.
   - Tous nos composants sont prefixes .boheme-*.
   ============================================================ */

:root {
    --boheme-ease: cubic-bezier(.22, 1, .36, 1);
    --boheme-ease-out: cubic-bezier(.16, 1, .3, 1);
    --boheme-accent: var(--bs-primary);
    --boheme-accent-rgb: var(--bs-primary-rgb);
    --boheme-shadow-soft: 0 8px 30px rgba(var(--bs-body-color-rgb), .10);
    --boheme-shadow-hover: 0 20px 55px rgba(var(--bs-body-color-rgb), .18);
    --boheme-radius: var(--bs-border-radius-xl);
    --boheme-radius-lg: 1.25rem;
    --boheme-blur: saturate(180%) blur(14px);
}

/* ---------- Accessibilite ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
.boheme-focusable:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--boheme-accent);
    outline-offset: 3px;
    border-radius: 4px;
}
::selection { background: var(--boheme-accent); color: #fff; }

/* ---------- Rythme / conteneurs ---------- */
.boheme-section { padding: clamp(48px, 8vw, 110px) 0; }
.boheme-section-sm { padding: clamp(32px, 5vw, 64px) 0; }
.boheme-page-hero {
    position: relative;
    padding: clamp(44px, 7vw, 96px) 0;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(var(--bs-primary-rgb), .10), transparent 55%),
        linear-gradient(180deg, var(--bs-tertiary-bg), transparent);
    overflow: hidden;
}
.boheme-page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -40% auto;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(var(--bs-primary-rgb), .16), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

/* ---------- Typographie utilitaire ---------- */
.boheme-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: .76rem;
    font-weight: 700;
    color: var(--boheme-accent);
}
.boheme-eyebrow::before {
    content: "";
    width: 30px; height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.boheme-heading {
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.08;
    color: var(--bs-emphasis-color);
}
.boheme-heading .accent { color: var(--boheme-accent); font-style: italic; }
.boheme-lead { font-size: 1.05rem; color: var(--bs-body-color); max-width: 60ch; }

/* ---------- Boutons boheme (namespaced, sans casser .btn) ---------- */
.boheme-btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.boheme-btn-shine::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    transform: translateX(-130%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transition: transform .8s var(--boheme-ease);
}
.boheme-btn-shine:hover::after { transform: translateX(130%) skewX(-18deg); }
.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading::before {
    content: "";
    position: absolute; top: 50%; left: 50%;
    width: 18px; height: 18px; margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: boheme-spin .6s linear infinite;
}
.js-add-to-cart.is-loading { opacity: .6; pointer-events: none; }
@keyframes boheme-spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.boheme-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 24px);
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: var(--bs-emphasis-color);
    color: var(--bs-body-bg);
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: var(--boheme-shadow-hover);
    opacity: 0;
    z-index: 2050;
    transition: opacity .35s var(--boheme-ease), transform .35s var(--boheme-ease);
    pointer-events: none;
    max-width: 90vw;
}
.boheme-toast::before {
    content: "";
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--boheme-accent);
}
.boheme-toast.show { opacity: 1; transform: translate(-50%, 0); }
.boheme-toast-error { background: var(--bs-danger); color: #fff; }
.boheme-toast-error::before { background: #fff; }

/* ---------- Drawer panier ---------- */
.boheme-cart-drawer {
    --bs-offcanvas-width: 430px;
    max-width: 100vw;
    box-shadow: -24px 0 70px rgba(var(--bs-body-color-rgb), .18);
}
@media (max-width: 480px) { .boheme-cart-drawer { --bs-offcanvas-width: 100vw; } }
.boheme-cart-drawer .offcanvas-footer {
    display: flex;
    padding: 20px 22px 26px;
    background: var(--bs-body-bg);
}
.boheme-cart-shipping .progress { border-radius: 999px; background: var(--bs-tertiary-bg); }
.boheme-cart-shipping .progress-bar { transition: width .6s var(--boheme-ease); border-radius: 999px; }
.boheme-cart-line {
    animation: boheme-slide-in .45s var(--boheme-ease-out) both;
}
.boheme-cart-line img { object-fit: cover; border-radius: 12px; }
.boheme-qty {
    user-select: none;
}
.boheme-qty .btn { line-height: 1; box-shadow: none !important; }
@keyframes boheme-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Etat vide ---------- */
.boheme-empty-state {
    padding: clamp(48px, 10vw, 120px) 1rem;
    text-align: center;
}
.boheme-empty-state .icon { opacity: .5; }

/* ---------- Skeleton loaders ---------- */
.boheme-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--bs-tertiary-bg);
    border-radius: var(--boheme-radius);
}
.boheme-skeleton::after {
    content: "";
    position: absolute; inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(var(--bs-emphasis-color-rgb), .06), transparent);
    animation: boheme-shimmer 1.4s infinite;
}
@keyframes boheme-shimmer { 100% { transform: translateX(100%); } }
.boheme-skeleton-line { height: 12px; border-radius: 6px; margin-bottom: 10px; }
.boheme-skeleton-img { aspect-ratio: 3 / 4; }

/* ---------- Reveal on scroll ---------- */
.boheme-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--boheme-ease-out), transform .7s var(--boheme-ease-out);
    will-change: opacity, transform;
}
.boheme-reveal.is-visible { opacity: 1; transform: none; }
.boheme-reveal[data-delay="1"] { transition-delay: .08s; }
.boheme-reveal[data-delay="2"] { transition-delay: .16s; }
.boheme-reveal[data-delay="3"] { transition-delay: .24s; }
.boheme-reveal[data-delay="4"] { transition-delay: .32s; }

/* ---------- Cartes / surfaces boheme ---------- */
.boheme-surface {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--boheme-radius-lg);
    box-shadow: var(--boheme-shadow-soft);
}
.boheme-surface-glass {
    background: rgba(var(--bs-body-bg-rgb), .72);
    backdrop-filter: var(--boheme-blur);
    -webkit-backdrop-filter: var(--boheme-blur);
    border: 1px solid rgba(var(--bs-emphasis-color-rgb), .06);
    border-radius: var(--boheme-radius-lg);
}
.boheme-hover-lift { transition: transform .4s var(--boheme-ease), box-shadow .4s var(--boheme-ease); }
.boheme-hover-lift:hover { transform: translateY(-6px); box-shadow: var(--boheme-shadow-hover); }

/* ---------- Puces d'avantages ---------- */
.boheme-usp {
    display: flex; align-items: center; gap: .6rem;
    color: var(--bs-body-color); font-size: .92rem;
}
.boheme-usp i, .boheme-usp svg { color: var(--boheme-accent); }

/* ---------- Recherche dynamique (offcanvas #searchModal) ---------- */
.boheme-search-results {
    max-width: 640px;
    margin: 18px auto 0;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--boheme-radius);
    background: var(--bs-body-bg);
}
.boheme-search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--bs-border-color);
    transition: background-color .15s ease;
}
.boheme-search-result-item:last-of-type { border-bottom: 0; }
.boheme-search-result-item:hover { background: var(--bs-tertiary-bg); }
.boheme-search-result-item img {
    width: 56px; height: 70px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
    flex-shrink: 0;
}
.boheme-search-result-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.boheme-search-result-name {
    color: var(--bs-emphasis-color);
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.boheme-search-result-price { font-size: .85rem; color: var(--bs-body-color); }
.boheme-search-loading,
.boheme-search-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: .9rem;
}
.boheme-search-view-all {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--boheme-accent);
    text-decoration: none;
    background: var(--bs-tertiary-bg);
}

/* ---------- Wishlist (produits aimes) ---------- */
.js-wishlist-toggle.is-active { color: var(--boheme-accent) !important; }
.js-wishlist-toggle.is-active svg { fill: currentColor; }

/* ---------- Fil d'ariane ---------- */
.breadcrumb { --bs-breadcrumb-divider: '/'; }
.breadcrumb-item a { color: var(--bs-body-color); }
.breadcrumb-item a:hover { color: var(--boheme-accent); }

.object-fit-cover { object-fit: cover; }
.cursor-pointer { cursor: pointer; }

/* ---------- Description produit (HTML QuillJS) ---------- */
.boheme-description {
    color: var(--bs-body-color);
    font-size: 1rem;
    line-height: 1.75;
}
.boheme-description > :first-child { margin-top: 0; }
.boheme-description > :last-child { margin-bottom: 0; }
.boheme-description p { margin: 0 0 1.1em; }
.boheme-description strong, .boheme-description b { color: var(--bs-emphasis-color); font-weight: 600; }
.boheme-description a { color: var(--boheme-accent); text-decoration: underline; text-underline-offset: 2px; }
.boheme-description img { max-width: 100%; height: auto; border-radius: var(--bs-border-radius-lg); margin: .5em 0; }
.boheme-description h2,
.boheme-description h3,
.boheme-description h4 {
    color: var(--bs-emphasis-color);
    font-weight: 600;
    line-height: 1.3;
    margin: 1.6em 0 .5em;
}
.boheme-description h2 { font-size: 1.5rem; }
.boheme-description h3 { font-size: 1.25rem; }
.boheme-description h4 { font-size: 1.0625rem; }
.boheme-description ul,
.boheme-description ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.boheme-description li { margin-bottom: .4em; padding-left: .15em; }
.boheme-description li::marker { color: var(--boheme-accent); }
.boheme-description blockquote {
    margin: 1.2em 0;
    padding: .2em 0 .2em 1em;
    border-left: 3px solid var(--boheme-accent);
    color: var(--bs-secondary-color);
    font-style: italic;
}
/* Variante compacte : short description sous le prix */
.boheme-description--compact { font-size: .95rem; line-height: 1.7; }
.boheme-description--compact h2 { font-size: 1.25rem; }
.boheme-description--compact h3 { font-size: 1.1rem; }

/* ---------- Composants tunnel d'achat (partages panier/checkout/paiement) ---------- */
.boheme-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    overflow: hidden;
    background: var(--bs-body-bg);
}
.boheme-stepper button {
    border: 0;
    background: transparent;
    width: 40px; height: 40px;
    font-size: 18px;
    line-height: 1;
    color: var(--bs-emphasis-color);
    transition: background-color .2s ease, color .2s ease;
}
.boheme-stepper button:hover { background: var(--bs-tertiary-bg); color: var(--bs-primary); }
.boheme-stepper button:active { transform: scale(.9); }
.boheme-stepper span {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    font-variant-numeric: tabular-nums;
}

.boheme-summary {
    position: sticky;
    top: 110px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--boheme-radius-lg);
    padding: 28px;
    box-shadow: var(--boheme-shadow-soft);
}
.boheme-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--bs-body-color);
    font-size: .95rem;
}
.boheme-summary-row + .boheme-summary-row { border-top: 1px dashed var(--bs-border-color); }
.boheme-summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 2px solid var(--bs-emphasis-color);
}
.boheme-summary-total span:first-child {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bs-emphasis-color);
}
.boheme-summary-total span:last-child {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -.02em;
    color: var(--bs-primary);
}
.boheme-coupon .form-control { border-radius: 999px 0 0 999px; }
.boheme-coupon .btn { border-radius: 0 999px 999px 0; padding-inline: 1.2rem; }

.boheme-trust li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--bs-body-color);
    font-size: .9rem;
}
.boheme-trust li i {
    color: var(--bs-primary);
    width: 20px;
    text-align: center;
}

@media (max-width: 991.98px) {
    .boheme-summary { position: static; margin-top: 8px; }
}

/* ---------- Carte de confirmation (commande / paiement) ---------- */
.boheme-confirm-card {
    max-width: 560px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--boheme-radius-lg);
    padding: clamp(32px, 6vw, 56px);
    box-shadow: var(--boheme-shadow-soft);
}
.boheme-confirm-icon {
    width: 84px; height: 84px;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: 2rem;
}
.boheme-confirm-icon.is-pending {
    background: rgba(var(--bs-warning-rgb), .12);
    color: var(--bs-warning);
}
.boheme-confirm-icon.is-error {
    background: rgba(var(--bs-danger-rgb), .12);
    color: var(--bs-danger);
}
.boheme-confirm-details {
    text-align: left;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--bs-border-color);
}

/* ---------- Hero tunnel d'achat (panier/checkout) ---------- */
.boheme-cart-hero {
    position: relative;
    padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(var(--bs-primary-rgb), .10), transparent 60%),
        linear-gradient(180deg, var(--bs-tertiary-bg), transparent);
}
.boheme-cart-count-badge {
    font-size: .5em;
    font-weight: 600;
    color: var(--bs-primary);
    vertical-align: middle;
}
.boheme-continue {
    display: inline-flex;
    align-items: center;
    transition: color .25s ease, transform .25s ease;
}
.boheme-continue:hover { color: var(--bs-primary) !important; }
.boheme-continue:hover .fa-arrow-left { transform: translateX(-4px); }
.boheme-continue .fa-arrow-left { transition: transform .25s var(--boheme-ease); }

/* ---------- Etat vide (panier/checkout) ---------- */
.boheme-cart-empty-state {
    text-align: center;
    padding: clamp(48px, 9vw, 110px) 1rem;
}
.boheme-cart-empty-icon {
    width: 120px; height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(var(--bs-primary-rgb), .14), rgba(var(--bs-primary-rgb), .04));
    animation: boheme-float 3.5s ease-in-out infinite;
}
.boheme-cart-empty-icon .icon { font-size: 3rem; color: var(--bs-primary); }
@keyframes boheme-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
