﻿/* ============================================================ tokens */
:root {
  --bg: #0b0b10;
  --bg-2: #12121a;
  --card: rgba(255, 255, 255, .055);
  --card-strong: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .09);
  --text: #f4f4f8;
  --muted: #9a9aae;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --hot: #d946ef;
  --warm: #f97316;
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--hot) 55%, var(--warm) 110%);
  --glow: color-mix(in srgb, var(--hot) 60%, transparent);
  --soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --orb1: #7c3aed; --orb2: #db2777; --orb3: #0891b2;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f43f5e;
  --radius: 20px;
  --radius-sm: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  transition: background-color .6s ease;
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  overflow-x: clip; /* "hidden" casserait position: sticky */
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, .rich-edit { -webkit-user-select: text; user-select: text; }
/* Médias protégés : l'image ne reçoit jamais le toucher / clic (c'est son conteneur qui le reçoit),
   donc pas de menu « Enregistrer l'image », pas de glisser, pas d'aperçu au 3D Touch. */
img { pointer-events: none; -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
video { -webkit-user-drag: none; -webkit-touch-callout: none; }
.carousel, .pcard .img, .pmini .img, .featured .f-img, .ccard, .hero, .media-grid .m { -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--accent-2); }
img, video { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ============================================================ fond animé */
/* Fond dans une couche stable (z-index 0, et non « sous » la page) : sur iPhone, un fond fixe en z-index
   négatif est parfois perdu / redessiné de travers pendant les transitions 3D. La page est isolée au-dessus. */
.bg-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; display: none; transform: translateZ(0); }
[data-bg="orbs"] .bg-orbs, [data-bg="aurora"] .bg-aurora, [data-bg="grid"] .bg-grid,
[data-bg="particles"] .bg-particles, [data-bg="stars"] .bg-particles, [data-bg="dots"] .bg-particles, [data-bg="silk"] .bg-particles,
[data-bg="waves"] .bg-waves, [data-bg="lava"] .bg-lava, [data-bg="lines"] .bg-lines,
[data-bg="bokeh"] .bg-particles, [data-bg="mesh"] .bg-mesh, [data-bg="spot"] .bg-spot, [data-bg="hex"] .bg-hex,
[data-bg="beams"] .bg-beams, [data-bg="image"] .bg-image { display: block; animation: fadeIn .35s both; }
/* fondu court : le fond (et ses particules) est en place avant les cartes de la première page */

/* Dégradé vivant : grandes nappes de couleur floues qui se mélangent lentement (façon fond d'écran premium) */
.bg-mesh { filter: blur(60px) saturate(1.25); }
.bg-mesh i { position: absolute; width: 75vmax; height: 75vmax; border-radius: 50%; opacity: .3; mix-blend-mode: screen;
  animation: meshMove 24s ease-in-out infinite alternate; }
.bg-mesh i:nth-child(1) { background: var(--orb1); left: -25vmax; top: -20vmax; }
.bg-mesh i:nth-child(2) { background: var(--orb2); right: -30vmax; top: 10vh; animation-duration: 30s; animation-delay: -9s; }
.bg-mesh i:nth-child(3) { background: var(--orb3); left: -10vmax; bottom: -35vmax; animation-duration: 27s; animation-delay: -4s; }
.bg-mesh i:nth-child(4) { background: var(--hot); right: -10vmax; bottom: -25vmax; width: 50vmax; height: 50vmax; opacity: .22; animation-duration: 21s; animation-delay: -14s; }
@keyframes meshMove { 0% { transform: translate(0, 0) rotate(0) scale(1); } 50% { transform: translate(14vw, 10vh) rotate(40deg) scale(1.2); } 100% { transform: translate(-10vw, 16vh) rotate(-20deg) scale(.9); } }

/* Projecteur doux : deux halos de lumière qui se promènent lentement sur un fond sombre */
.bg-spot i { position: absolute; width: 90vmax; height: 90vmax; left: 50%; top: 40%; margin: -45vmax 0 0 -45vmax; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 55%); animation: spotWander 20s ease-in-out infinite; }
.bg-spot i:nth-child(2) { background: radial-gradient(circle, color-mix(in srgb, var(--hot) 22%, transparent), transparent 50%); animation-duration: 27s; animation-direction: reverse; }
@keyframes spotWander { 0%, 100% { transform: translate(-28vw, -22vh); } 25% { transform: translate(26vw, -10vh); } 50% { transform: translate(18vw, 24vh); } 75% { transform: translate(-22vw, 18vh); } }

/* Nid d'abeille : motif hexagonal fin, une vague de lumière le traverse en diagonale */
.bg-hex i, .bg-hex b { position: absolute; inset: 0; }
.bg-hex i { opacity: .16; background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33M0 16L-28 0M56 16l28-16' fill='none' stroke='white' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px; }
.bg-hex b { background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--accent) 40%, transparent) 50%, transparent 65%);
  background-size: 300% 300%; mix-blend-mode: screen; animation: hexSweep 9s ease-in-out infinite;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-size: 56px 97px; mask-size: 56px 97px; }
@keyframes hexSweep { 0% { background-position: 100% 100%; } 100% { background-position: 0% 0%; } }

/* Rayons de lumière : faisceaux doux qui descendent du haut de l'écran et oscillent */
.bg-beams { -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); }
.bg-beams i { position: absolute; top: -20vh; left: 50%; width: 22vw; min-width: 120px; height: 130vh; transform-origin: 50% 0; filter: blur(18px);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 45%, transparent), transparent 80%); opacity: .5; animation: beamSway 12s ease-in-out infinite alternate; }
.bg-beams i:nth-child(1) { margin-left: -40vw; --r0: -18deg; --r1: -6deg; }
.bg-beams i:nth-child(2) { margin-left: -10vw; background: linear-gradient(to bottom, color-mix(in srgb, var(--hot) 40%, transparent), transparent 75%); --r0: 8deg; --r1: -8deg; animation-duration: 15s; }
.bg-beams i:nth-child(3) { margin-left: 18vw; background: linear-gradient(to bottom, color-mix(in srgb, var(--warm) 35%, transparent), transparent 70%); --r0: 16deg; --r1: 4deg; animation-duration: 10s; }
@keyframes beamSway { from { transform: rotate(var(--r0)); } to { transform: rotate(var(--r1)); } }

/* Mon image : image envoyée par l'admin, floutée et assombrie (texte toujours lisible), léger zoom lent */
/* déborde de 60 px de chaque côté (les bords flous restent hors écran) ; max-width: none sinon la règle
   générale « img { max-width: 100% } » la rétrécit et la décale : bande noire sur la droite */
.bg-image img { z-index: 0; position: absolute; left: -60px; top: -60px; width: calc(100% + 120px); height: calc(100% + 120px); max-width: none;
  object-fit: cover; object-position: center;
  /* flou et saturation déjà appliqués par le serveur (?blur=…) : rien à recalculer ici */
  animation: bgZoom 40s ease-in-out infinite alternate; }
.bg-image::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, var(--bg-dim, .5)); }
@keyframes bgZoom { from { transform: scale(1); } to { transform: scale(1.1); } }

/* Effets par-dessus l'image (particules / étoiles / bokeh aux couleurs du thème, le reste en blanc). Ordre : photo, assombrissement, effet. */
[data-bg-fx="none"] .bg-image img { animation: none; }
[data-bg-fx="zoom"] .bg-image img { animation: kenBurns 34s ease-in-out infinite alternate; }
@keyframes kenBurns { 0% { transform: scale(1.02) translate(0, 0); } 50% { transform: scale(1.12) translate(-2.5%, -1.5%); } 100% { transform: scale(1.18) translate(2%, -3%); } }
[data-bg-fx="parallax"] .bg-image img { animation: none; transform: scale(1.14); transition: transform .45s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
[data-bg-canvas="on"] .bg-particles { display: block; animation: fadeIn .35s both; }
/* Fond « Uni » : la couche de l'image (sans image ni assombrissement) porte les effets rayons / reflet / grain */
[data-bg="none"] .bg-image { display: block; }
[data-bg="none"] .bg-image::after, [data-bg="none"] .bg-image img { display: none; }
.bg-image::before { content: none; position: absolute; z-index: 2; pointer-events: none; opacity: var(--fx-o, .85); }
[data-intensity="low"] .bg-image::before { --fx-o: .5; }
[data-intensity="high"] .bg-image::before { --fx-o: 1; }
/* Rayons : faisceaux de lumière blanche qui descendent en oscillant doucement */
[data-bg-fx="rays"] .bg-image::before { content: ""; inset: -10% -30% 15%; filter: blur(10px); mix-blend-mode: screen;
  background: repeating-linear-gradient(102deg, transparent 0 6%, rgba(255, 255, 255, .13) 8.5%, transparent 11% 19%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%); mask-image: linear-gradient(to bottom, #000, transparent 80%);
  transform-origin: 50% 0; animation: raysSway 16s ease-in-out infinite alternate; }
@keyframes raysSway { from { transform: translateX(-5%) skewX(-7deg); } to { transform: translateX(5%) skewX(7deg); } }
/* Reflet : une lueur qui balaie l'écran de temps en temps */
[data-bg-fx="shine"] .bg-image::before { content: ""; inset: 0; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .16) 47%, rgba(255, 255, 255, .26) 50%, rgba(255, 255, 255, .16) 53%, transparent 62%) no-repeat;
  background-size: 260% 100%; animation: bgShine 9s ease-in-out infinite; }
@keyframes bgShine { 0% { background-position: 130% 0; } 45%, 100% { background-position: -30% 0; } }
/* Grain ciné : bruit fin qui scintille (filtre SVG intégré, aucune image téléchargée) */
[data-bg-fx="grain"] .bg-image::before { content: ""; inset: -50%; opacity: calc(var(--fx-o, .85) * .22); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainJitter .9s steps(6) infinite; }
@keyframes grainJitter { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.bg-thumb { width: 64px; height: 64px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--card-strong); color: var(--muted); }
.bg-thumb img { width: 100%; height: 100%; object-fit: cover; }
[data-bg-blur="low"] { --bg-blur: 5px; } [data-bg-blur="high"] { --bg-blur: 28px; }
[data-bg-dim="low"] { --bg-dim: .3; } [data-bg-dim="high"] { --bg-dim: .7; }
/* Étoiles filantes : léger voile de nuit derrière le ciel */
[data-bg="stars"] .bg-particles { background: radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--orb1) 35%, transparent), transparent 60%); }

/* Vagues : grandes formes arrondies qui tournent lentement en bas de l'écran */
.bg-waves i { position: absolute; left: 50%; width: 220vmax; height: 220vmax; margin-left: -110vmax; top: 68vh; border-radius: 42%;
  background: var(--orb1); opacity: .22; animation: spinSlow 22s linear infinite; }
.bg-waves i:nth-child(2) { top: 72vh; border-radius: 40%; background: var(--orb2); opacity: .18; animation-duration: 30s; animation-direction: reverse; }
.bg-waves i:nth-child(3) { top: 77vh; border-radius: 44%; background: var(--orb3); opacity: .16; animation-duration: 38s; }

/* Lave : blobs flous qui se déforment et dérivent */
.bg-lava { filter: blur(38px) saturate(1.2); }
.bg-lava i { position: absolute; width: 46vmax; height: 46vmax; opacity: .32; background: var(--orb1);
  animation: lavaMorph 14s ease-in-out infinite alternate, lavaMove 26s ease-in-out infinite alternate; }
.bg-lava i:nth-child(1) { left: -10%; top: 5%; }
.bg-lava i:nth-child(2) { right: -15%; top: 30%; background: var(--orb2); animation-duration: 17s, 31s; animation-delay: -5s, -8s; }
.bg-lava i:nth-child(3) { left: 15%; bottom: -15%; background: var(--orb3); animation-duration: 12s, 22s; animation-delay: -3s, -12s; }
.bg-lava i:nth-child(4) { right: 5%; bottom: 10%; width: 30vmax; height: 30vmax; background: var(--hot); opacity: .22; animation-duration: 10s, 19s; }
@keyframes lavaMorph {
  0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  50% { border-radius: 70% 30% 46% 54% / 30% 39% 61% 70%; }
  100% { border-radius: 30% 70% 52% 48% / 60% 37% 63% 40%; }
}
@keyframes lavaMove { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(12vw, -8vh) scale(1.15); } 100% { transform: translate(-8vw, 10vh) scale(.9); } }

/* Néon : faisceaux lumineux qui balaient l'écran */
.bg-lines { filter: drop-shadow(0 0 6px var(--accent)); }
.bg-lines i { position: absolute; inset: -50%;
  background: repeating-linear-gradient(115deg, transparent 0 44px, color-mix(in srgb, var(--accent) 55%, transparent) 44px 47px, transparent 47px 120px);
  animation: linesMove 9s linear infinite; -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%); }
.bg-lines i:nth-child(2) { background: repeating-linear-gradient(65deg, transparent 0 78px, color-mix(in srgb, var(--hot) 50%, transparent) 78px 81px, transparent 81px 190px);
  animation: linesMove2 14s linear infinite; }
/* déplacement = exactement une période du motif (120 px à 115°, 190 px à 65°) : boucle sans saut */
@keyframes linesMove { to { transform: translate(108.76px, 50.71px); } }
@keyframes linesMove2 { to { transform: translate(-172.2px, 80.3px); } }
.bg-orbs i {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(80px); opacity: .22; animation: orb 22s ease-in-out infinite alternate;
}
.bg-orbs i:nth-child(1) { background: var(--orb1); top: -30vmax; left: -25vmax; }
.bg-orbs i:nth-child(2) { background: var(--orb2); bottom: -35vmax; right: -30vmax; animation-duration: 28s; animation-delay: -6s; }
.bg-orbs i:nth-child(3) { background: var(--orb3); top: 40%; left: 30%; width: 45vmax; height: 45vmax; opacity: .12; animation-duration: 34s; }
@keyframes orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.12); }
  100% { transform: translate(-6vmax, 10vmax) scale(.95); }
}

/* ============================================================ barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-top) + 10px) 12px 10px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 92%, transparent), color-mix(in srgb, var(--bg) 70%, transparent));
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
  animation: fadeIn .35s var(--ease);
}
.topbar .spacer { width: 40px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); transition: transform .15s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.88); background: var(--card-strong); }

/* ============================================================ vues */
.view-host { position: relative; z-index: 1; isolation: isolate; min-height: 100vh; }
.view {
  padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  max-width: 560px; margin: 0 auto;
}
.view.no-tabbar { padding-bottom: calc(var(--safe-bottom) + 110px); }
/* Changement de page (mountView) : la nouvelle page se prépare cachée par-dessus, ses animations figées au
   départ, pendant que l'ancienne s'efface en glissant un peu ; puis la nouvelle entre d'un seul mouvement. */
