/* Mouvements de la boutique : entrée de la bannière, apparitions au défilement, reflets et survols, puis la touche
   propre à chaque gabarit. Sous #boutique (ShopLayout) : l'aperçu de l'administration n'est pas touché.
   On n'anime que translate, scale, rotate, transform et opacity (rien qui redessine la page à chaque image).
   translate, scale et rotate sont des propriétés à part : elles s'ajoutent au transform des gabarits (photo penchée,
   carte soulevée au survol) au lieu de l'écraser. Coupé par « Animations » décoché (.no-motion, boutique-gabarits.css)
   et quand l'appareil demande moins de mouvement (plus bas). Durées en millisecondes entières (Windows en français
   écrit « 0,5 »). */

/* ---------- Entrée de la bannière : chaque ligne arrive à son tour ---------- */

#boutique .hero .hero-content > * {
    animation: fx-rise 900ms cubic-bezier(.2, .7, .2, 1) both;
}

    #boutique .hero .hero-content > :nth-child(1) { animation-delay: 80ms; }
    #boutique .hero .hero-content > :nth-child(2) { animation-delay: 180ms; }
    #boutique .hero .hero-content > :nth-child(3) { animation-delay: 300ms; }
    #boutique .hero .hero-content > :nth-child(4) { animation-delay: 420ms; }
    #boutique .hero .hero-content > :nth-child(5) { animation-delay: 540ms; }

/* Le titre monte de plus loin et plus lentement que le reste. */
#boutique .hero .hero-content > h1 {
    animation-name: fx-title;
    animation-duration: 1100ms;
}

#boutique .hero-split .hero-visual {
    animation: fx-visual 1300ms cubic-bezier(.2, .7, .2, 1) 120ms both;
}

    /* La photo se pose : elle part un peu grossie et revient à sa taille. */
    #boutique .hero-split .hero-visual img {
        animation: fx-settle 2400ms cubic-bezier(.2, .7, .2, 1) both;
    }

@keyframes fx-rise {
    from { opacity: 0; translate: 0 22px; }
}

@keyframes fx-title {
    from { opacity: 0; translate: 0 48px; }
}

@keyframes fx-visual {
    from { opacity: 0; translate: 0 30px; scale: .96; }
}

@keyframes fx-settle {
    from { scale: 1.14; }
}

/* ---------- Reflet qui passe sur les boutons principaux ---------- */

#boutique .hero .btn-brand,
#boutique .cta-band .btn,
#boutique .buy-row .btn-primary,
#boutique .summary .btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

    #boutique .hero .btn-brand::after,
    #boutique .cta-band .btn::after,
    #boutique .buy-row .btn-primary::after,
    #boutique .summary .btn-primary::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 60%;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .38) 50%, transparent 100%);
        transform: translateX(-120%) skewX(-18deg);
        animation: fx-sheen 5200ms ease-in-out 1600ms infinite;
    }

@keyframes fx-sheen {
    0% { transform: translateX(-120%) skewX(-18deg); }
    22%, 100% { transform: translateX(260%) skewX(-18deg); }
}

/* ---------- Cartes de produits : un halo de couleur au survol (souris seulement) ---------- */

@media (hover: hover) {
    #boutique .product-grid .product-card {
        position: relative;
    }

        #boutique .product-grid .product-card::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            box-shadow: 0 0 0 2px rgba(var(--brand-rgb), .55), 0 18px 44px -18px rgba(var(--brand-rgb), .55);
            opacity: 0;
            transition: opacity 300ms ease;
        }

        #boutique .product-grid .product-card:hover::after {
            opacity: 1;
        }

    #boutique.hover-none .product-grid .product-card::after,
    #boutique.card-plain .product-grid .product-card::after {
        display: none;
    }
}

/* Au toucher : la carte s'enfonce un peu sous le doigt (transitions plus bas, avec le relief). */
#boutique .product-card:active,
#boutique .cat-tile:active {
    scale: .98;
}

