/* Jida Market : menu desktop custom v2 (charte : vert #254636, corail #F0704A) */

:root {
  --jm2-cream: #FDF6EE;
  --jm2-cream-deep: #FAE9D7;
  --jm2-green: #254636;
  --jm2-green-deep: #1B3528;
  --jm2-green-soft: #EBF1EC;
  --jm2-orange: #F0704A;
  --jm2-orange-deep: #E05A34;
  --jm2-ink: #22312A;
  --jm2-muted: #7A8078;
  --jm2-line: #EBDFD2;
}

/* Le menu custom ne concerne que le desktop */
@media (max-width: 1024px) {
  #jm2-panels { display: none !important; }
}

/* --- barre de navigation --- */
.jm2-nav { display: flex; flex-wrap: nowrap; gap: 0; align-items: center; list-style: none; margin: 0; padding: 0; }
.jm2-nav .jm2-item { margin: 0; list-style: none; }
.jm2-nav .jm2-item::marker { content: ""; }
.jm2-nav .jm2-toggle,
.jm2-nav .jm2-item > a {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 14.5px; color: var(--jm2-green);
  padding: 8px 10px; border-radius: 8px; position: relative; display: inline-block;
  text-decoration: none; line-height: 1.4; white-space: nowrap;
}
.jm2-nav .jm2-pill > a {
  background: var(--jm2-green) !important; color: #F3EFE6 !important; padding: 8px 14px; margin-left: 6px;
}
.jm2-nav .jm2-pill > a:hover,
.jm2-nav .jm2-pill > a:focus,
.jm2-nav .jm2-pill > a:active {
  background: var(--jm2-green-deep) !important; color: #F3EFE6 !important;
}
.jm2-nav .jm2-toggle:hover,
.jm2-nav .jm2-item > a:hover { background: var(--jm2-cream-deep); color: var(--jm2-green); }
.jm2-nav .jm2-toggle[aria-expanded="true"] { background: var(--jm2-cream-deep); }
.jm2-nav .jm2-toggle[aria-expanded="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 3px; border-radius: 2px 2px 0 0; background: var(--jm2-orange);
}
.jm2-nav .jm2-hot > a, .jm2-nav .jm2-hot > .jm2-toggle { color: var(--jm2-orange-deep); }
.jm2-nav .jm2-toggle:focus-visible,
.jm2-nav .jm2-item > a:focus-visible { outline: 2px solid var(--jm2-orange); outline-offset: 2px; }
.jm2-car { font-size: 10px; margin-left: 5px; opacity: .55; }

/* --- panneaux --- */
.jm2-panel {
  position: fixed; left: 0; right: 0; z-index: 9990;
  background: #FFFFFF; border-bottom: 1px solid var(--jm2-line);
  box-shadow: 0 24px 40px -24px rgba(37, 70, 54, .4);
  animation: jm2-slide .18s ease-out;
}
@keyframes jm2-slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jm2-panel { animation: none; } }

.jm2-panel-inner {
  max-width: 1320px; margin: 0 auto; padding: 24px 24px 0;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px;
}
.jm2-mode-mega .jm2-panel-inner { grid-template-columns: 250px minmax(0, 1fr) 230px; }
.jm2-mode-drop .jm2-panel-inner { max-width: 900px; }