.view.view-pending { position: absolute; left: 0; right: 0; top: 0; max-height: 100vh; overflow: hidden; visibility: hidden; pointer-events: none; }
.view-pending, .view-pending * { animation-play-state: paused !important; }
.view-leave { pointer-events: none; animation: leaveFwd .16s cubic-bezier(.4, 0, 1, 1) both; }
.view-leave.leave-back { animation-name: leaveBack; }
.view-leave.leave-fade { animation-name: leaveFade; }
@keyframes leaveFwd { to { opacity: 0; transform: translateX(-6%); } }
@keyframes leaveBack { to { opacity: 0; transform: translateX(6%); } }
@keyframes leaveFade { to { opacity: 0; transform: translateY(-6px); } }
.view.enter-fwd { animation: enterFwd .38s var(--ease) both; }
.view.enter-back { animation: enterBack .38s var(--ease) both; }
.view.enter-fade { animation: enterFade .38s var(--ease) both; }
@keyframes enterFwd { from { opacity: 0; transform: translateX(9%); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-9%); } to { opacity: 1; transform: none; } }
@keyframes enterFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* images pas encore chargées : fondu à leur arrivée */
img.img-wait { opacity: 0; }
img.img-in { animation: fadeIn .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

.stagger > * { animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }   /* cascade rapide : le contenu arrive d'abord */

/* ============================================================ éléments communs */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: relative; overflow: hidden;
}
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 26px 4px 10px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rich { white-space: pre-line; word-wrap: break-word; }
.rich a { color: var(--accent-2); }
.rich blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); }
.rich code, .rich pre { font-family: ui-monospace, monospace; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; }
.rich .spoiler { background: var(--muted); color: transparent; border-radius: 4px; transition: all .3s; }
.rich .spoiler.shown { background: transparent; color: inherit; }

.pressable { position: relative; overflow: hidden; transition: transform .18s var(--ease), background .2s, opacity .2s; }
.pressable:active { transform: scale(.965); }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,.28);
  transform: scale(0); animation: ripple .6s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 14px 18px; border-radius: 16px;
  background: var(--card-strong); border: 1px solid var(--line);
  font-weight: 650; font-size: 16px; text-decoration: none; color: var(--text);
}
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 30px -10px var(--glow); background-size: 200% 200%; animation: gradShift 6s ease infinite; }
.btn.danger { background: rgba(244, 63, 94, .14); color: #fda4af; border-color: rgba(244, 63, 94, .3); }
.btn.ok { background: rgba(52, 211, 153, .14); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.btn.small { min-height: 42px; padding: 8px 14px; font-size: 14px; border-radius: 12px; width: auto; }
.btn[disabled] { opacity: .5; pointer-events: none; }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--card-strong); color: var(--muted); white-space: nowrap;
}
.chip.promo { background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; animation: pulse 2.4s ease-in-out infinite; gap: 5px; }

/* Flamme des promos : vacille comme une vraie flamme, lueur qui respire, braise qui s'envole */
/* la boîte épouse exactement l'emoji : halo, braise et rotation sont centrés sur la flamme */
.flame { position: relative; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.flame-core { display: block; line-height: 1; transform-origin: 50% 88%; animation: flameFlicker 1.3s ease-in-out infinite, flameGlow 1.9s ease-in-out infinite; }
.flame::before { content: ""; position: absolute; inset: -30% -40% -10%; border-radius: 50%; background: radial-gradient(circle at 50% 70%, rgba(255, 170, 0, .75), rgba(255, 80, 0, 0) 65%); animation: flameHalo 1.3s ease-in-out infinite; z-index: -1; }
.flame::after { content: ""; position: absolute; left: calc(50% - 1.5px); bottom: 70%; width: 3px; height: 3px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 4px 1px #ff9a2e; opacity: 0; animation: ember 1.8s ease-out infinite; }
@keyframes flameFlicker {
  0%, 100% { transform: rotate(-3deg) scale(1, 1); }
  20% { transform: rotate(2deg) scale(1.06, 1.1) translateY(-.5px); }
  40% { transform: rotate(-1deg) scale(.97, 1.04); }
  60% { transform: rotate(3deg) scale(1.04, .96); }
  80% { transform: rotate(-2deg) scale(1.02, 1.08) translateY(-.5px); }
}
@keyframes flameGlow { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 150, 0, .9)); } 50% { filter: drop-shadow(0 0 6px rgba(255, 200, 60, 1)); } }
@keyframes flameHalo { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes ember { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(4px, -12px) scale(.3); } }
.chip.sold { background: rgba(244, 63, 94, .18); color: #fda4af; }
.chip.ok { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.chip.warn { background: rgba(251, 191, 36, .16); color: #fcd34d; }
/* Badge « Nouveau » : reflet qui passe régulièrement */
.chip.new { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--accent), var(--hot)); box-shadow: 0 4px 14px -6px var(--glow); }
.chip.new::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); animation: newShine 3.2s ease-in-out infinite; }
@keyframes newShine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* Compte à rebours des promos */
.cd { font-variant-numeric: tabular-nums; font-weight: 700; }
.cd.on-img { position: absolute; left: 8px; bottom: 8px; z-index: 3; padding: 3px 8px; border-radius: 999px; font-size: 11px; color: #fff; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cd.urgent { color: #fff; background: linear-gradient(135deg, #ef4444, #f97316); animation: pulse 1.6s ease-in-out infinite; }
.cd.over { opacity: .7; }
.promo-timer { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, #f97316 12%, var(--card)); border: 1px solid color-mix(in srgb, #f97316 35%, transparent); display: grid; gap: 2px; }
.promo-timer .cd { font-size: 16px; background: none; animation: none; color: #fdba74; }
.promo-timer .cd.urgent { color: #fca5a5; }

/* Favoris */
.fav { position: absolute; top: 6px; right: 6px; z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; }
.fav svg { width: 18px; height: 18px; fill: transparent; transition: fill .25s, stroke .25s; }
.fav.on svg { fill: #f43f5e; stroke: #f43f5e; }
.fav.pop svg { animation: favPop .45s var(--spring); }
@keyframes favPop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
.fav.big { position: static; margin-left: auto; width: 42px; height: 42px; background: var(--card-strong); }
.fav.big svg { width: 22px; height: 22px; }
.p-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 42px; }
.fav-row .thumb { color: #f43f5e; }
.fav-row .thumb svg { fill: #f43f5e; width: 26px; height: 26px; }
.pcard.leaving { transition: opacity .3s, transform .3s; opacity: 0; transform: scale(.9); }

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .5); } 50% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0); } }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .big { font-size: 44px; display: block; margin-bottom: 10px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ============================================================ skeleton */
.skel-in { animation: fadeIn .3s ease both, shimmer 1.3s linear infinite; }
.skel { background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.11) 40%, rgba(255,255,255,.05) 80%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Photos des cartes : reflet animé à leur place pendant le chargement, puis fondu (classe .ld posée par app.js) */
/* fondu par transition (pas d'animation : la bannière garde son zoom lent, les cartes leurs effets) */
:is(.pcard .img, .pmini .img, .f-img, .ccard, .cat .thumb, .hero, .cart-thumb, .slide) > img:not(.blur-bg) { transition: opacity .45s var(--ease), transform .5s var(--ease); }
:is(.pcard .img, .pmini .img, .f-img, .ccard, .cat .thumb, .hero, .cart-thumb, .slide) > img:not(.blur-bg):not(.ld) { opacity: 0; }
/* reflet seulement dans les cadres photo simples (les cartes elles-mêmes ont déjà leur animation d'arrivée) */
:is(.pcard .img, .pmini .img, .f-img, .cat .thumb, .cart-thumb):has(> img:not(.ld)) {
  background-image: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.10) 40%, rgba(255,255,255,.04) 80%);
  background-size: 300% 100%; animation: shimmer 1.3s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  :is(.pcard .img, .pmini .img, .f-img, .cat .thumb, .cart-thumb):has(> img:not(.ld)) { animation: none; }
}

/* ============================================================ connexion */
.login {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: calc(var(--safe-top) + 24px) 16px calc(var(--safe-bottom) + 24px); max-width: 460px; margin: 0 auto;
}
.logo {
  width: 92px; height: 92px; border-radius: 28px; margin: 0 auto; display: grid; place-items: center;
  background: var(--grad); background-size: 200% 200%; animation: gradShift 6s ease infinite, pop .7s var(--spring) both;
  box-shadow: 0 20px 60px -15px var(--glow);
}
.logo svg { width: 48px; height: 48px; stroke: #fff; stroke-width: 1.8; }
.login h2 { margin: 0; font-size: 30px; letter-spacing: -.02em; text-align: center; }
.login p { margin: 0; text-align: center; }
.tg-btn { background: #2aabee; border: 0; color: #fff; box-shadow: 0 12px 30px -12px rgba(42, 171, 238, .8); }
.tg-btn svg { fill: #fff; stroke: none; }
.code-input {
  width: 100%; text-align: center; font-size: 26px; letter-spacing: .25em; font-weight: 700;
  text-transform: uppercase; padding: 16px; border-radius: 18px;
  background: var(--card); color: var(--text); border: 1.5px solid var(--line); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ============================================================ accueil */
/* bannière au format 16/10 : l'image remplit tout le cadre (centrée, bords en trop coupés), sans zoom animé
   ni rien par-dessus */
.hero { border-radius: 24px; overflow: hidden; position: relative; margin-bottom: 16px; aspect-ratio: 16 / 10; background: var(--bg-2); }
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.brand { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 8px 4px 14px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 200%; animation: gradShift 6s ease infinite; }
.welcome { font-size: 15.5px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 104px;
  padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  text-align: left; text-decoration: none; color: var(--text); font-weight: 650;
}
.tile .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: color-mix(in srgb, var(--accent) 55%, white); }
.tile.full { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; }
.badge-dot { position: absolute; top: 12px; right: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--danger); font-size: 12px; font-weight: 800; display: grid; place-items: center; animation: pop .5s var(--spring) both; }

/* ============================================================ catégories & produits */
.cat {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); width: 100%; text-align: left;
}
.cat .thumb { width: 64px; height: 64px; border-radius: 16px; flex: none; background: var(--grad); display: grid; place-items: center; overflow: hidden; font-size: 26px; font-weight: 800; color: #fff; }
.cat .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat .name { font-weight: 700; font-size: 17px; }
.cat .chev { color: var(--muted); transition: transform .3s var(--ease); }
.cat.sold { opacity: .6; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pcard { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; text-align: left; display: flex; flex-direction: column; }
.pcard .img { aspect-ratio: 1; background: var(--bg-2); position: relative; overflow: hidden; display: grid; place-items: center; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pcard .img .ph { font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Étiquettes sur la photo (promo, badge…) : l'une sous l'autre, chacune à la largeur de son texte. Un texte long
   passe à la ligne au lieu d'être coupé. La place du cœur (en haut à droite) n'est réservée qu'à sa hauteur :
   les étiquettes du dessous ont toute la largeur de la photo. */
.img .tags { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 3; pointer-events: none; }
.pcard .img .tags::before { content: ""; float: right; width: 36px; height: 33px; }
.img .tags:empty { display: none; }
/* largeur = celle du texte : si elle ne tient pas à côté du cœur, l'étiquette passe sous le cœur (pleine largeur) */
.img .tags .chip { display: flex; width: max-content; max-width: 100%; margin-bottom: 5px; white-space: normal; line-height: 1.25;
  text-align: left; overflow-wrap: break-word; padding-block: 4px; }
.img .tags .chip > span:last-child { min-width: 0; }
.pcard .img .vid { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); border-radius: 10px; padding: 4px 6px; display: flex; }
.pcard .img .vid svg { width: 16px; height: 16px; }
.pcard .body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.pcard .pname { font-weight: 700; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price, .p-price { white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }
.price { font-weight: 800; color: color-mix(in srgb, var(--accent) 35%, white); font-size: 14px; }
.price .now, .price .was, .p-price .now, .p-price .was { display: block; }
.price .was { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.price .was s, .p-price .was s { color: var(--muted); }

/* ============================================================ fiche produit */
.carousel-wrap { margin: -16px -16px 0; position: relative; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #000; }
.carousel::-webkit-scrollbar { display: none; }
/* Photo entière, jamais rognée : elle tient dans le carré (object-fit: contain), et l'espace libre
   est rempli par la même photo floutée en fond (au lieu de bandes noires). */
.carousel .slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; position: relative; overflow: hidden; }
.carousel .slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.carousel .slide img.blur-bg { object-fit: cover; filter: blur(22px) brightness(.55) saturate(1.2); transform: scale(1.15); }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.4); transition: width .35s var(--ease), background .35s; }
.dots i.on { width: 22px; background: #fff; }
.counter { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); }
.no-media { margin: -16px -16px 0; height: 160px; background: var(--grad); background-size: 200% 200%; animation: gradShift 8s ease infinite; display: grid; place-items: center; font-size: 56px; font-weight: 800; color: rgba(255,255,255,.9); }
.p-head { margin-top: 18px; }
.p-head h2 { margin: 6px 0 8px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.p-price { font-size: 22px; font-weight: 800; line-height: 1.3; }
.p-price .now { background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 6s ease infinite; }
.p-price .was { font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.p-head h2 { overflow-wrap: anywhere; }
.p-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 18px; }
.p-nav .pos { font-size: 13px; color: var(--muted); font-weight: 700; }

.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 12px 16px calc(var(--safe-bottom) + 12px);
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 98%, transparent) 60%, transparent);
  animation: slideUp .5s var(--ease) .15s both;
}
.cta-bar .btn { max-width: 528px; margin: 0 auto; }

/* ---------- panier */
.cart-fab {
  position: fixed; right: 16px; bottom: calc(var(--safe-bottom) + 96px); z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; border: 0; color: #fff; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.12) inset;
  animation: pop .45s var(--spring) both; overflow: visible; transition: transform .18s var(--ease);
}
.cart-fab:active { transform: scale(.92); }
.cart-fab { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .18s var(--ease), left .3s var(--spring), right .3s var(--spring), top .3s var(--spring); }
.cart-fab.dragging { transition: none; transform: scale(1.08); box-shadow: 0 16px 36px rgba(0,0,0,.5); }
.cart-fab.on-product { bottom: calc(var(--safe-bottom) + 88px); }
.cart-fab svg { width: 26px; height: 26px; }
.cart-fab b { position: absolute; top: -5px; right: -5px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--danger); color: #fff; font-size: 13px; font-weight: 800; line-height: 1; display: grid; place-items: center;
  border: 2px solid var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.format-card { gap: 14px; }
.format-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.format-chip { display: grid; gap: 2px; min-width: 72px; padding: 10px 14px; border-radius: 14px; text-align: center;
  background: rgba(255,255,255,.06); border: 1.5px solid var(--line); color: var(--text); font: inherit; transition: border-color .2s, background .2s, transform .2s; }
.format-chip b { font-size: 16px; }
.format-chip span { font-size: 13px; color: var(--muted); font-weight: 700; }
.format-chip.on { border-color: var(--accent); background: var(--soft); transform: translateY(-1px); }
.format-chip.on span { color: var(--text); }
.format-was { font-size: 12px; color: var(--muted); opacity: .8; margin-left: 6px; }
.format-chip .format-was { margin-left: 0; }
.cart-promo { margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1.5px solid var(--line); }
.stepper-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: var(--text); font-size: 20px; font-weight: 800; line-height: 1; }
.stepper-btn:disabled { opacity: .35; }
.stepper-n { min-width: 30px; text-align: center; font-size: 17px; }
.stepper.small .stepper-btn { width: 32px; height: 32px; font-size: 18px; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px; }
.cart-thumb { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 0; padding: 0; background: rgba(255,255,255,.06); display: grid; place-items: center; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { min-width: 0; display: grid; }
.cart-sub { margin-left: auto; }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; font-size: 18px; }
.cart-total b { font-size: 22px; }
/* admin : formats d'un produit (quantité · prix) */
.format-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 120px) auto; gap: 8px; align-items: center; }
.format-row input, .format-price input { width: 100%; min-width: 0; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.25); color: var(--text); border: 1.5px solid var(--line); font: inherit; outline: none; }
.format-row input:focus { border-color: var(--accent); }
.format-price { position: relative; }
.format-price input { padding-right: 26px; }
.format-price span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ============================================================ avis & sondages */
.review .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; flex: none; }
.review .text { white-space: pre-line; word-wrap: break-word; }
.poll h3 { margin: 0 0 4px; font-size: 18px; }
.opt { width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--card-strong); border: 1px solid var(--line); font-weight: 600; position: relative; overflow: hidden; }
.opt .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--hot) 35%, transparent)); width: 0; transition: width 1s var(--ease); }
.opt.mine { border-color: var(--accent); }
.opt .lbl { position: relative; display: flex; justify-content: space-between; gap: 10px; }
textarea, .field input, .field select, .wheel-row input, .wheel-search {
  width: 100%; padding: 14px; border-radius: 14px; background: rgba(0,0,0,.25); color: var(--text);
  border: 1.5px solid var(--line); font: inherit; outline: none; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
textarea:focus, .field input:focus, .field select:focus, .wheel-row input:focus, .wheel-search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.wheel-row input { padding: 11px 12px; }
textarea { min-height: 120px; }
/* iPhone : les champs date / heure natifs gardent leur propre largeur minimale et débordent → style natif retiré */
.field input[type="date"], .field input[type="time"], .field input[type="datetime-local"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; box-sizing: border-box;
  min-height: 52px; text-align: left;
}
.field input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field { min-width: 0; }

/* ============================================================ barre d'onglets */
.tabbar {
  /* proche du bas comme sur iOS : empiète un peu sur la zone de la barre de gestes, sans la toucher */
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(8px, calc(var(--safe-bottom) - 14px));
  height: var(--tabbar-h); max-width: 536px; margin: 0 auto;
  display: flex; align-items: stretch; padding: 6px; gap: 4px;
  background: rgba(22, 22, 32, .78); border: 1px solid var(--line); border-radius: 24px;
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.7);
  animation: slideUp .55s var(--ease) both;
}
/* Barre collée en bas (classique, pleine largeur) : le fond descend sous la barre de gestes du téléphone */
[data-tabbar="docked"] .tabbar { left: 0; right: 0; bottom: 0; max-width: none; border-radius: 0; border-width: 1px 0 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 6px max(8px, calc((100vw - 536px) / 2)) calc(var(--safe-bottom) + 6px);
  box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .8); }
