/* ==========================================================================
   OMarket — Marketplace public · style visuel (refonte nov. 2026)
   Charte OMarket : bleu #1F3A93, orange #F57C00, vert #2ECC71,
   Montserrat (titres) / Open Sans (texte).
   Motifs : bande kente, losanges bogolan, soleil. Animations légères,
   désactivées si l'utilisateur demande moins de mouvement.
   ========================================================================== */

:root {
  --om-blue: #1F3A93;
  --om-blue-600: #1A3280;
  --om-blue-700: #14276A;
  --om-blue-800: #0F1C50;
  --om-blue-50: #E8EDF8;
  --om-orange: #F57C00;
  --om-orange-300: #FFA726;
  --om-orange-600: #E65100;
  --om-orange-50: #FFF3E0;
  --om-green: #2ECC71;
  --om-green-500: #219A52;
  --om-sand: #FBF6EE;
  --om-ink: #111827;
  --om-radius: 18px;
  --om-ease: cubic-bezier(.22, 1, .36, 1);

  /* Bande kente : bleu / orange / vert / nuit, répétée */
  --om-kente: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='12'%3E%3Crect width='24' height='12' fill='%231F3A93'/%3E%3Crect x='24' width='8' height='12' fill='%23FFA726'/%3E%3Crect x='32' width='16' height='12' fill='%2314276A'/%3E%3Crect x='48' width='8' height='12' fill='%232ECC71'/%3E%3Crect x='56' width='24' height='12' fill='%23F57C00'/%3E%3Crect x='80' width='6' height='12' fill='%230F1C50'/%3E%3Crect x='86' width='10' height='12' fill='%23FFA726'/%3E%3Cpath d='M0 6h96' stroke='%23fff' stroke-opacity='.35' stroke-width='1' stroke-dasharray='3 3'/%3E%3C/svg%3E");
  /* Losanges bogolan, traits clairs, pour fonds sombres */
  --om-bogolan: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' fill='none' stroke='%23fff' stroke-width='1.4'%3E%3Cpath d='M28 4 52 28 28 52 4 28Z'/%3E%3Cpath d='M28 16 40 28 28 40 16 28Z'/%3E%3Ccircle cx='28' cy='28' r='2.5' fill='%23fff'/%3E%3Cpath d='M0 0l8 8M56 0l-8 8M0 56l8-8M56 56l-8-8'/%3E%3C/svg%3E");
  /* Petits triangles adinkra-like pour fonds clairs */
  --om-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 9l5 9h-10z' fill='%231F3A93' fill-opacity='.07'/%3E%3C/svg%3E");
}

html { -webkit-tap-highlight-color: transparent; }
body.om-market { background: #F5F7FA; }

/* ── Éléments de motif ─────────────────────────────────────────────────── */
.om-kente { height: 8px; background: var(--om-kente) repeat-x; background-size: auto 8px; }
.om-kente--thick { height: 12px; background-size: auto 12px; }
.om-kente--move { animation: om-kente-slide 30s linear infinite; }
@keyframes om-kente-slide { to { background-position: 960px 0; } }

.om-bogolan { position: relative; isolation: isolate; }
.om-bogolan::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--om-bogolan); background-size: 56px; opacity: .08;
}
.om-dots { background-image: var(--om-dots); background-size: 28px; }
.om-sand { background-color: var(--om-sand); }

/* ── En-tête ───────────────────────────────────────────────────────────── */
.om-header { transition: box-shadow .3s var(--om-ease), background-color .3s; }
.om-header.is-scrolled { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.6) blur(12px); box-shadow: 0 6px 24px -12px rgba(15,28,80,.35); }
.om-header .om-logo { transition: height .3s var(--om-ease); }
.om-header.is-scrolled .om-logo { height: 2.25rem; }

.om-search { transition: box-shadow .25s, border-color .25s; }
.om-search:focus-within { box-shadow: 0 0 0 4px rgba(31,58,147,.15); }

/* ── Héros ─────────────────────────────────────────────────────────────── */
.om-hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 28px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(245,124,0,.28) 0%, transparent 55%),
    linear-gradient(150deg, var(--om-blue) 0%, var(--om-blue-700) 62%, var(--om-blue-800) 100%);
}
.om-hero::before { /* motif bogolan */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--om-bogolan); background-size: 64px; opacity: .07;
}
.om-sun { /* soleil orange, anneaux */
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  width: 340px; height: 340px; right: -90px; top: -110px;
  background: radial-gradient(circle, var(--om-orange-300) 0 28%, transparent 29%),
              repeating-radial-gradient(circle, rgba(255,167,38,.35) 0 2px, transparent 2px 22px);
  animation: om-spin 80s linear infinite;
}
@keyframes om-spin { to { transform: rotate(360deg); } }