/* ---------- Apparitions au défilement (navigateurs qui suivent le défilement) ---------- */

/* Sans ce support, .reveal garde l'animation au chargement de boutique.css. La bannière est déjà à l'écran : elle
   garde son entrée minutée. Les rangées qui glissent du doigt sur téléphone gardent aussi la leur (plus bas), car
   leur propre défilement servirait de repère. */
@supports (animation-timeline: view()) {
    #boutique .reveal:not(.hero),
    #boutique .shop-section-head,
    #boutique .home-richtext > *,
    #boutique .faq-item {
        animation: fx-in linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 70%;
        animation-delay: 0s;
    }

    /* Photos des tuiles et du bloc texte et photo : un léger zoom arrière en entrant. */
    #boutique .cat-tile img,
    #boutique .home-imagetext-photo img {
        animation: fx-unzoom linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 50%;
    }

    /* Bannière photo « côte à côte » : l'image glisse doucement en descendant la page. */
    #boutique .hero-split .hero-visual img {
        animation: fx-settle 2400ms cubic-bezier(.2, .7, .2, 1) both, fx-drift linear both;
        animation-timeline: auto, scroll(root);
        animation-range: normal, 0 700px;
    }

    @media (max-width: 760px) {
        #boutique :is(.cat-tiles, .perks, .testimonial-grid, .cat-circles) > .reveal {
            animation: fx-rise 700ms cubic-bezier(.2, .7, .2, 1) both;
            animation-timeline: auto;
            animation-delay: calc(var(--i, 0) * 70ms);
        }
    }
}

@keyframes fx-in {
    from { opacity: 0; translate: 0 36px; scale: .98; }
}

@keyframes fx-unzoom {
    from { scale: 1.16; }
}

@keyframes fx-drift {
    to { translate: 0 28px; }
}

/* =====================================================================
   La touche de chaque gabarit
   ===================================================================== */

/* Éclat : le point vert du badge bat comme un signal en direct, les icônes des avantages sautillent au survol. */
#boutique.tpl-eclat .hero-badge .dot {
    position: relative;
}

    #boutique.tpl-eclat .hero-badge .dot::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: #22c55e;
        animation: fx-ping 2200ms ease-out infinite;
    }

@keyframes fx-ping {
    from { opacity: .7; scale: 1; }
    to { opacity: 0; scale: 3; }
}

#boutique.tpl-eclat .perk .perk-icon,
#boutique.tpl-douceur .perk .perk-icon {
    transition: rotate 400ms cubic-bezier(.3, 1.6, .5, 1), scale 400ms cubic-bezier(.3, 1.6, .5, 1);
}

#boutique.tpl-eclat .perk:hover .perk-icon,
#boutique.tpl-douceur .perk:hover .perk-icon {
    rotate: -8deg;
    scale: 1.12;
}

/* Atelier et Nuit : un filet se trace sous les titres de section. */
#boutique:is(.tpl-atelier, .tpl-nuit) .shop-section-head h2 {
    position: relative;
}

    #boutique:is(.tpl-atelier, .tpl-nuit) .shop-section-head h2::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -8px;
        width: 56px;
        height: 1px;
        background: var(--accent);
        transform-origin: left;
        animation: fx-line 1200ms cubic-bezier(.2, .7, .2, 1) 300ms both;
    }

#boutique.tpl-nuit .shop-section-head.is-centered h2::after,
#boutique.tpl-nuit .shop-section-head h2::after {
    left: calc(50% - 28px);
    transform-origin: center;
    background: var(--brand);
}

@supports (animation-timeline: view()) {
    #boutique:is(.tpl-atelier, .tpl-nuit) .shop-section-head h2::after {
        animation: fx-line linear both;
        animation-timeline: view();
        animation-range: entry 40% cover 40%;
    }
}

@keyframes fx-line {
    from { scale: 0 1; }
}