/* L'onglet actif s'agrandit (×2,2) et affiche son nom à côté de l'icône ; les autres n'ont que l'icône.
   Largeur d'un « pas » = place libre / (n − 1 + 2,2) : la pastille fait 2,2 pas et avance d'un pas par onglet. */
[data-tabbar="docked"] .tabbar .pill { bottom: calc(var(--safe-bottom) + 6px); left: max(8px, calc((100vw - 536px) / 2));
  width: calc((100% - 2 * max(8px, calc((100vw - 536px) / 2)) - (var(--n, 1) - 1) * 4px) / (var(--n, 1) + 1.2) * 2.2); border-radius: 16px; }
.tabbar .pill { position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 18px;
  width: calc((100% - 12px - (var(--n, 1) - 1) * 4px) / (var(--n, 1) + 1.2) * 2.2);
  transform: translateX(calc(var(--i, 0) * (100% / 2.2 + 4px))); background: var(--grad); background-size: 200% 200%; animation: gradShift 6s ease infinite; transition: transform .45s var(--spring), width .45s var(--spring); z-index: 0; box-shadow: 0 6px 20px -6px var(--glow); }
.tab { flex: 1 1 0; min-width: 0; overflow: hidden; position: relative; z-index: 1; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); border-radius: 18px; transition: color .3s, flex-grow .45s var(--spring); }
.tab.on { flex-grow: 2.2; }
.tab span { max-width: 0; opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: max-width .45s var(--ease), opacity .2s; }
.tab.on span { max-width: 100px; opacity: 1; transition: max-width .45s var(--ease), opacity .3s .12s; }
.tab svg { flex: none; width: 22px; height: 22px; transition: transform .35s var(--spring); }
.tab.on { color: #fff; }
.tab.on svg { transform: scale(1.06); }
.tab:active svg { transform: scale(.82); }

/* ============================================================ bottom sheet */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .25s both; }
.backdrop.closing { animation: fadeIn .25s reverse both; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto;
  max-width: 560px; margin: 0 auto; padding: 10px 16px calc(var(--safe-bottom) + 20px);
  background: #16161f; border-radius: 26px 26px 0 0; border: 1px solid var(--line); border-bottom: 0;
  animation: sheetIn .45s var(--ease) both; overscroll-behavior: contain;
}
.sheet.closing { animation: sheetOut .3s var(--ease) both; }
.sheet .grip { width: 42px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.22); margin: 2px auto 14px; }
.sheet h3 { margin: 0 0 14px; font-size: 20px; }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }

/* ============================================================ toasts */
.toast-host { position: fixed; z-index: 60; top: calc(var(--safe-top) + 12px); left: 12px; right: 12px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 520px; margin: 0 auto; padding: 13px 16px; border-radius: 16px; background: rgba(30, 30, 44, .95); border: 1px solid var(--line); backdrop-filter: blur(12px); font-weight: 600; font-size: 14.5px; display: flex; gap: 10px; align-items: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); animation: toastIn .45s var(--spring) both; }
.toast.err { border-color: rgba(244, 63, 94, .5); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) scale(.97); } }

/* ============================================================ admin */
.segmented { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; scroll-snap-type: x proximity; }
.segmented::-webkit-scrollbar { display: none; }
.seg { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 650; color: var(--muted); transition: all .3s var(--ease); scroll-snap-align: start; }
.seg.on { background: #fff; color: #111; border-color: #fff; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.stat b { display: block; font-size: 28px; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); width: 100%; text-align: left; }
.list-item .mini { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; background: var(--card-strong); display: grid; place-items: center; font-weight: 800; }
.list-item .mini img { width: 100%; height: 100%; object-fit: cover; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); width: 100%; text-align: left; font-weight: 600; }
.switch { width: 50px; height: 30px; border-radius: 15px; background: rgba(255,255,255,.15); position: relative; flex: none; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .35s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.toggle.on .switch { background: var(--ok); }
.toggle.on .switch::after { transform: translateX(20px); }
.fmt-bar { display: flex; gap: 6px; margin-bottom: 6px; }
.fmt-bar button { min-width: 40px; height: 36px; border-radius: 10px; background: var(--card-strong); font-weight: 800; transition: background .2s, color .2s, transform .2s var(--spring); }
.fmt-bar button.on { background: var(--grad); color: #fff; transform: translateY(-1px); }
.fmt-bar button svg { width: 18px; height: 18px; }
.rich-edit {
  min-height: 110px; padding: 14px; border-radius: 14px; background: rgba(0,0,0,.25); color: var(--text);
  border: 1.5px solid var(--line); outline: none; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5;
  -webkit-user-select: text; user-select: text; cursor: text; transition: border-color .2s, box-shadow .2s;
}
.rich-edit:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.rich-edit:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-edit a { color: var(--accent-2); text-decoration: underline; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-grid .m { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-2); animation: pop .4s var(--spring) both; }
.media-grid .m img, .media-grid .m video { width: 100%; height: 100%; object-fit: cover; }
.media-grid .m .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.65); display: grid; place-items: center; }
.media-grid .m .x svg { width: 16px; height: 16px; }
.media-grid .m .mv { position: absolute; bottom: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.65); display: grid; place-items: center; }
.media-grid .m .mv svg { width: 16px; height: 16px; }
.media-grid .add { aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); }
.progress { height: 6px; border-radius: 3px; background: var(--card-strong); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.code-pill { font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: .12em; font-size: 16px; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bars { display: grid; gap: 8px; }
.barrow { display: grid; gap: 4px; }
.barrow .track { height: 8px; border-radius: 4px; background: var(--card-strong); overflow: hidden; }
.barrow .track i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--grad); transition: width 1s var(--ease); }