/* rubriques : groupes cote a cote */
.jm2-rubs { display: flex; gap: 26px; align-items: flex-start; }
.jm2-rubgroup { min-width: 190px; max-width: 240px; }
.jm2-panel .jm2-rubs h3.jm2-rubtitle {
  font-size: 11px !important; line-height: 1.4 !important;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--jm2-muted) !important; margin: 0 0 8px 8px !important;
  padding: 0 !important; font-weight: 700 !important; font-family: inherit !important;
}
.jm2-rubgroup ul + .jm2-rubtitle,
.jm2-panel .jm2-rubs .jm2-guides ~ *,
.jm2-rubgroup h3.jm2-rubtitle:not(:first-child) { margin-top: 18px !important; }
.jm2-rubs ul { list-style: none; margin: 0; padding: 0; }
.jm2-rubs li { margin: 1px 0; }
.jm2-rub {
  appearance: none; background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--jm2-ink); font-weight: 500; font-size: 14.5px; padding: 7px 10px; border-radius: 8px;
  display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left;
}
.jm2-rub:hover { background: var(--jm2-green-soft); color: var(--jm2-green); }
.jm2-rub.jm2-sel { background: var(--jm2-green); color: #F3EFE6; font-weight: 600; }
.jm2-rub .jm2-c { font-size: 11px; color: var(--jm2-muted); margin-left: auto; }
.jm2-rub.jm2-sel .jm2-c { color: #C9D8CC; }
.jm2-guides a { color: var(--jm2-orange-deep); font-weight: 600; text-decoration: none; display: block; padding: 6px 10px; font-size: 14px; }
.jm2-guides a:hover { text-decoration: underline; }

/* vitrine produits */
.jm2-cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; max-height: 380px; overflow-y: auto; padding: 2px;
}
.jm2-mode-drop .jm2-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jm2-pcard {
  background: var(--jm2-cream); border: 1px solid var(--jm2-line); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative;
  text-decoration: none; color: var(--jm2-ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.jm2-pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 18px -12px rgba(37,70,54,.45); color: var(--jm2-ink); }
@media (prefers-reduced-motion: reduce) { .jm2-pcard, .jm2-pcard:hover { transition: none; transform: none; } }
.jm2-pimg img {
  width: 100%; height: 92px; object-fit: contain; border-radius: 8px; display: block;
  mix-blend-mode: multiply;
}
.jm2-bdg {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 4px; padding: 2px 6px;
}
.jm2-bdg-best { background: var(--jm2-green); color: #F3EFE6; }
.jm2-bdg-promo { background: var(--jm2-orange); color: #FFF; }
.jm2-pn { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.jm2-stars { display: flex; gap: 4px; align-items: baseline; }
.jm2-stars-i { color: #F5A623; font-size: 12px; }
.jm2-stars-v { font-weight: 700; font-size: 12px; color: var(--jm2-ink); }
.jm2-stars-n { color: var(--jm2-muted); font-size: 11px; }
.jm2-pp { margin-top: auto; font-weight: 700; color: var(--jm2-green); font-size: 13px; }
.jm2-pp del { color: var(--jm2-muted); font-weight: 400; font-size: 11px; margin-right: 5px; }
.jm2-pp ins { text-decoration: none; }
.jm2-voirtout {
  display: inline-block; margin: 10px 0 2px; color: var(--jm2-orange-deep);
  font-weight: 700; font-size: 13px; text-decoration: none;
}
.jm2-voirtout:hover { text-decoration: underline; color: var(--jm2-orange-deep); }

/* carte vedette */
.jm2-feature {
  background: linear-gradient(160deg, var(--jm2-green) 0%, var(--jm2-green-deep) 100%);
  color: #F3EFE6; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 5px; align-self: start; text-decoration: none;
}
.jm2-feature:hover { color: #F3EFE6; }
.jm2-f-eyebrow { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: #FFC9B5; font-weight: 700; }
.jm2-f-img img { width: 100%; height: 110px; object-fit: contain; border-radius: 10px; background: #FFFFFF; padding: 6px; margin: 8px 0 4px; display: block; box-sizing: border-box; }
.jm2-f-name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.jm2-f-price { color: #F3EFE6; font-weight: 700; font-size: 14px; }
.jm2-f-price del { color: #9DB3A3; font-weight: 400; }
.jm2-f-price ins { text-decoration: none; }
/* prix par role (YITH) sur fond vert : Standard en clair, Adherent en corail */
.jm2-feature .ywcrbp_regular_price,
.jm2-feature .ywcrbp_regular_price .amount,
.jm2-feature .ywcrbp_regular_price bdi { color: #C9D8CC !important; }
.jm2-feature .ywcrbp_their_price,
.jm2-feature .ywcrbp_their_price .amount,
.jm2-feature .ywcrbp_their_price bdi { color: #FFC9B5 !important; }
.jm2-feature .ywcrbp_regular_price,
.jm2-feature .ywcrbp_their_price { display: block; }
.jm2-f-cta {
  margin-top: 10px; background: var(--jm2-orange); color: #FFF; border-radius: 8px;
  text-align: center; font-weight: 700; font-size: 13px; padding: 9px;
}
.jm2-feature:hover .jm2-f-cta { background: var(--jm2-orange-deep); }

/* bandeau univers + guides : mini-bannières */
.jm2-band {
  max-width: 1320px; margin: 14px auto 0; padding: 14px 24px 4px;
  border-top: 1px dashed var(--jm2-line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px;
}
.jm2-tile {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--jm2-ink);
  background: var(--jm2-cream); border: 1px solid var(--jm2-line); border-radius: 12px;
  padding: 11px 34px 11px 13px; position: relative; overflow: hidden;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.jm2-tile::after {
  content: "→"; position: absolute; right: 14px; color: var(--jm2-orange-deep);
  opacity: 0; transition: opacity .15s ease, transform .15s ease; transform: translateX(-4px);
}
.jm2-tile:hover {
  border-color: var(--jm2-green); transform: translateY(-2px);
  box-shadow: 0 10px 16px -12px rgba(37,70,54,.45); color: var(--jm2-ink);
}
.jm2-tile:hover::after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .jm2-tile, .jm2-tile:hover { transition: none; transform: none; } }
.jm2-tile-t b { display: block; font-size: 13.5px; line-height: 1.25; font-weight: 700; }
.jm2-tile-t small { color: var(--jm2-muted); font-size: 11.5px; }
.jm2-tile-guide { background: var(--jm2-green); border-color: var(--jm2-green); color: #F3EFE6; }
.jm2-tile-guide:hover { color: #F3EFE6; border-color: var(--jm2-green); }
.jm2-tile-guide .jm2-tile-t small { color: #C9D8CC; }
.jm2-tile-guide::after { color: #FFC9B5; }
.jm2-chip-img { flex: none; }
.jm2-chip-img img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block;
  background: #FFF; border: 1px solid var(--jm2-line);
}
.jm2-tile-guide .jm2-chip-img img { border: none; }
.jm2-chip-emoji {
  width: 46px; height: 46px; border-radius: 50%; background: var(--jm2-cream-deep);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.jm2-tile-guide .jm2-chip-emoji { background: var(--jm2-green-deep); }

/* bandeau reassurance */
.jm2-reassure {
  border-top: 1px solid var(--jm2-line); margin-top: 20px;
  display: flex; gap: 30px; justify-content: center; flex-wrap: wrap;
  padding: 12px 24px; font-size: 12.5px; color: var(--jm2-muted);
}
.jm2-reassure b { color: var(--jm2-green); font-weight: 600; }
/* note sur fond vert de la carte vedette */
.jm2-feature .jm2-stars-v { color: #F3EFE6; }
.jm2-feature .jm2-stars-n { color: #C9D8CC; }