.om-word { display: inline-grid; }
.om-word > span { grid-area: 1 / 1; opacity: 0; transform: translateY(.45em); transition: opacity .5s var(--om-ease), transform .5s var(--om-ease); }
.om-word > span.is-on { opacity: 1; transform: none; }

.om-float { animation: om-float 6s ease-in-out infinite; }
.om-float--2 { animation-delay: -2s; }
.om-float--3 { animation-delay: -4s; }
@keyframes om-float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--r, 0deg)); } }

.om-hero-card {
  background: rgba(255,255,255,.96); color: var(--om-ink); border-radius: 18px;
  box-shadow: 0 24px 48px -16px rgba(6,12,40,.55);
}

/* ── Bandeau défilant (marquee) ────────────────────────────────────────── */
.om-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.om-marquee__track { display: flex; gap: 2.5rem; width: max-content; animation: om-marquee 36s linear infinite; }
.om-marquee:hover .om-marquee__track { animation-play-state: paused; }
@keyframes om-marquee { to { transform: translateX(-50%); } }

/* ── Catégories ────────────────────────────────────────────────────────── */
.om-cat {
  display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center;
  padding: 1rem .5rem; border-radius: var(--om-radius); background: #fff; border: 1px solid #E5E9F2;
  transition: transform .35s var(--om-ease), box-shadow .35s var(--om-ease), border-color .25s;
}
.om-cat:hover { transform: translateY(-4px); border-color: var(--om-blue); box-shadow: 0 14px 28px -18px rgba(31,58,147,.6); }
.om-cat__icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; position: relative;
  transition: transform .45s var(--om-ease);
}
.om-cat__icon::after { /* anneau pointillé façon perles */
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px dotted currentColor; opacity: .35;
}
.om-cat:hover .om-cat__icon { transform: rotate(-8deg) scale(1.06); }