/* Rupture par produit */
.chip.out { background: rgba(15, 15, 20, .82); color: #fda4af; border: 1px solid rgba(244, 63, 94, .45); }:is(.pcard, .pmini).out .img img, :is(.pcard, .pmini).out .img .ph { filter: grayscale(1) brightness(.55); }
:is(.pcard, .pmini).out .price { opacity: .55; }
.out-btn { width: 100%; background: var(--card-strong); color: #fda4af; }

/* Avis avec étoiles */
.stars { display: inline-flex; gap: 1px; letter-spacing: 0; line-height: 1; vertical-align: -1px; }
.stars i { font-style: normal; color: color-mix(in srgb, var(--muted) 45%, transparent); font-size: 16px; }
.stars i.on { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, .45); }
.stars i.half { background: linear-gradient(90deg, #fbbf24 50%, color-mix(in srgb, var(--muted) 45%, transparent) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars.sm i { font-size: 12.5px; }
.star-pick { display: flex; justify-content: center; gap: 6px; }
.star-pick button { font-size: 38px; line-height: 1; padding: 2px; color: color-mix(in srgb, var(--muted) 40%, transparent); transition: color .2s, transform .2s; }
.star-pick button.on { color: #fbbf24; text-shadow: 0 0 14px rgba(251, 191, 36, .55); }
.star-pick button.pop { animation: favPop .45s var(--spring); }
.star-hint { min-height: 18px; font-weight: 600; }
.rating-sum { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.rs-avg { display: grid; justify-items: center; gap: 4px; padding-right: 4px; }
.rs-avg b { font-size: 40px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rs-bars { display: grid; gap: 5px; }
.rs-row { display: grid; grid-template-columns: 30px 1fr 24px; gap: 8px; align-items: center; }
.rs-row .track { height: 7px; border-radius: 4px; background: var(--card-strong); overflow: hidden; }
.rs-row .track i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #f59e0b, #fbbf24); transition: width 1s var(--ease); }
.rs-row > span:last-child { text-align: right; }

/* Sondages avec date de fin */
.chip.poll-cd { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text, #fff); }
.chip.poll-cd.urgent { background: linear-gradient(135deg, #ef4444, #f97316); }
.poll .opt.win { border-color: #fbbf24; box-shadow: 0 0 0 1px #fbbf24, 0 8px 24px -12px rgba(251, 191, 36, .8); }
.poll .opt.win .bar { background: linear-gradient(90deg, rgba(251, 191, 36, .45), rgba(245, 158, 11, .25)) !important; }
.poll.ended h3 { opacity: .9; }

/* Thèmes saisonniers : couche légère par-dessus la page, jamais cliquable */
.season-layer { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.season-layer span { position: absolute; left: var(--x); top: -5vh; font-size: calc(14px * var(--s)); line-height: 1; opacity: .8; will-change: transform; }
.season-layer.fall span { color: #fff; text-shadow: 0 0 6px rgba(255,255,255,.7); animation: snowFall var(--d) linear var(--delay) infinite; }
@keyframes snowFall { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--dx), 55vh) rotate(180deg); } 100% { transform: translate(0, 112vh) rotate(360deg); } }
.season-layer.rise span { top: auto; bottom: -5vh; color: #fb7185; text-shadow: 0 0 10px rgba(251,113,133,.6); animation: heartRise var(--d) ease-in var(--delay) infinite; }
@keyframes heartRise { 0% { transform: translate(0, 0) scale(.8); opacity: 0; } 15% { opacity: .75; } 100% { transform: translate(var(--dx), -112vh) scale(1.15); opacity: 0; } }
.season-layer.fly span { top: var(--y); left: -10vw; font-size: calc(18px * var(--s)); opacity: .55; filter: drop-shadow(0 0 6px rgba(249,115,22,.5)); animation: batFly calc(var(--d) * 1.4) ease-in-out var(--delay) infinite; }
@keyframes batFly { 0% { transform: translate(0, 0); } 25% { transform: translate(30vw, -6vh) scaleX(1); } 50% { transform: translate(60vw, 4vh); } 75% { transform: translate(90vw, -4vh); } 100% { transform: translate(125vw, 0); } }
.season-layer.bokeh span { width: calc(46px * var(--s)); height: calc(46px * var(--s)); top: auto; bottom: -10vh; border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 186, 116, .45), rgba(251, 191, 36, 0) 70%); animation: bokehRise calc(var(--d) * 1.5) ease-in-out var(--delay) infinite; }
@keyframes bokehRise { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(var(--dx), -115vh); opacity: 0; } }
.season-layer.twinkle span { top: var(--y); color: #fde68a; text-shadow: 0 0 8px rgba(253, 230, 138, .9); animation: twinkle calc(var(--d) / 4) ease-in-out var(--delay) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: .9; transform: scale(1.1) rotate(45deg); } }
.brand-card, .hero { position: relative; }
.season-deco { position: absolute; top: 8px; right: 12px; z-index: 3; font-size: 30px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); animation: decoSway 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes decoSway { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-3px); } }
[data-anim="none"] .season-deco { animation: none; }


/* Catégorie : tri et filtres */
.cat-tools .segmented { margin-bottom: 8px; }
.cat-tools > .muted { display: block; margin: 0 4px 12px; }
.sort-btn { display: inline-flex; align-items: center; gap: 6px; }
.sort-btn svg { width: 14px; height: 14px; transform: rotate(90deg); }
.sort-check { color: var(--accent-2); font-weight: 800; }

/* Accueil : badge Ouvert / Fermé */
.hours-badge { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 14px; border-radius: 16px; text-align: left;
  font-size: 14px; font-weight: 700; background: color-mix(in srgb, var(--danger, #ef4444) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 35%, transparent); }
.hours-badge.open { background: color-mix(in srgb, var(--ok) 10%, var(--card)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.hours-badge svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.hb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--danger, #ef4444); }
.hours-badge.open .hb-dot { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: hbPulse 2s ease-out infinite; }
@keyframes hbPulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hours-badge.exc { align-items: flex-start; background: color-mix(in srgb, var(--danger) 16%, var(--card)); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.hours-badge.exc .hb-dot { margin-top: 5px; animation: hbBlink 1.6s ease-in-out infinite; }
.hours-badge.exc svg { margin-top: 2px; }
@keyframes hbBlink { 50% { opacity: .35; } }
.hb-text { display: grid; gap: 2px; }
.hb-text .small { font-weight: 600; }
.hours-closed { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--danger) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); }
.hours-row { display: flex; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.hours-row.closed span { color: var(--muted); }
.hours-row.today { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.hours-edit { display: grid; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.hours-edit .seg { padding: 6px 12px; font-size: 13px; }
.hours-edit .seg.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.hours-times { display: flex; align-items: center; gap: 10px; }
.hours-times[hidden], .field[hidden] { display: none; }
.hours-times input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); color: var(--text);
  border: 1.5px solid var(--line); font: inherit; font-weight: 700; text-align: center; outline: none; color-scheme: dark; }
.hours-times input:focus { border-color: var(--accent); }

/* Style du site : une ligne compacte par réglage, qui s'ouvre au toucher */
.fold { border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; overflow: hidden;
  transition: border-color .3s ease, background .3s ease; }
.fold.open { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.fold-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px; text-align: left; }
.fold-head b { flex: none; font-size: 15px; }
.fold-val { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.fold-head svg { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .3s var(--ease); }
.fold.open .fold-head svg { transform: rotate(90deg); }
.fold-body { padding: 0 12px 14px; animation: fadeUp .35s var(--ease) both; }
.fold-body .chips { margin: 0; }

/* Membres en attente : Valider / Refuser côte à côte */
.pending-acts { display: flex; gap: 6px; flex: none; }
.pending-acts .btn.small { min-height: 36px; padding: 6px 12px; }

/* Vérification (avant le code) */
.verify-badge { display: inline-flex; align-items: center; gap: 8px; margin: 4px auto 0; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 14px; }
.join-list { text-align: left; }
.chat-ava { border-radius: 50% !important; }
.chat-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.join-chip { background: var(--accent); color: #fff; }
.verify-test { margin-top: 4px; font-weight: 700; }
.verify-test.ok { color: var(--ok); }
.verify-test.ko, .verify-test.warn { color: #fbbf24; }
.verify-steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* Accueil : vus récemment */
.recent-box { transition: opacity .3s ease, transform .3s var(--ease); }
.recent-box.gone { opacity: 0; transform: translateY(-8px); }

/* Admin : notification sur l'accueil */
.admin-notif { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 12px; padding: 10px 14px; border-radius: 16px; text-align: left;
  font-size: 14px; font-weight: 700; background: color-mix(in srgb, #fbbf24 12%, var(--card)); border: 1px solid color-mix(in srgb, #fbbf24 45%, transparent);
  transition: opacity .22s ease, transform .22s var(--ease), max-height .22s ease; max-height: 80px; }
.admin-notif.gone { opacity: 0; transform: translateY(-8px) scale(.97); }
.admin-notif svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.an-ico { font-size: 18px; }
.an-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; animation: waitPulse 1.8s ease-out infinite; }

/* Sous-catégories */
.subcats { margin-bottom: 6px; }
.cat.subcat { padding-top: 10px; padding-bottom: 10px; }
.cat.subcat .thumb { width: 52px; height: 52px; }
.cat.subcat .name { font-size: 16px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.crumb svg { width: 16px; height: 16px; }
.admin-sub { margin-left: 18px; border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }

/* Filigrane par-dessus les vidéos (jamais cliquable : les contrôles de la vidéo restent utilisables) */
.wm-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; display: grid; place-items: center;
  color: rgba(255, 255, 255, var(--wm-a)); text-shadow: 0 1px 2px rgba(0, 0, 0, calc(var(--wm-a) * .9)); font-weight: 800; letter-spacing: .04em; user-select: none; }
.wm-overlay.wm-low { --wm-a: .22; } .wm-overlay.wm-normal { --wm-a: .38; } .wm-overlay.wm-high { --wm-a: .58; }
.wm-grid { position: absolute; inset: -60%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 34px 46px; transform: rotate(-30deg); }
.wm-grid span { font-size: 16px; white-space: nowrap; }
/* filigrane « logo » sur les vidéos : le logo répété, transparent selon la visibilité choisie */
.wm-logo .wm-grid { gap: 40px 54px; }
.wm-logo .wm-grid img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; opacity: calc(var(--wm-a) * 1.45); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.g-slide { position: relative; }
.wm-preview { width: 100%; max-width: 260px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--bg-2); justify-self: center; }

/* Galerie plein écran */
html.gallery-open, html.gallery-open body { overflow: hidden; }
.carousel .slide { cursor: zoom-in; }
.expand { position: absolute; bottom: 10px; right: 12px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.expand svg { width: 18px; height: 18px; }
.gallery { --fade: 1; position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, calc(.96 * var(--fade))); opacity: 0; transition: opacity .3s ease; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gallery.open { opacity: 1; }
.gallery.closing { opacity: 0; }
.g-track { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.g-track::-webkit-scrollbar { display: none; }
.g-track.zoomed { overflow-x: hidden; }
/* Média entier, jamais rogné ni zoomé : boîte de taille fixe (sous le bouton ✕, au-dessus du bas de
   l'écran) et object-fit: contain. Taille explicite indispensable sur iPhone : sinon la vidéo prend sa
   taille d'origine et déborde (effet « zoomé »). */
.g-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; overflow: hidden; }
.g-slide > img, .g-slide > .vplayer { position: absolute; left: 0; top: calc(var(--safe-top) + 56px); width: 100%;
  height: calc(100% - var(--safe-top) - var(--safe-bottom) - 96px); }
.g-slide > img { object-fit: contain; will-change: transform; }

/* Lecteur vidéo de l'app (remplace les commandes du téléphone) */
.vplayer { position: absolute; inset: 0; background: #000; overflow: hidden; -webkit-touch-callout: none; user-select: none; }
.vplayer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vp-big { position: absolute; left: 50%; top: 50%; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.vp-big svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
.vplayer.paused .vp-big { opacity: 1; transform: scale(1); pointer-events: auto; }
.vp-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 4px 8px;
  border-radius: 14px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.vplayer.show .vp-bar { opacity: 1; transform: none; pointer-events: auto; }
.vp-btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; border-radius: 10px; }
.vp-btn:active { background: rgba(255, 255, 255, .15); }
.vp-btn svg { width: 18px; height: 18px; }
.vp-time { flex: none; font-size: 11.5px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.vp-seek { flex: 1; min-width: 40px; height: 24px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: none; }
.vp-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), rgba(255, 255, 255, .3) var(--p, 0%)); }
.vp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.vp-seek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.vp-seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.vp-seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.carousel-wrap .vp-bar { bottom: 30px; }   /* au-dessus des points du carrousel */
.vplayer .wm-overlay { z-index: 2; }.gallery.open .g-slide img { animation: gIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes gIn { from { transform: scale(.92); opacity: 0; } }
.g-close { position: absolute; top: calc(var(--safe-top) + 10px); right: 12px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.g-close svg { width: 20px; height: 20px; }
.g-count { position: absolute; top: calc(var(--safe-top) + 20px); left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; font-size: 14px; pointer-events: none; opacity: var(--fade); }

/* Rappel de fin de promo (accueil) */
.promo-alert { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); text-align: left; color: #fff;
  background: linear-gradient(120deg, #ef4444, #f97316, #ef4444); background-size: 200% 100%; animation: alertSlide 4s ease-in-out infinite; box-shadow: 0 10px 30px -14px rgba(239, 68, 68, .9); }
@keyframes alertSlide { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.promo-alert .pa-icon { flex: none; font-size: 26px; animation: alarm 1.6s ease-in-out infinite; }
@keyframes alarm { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.promo-alert .grow { min-width: 0; display: grid; gap: 2px; }
.promo-alert b { font-size: 15px; }
.promo-alert .small { opacity: .92; }
.promo-alert .cd { font-weight: 800; background: none; animation: none; color: #fff; }
.promo-alert svg { flex: none; width: 18px; height: 18px; }

/* Produit mis en avant sur l'accueil : grande carte, bordure lumineuse qui tourne */
.feat-wrap { margin-top: 16px; }
/* padding : de la place au-dessus pour le petit bond (sinon le haut de la carte serait coupé) */
.feat-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  padding-top: 10px; margin-top: -10px; }
.feat-track::-webkit-scrollbar { display: none; }
/* bordure qui tourne (couleur qui défile, rien ne pivote) + petit bond qui se répète */
.feat-track > .featured { flex: 0 0 100%; scroll-snap-align: start; margin-top: 0;
  animation: featBorder 6s linear infinite, featHop 3.4s ease-in-out 1.4s infinite; }
@keyframes featHop { 0%, 72%, 100% { transform: translateY(0); } 79% { transform: translateY(-7px); } 86% { transform: translateY(0); }
  91% { transform: translateY(-2.5px); } 96% { transform: translateY(0); } }
.feat-track.multi > .featured { flex-basis: 88%; }   /* la carte suivante dépasse : on comprend qu'on peut glisser */
.feat-track.multi > .featured:last-child { margin-right: 4px; }
.feat-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.feat-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--card-strong); transition: width .35s var(--ease), background .35s; }
.feat-dots i.on { width: 22px; background: var(--grad); }
/* Bordure dégradée qui tourne : c'est l'angle du dégradé qui change (--fa), aucun élément ne pivote.
   (L'ancien grand carré en rotation dépassait des coins arrondis sur iPhone pendant les animations.) */
@property --fa { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.featured { position: relative; display: block; width: 100%; margin-top: 16px; padding: 2px; border-radius: calc(var(--radius) + 2px); text-align: left; overflow: hidden; isolation: isolate;
  background: conic-gradient(from var(--fa), var(--accent), var(--hot), var(--warm), var(--accent)); }
@keyframes featBorder { to { --fa: 1turn; } }
.featured .f-img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; }
.featured .f-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: featZoom 14s ease-in-out infinite alternate; }
@keyframes featZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.featured .f-img .ph { font-size: 64px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.featured .f-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 30%, transparent 45%, rgba(0,0,0,.85) 100%); pointer-events: none; }
.featured .f-label { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--hot)); box-shadow: 0 6px 20px -6px var(--glow); overflow: hidden; }
.featured .f-label::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); transform: translateX(-120%); animation: newShine 3.6s ease-in-out infinite; }
.featured .fav { top: 10px; right: 10px; }
.featured .f-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 16px; display: grid; gap: 4px; color: #fff; }
.featured .f-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.featured .f-tags .cd.on-img { position: static; }
.featured .f-name { font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.6); overflow-wrap: anywhere; }
.featured .f-price { font-size: 16px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.featured .f-price .was, .featured .f-price .was s { color: rgba(255,255,255,.75); }
.featured .f-cta { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 0 0 var(--radius) var(--radius); background: var(--bg-2); font-weight: 700; font-size: 14.5px; }
.featured .f-cta svg { width: 18px; height: 18px; }
[data-anim="none"] .featured, [data-anim="none"] .featured .f-img img { animation: none; }

/* Écran du code : attente de validation par l'admin */
.wait-card { display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 14px; color: var(--muted); }
.wait-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--glow); animation: waitPulse 1.8s ease-out infinite; }
@keyframes waitPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.pending-alert { border-color: color-mix(in srgb, #fbbf24 45%, transparent); background: color-mix(in srgb, #fbbf24 10%, var(--card)); }

/* Corbeille */
.trash-item { flex-wrap: wrap; }
.trash-item .grow { flex: 1 1 0; }
.trash-actions { flex: 1 0 100%; display: flex; gap: 8px; align-items: center; }
.trash-actions .btn { flex: 1; }

/* Statistiques par produit */
.pstat-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pstat-totals > div { padding: 12px 8px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-align: center; display: grid; gap: 2px; }
.pstat-totals b { font-size: 22px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pstat-totals span { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.pstat { text-align: left; align-items: flex-start; }
.pstat .rank { flex: none; width: 28px; font-weight: 800; color: var(--muted); font-size: 13px; padding-top: 14px; }
.pstat .grow { min-width: 0; display: grid; gap: 3px; }
.pstat-nums { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pstat-nums .on { color: var(--text, #fff); font-weight: 800; }
.pstat .track { height: 6px; border-radius: 3px; background: var(--card-strong); overflow: hidden; margin-top: 4px; }
.pstat .track i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--grad); transition: width 1s var(--ease); }

/* ============================================================ STYLES (thèmes) */
[data-theme="neon"]    { --accent: #8b5cf6; --hot: #d946ef; --warm: #f97316; --accent-2: #22d3ee; --bg: #0b0b10; --bg-2: #12121a; --orb1: #7c3aed; --orb2: #db2777; --orb3: #0891b2; }
[data-theme="ocean"]   { --accent: #0ea5e9; --hot: #6366f1; --warm: #2dd4bf; --accent-2: #67e8f9; --bg: #060b14; --bg-2: #0b1422; --orb1: #0369a1; --orb2: #4338ca; --orb3: #0d9488; }
[data-theme="sunset"]  { --accent: #f97316; --hot: #e11d48; --warm: #facc15; --accent-2: #fb7185; --bg: #120a08; --bg-2: #1c110d; --orb1: #c2410c; --orb2: #be123c; --orb3: #a16207; }
[data-theme="emerald"] { --accent: #10b981; --hot: #0d9488; --warm: #a3e635; --accent-2: #6ee7b7; --bg: #05100b; --bg-2: #0a1a13; --orb1: #047857; --orb2: #0f766e; --orb3: #4d7c0f; }
[data-theme="gold"]    { --accent: #d4a017; --hot: #b45309; --warm: #fde68a; --accent-2: #fcd34d; --bg: #0b0906; --bg-2: #15110a; --orb1: #92400e; --orb2: #713f12; --orb3: #a16207; }
[data-theme="cyber"]   { --accent: #84cc16; --hot: #ec4899; --warm: #22d3ee; --accent-2: #bef264; --bg: #07070a; --bg-2: #101016; --orb1: #3f6212; --orb2: #be185d; --orb3: #0e7490; }
/* ambiances « bonne vibe » */
[data-theme="tropical"] { --accent: #14b8a6; --hot: #fb7185; --warm: #facc15; --accent-2: #5eead4; --bg: #04110f; --bg-2: #0a1c19; --orb1: #0f766e; --orb2: #be123c; --orb3: #a16207; }
[data-theme="sakura"]   { --accent: #f472b6; --hot: #a78bfa; --warm: #fde68a; --accent-2: #f9a8d4; --bg: #120a10; --bg-2: #1d1119; --orb1: #be185d; --orb2: #6d28d9; --orb3: #a16207; }
[data-theme="miami"]    { --accent: #ec4899; --hot: #06b6d4; --warm: #fb923c; --accent-2: #67e8f9; --bg: #0a0812; --bg-2: #141020; --orb1: #be185d; --orb2: #0e7490; --orb3: #c2410c; }
[data-theme="peach"]    { --accent: #fb923c; --hot: #f472b6; --warm: #fde047; --accent-2: #fdba74; --bg: #120b08; --bg-2: #1d130e; --orb1: #c2410c; --orb2: #be185d; --orb3: #a16207; }
[data-theme="lavender"] { --accent: #a78bfa; --hot: #60a5fa; --warm: #f0abfc; --accent-2: #c4b5fd; --bg: #0b0a14; --bg-2: #15132a; --orb1: #5b21b6; --orb2: #1d4ed8; --orb3: #a21caf; }
[data-theme="festival"] { --accent: #f43f5e; --hot: #8b5cf6; --warm: #22d3ee; --accent-2: #fda4af; --bg: #0c0710; --bg-2: #170e1d; --orb1: #be123c; --orb2: #6d28d9; --orb3: #0e7490; }

.grad-text { background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 6s ease infinite; }

/* ============================================================ ANIMATIONS de transition */
[data-anim="fade"] .view.enter-fwd, [data-anim="fade"] .view.enter-back { animation: enterFade .4s var(--ease) both; }
[data-anim="zoom"] .view.enter-fwd { animation: zoomIn .45s var(--ease) both; }
[data-anim="zoom"] .view.enter-back { animation: zoomBack .45s var(--ease) both; }
[data-anim="flip"] .view-host { perspective: 1200px; }
[data-anim="flip"] .view.enter-fwd { animation: flipIn .5s var(--ease) both; transform-origin: left center; }
[data-anim="flip"] .view.enter-back { animation: flipBack .5s var(--ease) both; transform-origin: right center; }
[data-anim="bounce"] .view.enter-fwd, [data-anim="bounce"] .view.enter-back, [data-anim="bounce"] .view.enter-fade { animation: bounceIn .6s var(--spring) both; }
/* sortie de l'ancienne page, dans le même style */
[data-anim="fade"] .view-leave.leave-fwd, [data-anim="fade"] .view-leave.leave-back { animation-name: leaveFade; }
[data-anim="zoom"] .view-leave.leave-fwd { animation-name: zoomOut; }
[data-anim="zoom"] .view-leave.leave-back { animation-name: zoomOutBack; }
[data-anim="flip"] .view-leave.leave-fwd { animation-name: flipOut; transform-origin: right center; }
[data-anim="flip"] .view-leave.leave-back { animation-name: flipOutBack; transform-origin: left center; }
[data-anim="bounce"] .view-leave { animation-name: bounceOut; }
@keyframes zoomOut { to { opacity: 0; transform: scale(1.04); } }
@keyframes zoomOutBack { to { opacity: 0; transform: scale(.95); } }
@keyframes flipOut { to { opacity: 0; transform: rotateY(14deg) translateX(-4%); } }
@keyframes flipOutBack { to { opacity: 0; transform: rotateY(-14deg) translateX(4%); } }
@keyframes bounceOut { to { opacity: 0; transform: translateY(-8px) scale(.98); } }
/* éléments en cascade : un petit rebond maîtrisé (le ressort générique dépassait trop : effet « buggé ») */
[data-anim="bounce"] .stagger > * { animation-name: bounceItem; animation-timing-function: cubic-bezier(.22, .8, .2, 1); }
@keyframes bounceItem { 0% { opacity: 0; transform: translateY(30px) scale(.96); } 55% { opacity: 1; transform: translateY(-6px) scale(1.005); }
  78% { transform: translateY(2px); } 100% { opacity: 1; transform: none; } }
[data-anim="zoom"] .stagger > * { animation-name: zoomIn; }
/* Pivot 3D : les éléments arrivent aussi en 3D (légère bascule vers l'avant) */
[data-anim="flip"] .stagger > * { animation-name: flipItem; transform-origin: 50% 0; }
@keyframes flipItem { from { opacity: 0; transform: perspective(800px) rotateX(-22deg) translateY(14px); } to { opacity: 1; transform: none; } }
[data-anim="flip"] .reveal { transform: perspective(800px) rotateX(-16deg) translateY(22px); transform-origin: 50% 0; }
[data-anim="flip"] .reveal.in { transform: none; }

/* Vitrine « À la une » : apparition douce et simple, la même pour tous les styles (pas de rotation ni de zoom
   sur ce grand bloc : c'était moche sur iPhone). Ensuite, son petit bond en boucle (featHop). */
.stagger > .feat-wrap, [data-anim] .stagger > .feat-wrap { animation: featAppear .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes featAppear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
[data-anim="none"] *, [data-anim="none"] *::before, [data-anim="none"] *::after { animation: none !important; transition: none !important; }
@keyframes zoomIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes zoomBack { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes flipIn { from { opacity: 0; transform: rotateY(-40deg) translateX(10%); } to { opacity: 1; transform: none; } }
@keyframes flipBack { from { opacity: 0; transform: rotateY(40deg) translateX(-10%); } to { opacity: 1; transform: none; } }
@keyframes bounceIn { 0% { opacity: 0; transform: translateY(50px) scale(.96); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }

/* ============================================================ FONDS animés */
.bg-aurora i { position: absolute; inset: -50%; filter: blur(70px); opacity: .35;
  background: conic-gradient(from 0deg, var(--orb1), var(--orb2), var(--orb3), var(--orb1)); animation: spinSlow 30s linear infinite; }
.bg-aurora i:nth-child(2) { inset: -30%; opacity: .25; animation-duration: 45s; animation-direction: reverse; mix-blend-mode: screen; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.bg-grid { perspective: 400px; }
.bg-grid i { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 80%; transform: rotateX(62deg); transform-origin: bottom;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 45%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--accent) 45%, transparent) 1px, transparent 1px);
  background-size: 48px 48px; animation: gridMove 3s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%); mask-image: linear-gradient(to top, #000 10%, transparent 90%); }
.bg-grid::before { content: ""; position: absolute; left: 0; right: 0; top: 18%; height: 40%; background: radial-gradient(ellipse at center, var(--glow), transparent 65%); opacity: .35; }
@keyframes gridMove { to { background-position: 0 48px; } }
.bg-particles { width: 100%; height: 100%; }
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }

/* ============================================================ EN-TÊTE + logo animé */
.topbar { min-height: calc(var(--safe-top) + 62px); }
.topbar h1 { font-size: 18px; }
.brand-logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.brand-logo[hidden] { display: none; }
.look-btn svg { transition: transform .5s var(--spring); }
.look-btn:active svg { transform: rotate(-30deg) scale(.9); }
.alogo { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.alogo svg { position: relative; width: 66%; height: 66%; overflow: visible; }
@keyframes breathe { 0%, 100% { transform: scale(.9); opacity: .4; } 50% { transform: scale(1.1); opacity: .7; } }

/* ============================================================ écran de démarrage */
.splash { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg); transition: opacity .5s ease, visibility .5s; }
.splash.done { opacity: 0; visibility: hidden; }
.splash.skip { display: none; }
.splash-logo { width: 110px; height: 110px; }
.splash-logo .alogo { animation: pop .7s var(--spring) both; }  /* le logo « pop » au moment où il apparaît */
.splash-name { font-size: 28px; font-weight: 800; letter-spacing: -.02em; animation: fadeUp .6s var(--ease) .2s both; }
.splash-bar { width: 140px; height: 4px; border-radius: 2px; background: var(--card-strong); overflow: hidden; animation: fadeIn .4s .3s both; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: 2px; background: var(--grad); animation: loadbar 1s ease-in-out infinite; }
@keyframes loadbar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ============================================================ ACCUEIL enrichi */
.ticker { position: relative; overflow: hidden; margin: 14px -16px 16px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--soft), transparent 30%, transparent 70%, var(--soft)); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker .track { display: inline-flex; gap: 36px; white-space: nowrap; padding-left: 36px; animation: marquee var(--dur, 22s) linear infinite; font-weight: 700; font-size: 14px; }
.ticker .track span { display: inline-flex; align-items: center; gap: 8px; }
.ticker .track span::after { content: "✦"; margin-left: 28px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kpi { padding: 12px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; position: relative; overflow: hidden; }
.kpi b { display: block; font-size: 24px; letter-spacing: -.02em; }
.kpi span { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 8px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.ccard { width: 150px; height: 190px; border-radius: 22px; overflow: hidden; position: relative; text-align: left; background: var(--grad); background-size: 200% 200%; animation: gradShift 8s ease infinite; }
.ccard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ccard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), transparent 60%); }
.ccard .meta { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; display: grid; gap: 2px; }
.ccard .meta b { font-size: 15px; line-height: 1.2; }
.ccard .meta span { font-size: 12px; opacity: .8; font-weight: 600; }
.ccard .big-ini { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 900; color: rgba(255,255,255,.25); }
.pmini { width: 150px; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); text-align: left; }
.pmini .img { aspect-ratio: 1; position: relative; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.pmini .img img { width: 100%; height: 100%; object-fit: cover; }
.pmini .img .ph { font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pmini .body { padding: 9px 11px 11px; display: grid; gap: 3px; }
.pmini .body b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 4px 10px; }
.section-head .section-title { margin: 0; }
.section-head button { font-size: 13px; font-weight: 700; color: var(--accent-2); }

/* Reflet qui balaie les cartes en promo */
.shine { position: relative; overflow: hidden; }
/* Le reflet attend complètement hors de la carte (la partie inclinée ne dépasse jamais pendant
   la pause), puis traverse d'un seul mouvement fluide (transform = animation accélérée). */
.shine::before { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: translateX(-260%) skewX(-18deg); animation: sweep 3.6s cubic-bezier(.45, 0, .25, 1) infinite; will-change: transform; }
@keyframes sweep {
  0%, 55% { transform: translateX(-260%) skewX(-18deg); }
  100% { transform: translateX(330%) skewX(-18deg); }
}

/* Bordure lumineuse tournante (bouton « Entrer » de l'écran du code) */
.glow-border { position: relative; isolation: isolate; }
/* le halo épouse la forme du bouton (pilule en « Très arrondi », carré en « Carré ») : plus de coins qui dépassent */
.glow-border::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1; background: conic-gradient(from var(--a, 0deg), var(--accent), var(--hot), var(--warm), var(--accent-2), var(--accent)); animation: rotA 3s linear infinite; filter: blur(6px); opacity: .8; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes rotA { to { --a: 360deg; } }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-anim="none"] .reveal { opacity: 1; transform: none; }

/* ============================================================ panneau « Personnaliser » */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { border-radius: 18px; padding: 10px; background: var(--card); border: 2px solid var(--line); display: grid; gap: 8px; justify-items: center; font-size: 13px; font-weight: 700; transition: border-color .3s, transform .3s var(--spring); }
.swatch i { width: 100%; height: 46px; border-radius: 12px; display: block; background-size: 200% 200%; animation: gradShift 5s ease infinite; }
.swatch.on { border-color: #fff; transform: translateY(-2px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .seg { display: inline-flex; gap: 6px; align-items: center; }
.look-preview { height: 70px; border-radius: 16px; overflow: hidden; position: relative; background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; display: grid; place-items: center; font-weight: 800; }
.look-preview .demo { padding: 10px 18px; border-radius: 12px; background: var(--grad); color: #fff; }
.look-preview { perspective: 600px; }
.look-preview .demo.play { animation: enterFwd .5s var(--ease) both; }
[data-anim="fade"] .look-preview .demo.play { animation-name: fadeUp; }
[data-anim="zoom"] .look-preview .demo.play { animation-name: zoomIn; }
[data-anim="flip"] .look-preview .demo.play { animation: flipIn .6s var(--ease) both; }
[data-anim="bounce"] .look-preview .demo.play { animation: bounceIn .7s var(--spring) both; }

/* ============================================================ LOGO : image perso + effets (sans anneau) */
/* Toutes les couches décoratives sont masquées par défaut ; chaque effet active les siennes. */
.alogo .halo, .alogo .shadow, .alogo .sheen, .alogo .stars, .alogo .embers, .alogo .holo { display: none; position: absolute; pointer-events: none; }
.alogo .logo-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; z-index: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 18px -8px rgba(0, 0, 0, .7); }

/* 🪶 Flottant : le logo flotte, son ombre au sol s'élargit et se resserre */
.alogo[data-fx="float"] > .logo-img { animation: floatY 3.6s ease-in-out infinite; }
.alogo[data-fx="float"] .shadow { display: block; left: 18%; right: 18%; bottom: -16%; height: 12%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%); animation: floatShadow 3.6s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9%; } }
@keyframes floatShadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.7); opacity: .45; } }

/* 🪙 3D : le logo devient une vraie pièce épaisse qui tourne sur elle-même (360°, en boucle).
   Plusieurs copies empilées en profondeur forment la tranche ; ombre au sol qui suit la rotation. */
.alogo[data-fx="tilt"] { perspective: 260px; }
.alogo .coin { position: absolute; inset: 0; z-index: 1; transform-style: preserve-3d; animation: coinSpin 5s linear infinite; }
.alogo .coin img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.alogo .coin img.edge { filter: brightness(.42) saturate(1.3); }
.alogo .coin img.face { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
@keyframes coinSpin { from { transform: rotateX(10deg) rotateY(0deg); } to { transform: rotateX(10deg) rotateY(360deg); } }
.alogo[data-fx="tilt"] .shadow { display: block; left: 14%; right: 14%; bottom: -14%; height: 11%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .6), transparent 70%); animation: coinShadow 2.5s ease-in-out infinite; }
@keyframes coinShadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.35); } }

/* 💎 Reflet : un éclat de lumière passe sur le logo, comme sur du verre */
.alogo[data-fx="shine"] .sheen { display: block; inset: 0; border-radius: 50%; overflow: hidden; z-index: 2; }
.alogo[data-fx="shine"] .sheen::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 45%; left: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: translateX(-240%) skewX(-20deg); animation: logoSheen 3.4s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes logoSheen { 0%, 50% { transform: translateX(-240%) skewX(-20deg); } 100% { transform: translateX(320%) skewX(-20deg); } }

/* 🌈 Holo : reflets irisés qui glissent sur le logo, comme un sticker holographique */
.alogo[data-fx="holo"] .holo { display: block; inset: 0; z-index: 2; border-radius: 50%; mix-blend-mode: color-dodge; opacity: .42;
  background: linear-gradient(115deg, transparent 25%, #ff6ec7 38%, #7afcff 48%, #feff9c 58%, #b388ff 66%, transparent 76%);
  background-size: 260% 260%; animation: holoMove 4.5s ease-in-out infinite; }
.alogo[data-fx="holo"] > .logo-img { animation: holoTilt 4.5s ease-in-out infinite; }
@keyframes holoMove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes holoTilt { 0%, 100% { filter: saturate(1); } 50% { filter: saturate(1.35) contrast(1.05); } }

/* 💓 Battement : double pulsation, comme un cœur */
.alogo[data-fx="pulse"] > .logo-img { animation: heartBeat 1.7s ease-in-out infinite; }
.alogo[data-fx="pulse"] .halo { display: block; inset: -12%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hot) 55%, transparent), transparent 66%); animation: beatGlow 1.7s ease-in-out infinite; }
@keyframes heartBeat { 0%, 45%, 100% { transform: scale(1); } 10% { transform: scale(1.1); } 20% { transform: scale(.97); } 30% { transform: scale(1.07); } }
@keyframes beatGlow { 0%, 45%, 100% { opacity: 0; transform: scale(.9); } 12%, 30% { opacity: .9; transform: scale(1.12); } }

/* 🔥 Braises : de petites braises s'élèvent derrière le logo */
.alogo[data-fx="embers"] .embers { display: block; inset: -25% -15% -5%; z-index: 0; }
.alogo .embers i { position: absolute; bottom: 12%; width: 9%; height: 9%; min-width: 3px; min-height: 3px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff3c4 0, #fb923c 45%, rgba(249, 115, 22, 0) 72%); box-shadow: 0 0 6px #f97316;
  animation: emberUp 2.6s ease-out infinite; }
.alogo .embers i:nth-child(1) { left: 14%; }
.alogo .embers i:nth-child(2) { left: 32%; animation-delay: .5s; width: 7%; height: 7%; }
.alogo .embers i:nth-child(3) { left: 52%; animation-delay: 1.1s; }
.alogo .embers i:nth-child(4) { left: 70%; animation-delay: 1.6s; width: 6%; height: 6%; }
.alogo .embers i:nth-child(5) { left: 84%; animation-delay: 2.1s; }
.alogo[data-fx="embers"] > .logo-img { animation: emberGlow 2.6s ease-in-out infinite; }
@keyframes emberUp { 0% { bottom: 12%; opacity: 0; transform: translateX(0) scale(1); } 15% { opacity: 1; } 100% { bottom: 105%; opacity: 0; transform: translateX(6px) scale(.35); } }
@keyframes emberGlow { 0%, 100% { filter: drop-shadow(0 4px 6px rgba(249, 115, 22, .35)); } 50% { filter: drop-shadow(0 4px 12px rgba(249, 115, 22, .7)); } }

/* ⭐ Étincelles : petites étoiles qui scintillent autour */
.alogo[data-fx="sparkle"] .stars { display: block; inset: -22%; }
.alogo .stars i { position: absolute; width: 16%; height: 16%; min-width: 5px; min-height: 5px; background: #fff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 3px var(--hot)); opacity: 0; animation: twinkle 2.4s ease-in-out infinite; }
.alogo .stars i:nth-child(1) { top: 4%; left: 12%; }
.alogo .stars i:nth-child(2) { top: 10%; right: 4%; width: 11%; height: 11%; animation-delay: .6s; background: var(--warm); }
.alogo .stars i:nth-child(3) { bottom: 6%; right: 12%; animation-delay: 1.2s; }
.alogo .stars i:nth-child(4) { bottom: 14%; left: 2%; width: 10%; height: 10%; animation-delay: 1.8s; background: var(--accent-2); }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: .2; transform: scale(.6) rotate(90deg); } }

/* 🍮 Gelée : le logo s'écrase et rebondit comme de la gelée */
.alogo[data-fx="jelly"] > .logo-img { transform-origin: 50% 100%; animation: jelly 2.4s ease-in-out infinite; }
@keyframes jelly { 0%, 60%, 100% { transform: scale(1, 1); } 10% { transform: scale(1.12, .86); } 22% { transform: scale(.9, 1.1) translateY(-7%); }
  34% { transform: scale(1.05, .95); } 46% { transform: scale(.98, 1.02); } }

/* 🔔 Balancier : le logo se balance doucement, accroché par le haut */
.alogo[data-fx="swing"] > .logo-img { transform-origin: 50% -12%; animation: swing 2.8s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(9deg); } 50% { transform: rotate(-9deg); } }

/* 📺 Glitch : décalages RVB brefs et irréguliers */
.alogo[data-fx="glitch"] > .logo-img { animation: glitchShift 3s steps(1) infinite; }
@keyframes glitchShift {
  0%, 86%, 100% { transform: none; filter: none; }
  88% { transform: translate(-2px, 1px) skewX(-6deg); filter: drop-shadow(2px 0 0 #ff2a6d) drop-shadow(-2px 0 0 #05d9e8); }
  92% { transform: translate(2px, -1px); filter: drop-shadow(-3px 0 0 #ff2a6d) drop-shadow(3px 0 0 #05d9e8); }
  95% { transform: none; filter: none; }
}
.logo-preview { width: 76px; height: 76px; flex: none; }
/* Admin : image de catégorie */
.cat-img-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .18); border: 1px dashed var(--line); }
.cat-img-thumb { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--grad); color: #fff; }
.cat-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Choix du contour : grille de mini-logos animés */
.fx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fx-pick { display: grid; justify-items: center; gap: 8px; padding: 14px 6px 10px; border-radius: 16px; background: var(--card);
  border: 2px solid var(--line); font-size: 12px; font-weight: 700; transition: border-color .3s, transform .3s var(--spring); }
.fx-pick.on { border-color: #fff; transform: translateY(-2px); }
.fx-logo { width: 44px; height: 44px; display: block; }
.fx-name { line-height: 1.2; text-align: center; }

/* ============================================================ POLICES */
[data-font="rounded"] body, .font-rounded { font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Quicksand", system-ui, sans-serif; }
[data-font="serif"] body, .font-serif { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
[data-font="mono"] body, .font-mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace; letter-spacing: -.01em; }
/* polices du téléphone (aucun fichier à télécharger) : iPhone en premier, puis Android et ordinateur */
[data-font="futura"] body, .font-futura { font-family: Futura, "Avenir Next", "Century Gothic", "Trebuchet MS", "Product Sans", sans-serif; letter-spacing: .01em; }
[data-font="elegant"] body, .font-elegant { font-family: Didot, "Bodoni 72", "Bodoni MT", "Playfair Display", "Noto Serif Display", Georgia, serif; letter-spacing: .02em; }
[data-font="hand"] body, .font-hand { font-family: "Marker Felt", "Chalkboard SE", "Segoe Print", "Comic Sans MS", "Dancing Script", cursive; }
[data-font="condensed"] body, .font-condensed { font-family: "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, Impact, sans-serif; letter-spacing: .02em; }
[data-font="typewriter"] body, .font-typewriter { font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace; }
[data-font] button, [data-font] input, [data-font] textarea, [data-font] select { font-family: inherit; }

/* ============================================================ ARRONDIS */
/* Trois niveaux nettement différents. --radius pilote les cartes, la carte « à la une », les alertes… ;
   les éléments à arrondi fixe sont listés ici (blocs, vignettes, boutons). Normal = valeurs d'origine. */
[data-radius="sharp"] { --radius: 6px; --radius-sm: 4px; }
[data-radius="round"] { --radius: 32px; --radius-sm: 20px; }
[data-radius="sharp"] :is(.btn, .card, .tile, .cat, .pcard, .ccard, .pmini, .stat, .kpi, .list-item, .opt, .toggle, .hero, .seg, .chip, .code-input,
  textarea, .field input, .field select, .rich-edit, .swatch, .icon-btn, .tile .ico, .cat .thumb, .bg-thumb, .list-item .mini, .tab, .tabbar .pill,
  .toast, .look-preview, .media-grid .m, .fold, .admin-notif, .hours-badge, .hours-closed, .hours-edit, .hours-row, .fx-pick, .color-pick,
  .cat-img-row, .crumb, .promo-alert, .promo-timer) { border-radius: 6px; }
[data-radius="sharp"]:not([data-tabbar="docked"]) .tabbar { border-radius: 8px; }
[data-radius="sharp"] .sheet { border-radius: 10px 10px 0 0; }
[data-radius="round"] :is(.card, .tile, .cat, .pcard, .ccard, .pmini, .stat, .kpi, .list-item, .hero, .swatch, .look-preview, .fold,
  .admin-notif, .hours-badge, .hours-closed, .hours-edit, .hours-row, .fx-pick, .color-pick, .cat-img-row, .promo-alert, .promo-timer) { border-radius: 32px; }
[data-radius="round"] :is(.cat .thumb, .bg-thumb, .list-item .mini, .media-grid .m, .tile .ico) { border-radius: 20px; }
[data-radius="round"] :is(.btn, .btn.small, .opt, .toggle, .seg, .chip, .code-input, .icon-btn, .toast, .crumb) { border-radius: 999px; }
[data-radius="round"] :is(textarea, .field input, .field select, .rich-edit) { border-radius: 22px; }
[data-radius="round"]:not([data-tabbar="docked"]) .tabbar { border-radius: 999px; }
[data-radius="round"] :is(.tab, .tabbar .pill) { border-radius: 999px; }
[data-radius="round"] .sheet { border-radius: 36px 36px 0 0; }

/* ============================================================ CARTES */
[data-cards="glass"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item) { backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
/* Sur une image de fond (déjà floutée par le serveur), pas de flou en direct derrière les cartes : sur iPhone,
   ce flou ne s'applique qu'à la fin des animations d'entrée (cartes sombres puis claires). Verre translucide
   équivalent à la place : même aspect du début à la fin, et plus léger. */
[data-bg="image"][data-cards="glass"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item) {
  backdrop-filter: none; -webkit-backdrop-filter: none; background-color: color-mix(in srgb, var(--bg) 30%, var(--card)); }
/* Fond à particules (étoiles, bokeh, points, soie, ou effet continu sur image / uni) : le flou effaçait les fines
   lignes et les points derrière les cartes. Verre net et clair à la place : les particules restent visibles à
   travers (et plus de flou recalculé à chaque image de l'animation, plus léger sur iPhone). */
:root:is([data-bg-canvas="on"], [data-bg="particles"], [data-bg="stars"], [data-bg="dots"], [data-bg="silk"], [data-bg="bokeh"])[data-cards="glass"]
  :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item) {
  backdrop-filter: none; -webkit-backdrop-filter: none; background-color: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
[data-cards="solid"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item, .toggle) { background: var(--bg-2); border-color: color-mix(in srgb, var(--accent) 14%, transparent); }
[data-cards="outline"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item, .toggle) { background: transparent; border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: inset 0 0 18px -10px var(--glow); }

/* ============================================================ VITESSE */
[data-speed="slow"] :is(.view.enter-fwd, .view.enter-back, .view.enter-fade, .enter-fade) { animation-duration: .9s !important; }
[data-speed="slow"] .view-leave { animation-duration: .26s; }
[data-speed="fast"] .view-leave { animation-duration: .1s; }
[data-speed="slow"] .stagger > * { animation-duration: .9s; animation-delay: calc(var(--i, 0) * 70ms); }
[data-speed="slow"] .reveal { transition-duration: 1.2s; }
[data-speed="fast"] :is(.view.enter-fwd, .view.enter-back, .view.enter-fade, .enter-fade) { animation-duration: .22s !important; }
[data-speed="fast"] .stagger > * { animation-duration: .3s; animation-delay: calc(var(--i, 0) * 15ms); }
[data-speed="slow"] .stagger > .feat-wrap { animation-duration: 1.1s; animation-delay: calc(var(--i, 0) * 70ms); }
[data-speed="fast"] .stagger > .feat-wrap { animation-duration: .45s; animation-delay: calc(var(--i, 0) * 15ms); }
[data-speed="fast"] .reveal { transition-duration: .35s; }

/* ============================================================ INTENSITÉ DU FOND */
[data-intensity="low"] .bg-layer { opacity: .4; }
[data-intensity="high"] .bg-orbs i { opacity: .34; }
[data-intensity="high"] .bg-aurora i { opacity: .45; }
[data-intensity="high"] .bg-aurora i:nth-child(2) { opacity: .3; }
/* pas de filtre sur l'image (déjà traitée) ni sur le canevas animé (il serait recalculé à chaque image) */
[data-intensity="high"] .bg-layer:not(.bg-image):not(.bg-particles) { filter: saturate(1.35) brightness(1.1); }

/* ============================================================ panneau de style */
.swatch i.rainbow { background-image: conic-gradient(from 0deg, #ef4444, #f59e0b, #84cc16, #22d3ee, #6366f1, #d946ef, #ef4444); }
.color-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; animation: fadeUp .4s var(--ease) both; }
.color-pick { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; }
.color-pick input { width: 52px; height: 52px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }
.color-pick input::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input::-webkit-color-swatch { border: 3px solid rgba(255,255,255,.85); border-radius: 50%; }
.color-pick input::-moz-color-swatch { border: 3px solid rgba(255,255,255,.85); border-radius: 50%; }
.saved-pill { font-size: 12px; font-weight: 800; color: #6ee7b7; background: rgba(52, 211, 153, .14); padding: 4px 10px; border-radius: 999px; opacity: 0; }
.saved-pill.show { animation: savedFlash 1.8s var(--ease) both; }
@keyframes savedFlash { 0% { opacity: 0; transform: translateY(4px) scale(.9); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ============================================================ DÉFILEMENT : en-tête compact + barres masquées */
/* « translate » (propriété séparée) pour ne pas entrer en conflit avec les animations d'entrée
   qui utilisent « transform ». */
/* Pendant le défilement (chrome-drag) : la barre suit la page sans animation (déplacement 1:1, fluide).
   À l'arrêt : elle termine son mouvement avec une courbe douce. */
.topbar { transition: translate .5s cubic-bezier(.22, .8, .2, 1), opacity .4s ease, min-height .6s var(--ease), padding .6s var(--ease), box-shadow .6s ease, background .6s ease; }
body.chrome-drag .topbar { transition: translate 0s, opacity 0s, min-height .6s var(--ease), padding .6s var(--ease), box-shadow .6s ease, background .6s ease; }
body.chrome-drag :is(.tabbar, .cta-bar) { transition: none; }
.topbar h1 { transition: font-size .6s var(--ease); }
.brand-logo { transition: transform .6s var(--ease); }
/* Accueil : pas de barre du haut, le contenu commence sous la zone système du téléphone */
body.home-page .view { padding-top: calc(var(--safe-top) + 16px); }
.tabbar, .cta-bar { transition: translate .5s cubic-bezier(.22, .8, .2, 1), opacity .4s ease; will-change: translate, opacity; }

/* Compact dès qu'on a un peu défilé */
body.scrolled .topbar { min-height: calc(var(--safe-top) + 50px); padding-top: calc(var(--safe-top) + 5px); padding-bottom: 5px;
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .9); background: color-mix(in srgb, var(--bg) 94%, transparent); }
body.scrolled .topbar h1 { font-size: 16px; }
body.scrolled .brand-logo { transform: scale(.82); }

/* Masquage au défilement (si activé) */
/* --hide (0 → 1) est posé par le défilement directement sur chaque barre */
[data-autohide="on"] .topbar { translate: 0 calc(var(--hide, 0) * -110%); opacity: calc(1 - var(--hide, 0) * .9); }
[data-autohide="on"] .tabbar { translate: 0 calc(var(--hide, 0) * (100% + var(--safe-bottom) + 24px)); opacity: calc(1 - var(--hide, 0) * .9); }
[data-autohide="on"] .cta-bar { translate: 0 calc(var(--hide, 0) * 110%); opacity: calc(1 - var(--hide, 0) * .9); }
[data-autohide="on"] body.chrome-hidden :is(.topbar, .tabbar, .cta-bar) { pointer-events: none; }

/* ============================================================ cartes : néon (promo), holo (nouveau), badges */
.promo-glow, .is-new { position: relative; }
/* liseré lumineux qui fait le tour de la carte (seul l'angle du dégradé change : rien ne pivote) */
.promo-glow::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--fa), transparent 0 52%, var(--hot) 68%, var(--warm) 80%, var(--accent) 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: featBorder 3.2s linear infinite; }
.promo-glow { box-shadow: 0 0 22px -10px var(--hot); }
/* reflet arc-en-ciel qui passe sur la photo des nouveautés */
.is-new .img::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: color-dodge; opacity: .34;
  background: linear-gradient(115deg, transparent 25%, #ff6ad5 38%, #8cf5ff 47%, #c3ff7a 56%, #ffd56a 64%, transparent 76%) no-repeat;
  background-size: 300% 100%; animation: holoSweep 5s ease-in-out infinite; }
@keyframes holoSweep { 0% { background-position: 110% 0; } 55%, 100% { background-position: -10% 0; } }
.tag-chip { font-weight: 800; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .6); }

/* ============================================================ roue de la chance */
.wheel-box { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 8px auto 16px; }
.wheel-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .55)); }
.wheel-disc { transform-box: fill-box; transform-origin: center; }
.wheel-disc.turning { transition: transform 5s cubic-bezier(.12, .72, .14, 1); }
.wheel-label { fill: #fff; font-weight: 800; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 2px; }
.wheel-pin { position: absolute; top: -8px; left: 50%; translate: -50% 0; z-index: 2; width: 0; height: 0;
  border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 26px solid #fff;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }
.wheel-result { text-align: center; display: grid; gap: 10px; justify-items: stretch; }
.wheel-result .cd { justify-self: center; }
.wheel-prize { font-size: 20px; animation: pop .5s var(--spring) both; }
.wheel-row { display: grid; gap: 8px; }
.wheel-row input { width: 100%; }
.wheel-row .wheel-chance { width: 74px; }
.list-item.used { opacity: .55; }


/* ============================================================ niveau des effets (Auto / Bas / Moyen / Haut) */
/* Moyen : plus de flou en direct derrière les cartes (le plus coûteux pour le téléphone), le reste garde ses effets */
[data-fx="medium"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item) { backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-fx="medium"][data-cards="glass"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item) { background-color: rgba(255, 255, 255, .065); }
/* Bas : fond figé, aucun flou, pas de cascade ni d'effets en boucle ; changements de page en simple fondu */
[data-fx="low"] *, [data-fx="low"] *::before, [data-fx="low"] *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
[data-fx="low"] :is(.topbar, .tabbar) { background: var(--bg-2); }
[data-fx="low"] .sheet { background: var(--bg-2); }
[data-fx="low"][data-cards="glass"] :is(.card, .tile, .cat, .pcard, .pmini, .stat, .kpi, .list-item) { background-color: rgba(255, 255, 255, .065); }
[data-fx="low"] .bg-layer *, [data-fx="low"] .bg-layer::before, [data-fx="low"] .bg-layer::after { animation-play-state: paused !important; }
[data-fx="low"] .stagger > *, [data-fx="low"] .stagger > .feat-wrap { animation: none !important; }
[data-fx="low"] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
[data-fx="low"] .view:is(.enter-fwd, .enter-back, .enter-fade) { animation: enterFade .25s ease both !important; }
[data-fx="low"] .view-leave { animation: leaveFade .1s ease both !important; }
[data-fx="low"] :is(.grad-text, .tabbar .pill, .swatch i, .promo-alert .pa-icon) { animation: none !important; }
[data-fx="low"] .feat-track > .featured { animation: none; }
[data-fx="low"] .featured .f-img img { animation: none; }
[data-fx="low"] .promo-glow::after { animation: none; background: var(--hot); opacity: .75; }
[data-fx="low"] .is-new .img::after, [data-fx="low"] .shine::before { display: none; }
[data-fx="low"] .season-layer { display: none; }

/* ============================================================ admin : tuiles d'accueil */
.admin-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-tile.card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; min-height: 124px; text-align: left; }
.admin-tile-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 23px; border-radius: 14px; background: var(--soft); margin-bottom: 6px; }
.admin-tile b { font-size: 15.5px; }
.admin-tile-sub { font-size: 12px; line-height: 1.3; color: var(--muted); }
.admin-tile-badge { position: absolute; top: 12px; right: 12px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: var(--card-strong); }
.admin-tile-badge.alert { background: var(--danger); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); }
:root .admin-tile.needs { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
.admin-tile.needs .admin-tile-sub { color: var(--text); font-weight: 600; }

/* ============================================================ admin : sections repliables */
.agroups { gap: 10px; }
.agroup { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s; }
.agroup.open { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.agroup-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left; }
.agroup-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; font-size: 21px; border-radius: 13px; background: var(--soft); }
.agroup-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agroup-txt b { font-size: 16px; }
.agroup-val { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.agroup-head svg { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .3s var(--ease); }
.agroup.open .agroup-head svg { transform: rotate(90deg); }
.agroup-body { padding: 0 12px 14px; animation: fadeUp .35s var(--ease) both; }
.agroup-body > .section-head:first-child { margin-top: 10px; }

/* interrupteurs regroupés dans une seule carte (façon réglages iPhone) */
.toggle-group { border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
:root .toggle-group .toggle { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.toggle-group > * + * { border-top: 1px solid var(--line); }
.toggle-group .toggle svg { width: 16px; height: 16px; color: var(--muted); }
.toggle-label { min-width: 0; }
.toggle-wrap .tip-text, .toggle-group p.muted { margin: -4px 14px 12px !important; }

/* aide repliée derrière un « i » */
.tip-btn { display: inline-grid; place-items: center; width: 19px; height: 19px; flex: none; margin-left: 7px; border-radius: 50%;
  border: 1.5px solid currentColor; color: var(--muted); font: italic 700 11px/1 Georgia, serif; cursor: pointer; vertical-align: middle; }
.tip-text { display: block; margin: 2px 4px 0; font-size: 12.5px; line-height: 1.4; font-weight: 400; color: var(--muted); animation: fadeUp .25s var(--ease) both; }

/* barre « Enregistrer » qui reste en bas de l'écran tant qu'il y a des changements */
.save-bar { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px); z-index: 20; display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 10px 10px 10px 14px; border-radius: 18px; font-weight: 600;
  background: color-mix(in srgb, var(--bg-2) 90%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); animation: fadeUp .3s var(--ease) both; }

/* ============================================================ aperçu « mini-téléphone » du style */
.phone-mock { width: 170px; margin: 4px auto 16px; padding: 7px; border-radius: 32px; background: #050507;
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .85); }
.pm-screen { position: relative; height: 330px; border-radius: 25px; overflow: hidden; background: var(--bg); font-size: 9px; }
.pm-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
img.pm-bg { filter: brightness(.55); }
.pm-orbs i { position: absolute; width: 170px; height: 170px; border-radius: 50%; filter: blur(32px); opacity: .45; }
.pm-orbs i:first-child { background: var(--orb1); left: -60px; top: -50px; }
.pm-orbs i:last-child { background: var(--orb2); right: -70px; bottom: 30px; }
.pm-content { position: relative; display: flex; flex-direction: column; gap: 7px; padding: 18px 9px 0; }
:root .pm-hero.card { display: flex; align-items: center; gap: 7px; padding: 9px; border-radius: calc(var(--radius) * .5); }
.pm-logo { width: 24px; height: 24px; flex: none; border-radius: 50%; overflow: hidden; background: var(--card-strong); }
.pm-logo img { width: 100%; height: 100%; object-fit: cover; }
.pm-hero b { min-width: 0; font-size: 11.5px; }
.pm-cta { padding: 6px; text-align: center; border-radius: calc(var(--radius) * .5); background: var(--grad); color: #fff; font-size: 9.5px; font-weight: 800; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
:root .pm-card.card { display: flex; flex-direction: column; gap: 4px; padding: 5px; border-radius: calc(var(--radius) * .45); }
.pm-img { display: block; height: 56px; border-radius: calc(var(--radius) * .3);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, transparent), color-mix(in srgb, var(--hot) 45%, transparent)); }
.pm-line { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text) 40%, transparent); }
.pm-line.short { width: 55%; background: var(--accent); }
.pm-tabbar { position: absolute; left: 9px; right: 9px; bottom: 9px; height: 30px; display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px; border-radius: 15px; background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: 1px solid var(--line); }
.pm-tabbar i { width: 14px; height: 5px; border-radius: 3px; background: var(--muted); opacity: .6; }
.pm-tabbar i.on { width: 30px; height: 18px; border-radius: 9px; background: var(--accent); opacity: 1; }
[data-tabbar="docked"] .pm-tabbar { left: 0; right: 0; bottom: 0; border-radius: 0; border-width: 1px 0 0; }
[data-radius="sharp"] .pm-tabbar { border-radius: 5px; }

/* ============================================================ vitrine de nuit */
/* Fond assombri et un peu désaturé, halo de lune en haut à droite, bords de l'écran dans l'ombre */
[data-night="on"] .bg-layer { filter: brightness(.5) saturate(.8); transition: filter 1.2s ease; }
.night-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  background: radial-gradient(circle at 84% 15%, rgba(255, 244, 214, .3) 0 22px, rgba(255, 236, 190, .1) 23px 70px, transparent 160px),
    radial-gradient(ellipse at 50% 30%, transparent 45%, rgba(4, 3, 14, .6) 100%); }
[data-night="on"] .night-sky { opacity: 1; }
[data-night="on"] .night-sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }
[data-night="on"] { --glow: color-mix(in srgb, var(--accent) 45%, transparent); }
[data-fx="low"] .night-sky i { animation: none; }

/* ============================================================ jeux (section « Jeux » + ticket à gratter) */
.game-card.card { display: flex; align-items: center; gap: 14px; padding: 16px; width: 100%; text-align: left; }
.game-ico { width: 58px; height: 58px; flex: none; display: grid; place-items: center; font-size: 30px; border-radius: 18px; background: var(--grad);
  box-shadow: 0 8px 22px -8px var(--glow); }
.game-card b { font-size: 17px; display: block; }
.game-card .chip { margin-top: 6px; }
.game-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* deux dates côte à côte : chacune la moitié exacte (les champs date d'iPhone ont une largeur minimale qui débordait) */
.date-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.date-pair .field { min-width: 0; overflow: hidden; }
.date-pair input { width: 100%; padding-left: 12px; padding-right: 12px; }
.game-card.locked .game-ico { filter: grayscale(1); opacity: .55; }
.game-card.ready .game-ico { animation: pop 1.6s var(--spring) infinite alternate; }
.scratch-box { position: relative; width: min(84vw, 330px); aspect-ratio: 16 / 10; margin: 6px auto 16px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 40%, var(--bg-2)), var(--bg-2));
  border: 2px dashed color-mix(in srgb, var(--warm) 60%, transparent); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .7); }
.scratch-prize { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; padding: 16px; text-align: center; }
.scratch-prize b { font-size: 26px; line-height: 1.15; }
.scratch-prize small { color: var(--muted); font-weight: 600; }
.scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .6s ease; }
.scratch-canvas.gone { opacity: 0; pointer-events: none; }

/* ============================================================ titres des catégories (effet + couleur) */
/* Appliqué aux noms des catégories (menu, carrousel de l'accueil, titre de la page) et aux boutons de choix.
   Effet : celui de la catégorie (data-tfx), sinon le style général de la boutique (data-cat-style).
   Couleur : celle de la catégorie (classe tc, --cat-c), sinon les couleurs du thème.
   Les emojis sont dans des <span> à part : ils gardent leurs couleurs. */
.cat-title, .cs-pick { --t1: var(--accent); --t2: var(--hot); --t3: var(--warm); --fg: var(--text); }
.cat-title.tc { --t1: var(--cat-c); --t2: color-mix(in srgb, var(--cat-c) 45%, #fff); --t3: color-mix(in srgb, var(--cat-c) 65%, #000); --fg: var(--cat-c); }
.cat-title.tc .cs-word { color: var(--cat-c); }   /* « Simple » avec une couleur */
/* Les titres qui coupent ce qui dépasse (« … » des noms trop longs, titre du haut) : de la place à l'intérieur
   pour les lueurs (néon, battement, foudre…), sinon elles s'arrêtent net et forment un rectangle. La marge
   négative compense : le texte reste exactement au même endroit. */
.cat-title.ellipsis, .topbar h1.cat-title { padding: 14px 18px; margin: -14px -18px; }
:is([data-cat-style="gradient"] .cat-title:not([data-tfx]), .cat-title[data-tfx="gradient"], .cs-gradient) .cs-word {
  background: linear-gradient(90deg, var(--t1), var(--t2) 33%, var(--t3) 66%, var(--t1)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: titleSlide 6s linear infinite; }
@keyframes titleSlide { from { background-position: 0 0; } to { background-position: 300% 0; } }

:is([data-cat-style="neon"] .cat-title:not([data-tfx]), .cat-title[data-tfx="neon"], .cs-neon) .cs-word {
  color: #fff; text-shadow: 0 0 2px #fff, 0 0 6px var(--t1), 0 0 11px var(--t1), 0 0 15px color-mix(in srgb, var(--t2) 70%, transparent); animation: neonFlicker 5s infinite; }
@keyframes neonFlicker { 0%, 90%, 100% { opacity: 1; } 91% { opacity: .55; } 93% { opacity: 1; } 95% { opacity: .7; } 96% { opacity: 1; } }

:is([data-cat-style="shine"] .cat-title:not([data-tfx]), .cat-title[data-tfx="shine"], .cs-shine) .cs-word {
  background: linear-gradient(100deg, var(--fg) 38%, #fff 50%, var(--fg) 62%); background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shineSweep 3.4s linear infinite; }
@keyframes shineSweep { from { background-position: 130% 0; } to { background-position: -130% 0; } }

:is([data-cat-style="gold"] .cat-title:not([data-tfx]), .cat-title[data-tfx="gold"], .cs-gold) .cs-word {
  background: linear-gradient(180deg, #fff6cf 0%, #f6cd56 42%, #b8860b 55%, #ffe596 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }

:is([data-cat-style="rainbow"] .cat-title:not([data-tfx]), .cat-title[data-tfx="rainbow"], .cs-rainbow) .cs-word {
  background: linear-gradient(90deg, #ff5f6d, #ffc371, #f9f871, #7cf29c, #48c6ef, #8e7cff, #ff5f6d); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: titleSlide 4s linear infinite; }

/* Feu (même principe que la foudre) : flammes qui vacillent en continu, puis une flambée — lueur qui s'emballe
   et un 🔥 qui jaillit au coin avant de retomber */
:is([data-cat-style="fire"] .cat-title:not([data-tfx]), .cat-title[data-tfx="fire"], .cs-fire) .cs-word {
  position: relative;
  background: linear-gradient(0deg, #ff2e00 0%, #ff8a00 40%, #ffd000 70%, #fff3b0 100%); background-size: 100% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(255, 110, 0, .6));
  animation: fireFlicker 1.6s ease-in-out infinite alternate, fireFlare 3.8s infinite; }
@keyframes fireFlicker { 0% { background-position: 0 100%; } 50% { background-position: 0 70%; } 100% { background-position: 0 85%; } }
@keyframes fireFlare {
  0%, 80%, 100% { filter: drop-shadow(0 0 4px rgba(255, 110, 0, .6)); }
  83% { filter: drop-shadow(0 0 7px rgba(255, 170, 0, .95)) drop-shadow(0 -2px 4px rgba(255, 60, 0, .8)); }
  86% { filter: drop-shadow(0 0 5px rgba(255, 120, 0, .75)); }
  89% { filter: drop-shadow(0 0 8px rgba(255, 200, 40, 1)) drop-shadow(0 -3px 5px rgba(255, 80, 0, .85)); }
  94% { filter: drop-shadow(0 0 5px rgba(255, 110, 0, .7)); } }
:is([data-cat-style="fire"] .cat-title:not([data-tfx]), .cat-title[data-tfx="fire"], .cs-fire) .cs-word::after {
  content: "🔥"; position: absolute; top: -.5em; right: -.78em; font-size: .64em; opacity: 0;
  -webkit-text-fill-color: initial; color: initial;   /* l'emoji garde ses couleurs (le mot, lui, est en dégradé) */
  animation: flameBurst 3.8s infinite; }
@keyframes flameBurst { 0%, 80%, 100% { opacity: 0; transform: translateY(4px) scale(.5); }
  83% { opacity: 1; transform: translateY(-2px) scale(1.2); } 86% { opacity: .55; transform: translateY(0) scale(.95); }
  89% { opacity: 1; transform: translateY(-4px) scale(1.15); } 95% { opacity: 0; transform: translateY(-8px) scale(.8); } }

:is([data-cat-style="chrome"] .cat-title:not([data-tfx]), .cat-title[data-tfx="chrome"], .cs-chrome) .cs-word {
  background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 38%, #6b7280 50%, #f3f4f6 66%, #9ca3af 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55)); }

:is([data-cat-style="glitch"] .cat-title:not([data-tfx]), .cat-title[data-tfx="glitch"], .cs-glitch) .cs-word {
  color: var(--fg); text-shadow: 2px 0 #ff00c8, -2px 0 #00e5ff; animation: glitch 3s steps(1) infinite; }
@keyframes glitch {
  0%, 84%, 100% { text-shadow: 2px 0 #ff00c8, -2px 0 #00e5ff; transform: none; }
  86% { text-shadow: -3px 0 #ff00c8, 3px 0 #00e5ff; transform: translateX(1px); }
  90% { text-shadow: 3px -1px #ff00c8, -3px 1px #00e5ff; transform: translateX(-1px) skewX(-6deg); }
  94% { text-shadow: 1px 0 #ff00c8, -1px 0 #00e5ff; transform: none; } }

:is([data-cat-style="pulse"] .cat-title:not([data-tfx]), .cat-title[data-tfx="pulse"], .cs-pulse) .cs-word {
  color: var(--fg); animation: titlePulse 1.8s ease-in-out infinite; }
@keyframes titlePulse { 0%, 100% { text-shadow: 0 0 0 transparent; } 50% { text-shadow: 0 0 7px var(--t1), 0 0 14px color-mix(in srgb, var(--t2) 75%, transparent); } }

:is([data-cat-style="wave"] .cat-title:not([data-tfx]), .cat-title[data-tfx="wave"], .cs-wave) .cs-word { color: var(--fg); }
.cs-letters .cs-l { display: inline-block; white-space: pre; animation: titleWave 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * .07s); }
@keyframes titleWave { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-3px); color: var(--t2); } }

/* --- dégradés aux couleurs fixes (la couleur de la catégorie ne les change pas) */
:is([data-cat-style="holo"] .cat-title:not([data-tfx]), .cat-title[data-tfx="holo"], .cs-holo) .cs-word {
  background: linear-gradient(110deg, #ffd6f5, #c3f0ff, #d9ffd1, #fff3c4, #e6d1ff, #ffd6f5); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(200, 220, 255, .45)); animation: titleSlide 5s linear infinite; }
:is([data-cat-style="ice"] .cat-title:not([data-tfx]), .cat-title[data-tfx="ice"], .cs-ice) .cs-word {
  background: linear-gradient(180deg, #ffffff 0%, #d6f6ff 40%, #7dd3fc 70%, #e0f2fe 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(125, 211, 252, .7)); }
:is([data-cat-style="galaxy"] .cat-title:not([data-tfx]), .cat-title[data-tfx="galaxy"], .cs-galaxy) .cs-word {
  background: radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 2px), radial-gradient(circle at 70% 60%, #fff 0 1px, transparent 2px),
    linear-gradient(90deg, #6d28d9, #db2777, #2563eb, #7c3aed, #6d28d9);
  background-size: 18px 18px, 23px 23px, 300% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 6px rgba(139, 92, 246, .6)); animation: galaxyDrift 9s linear infinite; }
@keyframes galaxyDrift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 36px 18px, -46px 23px, 300% 0; } }
:is([data-cat-style="candy"] .cat-title:not([data-tfx]), .cat-title[data-tfx="candy"], .cs-candy) .cs-word {
  background: repeating-linear-gradient(-45deg, #ff5fa2 0 6px, #ffffff 6px 12px); background-size: 34px 34px;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); animation: candyRoll 1.6s linear infinite; }
@keyframes candyRoll { from { background-position: 0 0; } to { background-position: 34px 0; } }
:is([data-cat-style="toxic"] .cat-title:not([data-tfx]), .cat-title[data-tfx="toxic"], .cs-toxic) .cs-word {
  color: #b6ff3b; text-shadow: 0 0 6px #7cff00, 0 0 14px #39ff14; animation: toxicBubble 2.4s ease-in-out infinite; }
@keyframes toxicBubble { 0%, 100% { text-shadow: 0 0 6px #7cff00, 0 0 14px #39ff14; } 50% { text-shadow: 0 0 6px #c6ff00, 0 0 12px #39ff14, 0 0 16px #00ff6a; } }

/* --- effets qui suivent la couleur choisie (ou celles du thème) */
:is([data-cat-style="bounce"] .cat-title:not([data-tfx]), .cat-title[data-tfx="bounce"], .cs-bounce) .cs-word {
  display: inline-block; color: var(--fg); animation: titleBounce 2.2s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes titleBounce { 0%, 55%, 100% { transform: none; } 20% { transform: translateY(-4px); } 35% { transform: translateY(0) scaleY(.92); } }
:is([data-cat-style="jelly"] .cat-title:not([data-tfx]), .cat-title[data-tfx="jelly"], .cs-jelly) .cs-word {
  display: inline-block; color: var(--fg); transform-origin: 50% 100%; animation: titleJelly 2.6s ease-in-out infinite; }
@keyframes titleJelly { 0%, 60%, 100% { transform: none; } 10% { transform: scale(1.08, .9); } 20% { transform: scale(.94, 1.06); } 30% { transform: scale(1.03, .97); } 40% { transform: none; } }
:is([data-cat-style="shake"] .cat-title:not([data-tfx]), .cat-title[data-tfx="shake"], .cs-shake) .cs-word {
  display: inline-block; color: var(--fg); animation: titleShake 3.5s ease-in-out infinite; }
@keyframes titleShake { 0%, 82%, 100% { transform: none; } 84% { transform: translateX(-2px) rotate(-2deg); } 87% { transform: translateX(2px) rotate(2deg); }
  90% { transform: translateX(-2px) rotate(-1deg); } 93% { transform: translateX(1px); } }
/* Foudre : lueur électrique calme, puis un éclair (flash blanc-bleu qui tremble) et un ⚡ qui frappe au coin */
:is([data-cat-style="thunder"] .cat-title:not([data-tfx]), .cat-title[data-tfx="thunder"], .cs-thunder) .cs-word {
  position: relative; color: var(--fg); text-shadow: 0 0 5px color-mix(in srgb, var(--t1) 55%, transparent); animation: thunderFlash 3.4s infinite; }
@keyframes thunderFlash {
  0%, 84%, 100% { color: var(--fg); text-shadow: 0 0 5px color-mix(in srgb, var(--t1) 55%, transparent); transform: none; }
  85% { color: #fff; text-shadow: 0 0 3px #fff, 0 0 8px #7dd3fc, 0 0 13px var(--t1); transform: translateX(.6px); }
  87% { color: var(--fg); text-shadow: none; transform: translateX(-.6px); }
  89% { color: #fff; text-shadow: 0 0 4px #fff, 0 0 10px #93c5fd, 0 0 14px var(--t1); transform: none; }
  93% { color: var(--fg); text-shadow: 0 0 6px color-mix(in srgb, var(--t1) 70%, transparent); } }
:is([data-cat-style="thunder"] .cat-title:not([data-tfx]), .cat-title[data-tfx="thunder"], .cs-thunder) .cs-word::after {
  content: "⚡"; position: absolute; top: -.5em; right: -.75em; font-size: .62em; opacity: 0; filter: drop-shadow(0 0 4px #facc15);
  animation: boltStrike 3.4s infinite; }
@keyframes boltStrike { 0%, 83%, 100% { opacity: 0; transform: translateY(-4px) scale(.6); } 85% { opacity: 1; transform: scale(1.2); }
  87% { opacity: .25; } 89% { opacity: 1; transform: scale(1); } 95% { opacity: 0; } }

.cs-pick .cs-word { font-weight: 800; }
.admin-cat-name { display: block; font-size: 17px; }

/* modifier une catégorie : aperçu du titre, couleur et palette */
.cat-preview { display: grid; place-items: center; min-height: 74px; padding: 14px; border-radius: var(--radius); background: var(--bg-2);
  border: 1px solid var(--line); overflow: hidden; }
.cat-preview-name { font-size: 24px; font-weight: 800; text-align: center; line-height: 1.25; }
.color-btn { text-align: left; }
.color-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px; padding: 12px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); animation: fadeUp .25s var(--ease) both; }
.pal { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; overflow: hidden; transition: transform .2s var(--spring); }
.pal.on { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 3px var(--accent); }
.pal-auto { background: var(--grad); }
.pal-custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); font-size: 18px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.pal-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
/* choix sélectionné : fond sombre (sur le fond blanc habituel, le néon ou le chrome seraient invisibles) */
:root .cs-pick.on { background: var(--bg-2); color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
[data-fx="low"] :is(.cat-title, .cs-pick) :is(.cs-word, .cs-l) { animation: none !important; }
[data-fx="low"] :is(.cat-title, .cs-pick) .cs-word::after { animation: none !important; }

/* bouton « Modifier ce produit » (admin) sur la fiche */
.admin-edit { margin-top: 12px; width: 100%; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.admin-edit svg { width: 17px; height: 17px; }

/* réponse de la boutique sous un avis */
.review-reply { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent); font-size: 14px; white-space: pre-line; }
.review-reply b { display: block; font-size: 12.5px; color: var(--accent-2); margin-bottom: 2px; }

/* ============================================================ tchat (salon commun) */
.chat-view { padding-bottom: calc(var(--safe-bottom) + 104px); overflow-x: hidden; }
/* fond propre à la zone tchat : posé sur le fond de la boutique (au-dessus du fond animé / de l'image, sous la page),
   tout reste lisible ; retiré en quittant le tchat */
.chat-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.chat-head { display: grid; gap: 6px; margin-bottom: 10px; }
.chat-online { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; }
.chat-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: hbPulse 2s ease-out infinite; }
.chat-pin { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 4px; padding: 8px 12px; border-radius: 12px; text-align: left;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.chat-pin svg { width: 18px; height: 18px; flex: none; color: var(--accent-2); }
.chat-pin .grow { display: grid; min-width: 0; }
.chat-list { display: flex; flex-direction: column; gap: 6px; }
.chat-empty { margin-top: 48px; }
.msg { position: relative; align-self: flex-start; max-width: 82%; min-width: 0; padding: 7px 11px 5px; border-radius: 16px 16px 16px 6px;
  background: color-mix(in srgb, var(--bg-2) 85%, #fff 8%); border: 1px solid var(--line); text-align: left; cursor: pointer; }
.msg.mine { align-self: flex-end; border-radius: 16px 16px 6px 16px; border-color: transparent; color: #fff;
  background: color-mix(in srgb, var(--accent) 78%, #000); }
.msg.adm { border-color: color-mix(in srgb, var(--accent-2) 55%, transparent); }
.msg.flash { animation: msgFlash 1.3s ease; }
@keyframes msgFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent-2); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg-nick { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 1px; }
.msg-badge { padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .03em; color: #fff; background: var(--grad); }
.msg-quote { display: grid; width: 100%; margin: 2px 0 4px; padding: 4px 8px; border-left: 3px solid var(--accent-2); border-radius: 6px;
  background: rgba(0, 0, 0, .2); text-align: left; font-size: 12.5px; color: inherit; }
.msg-quote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.38; }
.msg-text a { color: inherit; text-decoration: underline; }
.msg-time { display: block; margin-top: 1px; text-align: right; font-size: 10.5px; opacity: .6; font-variant-numeric: tabular-nums; }
.msg-preview { display: grid; gap: 4px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 14px;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-new { position: fixed; z-index: 26; left: 50%; bottom: calc(var(--safe-bottom) + 84px); transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6); }
.chat-composer { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; padding: 8px 12px calc(var(--safe-bottom) + 8px);
  background: color-mix(in srgb, var(--bg) 92%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.chat-composer > * { max-width: 536px; margin-left: auto; margin-right: auto; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
/* 16px : en dessous, l'iPhone zoome sur le champ quand on écrit (page qui déborde à droite) */
textarea.chat-input { flex: 1 1 auto; width: auto; min-width: 0; min-height: 44px; max-height: 132px; padding: 11px 15px; border-radius: 22px;
  resize: none; line-height: 1.3; font-size: 16px; }
.chat-send { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); }
.chat-send svg { width: 20px; height: 20px; }
.chat-send:disabled { opacity: .4; }
.chat-replybar { display: flex; align-items: center; gap: 8px; padding: 2px 2px 8px; font-size: 13px; }
.chat-replybar > svg { width: 18px; height: 18px; flex: none; color: var(--accent-2); }
.chat-replybar .grow { display: grid; min-width: 0; }
.chat-replybar .icon-btn { width: 34px; height: 34px; }
.chat-notice { padding: 6px 4px 8px; color: var(--muted); text-align: center; }

/* ============================================================ accessibilité */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