/* Atelier : la photo de la bannière se pose plus lentement, comme une page qu'on tourne. */
#boutique.tpl-atelier .hero-split .hero-visual img {
    animation-duration: 3200ms;
}

/* Nuit : un reflet d'or passe sur les boutons dorés; un filet doré se trace en haut de la bannière. */
#boutique.tpl-nuit .hero .btn-brand::after,
#boutique.tpl-nuit .buy-row .btn-primary::after {
    background: linear-gradient(100deg, transparent 0%, rgba(255, 246, 214, .6) 50%, transparent 100%);
    animation-duration: 4200ms;
}

#boutique.tpl-nuit .hero .hero-content {
    position: relative;
}

    #boutique.tpl-nuit .hero .hero-content::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -1px;
        height: 1px;
        pointer-events: none;
        background: linear-gradient(90deg, transparent, var(--accent), transparent);
        animation: fx-line 1600ms cubic-bezier(.2, .7, .2, 1) 600ms both;
    }

/* Audace : tout arrive avec un rebond, les cartes penchent au survol comme des autocollants. */
#boutique.tpl-audace .hero .hero-content > * {
    animation-name: fx-pop;
    animation-timing-function: cubic-bezier(.3, 1.5, .5, 1);
    animation-duration: 700ms;
}

#boutique.tpl-audace .hero-split .hero-visual {
    animation: fx-pop-tilt 900ms cubic-bezier(.3, 1.5, .5, 1) 200ms both;
}

@keyframes fx-pop {
    from { opacity: 0; translate: 0 18px; scale: .86; }
}

@keyframes fx-pop-tilt {
    from { opacity: 0; rotate: -8deg; scale: .8; }
}

#boutique.tpl-audace .product-grid .product-card,
#boutique.tpl-audace .cat-tile {
    transition: transform 300ms cubic-bezier(.3, 1.5, .5, 1), box-shadow 300ms, rotate 300ms cubic-bezier(.3, 1.5, .5, 1), scale 120ms;
}

@media (hover: hover) {
    #boutique.tpl-audace .product-grid .product-card:nth-child(odd):hover,
    #boutique.tpl-audace .cat-tile:nth-child(odd):hover {
        rotate: -1deg;
    }

    #boutique.tpl-audace .product-grid .product-card:nth-child(even):hover,
    #boutique.tpl-audace .cat-tile:nth-child(even):hover {
        rotate: 1deg;
    }
}

/* Douceur : la photo de la bannière flotte doucement, comme un galet sur l'eau. */
#boutique.tpl-douceur .hero-split .hero-visual {
    animation: fx-visual 1300ms cubic-bezier(.2, .7, .2, 1) 120ms both, fx-float 7000ms ease-in-out 1500ms infinite alternate;
}

@keyframes fx-float {
    from { translate: 0 0; rotate: 0deg; }
    to { translate: 0 -12px; rotate: -1.5deg; }
}

#boutique.tpl-douceur .cat-circle-photo {
    transition: translate 500ms cubic-bezier(.3, 1.5, .5, 1), scale 500ms cubic-bezier(.3, 1.5, .5, 1);
}

#boutique.tpl-douceur .cat-circle:hover .cat-circle-photo {
    translate: 0 -6px;
    scale: 1.04;
}

/* Épure : les titres et les photos grandissent en entrant, à la manière des pages de produits techno. */
#boutique.tpl-epure .hero .hero-content > h1 {
    animation-name: fx-grow;
    animation-duration: 1400ms;
}

@keyframes fx-grow {
    from { opacity: 0; scale: .9; }
}

@supports (animation-timeline: view()) {
    #boutique.tpl-epure .shop-section-head,
    #boutique.tpl-epure .home-richtext > * {
        animation-name: fx-grow;
        animation-range: entry 10% cover 30%;
    }

    #boutique.tpl-epure .product-grid .product-photo img {
        animation: fx-unzoom linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 40%;
    }
}