/* ── Cartes produit ────────────────────────────────────────────────────── */
.om-card {
  position: relative; background: #fff; border-radius: var(--om-radius); overflow: hidden;
  border: 1px solid #E5E9F2; display: flex; flex-direction: column;
  transition: transform .4s var(--om-ease), box-shadow .4s var(--om-ease);
}
.om-card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -22px rgba(15,28,80,.45); }
.om-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #EEF1F6; }
.om-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--om-ease), opacity .4s; }
.om-card:hover .om-card__media img { transform: scale(1.07); }
.om-card__media::after { /* liseré kente en bas de la photo */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: var(--om-kente) repeat-x; background-size: auto 5px; transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--om-ease);
}
.om-card:hover .om-card__media::after { transform: scaleX(1); }
.om-card__cta {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 12px; padding: .7rem; font-weight: 600; font-size: .875rem;
  background: var(--om-blue-50); color: var(--om-blue-700);
  transition: background-color .25s, color .25s, transform .15s;
}
.om-card:hover .om-card__cta { background: var(--om-blue); color: #fff; }
.om-card__cta:active { transform: scale(.97); }

/* Image : apparition douce + reflet de chargement */
.om-img-load { background: linear-gradient(100deg, #EEF1F6 30%, #F7F9FC 50%, #EEF1F6 70%); background-size: 200% 100%; animation: om-shimmer 1.4s linear infinite; }
.om-img-load img { opacity: 0; }
.om-img-load.is-loaded { animation: none; background: #EEF1F6; }
.om-img-load.is-loaded img { opacity: 1; }
@keyframes om-shimmer { to { background-position: -200% 0; } }

/* Badges */
.om-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .3rem .6rem; border-radius: 999px; }
.om-badge--cod { background: var(--om-orange-50); color: #7F2400; }
.om-badge--cod .om-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--om-orange); box-shadow: 0 0 0 0 rgba(245,124,0,.6); animation: om-pulse 2.2s infinite; }
@keyframes om-pulse { 70% { box-shadow: 0 0 0 7px rgba(245,124,0,0); } 100% { box-shadow: 0 0 0 0 rgba(245,124,0,0); } }
.om-badge--momo { background: var(--om-blue-50); color: var(--om-blue-700); }

/* ── Boutons ───────────────────────────────────────────────────────────── */
.om-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 600; border-radius: 14px; transition: transform .15s, box-shadow .25s, background-color .25s; }
.om-btn:active { transform: scale(.97); }
.om-btn--gold { background: var(--om-orange); color: var(--om-blue-800); box-shadow: 0 10px 24px -10px rgba(245,124,0,.8); }
.om-btn--gold:hover { background: var(--om-orange-300); }
.om-btn--blue { background: var(--om-blue); color: #fff; box-shadow: 0 10px 24px -12px rgba(31,58,147,.8); }
.om-btn--blue:hover { background: var(--om-blue-600); }
.om-btn--ghost { border: 1.5px solid rgba(255,255,255,.55); color: #fff; }
.om-btn--ghost:hover { background: rgba(255,255,255,.1); }
.om-btn .om-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: om-ripple .6s linear; pointer-events: none; }
@keyframes om-ripple { to { transform: scale(4); opacity: 0; } }
.om-btn--shine::after { /* reflet qui traverse le bouton */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  animation: om-shine 4.5s ease-in-out infinite 1.5s;
}
@keyframes om-shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ── Titres de section ─────────────────────────────────────────────────── */
.om-title { position: relative; display: inline-block; padding-bottom: .55rem; }
.om-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 6px; border-radius: 3px; background: var(--om-kente) repeat-x; background-size: auto 6px; }

/* ── Étapes « Comment ça marche » ──────────────────────────────────────── */
.om-step__num {
  width: 52px; height: 52px; display: grid; place-items: center; font-family: Montserrat, sans-serif; font-weight: 800;
  color: #fff; background: var(--om-blue); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); /* losange */
}
.om-step:nth-child(2) .om-step__num { background: var(--om-orange); color: var(--om-blue-800); }
.om-step:nth-child(3) .om-step__num { background: var(--om-green-500); }
.om-step:nth-child(4) .om-step__num { background: var(--om-blue-800); }
.om-steps { position: relative; }
@media (min-width: 1024px) {
  .om-steps::before { content: ""; position: absolute; top: 26px; left: 52px; right: 12%; border-top: 2px dashed #C5D0ED; }
}

/* ── Apparition au défilement ──────────────────────────────────────────── */
.om-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--om-ease), transform .7s var(--om-ease); transition-delay: var(--d, 0s); }
.om-reveal.is-visible { opacity: 1; transform: none; }
.no-js .om-reveal { opacity: 1; transform: none; }

/* ── Barre de navigation mobile ────────────────────────────────────────── */
.om-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-top: 1px solid #E5E9F2; padding-bottom: env(safe-area-inset-bottom); }
.om-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: #4B5563; padding: 8px 0 7px; min-height: 52px; justify-content: center; }
.om-tabbar a.is-active { color: var(--om-blue); }
.om-tabbar a.is-active svg { transform: translateY(-1px); }
.om-tabbar a.is-active::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--om-orange); position: absolute; top: 0; }
.om-tabbar a { position: relative; }
@media (min-width: 768px) { .om-tabbar { display: none; } }
@media (max-width: 767px) { body.om-market { padding-bottom: 64px; } }

/* ── Divers ────────────────────────────────────────────────────────────── */
.om-shop-card { transition: transform .4s var(--om-ease), box-shadow .4s var(--om-ease); }
.om-shop-card:hover { transform: translateY(-5px) rotate(-.3deg); box-shadow: 0 20px 36px -22px rgba(15,28,80,.5); }
.om-chip { transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.om-chip:hover { transform: translateY(-2px); }
.om-count { font-variant-numeric: tabular-nums; }
.om-toast-in { animation: om-toast .5s var(--om-ease) both; }
@keyframes om-toast { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.om-check-pop { animation: om-pop .6s var(--om-ease) both; }
@keyframes om-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.om-confetti span { position: absolute; width: 8px; height: 14px; top: -10px; border-radius: 2px; animation: om-fall 1.6s ease-in forwards; }
@keyframes om-fall { to { transform: translateY(240px) rotate(540deg); opacity: 0; } }

:focus-visible { outline: 3px solid var(--om-orange); outline-offset: 2px; border-radius: 6px; }

/* Moins de mouvement : tout est affiché, rien ne bouge */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .om-reveal { opacity: 1; transform: none; }
  .om-marquee__track { animation: none; }
}
