﻿/* Living layer (31/10/2026), story layer: Purchase flow: cart, checkout and account (WordPress), confirmation, withdrawal, product not found. Owner: flow agent. On WordPress pages this file loads BEFORE themes/teranga-shop/checkout.css. */
/* The purchase flow is the control layer (CONTINUITY « A shop order »): no story motion on the cart, the checkout, the account and the
   withdrawal pages. Liveliness here is continuity (the same product object as the cards) and the one success moment of merci.php. */

/* MOT-02 press on the flow's small controls (the buttons get it from ta-living.css), and a focus ring that reads on the cream page
   (#547b24: 4.7:1, the green of the forms in teranga-after.css; the shared #7aad2a ring is 2.6:1). */
.ta-cart-remove,.ta-undo,.ta-link-button,.ta-cart-empty .ta-rayon-chips a,.ta-nf-rayons a{transition:scale var(--motion-duration-press) var(--motion-ease-out),background-color var(--motion-duration-respond) var(--motion-ease-out),color var(--motion-duration-respond) var(--motion-ease-out)}
:is(.ta-cart-remove,.ta-undo,.ta-link-button,.ta-cart-empty .ta-rayon-chips a,.ta-nf-rayons a):active{scale:var(--motion-distance-press)}
.ta-commerce :where(#ta-cart,#ta-cart-feedback,.ta-thankyou,.ta-after,.ta-nf,.woocommerce) :focus-visible{outline:3px solid #547b24;outline-offset:2px}

/* Order steps (cart, checkout page.php, merci.php), client request « icons instead of text »: an icon per step (cart, delivery,
   confirmation) and the short label; the number is for screen readers (« Étape n sur 3 »). A done step keeps its ✓, as a badge on
   its icon, and its link. No motion. */
.ta-shop-steps.has-icons li,.ta-shop-steps.has-icons li>a{display:inline-flex;align-items:center;gap:7px}
.ta-step-icon{position:relative;flex:none;display:inline-flex;width:18px;height:18px}
.ta-step-icon svg{width:100%;height:100%}
.ta-step-done{position:absolute;right:-6px;bottom:-5px;display:grid;place-items:center;width:13px;height:13px;border:1.5px solid #fff;border-radius:50%;background:var(--ta-sun-600,#c4501b);color:#fff;font:700 8px/1 var(--ta-font-sans,sans-serif)}
.ta-shop-steps.has-icons .is-done{gap:10px}.ta-shop-steps.has-icons .is-done>a{gap:10px}
@media(max-width:430px){.ta-shop-steps.has-icons li,.ta-shop-steps.has-icons li>a{gap:5px}.ta-shop-steps.has-icons .is-done,.ta-shop-steps.has-icons .is-done>a{gap:8px}.ta-step-icon{width:15px;height:15px}.ta-step-done{width:11px;height:11px;font-size:7px}}
@media(max-width:360px){.ta-shop-steps.has-icons{gap:6px}.ta-shop-steps.has-icons li,.ta-shop-steps.has-icons li>a{gap:4px}.ta-shop-steps.has-icons .is-done,.ta-shop-steps.has-icons .is-done>a{gap:7px}.ta-step-icon{width:14px;height:14px}} /* one line at 320 px */

/* Cart loading, client request « an icon instead of text » (MOT-05): one skeleton line the size of a cart line, the cart icon in
   place of the photo, the sentence for screen readers only. teranga-shop.js replaces it in place; while #ta-cart is busy it keeps a
   cart's height, so the footer stays out of view and nothing jumps. A calm pulse; reduced motion: still. No JS: hidden (panier.php
   noscript), the noscript sentence speaks. */
.ta-cart-loading{display:grid;grid-template-columns:100px minmax(0,1fr);gap:20px;align-items:start;padding:22px 0;border-bottom:1px solid #e6e1d4}
.ta-cart-loading-media{display:grid;place-items:center;aspect-ratio:1;border-radius:10px;background:var(--lv-surface,#f6f1e6)}
.ta-cart-loading-media svg{width:38%;height:38%;fill:none;stroke:var(--ta-sun-600,#c4501b);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ta-cart-loading-lines{display:grid;gap:10px;padding-top:4px}
.ta-cart-loading-lines>span{display:block;height:14px;border-radius:7px;background:#ece6d8}
.ta-cart-loading-lines>span:nth-child(1){width:min(70%,260px)}.ta-cart-loading-lines>span:nth-child(2){width:min(40%,110px)}
.ta-cart-loading-lines>span:nth-child(3){width:134px;height:44px;margin-top:4px;border-radius:8px}
#ta-cart[aria-busy=true]{min-height:600px}
@media(min-width:761px){.ta-cart-loading{grid-template-columns:112px minmax(0,1fr)}}
@media(max-width:760px){.ta-cart-loading{grid-template-columns:75px minmax(0,1fr);gap:12px}}
@media(max-width:430px){.ta-cart-loading{grid-template-columns:65px minmax(0,1fr)}}
@media(prefers-reduced-motion:no-preference){.ta-cart-loading-media,.ta-cart-loading-lines>span{animation:lv-wait calc(var(--motion-duration-success) * 2) var(--motion-ease-out) infinite alternate}}
@keyframes lv-wait{to{opacity:.5}}

/* MOT-04 state confirmation (cart page, js/living/flow.js): the status line answers within the respond token; the line whose total
   just changed is tinted for a moment. Reduced motion: the same text and tint, instantly. */
@media(prefers-reduced-motion:no-preference){#ta-cart-feedback:not(:empty){animation:lv-respond var(--motion-duration-respond) var(--motion-ease-out)}}
@keyframes lv-respond{from{opacity:.3;translate:0 3px}}
.ta-cart-item>strong{justify-self:start;margin:-3px -7px;padding:3px 7px;border-radius:6px;transition:background-color var(--motion-duration-respond) var(--motion-ease-out)}
.ta-cart-item.lv-changed>strong{background:var(--ta-sun-50,#fff4ea)}

/* DEP-01 the same product object as the cards, at thumbnail size: cart lines (js/teranga-shop.js), the checkout order card
   (teranga-commerce/checkout.php), the empty cart's departments (panier.php) and the confirmation fan (merci.php). The photo sits
   inset on the warm matte, multiplied so a white packshot melts into it, on one soft contact shadow. A known full scene
   (.is-scene) fills its frame as it is. No photo: the tinted matte (--lv-tint, sand by default) and the name's initial. */
:is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item){display:block;aspect-ratio:1;border-radius:10px;overflow:hidden;container-type:inline-size}
:is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item).lv-object{--lv-shadow-width:60%;--lv-shadow-bottom:11%}
.ta-commerce :is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item) img{display:block;width:100%;height:100%;min-width:0;max-width:100%;margin:0;padding:9%;border:0;border-radius:0;background:none;object-fit:contain}
.ta-commerce :is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item).is-scene img{padding:0;object-fit:cover;mix-blend-mode:normal}
:is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item).is-scene::after{display:none}
:is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item).lv-placeholder{display:grid;place-items:center}
:is(.ta-cart-media,.ta-review-media,.ta-rayon-object,.ta-fan-item).lv-placeholder::before{content:attr(data-initial);font-family:var(--ta-font-serif,'Cormorant Garamond',Georgia,serif);font-weight:500;font-size:2rem;font-size:46cqw;line-height:1;color:rgb(61 51 38/.55)}

/* Cart lines: the object takes the image column (100 / 112 / 75 / 65 px, teranga-shop.css). */
.ta-cart-media{width:100%;min-width:0;max-width:100%}
.ta-cart-item>*{min-width:0}.ta-cart-item-copy>a{overflow-wrap:anywhere} /* a long name never widens the 65 px image column at 320 px */
/* Checkout order card: 56 px objects beside the name. */
.ta-commerce .ta-review-media{flex:none;width:56px}

/* Empty cart: one quiet invitation (the existing title, line and button), then the departments as small objects. No animation. */
.ta-cart-empty .ta-rayon-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 12px;max-width:560px;margin:0 auto}
.ta-cart-empty .ta-rayon-chips a{display:flex;flex-direction:column;align-items:center;gap:9px;height:100%;min-height:44px;padding:4px;border:0;border-radius:14px;background:none;color:#2f4a17;font-size:13.5px;font-weight:600;line-height:1.3;text-align:center;text-decoration:none}
.ta-cart-empty .ta-rayon-chips a:hover{background:none}.ta-cart-empty .ta-rayon-chips a:hover .ta-rayon-name{text-decoration:underline}
.ta-cart-empty .ta-rayon-object{width:min(100%,96px);border-radius:14px;box-shadow:var(--elevation-1)}
.ta-cart-empty .ta-cart-empty-help{margin:30px auto 0}
@media(min-width:761px){.ta-cart-empty .ta-rayon-chips{grid-template-columns:repeat(6,minmax(0,1fr));gap:20px 16px;max-width:820px}}

/* Account sign-in (« Mon compte », outside the checkout form): the field reads as empty, like the checkout's. */
.ta-commerce .ta-login input{font-family:var(--ta-font-sans,Manrope,sans-serif);font-weight:400}
.ta-commerce .ta-login input::placeholder{color:#8a867c;font-weight:400;opacity:1}

/* merci.php — MOT-07 the success moment, once: the tick draws itself and the disc settles (600 ms); the title and the sentence are
   there at once. Reduced motion: the static tick. */
.ta-shop-shell.ta-thankyou .ta-thankyou-mark{display:flex;align-items:center;justify-content:center}
.ta-thankyou-mark svg{width:24px;height:24px}
@media(prefers-reduced-motion:no-preference){
.ta-thankyou-mark.is-paid{animation:lv-settle var(--motion-duration-success) var(--motion-ease-out) both}
.ta-thankyou-mark.is-paid path{stroke-dasharray:1;stroke-dashoffset:1;animation:lv-draw var(--motion-duration-reveal) var(--motion-ease-out) var(--motion-duration-press) forwards}
}
@keyframes lv-settle{0%{scale:.82}55%{scale:1.08}100%{scale:1}}
@keyframes lv-draw{to{stroke-dashoffset:0}}

/* merci.php — the one break (CMP-01, DEP-02/DEP-03): the ordered products, fanned at the order card's top corner. A mirrored pair of
   angles (--rotate-object), a white print edge, one contact shadow; it hangs in free space and dips only into the card's top
   padding: never over the order number, the total, a button or the withdrawal link. Static, and it ignores the pointer.
   Wide screens: above the card, beside the centred title (the sentence is narrowed to leave it room), so the page keeps its height
   (1366×768 above the fold). 761–1099 px: room is made above the cards. Phones: room above the folded order row, whose top
   padding keeps 16 px clear between the fan and the row (a control). */
.ta-thankyou{--fan:92px}
.ta-thankyou-fan{position:relative;z-index:var(--z-object);display:flex;align-items:flex-end;pointer-events:none}
.ta-thankyou-fan.is-3{--fan:80px}
.ta-fan-item{position:relative;flex:none;width:var(--fan);border:3px solid #fff;border-radius:12px;background:var(--lv-surface);box-shadow:var(--elevation-2);rotate:calc(var(--rotate-object) * -1)}
.ta-fan-item+.ta-fan-item{margin-left:calc(var(--fan) * -.34);rotate:var(--rotate-object)}
.ta-thankyou-fan.is-3 .ta-fan-item+.ta-fan-item{margin-left:calc(var(--fan) * -.42)}
.ta-thankyou-fan.is-3 .ta-fan-item:nth-child(2){z-index:1;rotate:none;margin-bottom:4px}
.ta-thankyou .ta-thankyou-grid>.ta-thankyou-order{position:relative;z-index:var(--z-card)}
@media(min-width:761px){
.ta-thankyou.has-fan .ta-thankyou-grid>.ta-after-next{grid-area:1/1}
.ta-thankyou.has-fan .ta-thankyou-grid>.ta-thankyou-order{grid-area:1/2}
.ta-thankyou.has-fan .ta-thankyou-grid>.ta-thankyou-fan{grid-area:1/2;justify-self:end;align-self:start;margin:calc(var(--fan) * -.8) 0 0 0}
}
@media(min-width:761px) and (max-width:1099px){.ta-thankyou{--fan:72px}.ta-thankyou-fan.is-3{--fan:64px}.ta-thankyou.has-fan .ta-thankyou-grid{margin-top:76px}}
@media(min-width:1100px){
.ta-thankyou.has-fan .ta-thankyou-grid>.ta-thankyou-fan{margin-right:-36px}
.ta-thankyou.has-fan .ta-thankyou-lead{max-width:640px;text-wrap:balance}
}
@media(max-width:760px){
.ta-thankyou{--fan:56px}.ta-thankyou-fan.is-3{--fan:52px}
.ta-thankyou-mark svg{width:20px;height:20px}
.ta-fan-item{border-width:2px;border-radius:10px}
.ta-thankyou.has-fan .ta-thankyou-grid>.ta-thankyou-fan{grid-area:2/1;justify-self:end;align-self:start;margin:0 14px 0 0}
.ta-thankyou.has-fan .ta-thankyou-grid>.ta-thankyou-order{grid-area:2/1;margin-top:calc(var(--fan) - 10px);padding:28px 14px 16px}
}

/* Page 404 utile (_partials/product_not_found.php inside the shop): what happened, a search, the departments, the phone and the
   contact form. Calm, no object (nothing here may pass for the missing product). */
.ta-nf h1{margin:0 0 10px}
.ta-nf-lead{max-width:62ch;color:#444}
.ta-nf-search{max-width:640px;margin:22px 0 0}
.ta-nf-search label{display:block;margin:0 0 6px;font-size:14px;font-weight:600;color:#3b3b3b}
.ta-nf-search div{display:flex;gap:10px}
.ta-nf-search input{flex:1;min-width:0;min-height:48px;padding:12px 14px;border:1px solid #c8c5bc;border-radius:10px;background:#fff;color:#222;font-size:16px}
.ta-nf-search .ta-shop-button{flex:none;min-height:48px}.ta-nf-search input::placeholder{color:#8a867c;opacity:1}
.ta-shop-shell.ta-nf h2{margin:30px 0 12px;font-size:22px!important}
.ta-nf-rayons{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0}
.ta-nf-rayons a{display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;border:1px solid #d9d5c8;border-radius:999px;background:#fff;color:#2f4a17;font-size:14px;font-weight:600;text-decoration:none}
.ta-nf-rayons a:hover{background:#f3efe4}
.ta-nf-help{margin:28px 0 18px;color:#444}.ta-nf-help a{color:#385917;font-weight:600}
@media(max-width:600px){.ta-nf-search div{flex-direction:column}.ta-nf-search .ta-shop-button{width:100%}}