/* Studio : une barre rouge balaie sous les titres; au survol, un trait rouge file au pied de la carte. */
#boutique.tpl-studio .shop-section-head h2 {
    position: relative;
}

    #boutique.tpl-studio .shop-section-head h2::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -10px;
        width: 72px;
        height: 6px;
        background: var(--accent);
        transform-origin: left;
        animation: fx-line 700ms cubic-bezier(.7, 0, .2, 1) 200ms both;
    }

@supports (animation-timeline: view()) {
    #boutique.tpl-studio .shop-section-head h2::after {
        animation: fx-line linear both;
        animation-timeline: view();
        animation-range: entry 40% cover 35%;
    }
}

#boutique.tpl-studio .hero .hero-content > h1 {
    animation-timing-function: cubic-bezier(.7, 0, .2, 1);
    animation-duration: 800ms;
}

#boutique:is(.tpl-studio, .tpl-magazine) .product-grid .product-body {
    position: relative;
}

    #boutique:is(.tpl-studio, .tpl-magazine) .product-grid .product-body::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 4px;
        background: var(--accent);
        scale: 0 1;
        transform-origin: left;
        transition: scale 400ms cubic-bezier(.7, 0, .2, 1);
    }

#boutique.tpl-magazine .product-grid .product-body::after {
    top: 0;
    bottom: auto;
    height: 1px;
    background: var(--ink);
}

@media (hover: hover) {
    #boutique:is(.tpl-studio, .tpl-magazine) .product-grid .product-card:hover .product-body::after {
        scale: 1 1;
    }
}

/* Magazine : les titres de section reçoivent un filet, le grand titre de couverture monte lentement. */
#boutique.tpl-magazine .hero .hero-content > h1 {
    animation-duration: 1500ms;
}

#boutique.tpl-magazine .shop-section-head h2 {
    position: relative;
}

    #boutique.tpl-magazine .shop-section-head h2::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -10px;
        width: 100%;
        max-width: 240px;
        height: 1px;
        background: var(--accent);
        transform-origin: left;
        animation: fx-line 1400ms cubic-bezier(.2, .7, .2, 1) 300ms both;
    }

@supports (animation-timeline: view()) {
    #boutique.tpl-magazine .shop-section-head h2::after {
        animation: fx-line linear both;
        animation-timeline: view();
        animation-range: entry 30% cover 45%;
    }
}

/* Botanique : la photo en arche pousse depuis le sol, les icônes des avantages se balancent comme des feuilles. */
#boutique.tpl-botanique .hero-split .hero-visual {
    transform-origin: 50% 100%;
    animation: fx-grow-up 1500ms cubic-bezier(.2, .7, .2, 1) 150ms both;
}

@keyframes fx-grow-up {
    from { opacity: 0; scale: 1 .7; }
}

#boutique.tpl-botanique .perk .perk-icon {
    transform-origin: 50% 100%;
    animation: fx-sway 4200ms ease-in-out infinite alternate;
}

#boutique.tpl-botanique .perk:nth-child(even) .perk-icon {
    animation-delay: -2100ms;
}

@keyframes fx-sway {
    from { rotate: -5deg; }
    to { rotate: 5deg; }
}

/* Néon : le sol quadrillé avance (sans redessiner : il glisse dans son plan), une ligne de balayage descend sur la
   bannière et le mot en couleur du titre s'allume en clignotant. */
#boutique.tpl-neon .hero-aurora::after {
    animation: fx-floor 1600ms linear infinite;
}

@keyframes fx-floor {
    from { transform: perspective(500px) rotateX(62deg) translateY(-56px); }
    to { transform: perspective(500px) rotateX(62deg) translateY(0); }
}

#boutique.tpl-neon .hero-aurora::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 30%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), .14), transparent);
    animation: fx-scan 6500ms linear infinite;
}

