﻿/* Living layer (31/10/2026), story layer: Catalogue, category and search pages, and the product card used everywhere
   (shop_catalogue.php, ta_store_card, ta_store_minicart; the toast is built by js/teranga-shop.js). Owner: catalogue agent.
   Corpus: DEP-01 the product on a matte with one contact shadow; CMP-11 + CMP-01 « Boutique — couverture »: one tile breaks
   the grid, its product rising out of the top of the card, the prices stay aligned; MOT-03 hover lift; MOT-04 state change;
   MOT-02 press (shared, ta-living.css). The control layer (categories, sort, stock toggle, pagination, search) is unchanged.

   Placeholder language, for every page that shows a product without a photo (card, product page, rows):
     <box class="lv-placeholder" style="--lv-tint:<?php echo esc_attr(ta_lv_tint($product)); ?>"> holding
       <span class="lv-ph-mark" style="--lv-len:6">Baobab</span>   the name's key word, large Cormorant italic in a deeper
                                                    shade of the tint, sized by its length (--lv-len = letters, min 4)
       <span class="lv-ph-dept">Savons</span>       the product's category (ta_store_primary_category), small capitals
       <span class="lv-ph-note">Photo à venir</span>
   on the department's tinted matte, inside a thin inset label frame. Nothing is drawn that could pass for the product.
   Type sizes follow the box (container units), so the same three spans work in a 56 px row or a 600 px gallery. */

