/* ============================================
   ROUTE D'OR — Mega Menu CSS
   Design premium avec panneau 2 colonnes
   ============================================ */

/* ── Conteneur principal ── */
.ro-megamenu {
  position: relative;
  z-index: 500;
}

/* ── Bouton déclencheur ── */
.ro-megamenu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: var(--ro-brown, #392d24);
  color: var(--ro-beige, #ece6da);
  border: none;
  border-radius: var(--ro-radius-full, 9999px);
  font-family: var(--ro-font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
  white-space: nowrap;
  line-height: 1;
}

.ro-megamenu__trigger:hover {
  background-color: var(--ro-brown-light, #5a4a3e);
}

.ro-megamenu__trigger[aria-expanded="true"] {
  background-color: var(--ro-brown-dark, #2a1f18);
}

.ro-megamenu__trigger svg {
  flex-shrink: 0;
  transition: transform 250ms ease;
}

.ro-megamenu__trigger[aria-expanded="true"] .ro-megamenu__icon-chevron {
  transform: rotate(180deg);
}

/* ── Panneau mega menu ── */
.ro-megamenu__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 720px;
  max-width: calc(100vw - 40px);
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(57, 45, 36, 0.18), 0 4px 12px rgba(57, 45, 36, 0.08);
  border: 1px solid var(--ro-border-light, #eeebe5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 250ms ease;
  pointer-events: none;
  overflow: hidden;
}

.ro-megamenu__panel[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Container 2 colonnes ── */
.ro-megamenu__container {
  display: flex;
  min-height: 380px;
  max-height: calc(100vh - 200px);
}

/* ── Colonne gauche : catégories principales ── */
.ro-megamenu__nav {
  width: 260px;
  flex-shrink: 0;
  background-color: var(--ro-beige-light, #f5f0e8);
  border-right: 1px solid var(--ro-border-light, #eeebe5);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.ro-megamenu__list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex: 1;
}

.ro-megamenu__item {
  position: relative;
}

.ro-megamenu__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--ro-brown, #392d24);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 200ms ease;
  border-left: 3px solid transparent;
}

.ro-megamenu__link:hover,
.ro-megamenu__item.is-active .ro-megamenu__link {
  background-color: #fff;
  color: var(--ro-orange, #e28f3b);
  border-left-color: var(--ro-gold, #ffd304);
}

.ro-megamenu__cat-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.ro-megamenu__cat-name {
  flex: 1;
  line-height: 1.3;
}

.ro-megamenu__arrow {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 200ms ease;
}

.ro-megamenu__item.is-active .ro-megamenu__arrow,
.ro-megamenu__link:hover .ro-megamenu__arrow {
  opacity: 1;
}

/* Footer de la nav (lien "tout voir") */
.ro-megamenu__nav-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--ro-border-light, #eeebe5);
}

.ro-megamenu__all-link {
  display: block;
  text-align: center;
  padding: 8px 12px;
  background-color: var(--ro-gold, #ffd304);
  color: var(--ro-brown, #392d24);
  border-radius: var(--ro-radius-full, 9999px);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 200ms ease;
}

.ro-megamenu__all-link:hover {
  background-color: var(--ro-gold-dark, #e6be00);
  transform: translateY(-1px);
}

/* ── Colonne droite : sous-catégories ── */
.ro-megamenu__content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}

.ro-megamenu__subcats {
  display: none;
}

.ro-megamenu__subcats.is-active {
  display: block;
  animation: roMegaFadeIn 200ms ease;
}

@keyframes roMegaFadeIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.ro-megamenu__subcats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ro-gold, #ffd304);
}

.ro-megamenu__subcats-title {
  margin: 0;
  font-family: var(--ro-font-heading, 'Playfair Display', serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ro-brown, #392d24);
}

.ro-megamenu__subcats-title a {
  color: inherit;
  text-decoration: none;
}

.ro-megamenu__subcats-title a:hover {
  color: var(--ro-orange, #e28f3b);
}

.ro-megamenu__subcats-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--ro-orange, #e28f3b);
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms ease;
}

.ro-megamenu__subcats-all:hover {
  color: var(--ro-orange-dark, #c47a2e);
}

/* Liste des sous-catégories en grille */
.ro-megamenu__subcats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.ro-megamenu__subcat-link {
  display: block;
  padding: 9px 14px;
  color: var(--ro-brown, #392d24);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  border-radius: 8px;
  transition: all 200ms ease;
  line-height: 1.3;
}

.ro-megamenu__subcat-link:hover {
  background-color: var(--ro-beige-light, #f5f0e8);
  color: var(--ro-orange, #e28f3b);
  padding-left: 18px;
}

/* Catégorie sans sous-catégories */
.ro-megamenu__subcats-empty {
  margin: 0;
  padding: 20px 0;
}

.ro-megamenu__subcats-discover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background-color: var(--ro-beige, #ece6da);
  color: var(--ro-brown, #392d24);
  border-radius: var(--ro-radius-full, 9999px);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 200ms ease;
}

.ro-megamenu__subcats-discover:hover {
  background-color: var(--ro-gold, #ffd304);
}

/* ── Overlay ── */
.ro-megamenu__overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: all 250ms ease;
  pointer-events: none;
}

.ro-megamenu__overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── RESPONSIVE ── */

/* Tablette */
@media (max-width: 1024px) {
  .ro-megamenu__panel {
    width: 600px;
  }
  
  .ro-megamenu__nav {
    width: 220px;
  }
  
  .ro-megamenu__subcats-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile : le mega menu desktop est masqué */
@media (max-width: 768px) {
  .ro-megamenu {
    display: none;
  }
}

/* ============================================
   MENU MOBILE — Accordion catégories
   ============================================ */

.ro-mobile-nav {
  padding: 0;
}

.ro-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ro-mobile-nav__item {
  border-bottom: 1px solid var(--ro-border-light, #eeebe5);
}

.ro-mobile-nav__item:last-child {
  border-bottom: none;
}

.ro-mobile-nav__link-row {
  display: flex;
  align-items: center;
}

.ro-mobile-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 14px 16px;
  color: var(--ro-brown, #392d24);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  transition: color 200ms ease;
}

.ro-mobile-nav__link:hover {
  color: var(--ro-orange, #e28f3b);
}

.ro-mobile-nav__icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.ro-mobile-nav__name {
  flex: 1;
}

/* Bouton toggle accordion */
.ro-mobile-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ro-brown, #392d24);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 200ms ease;
  border-left: 1px solid var(--ro-border-light, #eeebe5);
}

.ro-mobile-nav__toggle:hover {
  background-color: var(--ro-beige-light, #f5f0e8);
}

.ro-mobile-nav__toggle svg {
  transition: transform 250ms ease;
}

.ro-mobile-nav__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.ro-mobile-nav__toggle[aria-expanded="true"] {
  color: var(--ro-orange, #e28f3b);
  background-color: var(--ro-beige-light, #f5f0e8);
}

/* Sous-liste (fermée par défaut) */
.ro-mobile-nav__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  background-color: var(--ro-beige-light, #f5f0e8);
  border-top: 1px solid var(--ro-border-light, #eeebe5);
}

.ro-mobile-nav__sublist[aria-hidden="false"] {
  display: block;
  animation: roMobileFadeIn 200ms ease;
}

@keyframes roMobileFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ro-mobile-nav__sublink {
  display: block;
  padding: 10px 16px 10px 50px;
  color: var(--ro-brown, #392d24);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  transition: all 200ms ease;
}

.ro-mobile-nav__sublink:hover {
  color: var(--ro-orange, #e28f3b);
  padding-left: 54px;
}

/* Lien "Tout voir" */
.ro-mobile-nav__sublink--all {
  font-weight: 600;
  color: var(--ro-orange, #e28f3b);
  font-size: 13px;
  padding-top: 8px;
  padding-bottom: 12px;
}

.ro-mobile-nav__sublink--all:hover {
  color: var(--ro-orange-dark, #c47a2e);
}