@keyframes fx-scan {
    from { translate: 0 -100%; }
    to { translate: 0 340%; }
}

#boutique.tpl-neon .hero h1 span {
    animation: fx-flicker 1400ms linear 700ms both;
}

@keyframes fx-flicker {
    0% { opacity: 0; }
    10% { opacity: 1; }
    14% { opacity: .2; }
    22% { opacity: 1; }
    40% { opacity: .5; }
    46%, 100% { opacity: 1; }
}

#boutique.tpl-neon .hero .btn-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, .55);
    animation: fx-glow 2400ms ease-in-out infinite alternate;
}

@keyframes fx-glow {
    from { opacity: .15; }
    to { opacity: 1; }
}

#boutique.tpl-neon .product-grid .product-card::after {
    box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .9), 0 0 32px -4px rgba(var(--brand-rgb), .7), 0 0 60px -10px rgba(var(--accent-rgb), .6);
}

/* Rétro : les rayons du soleil tournent lentement derrière la bannière, tout arrive avec un rebond, les cartes
   frétillent au survol comme des autocollants. */
#boutique.tpl-retro .hero-aurora::before {
    inset: -60%;
    background: repeating-conic-gradient(from 0deg at 64.5% 75%, rgba(255, 255, 255, .22) 0deg 7deg, transparent 7deg 14deg);
    transform-origin: 64.5% 75%;
    animation: fx-rays 9000ms linear infinite;
}

@keyframes fx-rays {
    to { rotate: 14deg; }
}

#boutique.tpl-retro .hero .hero-content > * {
    animation-name: fx-pop;
    animation-timing-function: cubic-bezier(.3, 1.5, .5, 1);
    animation-duration: 750ms;
}

#boutique.tpl-retro .hero-split .hero-visual {
    animation: fx-pop-tilt 1000ms cubic-bezier(.3, 1.5, .5, 1) 200ms both;
}

/* Sur la photo et l'étiquette, pas sur la carte : la carte garde son apparition au défilement. */
@media (hover: hover) {
    #boutique.tpl-retro .product-grid .product-card:hover .product-photo,
    #boutique.tpl-retro .cat-tile:hover .cat-tile-body {
        animation: fx-wiggle 600ms ease-in-out both;
    }
}

@keyframes fx-wiggle {
    0%, 100% { rotate: 0deg; }
    25% { rotate: -2deg; }
    50% { rotate: 1.5deg; }
    75% { rotate: -.5deg; }
}

/* Artisan : la photo polaroïd tombe en place, puis se balance doucement sous son ruban adhésif. */
#boutique.tpl-artisan .hero-split .hero-visual {
    transform-origin: 50% 0;
    animation: fx-drop 1200ms cubic-bezier(.3, 1.4, .5, 1) 200ms both, fx-hang 5000ms ease-in-out 1500ms infinite alternate;
}

@keyframes fx-drop {
    from { opacity: 0; translate: 0 -50px; rotate: -10deg; }
}

@keyframes fx-hang {
    from { rotate: 0deg; }
    to { rotate: -2deg; }
}

#boutique.tpl-artisan .product-grid .product-photo img {
    transition: scale 700ms cubic-bezier(.2, .7, .2, 1);
}

@media (hover: hover) {
    #boutique.tpl-artisan .product-grid .product-card:hover .product-photo img {
        scale: 1.05;
    }
}

/* =====================================================================
   Cartes de produits : deuxième photo, badges, aperçu rapide, relief
   ===================================================================== */

#boutique .product-grid .product-card {
    position: relative;
}

/* Deuxième photo : elle se fond par-dessus la première au survol (souris seulement). */
#boutique .product-photo-alt {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    scale: 1.06;
    transition: opacity 500ms ease, scale 900ms cubic-bezier(.2, .7, .2, 1);
}

@media (hover: hover) {
    #boutique .product-card:hover .product-photo-alt {
        opacity: 1;
        scale: 1;
    }
}

