/* Thème Rivière · « la rivière » (03/12/2026, direction choisie sur aperçu par Timour, né pour La Pépite d'Or).
   Le matin, un coude de rivière turquoise en montagne ; le logo de la boutique devant. « Remonter la rivière » : on avance
   vers l'amont, et le catalogue est la rivière vue de haut : chaque produit flotte sur un petit radeau de bois.
   Trois couches, posées par riviere.js (même squelette que Mine et Tour) :
     #rv-vue      (derrière tout)   le bleu de l'eau
     le catalogue (dans la page)    la rivière et ses berges de galets, qui défilent avec les radeaux
     #rv-avant    (par-dessus)      le coude de la rivière, le logo, le bouton ; tout s'efface au passage
   États sur <body> : rv-accueil → rv-bord. rv-hors = on n'est pas sur l'onglet Produits.
   La profondeur : riviere.js écrit --px et --py (de -1 à 1) ; le décor et le logo glissent chacun à sa distance.
   Aucune ombre molle : les reliefs sont des rebords nets (retour de Timour sur la boutique de Snoop). */
body[data-vitrine="riviere"] #cl-vitrine > :is(.cl-hero, .cl-bande, .cl-rayons) { display: none !important; }
/* #rv-vue est derrière la page (z-index -1) : le fond de <body> le cacherait, on le rend transparent et on peint <html>. */
body[data-vitrine="riviere"][data-glossy="candy"] { background: transparent !important; }
html:has(body[data-vitrine="riviere"]) { background: #0b2239 !important; }
body[data-vitrine="riviere"].rv-accueil #cl-barre { display: none !important; }

#rv-vue, #rv-avant { position: fixed; inset: 0; overflow: hidden; container-type: inline-size; }
#rv-vue { z-index: -1; background: radial-gradient(circle at 50% 38%, #2bb5c9, #17426a 72%); }
#rv-avant { z-index: 2; pointer-events: none; }
body.rv-hors #rv-avant { display: none; }
/* Grand écran : l'app reste une colonne à la taille d'un téléphone, le décor ne déborde pas. */
@media (min-width: 600px) {
  #rv-vue, #rv-avant { left: 50%; right: auto; width: 56.25svh; translate: -50% 0; }
}
/* La boîte de la planche (9:16) : calée en bas, elle couvre toujours l'écran. */
.rv-cadre { position: absolute; left: 50%; bottom: 0; width: max(100cqw, 56.25svh); aspect-ratio: 9 / 16; translate: -50% 0; }
.rv-cadre img { display: block; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.rv-plein { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Par-dessus : le coude de la rivière ---------- */
/* Le point de fuite est l'amont de la rivière : c'est vers lui qu'on avance. */
.rv-plan { translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 6px); scale: 1.03; transform-origin: 50% 40%; will-change: transform; transition: transform .9s cubic-bezier(.6,0,.25,1), opacity .45s .4s; }
/* Le passage : on remonte la rivière jusqu'à l'eau. */
body.rv-bord .rv-plan { transform: scale(3.6); opacity: 0; }
body.rv-bord #rv-avant { visibility: hidden; transition: visibility 0s .95s; }

/* Le logo de la boutique devant la rivière. Il flotte à peine. */
.rv-nom { position: absolute; left: 50%; top: max(6svh, calc(env(safe-area-inset-top) + 26px)); width: min(80cqw, 40svh); margin: 0; translate: calc(-50% + var(--px, 0) * -6px) calc(var(--py, 0) * -4px); transition: opacity .3s; }
.rv-nom img { display: block; width: 100%; height: auto; max-height: 52svh; object-fit: contain; }
.rv-anime .rv-nom { animation: rv-pose .7s .15s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes rv-pose { from { opacity: 0; scale: .7; } }
.rv-anime .rv-nom img { animation: rv-flotte 5s 1s ease-in-out infinite; }
@keyframes rv-flotte { 50% { translate: 0 -7px; } }
.rv-nom.rv-coup img { animation: rv-coup .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes rv-coup { 40% { scale: 1.05; rotate: -1.5deg; } }
/* Le logo répond au doigt. */
.rv-touche { position: absolute; left: 12%; top: 8svh; width: 76%; height: 42svh; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* Le bouton : une pépite vernie. Or, texte et contour bleu profond du lettrage, un rebord net dessous. */
.rv-go {
  position: absolute; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom) + 2.5svh); translate: -50% 0; display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 26px 18px 30px; cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; white-space: nowrap;
  border: 3.5px solid #123a5e; border-radius: 999px; color: #123a5e; font: 900 19px/1 'Poppins', system-ui, sans-serif; letter-spacing: .01em;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 46%), linear-gradient(180deg, #ffd84a, #ffb400 62%, #f29a00);
  box-shadow: 0 7px 0 #123a5e;
}
.rv-go svg { width: 12px; height: 17px; fill: none; stroke: #123a5e; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.rv-anime .rv-go { animation: rv-monte .6s .5s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes rv-monte { from { opacity: 0; translate: -50% 26px; } }
.rv-anime .rv-go svg { animation: rv-appel 1.6s ease-in-out infinite; }
@keyframes rv-appel { 50% { translate: 5px 0; } }
.rv-go:active { translate: -50% 5px; box-shadow: 0 2px 0 #123a5e; }
body.rv-bord :is(.rv-nom, .rv-go, .rv-touche) { opacity: 0; pointer-events: none; animation: none; }
.rv-grain { position: fixed; z-index: 9999; width: 10px; aspect-ratio: 1; border-radius: 3px; pointer-events: none; background: var(--c, #ffc629); }
/* Hors du catalogue (panier, infos, avis, contact) : l'eau reste derrière, assombrie pour laisser lire les panneaux. */
#rv-vue::after { content: ""; position: absolute; inset: 0; background: rgba(11,34,57,.78); opacity: 0; transition: opacity .4s; }
body.rv-hors #rv-vue::after { opacity: 1; }

/* ---------- Le catalogue : la rivière vue de haut ---------- */
#rv-monde { display: none; }
/* La rivière est le fond du catalogue lui-même : elle défile avec les radeaux. La tuile se répète sans raccord. */
body.rv-bord #rv-monde {
  display: block; box-sizing: border-box; min-height: 100svh; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 22px) 5% 170px;
  background: #2bb5c9 url("heros/riviere.webp?v=1") center top / 100% auto repeat-y;
}
@media (min-width: 600px) { body.rv-bord #rv-monde { width: 56.25svh; } }
/* La rivière touche le haut de l'écran : sur le catalogue, la marge haute du moteur (70 px + 24 px) laissait une bande noire vide. */
body[data-vitrine="riviere"].rv-bord:not(.rv-hors) #appContent { padding-top: 0 !important; }
body[data-vitrine="riviere"].rv-bord:not(.rv-hors) #shoppingSection { margin-top: 0 !important; }
.rv-anime#rv-monde { animation: rv-entre .6s .3s cubic-bezier(.2,.8,.3,1) both; }
@keyframes rv-entre { from { opacity: 0; scale: 1.12; } }
.rv-rayon + .rv-rayon { margin-top: 30px; }
/* Le nom du rayon : une plaque crème. */
.rv-rayon h2 { display: inline-flex; align-items: center; margin: 0 0 14px; padding: 10px 18px; border-radius: 12px; border: 3px solid #123a5e;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 50%), #fff3d6; color: #123a5e; font: 900 15px/1 'Poppins', system-ui, sans-serif; letter-spacing: .03em; box-shadow: 0 4px 0 #123a5e; }
.rv-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; padding-bottom: 28px; }
/* Une fiche : un radeau sur l'eau. La colonne de droite est un demi-radeau plus bas. */
.rv-carte { position: relative; display: flex; flex-direction: column; cursor: pointer; }
.rv-carte:nth-child(even) { top: 28px; }
.rv-anime .rv-rayon:not(.rv-vu) .rv-carte { opacity: 0; }
.rv-anime .rv-rayon.rv-vu .rv-carte { animation: rv-arrive .5s calc(var(--n) * 70ms) cubic-bezier(.2,.8,.3,1.2) both; }
@keyframes rv-arrive { from { opacity: 0; translate: 0 22px; scale: .92; } 60% { opacity: 1; } }
.rv-carte.rv-tenu { scale: .97; }
/* Le radeau : la photo du commerçant est entière dans son ouverture, le bois flotté passe devant ses bords.
   (Une batée en acier a été refusée le 03/12 : « j'aime pas les disques d'argent ».)
   L'ouverture mesurée sur heros/radeau.webp (preparer-riviere.py) : 16,2 % à gauche, 16,6 % à droite, 15,1 % en haut, 17,7 % en bas. */
.rv-photo { position: relative; width: 100%; aspect-ratio: 1; }
.rv-photo::before { content: ""; position: absolute; left: 15%; top: 13.9%; width: 69.6%; height: 69.6%; border-radius: 8%; background: linear-gradient(165deg, #fff8e8, #efe2c6); }
.rv-photo > :is(img, video) { position: absolute; left: 15%; top: 13.9%; width: 69.6%; height: 69.6%; display: block; object-fit: cover; border-radius: 8%; }
.rv-photo::after { content: ""; position: absolute; inset: 0; background: url("heros/radeau.webp?v=1") center / 100% 100% no-repeat; pointer-events: none; }
/* L'étiquette du radeau : crème, le nom, le prix, le + doré. */
.rv-plaque { position: relative; display: flex; flex-direction: column; gap: 4px; margin: -9% 3% 0; padding: 9px 46px 10px 11px; min-height: 56px; box-sizing: border-box; justify-content: center;
  border: 2.5px solid #123a5e; border-radius: 12px; box-shadow: 0 5px 0 #123a5e;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 46%), #fff3d6; }
.rv-plaque b { font: 800 13.5px/1.2 'Poppins', system-ui, sans-serif; color: #123a5e; overflow-wrap: anywhere; }
.rv-prix { font: 900 15px/1 'Poppins', system-ui, sans-serif; color: #0f6f80; }
.rv-prix small { font-weight: 700; font-size: 11px; color: #1d4f7a; }
#rv-monde .rv-plus { position: absolute; right: 6px; top: 50%; left: auto; bottom: auto; translate: 0 -50%; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 2.5px solid #123a5e !important; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 48%), linear-gradient(180deg, #ffd84a, #ffb400) !important; box-shadow: none !important; }
#rv-monde .rv-plus svg { width: 18px; height: 18px; fill: none; stroke: #123a5e; stroke-width: 3.6; stroke-linecap: round; }
#rv-monde .rv-plus:active { scale: .88; }
.rv-vide { padding: 24px 16px; text-align: center; border-radius: 16px; border: 3px solid #123a5e; background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 50%), #fff3d6; color: #123a5e; box-shadow: 0 5px 0 #123a5e; }
.rv-vide b { display: block; margin-bottom: 4px; font: 900 19px/1.2 'Poppins', system-ui, sans-serif; }
.rv-vide span { font: 600 13.5px/1.4 'Poppins', system-ui, sans-serif; opacity: .85; }
/* Le produit ajouté descend vers la batée du panier. */
.rv-envol { position: fixed; z-index: 9999; border-radius: 10px; object-fit: cover; pointer-events: none; outline: 2.5px solid #123a5e; }

@media (prefers-reduced-motion: reduce) {
  .rv-go svg, .rv-nom img { animation: none; }
  .rv-plan { transition: none; }
}