/* Placeholder: the department's tinted label (DEP-01 truth rule) */
.lv-placeholder{container-type:inline-size}
.lv-ph-mark{max-width:100%;overflow:hidden;white-space:nowrap;font:italic 500 40px/1.1 var(--ta-font-serif,Georgia,serif);font-size:min(30cqi,calc(168cqi / var(--lv-len,4)));color:rgb(61 51 38/.36)}
.lv-ph-dept{font:700 11px/1.3 var(--ta-font-sans,Arial,sans-serif);font-size:clamp(9.5px,4.4cqi,12.5px);letter-spacing:.1em;text-transform:uppercase;color:#4a3f30}
.lv-ph-note{font:500 12px/1.35 var(--ta-font-sans,Arial,sans-serif);font-size:clamp(10.5px,4.6cqi,13px);color:#5d5242}
@supports (color:oklch(from red l c h)){.lv-ph-mark{color:oklch(from var(--lv-tint,#f1e7d6) .56 calc(c * 3.2) h)}.lv-ph-dept,.lv-ph-note{color:oklch(from var(--lv-tint,#f1e7d6) .36 calc(c * 2.2) h)}}
.ta-shop-card-image.lv-placeholder .ta-shop-card-placeholder{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto auto;align-items:end;padding:12px 16px 15px;background:none;color:inherit;font-size:inherit;letter-spacing:0}
.ta-shop-card-placeholder::before{content:"";position:absolute;inset:7px;border:1px solid rgb(61 51 38/.12);border-radius:6px;pointer-events:none}
.ta-shop-card-placeholder .lv-ph-mark{align-self:center;margin:6cqi 0 0 -.04em}
.ta-shop-card-placeholder .lv-ph-dept{margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* DEP-01 on the card: the packshot's white melts into the matte; ta_store_card() sets the product down on its contact
   shadow (--lv-x/--lv-y/--lv-s, --lv-shadow-*). A full photo (.lv-scene) stays as it is, in the plain frame. */
.ta-shop-card-image.lv-object{background:var(--lv-surface);overflow:hidden}
.ta-shop-card-image.lv-object img{transform:translate(calc(var(--lv-x,0) * 100%),calc(var(--lv-y,0) * 100%)) scale(var(--lv-s,1))}
.ta-shop-card-image.lv-scene{background:var(--lv-surface)}.ta-shop-card-image.lv-scene img{object-fit:cover}
.ta-shop-card.is-unavailable .ta-shop-card-image img{filter:saturate(.55)}
.ta-shop-card.is-unavailable .lv-ph-mark{color:rgb(61 51 38/.24)}
@supports (color:oklch(from red l c h)){.ta-shop-card.is-unavailable .lv-ph-mark{color:oklch(from var(--lv-tint,#f1e7d6) .7 calc(c * 2.2) h)}}

/* « Les prix restent alignés »: every card on a grid shares the grid's rows (photo, name, price, stock, action), so prices,
   stock lines and buttons sit on one line across a row whatever the length of the names. Spacing between rows of cards
   moves from the gap to the card's margin (a gap would also open inside each card). */
@supports (grid-template-rows:subgrid){
.ta-shop-grid{row-gap:0}
.ta-shop-grid>.ta-shop-card{display:grid;grid-row:span 5;grid-template-rows:subgrid;grid-template-columns:minmax(0,1fr);row-gap:0;margin-bottom:20px}
.ta-shop-grid>.ta-shop-card>.ta-shop-card-body{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
.ta-shop-grid>.ta-shop-card .ta-card-add,.ta-shop-grid>.ta-shop-card .ta-card-notify{grid-row:4;align-self:end}
@media(max-width:760px){.ta-shop-grid>.ta-shop-card{margin-bottom:14px}}
@media(max-width:430px){.ta-shop-grid>.ta-shop-card{margin-bottom:10px}}

/* CMP-11 + CMP-01 — the one break of the screen (catalogue and category page 1, shop's own order): the first card spans two
   columns and its product rises out of the top edge of the card, by about a quarter of its height (15–30 %). Top overflow
   only, never sideways; the price and the button stay in the card, on the row's lines. The photo box holds the space the
   product rises into (its top 0.28/1.28) above the matte panel (::before); the body carries the rest of the card. The photo
   sits in a crop box that is the product's own box (.lv-feature-object), so no box runs past the card; the empty space
   above the card is not a link; a screen-reader copy of the label sits in the body. The grid is the blending group,
   painted with the page colour, so the packshot's white melts into the page above the card as into the matte below. */
/* Safety net: nothing in the tile's grid can widen the page; 10 px of room each side keeps the focus rings (6 px) whole. */
.ta-shop-grid.has-feature{isolation:isolate;padding:16px 10px 0;margin-inline:-10px;overflow-x:clip;background:var(--ta-cream,#fbfaf6)}
.ta-shop-grid>.lv-feature{grid-column:span 2;grid-template-columns:subgrid;overflow:visible;border:0;border-radius:14px;background:none}
/* --lv-u: one matte height, in a length the horizontal properties can use (the box is 8:3.84, at most 300 px high). */
.lv-feature>.ta-shop-card-image{--lv-u:min(37.5%,234.375px);grid-column:1/-1;align-self:stretch;width:100%;aspect-ratio:8/3.84;max-height:300px;overflow:visible;isolation:auto;background:none;pointer-events:none}
.lv-feature>.ta-shop-card-image::before{content:"";position:absolute;inset:21.875% 0 0;border:1px solid #e6e1d4;border-bottom:0;border-radius:12px 12px 0 0;background:var(--lv-surface);pointer-events:auto}
/* The crop box: no z-index, no transform (it must not become the blending group); the photo inside it sits above the shadow. */
.lv-feature-object{position:absolute;overflow:hidden;top:calc((.28 + var(--lv-ot)) / 1.28 * 100%);height:calc(var(--lv-oh) / 1.28 * 100%);left:calc(66% - var(--lv-ox) * var(--lv-u));width:calc(var(--lv-ow) * var(--lv-u))}
.lv-feature-object img{position:absolute;z-index:1;top:calc(var(--lv-it) * 100%);left:calc(var(--lv-il) * 100%);width:calc(var(--lv-iw) * 100%);max-width:none;height:auto;aspect-ratio:1;transform:none;pointer-events:auto}
.lv-feature>.ta-shop-card-image::after{z-index:0;left:66%;bottom:5%;width:auto;height:7%;aspect-ratio:var(--lv-shadow-ratio,5);translate:-50% 0}
/* 15/11/2026 — the product is ON the frame, not behind it: with its transparent-background photo (.is-cutout, ta_lv_cutout
   in living.php) it is painted as it is, opaque, so the frame's line and colour never show through it. Without that
   file the photo stays blended (multiply), as everywhere else. */
.lv-feature-object.is-cutout img{mix-blend-mode:normal}
/* The story block on the matte's left (« À ne pas manquer », client request): kicker with its star, the department, and a short
   description from the product's own text (ta_store_card). It ends at 32.5 %; the product starts at 36 % or later. */
.lv-feature-story{position:absolute;left:4.5%;top:60.9%;width:28%;max-height:72%;translate:0 -50%;display:flex;flex-direction:column;align-items:flex-start;gap:6px;overflow:hidden}
.lv-feature-kicker{display:inline-flex;align-items:center;gap:5px;color:#3d671d;font:700 11px/1.2 var(--ta-font-sans,Arial,sans-serif);letter-spacing:.12em;text-transform:uppercase}
.lv-feature-star{flex:none;width:12px;height:12px;fill:currentColor}
.lv-feature-label{font:italic 500 clamp(19px,1.1vw + 13px,30px)/1.06 var(--ta-font-serif,Georgia,serif);color:#3d3326;overflow-wrap:break-word}
.lv-feature-story:has(.lv-feature-about) .lv-feature-label{font-size:clamp(19px,.7vw + 13px,24px)}
.lv-feature-about{margin:0;color:#4a3f30;font:500 12.5px/1.4 var(--ta-font-sans,Arial,sans-serif);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}
@media(max-width:1099px){.lv-feature-story .lv-feature-about{-webkit-line-clamp:4}}
/* The tile with a full photo (.lv-feature-scene, the client's own photos: their own background, light and floor shadow). No
   overflow and no multiply: the matte fills the photo row (the card's top edge on the row's line), the whole photo sits in
   a rounded frame on its right, lifted by elevation 2, and the story block takes the rest of the matte, on its left. The
   frame's side is 80 % of the box height, i.e. .8 * min(48 %, 300 px) of its width (the box is 8:3.84, at most 300 px). */
.lv-feature-scene>.ta-shop-card-image::before{inset:0;border-bottom:0}
.lv-feature-scene>.ta-shop-card-image img{position:absolute;z-index:1;top:10%;right:5%;width:auto;height:80%;max-width:none;aspect-ratio:1;object-fit:contain;border-radius:10px;background:#fff;box-shadow:var(--elevation-2);transform:none;pointer-events:auto}
.lv-feature-scene .lv-feature-story{top:50%;right:calc(10% + .8 * min(48%,300px));width:auto}
/* Phones: the matte keeps the kicker and the department; the description sits beside the price, in the tile's free column. */
.lv-feature-about.is-body{display:none}
@media(max-width:760px){.lv-feature-story .lv-feature-about{display:none}.lv-feature>.ta-shop-card-body>.lv-feature-about.is-body{display:-webkit-box;grid-column:2;grid-row:2 / span 3;align-self:start;margin:3px 0 0;font-size:12.5px;-webkit-line-clamp:7}}
.lv-feature>.ta-shop-card-body{position:relative;grid-column:1/-1;grid-template-columns:subgrid;border:1px solid #e6e1d4;border-top:0;border-radius:0 0 12px 12px;background:#fff;transition:box-shadow var(--motion-duration-respond) var(--motion-ease-out)}
.lv-feature>.ta-shop-card-body>*{grid-column:1}
.lv-feature>.ta-shop-card-body>.ta-shop-card-title{grid-column:1/-1}
}
.lv-feature-story,.lv-feature-about.is-body{display:none}
@supports (grid-template-rows:subgrid){.lv-feature-story{display:flex}}

/* MOT-03 hover lift, only where a fine pointer hovers: up by the lift token, elevation 2, respond token. No tilt (the
   card holds a price). The tile that breaks lifts with top: a transform would cut it off its blending group. */
.ta-shop-card{transition:translate var(--motion-duration-respond) var(--motion-ease-out),top var(--motion-duration-respond) var(--motion-ease-out),box-shadow var(--motion-duration-respond) var(--motion-ease-out)}
.ta-shop-card:hover{box-shadow:none}
@media(hover:hover) and (pointer:fine){.ta-shop-card:hover{translate:0 calc(-1 * var(--motion-distance-lift));box-shadow:var(--elevation-2)}.ta-shop-grid>.lv-feature:hover{translate:none;top:calc(-1 * var(--motion-distance-lift));box-shadow:none}.lv-feature:hover>.ta-shop-card-body{box-shadow:var(--elevation-2)}}
/* Category list on a computer (client request): the hovered category slides 4 px to the left, respond token; reduced motion
   keeps the colour change only. The list gets 6–10 px of room inside its scroll box for the slide and the focus ring. Phone
   chips unchanged. */
@media(min-width:992px){.ta-shop-categories{padding:6px 10px;margin:-6px -10px}}
@media(min-width:992px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.ta-shop-categories a{transition:translate var(--motion-duration-respond) var(--motion-ease-out),background-color var(--motion-duration-respond) var(--motion-ease-out)}.ta-shop-categories a:hover{translate:-4px 0}}
/* Keyboard: a clear ring around the card, never a lift (the buttons' ring is the shared one, ta-living.css). The title link
   lends its focus to the whole card, so its own ring (shared, !important) gives way where :has() exists. */
.ta-shop-card:has(.ta-shop-card-title a:focus-visible){outline:3px solid #3d671d;outline-offset:3px}
@supports selector(:has(a)){.ta-shop-card .ta-shop-card-title a:focus-visible{outline:none!important}}

/* MOT-04: « ✓ Ajouté » (.is-added, js) settles in one respond beat; reduced motion keeps the instant colour change. */
@media(prefers-reduced-motion:no-preference){.ta-card-add .ta-shop-button.is-added{animation:lv-card-added var(--motion-duration-respond) var(--motion-ease-out)}}
@keyframes lv-card-added{from{scale:.94}}

/* Unavailable: a calm card, and « M'avertir du retour » a clear control in the blue (availability) role, on the button line. */
.ta-card-notify{justify-content:center;width:100%;min-height:44px;margin-top:auto;padding:8px 10px;border:1px solid var(--ta-blue-200);border-radius:8px;background:var(--ta-blue-50);color:var(--ta-blue-700);font-size:13px;line-height:1.25;text-align:center;text-decoration:none;transition:background-color var(--motion-duration-respond) var(--motion-ease-out),border-color var(--motion-duration-respond) var(--motion-ease-out),scale var(--motion-duration-press) var(--motion-ease-out)}
.ta-card-notify:hover{background:var(--ta-blue-100);border-color:var(--ta-blue-400);color:var(--ta-blue-800)}
.ta-card-notify:active{scale:var(--motion-distance-press)}
@media(max-width:430px){.ta-card-notify{gap:4px;padding:6px 8px;font-size:12px}}

/* Mini cart and toast: the same object on the same matte (DEP-01), on the classes teranga-shop.js builds. No new motion. */
/* data-photo-kind on the line's link / the toast (teranga-shop.js, ta_store_minicart): only a packshot is multiplied onto the
   matte; a full photo stays as it is; no photo = the department's tint and the name's initial, not the drawn placeholder. */
.ta-minicart li a{position:relative;isolation:isolate}
.ta-minicart li a:is([data-photo-kind=cutout],[data-photo-kind=none])::before,.ta-toast:is([data-photo-kind=cutout],[data-photo-kind=none]):has(>img)::before{content:"";position:absolute;z-index:-1;left:0;top:50%;display:grid;place-items:center;width:56px;height:56px;margin-top:-28px;border-radius:8px;background:var(--lv-surface);color:#5d5242;font:italic 500 30px/1 var(--ta-font-serif,Georgia,serif)}
.ta-toast:is([data-photo-kind=cutout],[data-photo-kind=none]):has(>img)::before{left:14px;top:14px;margin-top:0}
.ta-minicart li a[data-photo-kind=cutout] img,.ta-toast[data-photo-kind=cutout] img{background:none;mix-blend-mode:multiply}
.ta-minicart li a[data-photo-kind=none]::before,.ta-toast[data-photo-kind=none]:has(>img)::before{content:attr(data-initial);background:var(--lv-tint,#f1e7d6)}
.ta-minicart li a[data-photo-kind=none] img,.ta-toast[data-photo-kind=none] img{visibility:hidden}
@supports (color:oklch(from red l c h)){.ta-minicart li a[data-photo-kind=none]::before,.ta-toast[data-photo-kind=none]:has(>img)::before{color:oklch(from var(--lv-tint,#f1e7d6) .45 calc(c * 3) h)}}