/* Badges flottants en bas de la photo : « Nouveau », « Gratuit ». Ils montent et descendent doucement. */
#boutique .product-badges {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

#boutique .product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: calc(var(--radius-sm) * 3); /* carré dans les gabarits aux coins droits, pastille ailleurs */
    background: rgba(var(--brand-rgb), .88);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
    box-shadow: 0 6px 16px -6px rgba(var(--brand-rgb), .8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fx-badge 3600ms ease-in-out infinite alternate;
}

    #boutique .product-badge.badge-free {
        background: rgba(22, 163, 74, .9);
        box-shadow: 0 6px 16px -6px rgba(22, 163, 74, .8);
        animation-delay: -1800ms;
    }

#boutique .product-card .ribbon {
    animation: fx-badge 3600ms ease-in-out -900ms infinite alternate;
}

@keyframes fx-badge {
    from { translate: 0 0; }
    to { translate: 0 -4px; }
}

/* L'œil de l'aperçu rapide : une pastille de verre en haut à droite, qui paraît au survol de la carte. */
#boutique .product-quick {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
    color: #14111f;
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45);
    backdrop-filter: blur(10px) saturate(1.4);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
    transition: opacity 250ms ease, translate 250ms ease, scale 150ms ease;
}

    #boutique .product-quick:active {
        scale: .92;
    }

@media (hover: hover) {
    #boutique .product-quick {
        opacity: 0;
        translate: 0 -6px;
    }

    #boutique .product-card:hover .product-quick,
    #boutique .product-quick:focus-visible {
        opacity: 1;
        translate: 0 0;
    }

    #boutique .product-quick:hover {
        scale: 1.08;
    }
}

/* Relief à la souris (boutique.js) : la carte penche vers le pointeur et un reflet la suit. */
#boutique .product-grid,
#boutique .cat-tiles {
    perspective: 1600px;
}

#boutique .product-grid .product-card,
#boutique .cat-tile {
    transition: transform 300ms cubic-bezier(.2, .7, .2, 1), box-shadow 300ms, border-color 300ms,
        rotate 450ms cubic-bezier(.2, .7, .2, 1), scale 150ms ease;
}

#boutique .product-grid .product-card.is-tilting,
#boutique .cat-tile.is-tilting {
    rotate: var(--tilt-x, 0) var(--tilt-y, 0) 0 var(--tilt, 0deg);
    transition: transform 300ms cubic-bezier(.2, .7, .2, 1), box-shadow 300ms, border-color 300ms, rotate 120ms linear, scale 150ms ease;
    will-change: rotate;
}

#boutique .product-grid .product-card::before,
#boutique .cat-tile::before {
    content: "";
    position: absolute;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 255, 255, .28), transparent 42%);
    opacity: 0;
    translate: var(--glare-x, 0) var(--glare-y, 0);
    transition: opacity 300ms ease;
}

#boutique .product-grid .product-card.is-tilting::before,
#boutique .cat-tile.is-tilting::before {
    opacity: 1;
}

/* ---------- « Ajouter » : le bouton confirme sur place ---------- */

/* « Ajouter » et « ✓ Ajouté » sont empilés dans la même case : le bouton prend la largeur du plus long des deux. */
#boutique .add-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    transition: scale 150ms ease, background-color 250ms ease, border-color 250ms ease;
}

    #boutique .add-button.is-added {
        background: #16a34a;
        border-color: #16a34a;
        color: #fff;
        box-shadow: 0 10px 24px -10px rgba(22, 163, 74, .8);
    }

    #boutique .add-button:active:not(:disabled) {
        scale: .95;
    }

    #boutique .add-button .add-label {
        grid-area: 1 / 1;
        transition: opacity 200ms ease, translate 300ms cubic-bezier(.2, .7, .2, 1);
    }

    #boutique .add-button .add-done {
        grid-area: 1 / 1;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        opacity: 0;
        translate: 0 140%;
        transition: opacity 200ms ease, translate 350ms cubic-bezier(.3, 1.4, .5, 1);
    }

    #boutique .add-button.is-added .add-label {
        opacity: 0;
        translate: 0 -100%;
    }

    #boutique .add-button.is-added .add-done {
        opacity: 1;
        translate: 0 0;
    }

        #boutique .add-button.is-added .add-done .icon {
            animation: fx-check 500ms cubic-bezier(.3, 1.8, .5, 1) 120ms both;
        }

    /* Une onde part du bouton au moment de l'ajout. */
    #boutique .add-button.is-added::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 3;
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .55);
        pointer-events: none;
        animation: fx-burst 600ms ease-out both;
    }

@keyframes fx-check {
    from { scale: 0; rotate: -30deg; }
}

@keyframes fx-burst {
    from { opacity: 1; scale: 0; }
    to { opacity: 0; scale: 12; }
}

/* ---------- Aperçu rapide : une fenêtre de verre dépoli ---------- */

#boutique .quick-backdrop {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(10, 8, 20, .5);
    animation: fx-fade 250ms ease both;
}

#boutique .quick-view {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 211;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: min(920px, calc(100vw - 48px));
    max-height: calc(100dvh - 64px);
    overflow: auto;
    overscroll-behavior: contain;
    translate: -50% -50%;
    border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
    border-radius: min(calc(var(--radius) * 1.5), 28px);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    color: var(--ink);
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .6);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    animation: fx-pop-in 350ms cubic-bezier(.2, .9, .3, 1.1) both;
    outline: none;
}

@keyframes fx-fade {
    from { opacity: 0; }
}

@keyframes fx-pop-in {
    from { opacity: 0; scale: .94; }
}

#boutique .quick-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    color: var(--ink);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: rotate 300ms ease;
}

    #boutique .quick-close:hover {
        rotate: 90deg;
    }

#boutique .quick-photo {
    display: grid;
    place-items: center;
    min-height: 320px;
    background: var(--surface-2);
    overflow: hidden;
}

    #boutique .quick-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        animation: fx-settle 1200ms cubic-bezier(.2, .7, .2, 1) both;
    }

    #boutique .quick-photo .placeholder-code {
        font-size: 28px;
    }

#boutique .quick-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 36px 32px 28px;
}

    #boutique .quick-body > * {
        animation: fx-rise 500ms cubic-bezier(.2, .7, .2, 1) both;
    }

        #boutique .quick-body > :nth-child(2) { animation-delay: 60ms; }
        #boutique .quick-body > :nth-child(3) { animation-delay: 120ms; }
        #boutique .quick-body > :nth-child(4) { animation-delay: 180ms; }
        #boutique .quick-body > :nth-child(5) { animation-delay: 240ms; }

#boutique .quick-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
}

#boutique .quick-view .price {
    align-items: flex-start;
    text-align: left;
}

    #boutique .quick-view .price span {
        font-size: 26px;
    }

#boutique .quick-description {
    margin: 0;
    color: var(--muted);
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#boutique .quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: auto;
    padding-top: 12px;
}

    #boutique .quick-actions .btn-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding-left: 0;
        color: var(--brand);
        font-weight: 600;
        text-decoration: none;
    }

/* La page ne défile plus sous l'aperçu ouvert. */
html:has(#boutique .quick-view) {
    overflow: hidden;
}

/* Éclat : un titre de bannière plus grand et plus serré sur grand écran. */
@media (min-width: 1081px) {
    #boutique.tpl-eclat .hero h1 {
        font-size: clamp(56px, 6.6vw, 96px);
        letter-spacing: -0.045em;
        line-height: .98;
    }
}

/* ---------- Moins de mouvement ---------- */

@media (prefers-reduced-motion: reduce) {
    #boutique *,
    #boutique *::before,
    #boutique *::after {
        animation: none !important;
        transition: none !important;
    }
}
