/* ═══════════════════════════════════════
   RF MEGA MENU v4 — CSS Front
   ═══════════════════════════════════════ */

/* ── Wrapper Astra pleine largeur ── */
/* position:fixed = toujours calé sur le viewport, sans dépendre d'aucun offsetParent */
.astra-full-megamenu-wrapper,
.astra-mega-menu-width-full {
  position: fixed !important;
  left: 0 !important;
  top: auto;
  width: 100vw !important;
  right: auto !important;
  margin: 0 !important;
  transform: none !important;
  box-sizing: border-box;
  z-index: 9999;
  /* top est calculé dynamiquement par rf-mega-menu-front.js */
}
.astra-full-megamenu-wrapper .ast-mm-custom-content,
.astra-full-megamenu-wrapper .ast-mm-template-content {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: #fff;
  padding: 0;
}

/* ── Conteneur global ── */
.rf-mega {
  width: 100%;
  background: #fff;
}
.rf-mega-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px 1fr;
}

/* ═══ RAIL GAUCHE ═══ */
.rf-rail {
  background: #F9F1EE;
  border-right: 1px solid rgba(139,69,90,.10);
  padding: 24px 0 20px;
  display: flex;
  flex-direction: column;
}
.rf-rail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: #bbb;
  padding: 0 18px 14px;
}
.rf-rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .18s ease;
  position: relative;
}
.rf-rail-item:hover { background: rgba(193,82,110,.05); }
.rf-rail-item.is-on  { background: #fff; border-left-color: #C1526E; }
.rf-rail-item.is-on::after {
  content: '';
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-right-color: #fff;
}
.rf-rail-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  transition: transform .18s;
}
.rf-rail-item:hover .rf-rail-icon,
.rf-rail-item.is-on  .rf-rail-icon { transform: scale(1.1); }
/* Couleurs d'icônes par panneau — override possible via admin */
.rf-icon-decorer  { background: #FFF0E6; }
.rf-icon-seduire  { background: #FFE8EF; }
.rf-icon-amuser   { background: #EEF0FF; }
.rf-icon-bienetre { background: #E8F5E8; }
/* Fallback pour les panneaux personnalisés */
.rf-rail-icon:not([class*='rf-icon-']) { background: #f0e8ef; }

.rf-rail-text { flex: 1; min-width: 0; }
.rf-rail-title {
  font-size: 13.5px; font-weight: 600;
  color: #2a1a1f; line-height: 1.2;
  transition: color .15s;
}
.rf-rail-item.is-on  .rf-rail-title,
.rf-rail-item:hover .rf-rail-title { color: #C1526E; }
.rf-rail-sub {
  font-size: 11px; color: #aaa;
  margin-top: 2px; line-height: 1.3;
}
.rf-rail-arr {
  font-size: 13px; color: #ccc;
  opacity: 0; transform: translateX(-3px);
  transition: all .18s;
}
.rf-rail-item.is-on  .rf-rail-arr,
.rf-rail-item:hover .rf-rail-arr { opacity: 1; transform: none; }

.rf-rail-sep { height: 1px; background: rgba(139,69,90,.10); margin: 12px 18px; }

.rf-rail-cta {
  display: block;
  margin: 10px 14px 0;
  background: linear-gradient(135deg, #8B455A, #C1526E);
  border-radius: 11px; padding: 13px 15px;
  cursor: pointer; text-decoration: none;
  transition: transform .18s, box-shadow .18s;
}
.rf-rail-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(193,82,110,.28); }
.rf-rail-cta-title { font-size: 13.5px; color: #fff; font-style: italic; }
.rf-rail-cta-sub   { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 3px; }

/* ═══ PANNEAUX ═══ */
.rf-panels { flex: 1; overflow: hidden; }
.rf-panel  { display: none; }
.rf-panel.is-on {
  display: grid;
  grid-template-columns: 1fr 280px;
  animation: rfPanelIn .2s ease;
}
@keyframes rfPanelIn {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Zone navigation ── */
.rf-panel-nav {
  padding: 28px 32px 22px;
  border-right: 1px solid rgba(139,69,90,.10);
  display: flex; flex-direction: column; justify-content: space-between;
}
.rf-nav-cols {
  display: grid;
  grid-template-columns: repeat(var(--rf-ncols, 2), minmax(130px, 1fr));
  gap: 28px;
}
.rf-nav-col h4 {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: #aaa;
  margin: 0 0 14px; padding: 0 0 8px;
  border-bottom: 1px solid rgba(139,69,90,.10);
}
/* Titre de colonne cliquable */
.rf-nav-col-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .15s;
}
.rf-nav-col-link:hover { color: #C1526E; }
.rf-nav-col-arrow {
  font-size: 11px; opacity: 0;
  transform: translateX(-3px);
  transition: all .15s;
  display: inline-block;
}
.rf-nav-col-link:hover .rf-nav-col-arrow { opacity: 1; transform: none; }
.rf-nav-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rf-nav-links li a {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
  padding: 8px 10px; border-radius: 8px;
  font-size: 14px; color: #3a2a30; font-weight: 400;
  line-height: 1.3; transition: all .15s;
}
.rf-nav-links li a:hover {
  background: #f7e8ef;
  color: #C1526E;
  padding-left: 16px;
}
.rf-nav-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: #C1526E; flex-shrink: 0;
  opacity: 0; transition: opacity .15s;
}
.rf-nav-links li a:hover .rf-nav-dot { opacity: 1; }

/* ── Bloc inspiration avec cartes photos ── */
.rf-inspi-bar {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid rgba(139,69,90,.10);
}
.rf-inspi-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.rf-inspi-bar-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: #bbb;
}
.rf-inspi-more {
  font-size: 12px; color: #C1526E;
  text-decoration: none; font-weight: 600;
  white-space: nowrap; transition: letter-spacing .15s;
}
.rf-inspi-more:hover { letter-spacing: .02em; }
.rf-inspi-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rf-inspi-card {
  display: block; text-decoration: none;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(139,69,90,.10);
  background: #fff;
  transition: all .18s; cursor: pointer;
}
.rf-inspi-card:hover {
  border-color: #C1526E;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}
.rf-inspi-card-img {
  height: 90px; overflow: hidden;
  background: #f5eef0;
}
.rf-inspi-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .25s;
}
.rf-inspi-card:hover .rf-inspi-card-img img { transform: scale(1.06); }
.rf-inspi-card-img-ph { width: 100%; height: 100%; background: linear-gradient(135deg,#f9e4ee,#f0d0e0); }
.rf-inspi-card-body { padding: 8px 10px 10px; }
.rf-inspi-card-cat {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: #C1526E; margin-bottom: 3px;
}
.rf-inspi-card-title {
  font-size: 12px; font-weight: 600;
  color: #2a1a1f; line-height: 1.35; margin: 0;
}

/* ── Colonne produit ── */
.rf-panel-product {
  padding: 20px 18px;
  background: #fdfbfa;
  display: flex; flex-direction: column; gap: 10px;
}

/* Carte héro (photo éditoriale pleine) */
.rf-card-hero {
  border-radius: 14px; overflow: hidden;
  flex-shrink: 0;
  transition: transform .18s, box-shadow .18s;
}
.rf-card-hero:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.rf-card-hero-link { display: block; text-decoration: none; color: inherit; }
.rf-card-hero-img {
  position: relative; overflow: hidden;
  height: 200px;
}
.rf-card-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.rf-card-hero:hover .rf-card-hero-img img { transform: scale(1.04); }
.rf-card-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30,10,20,.72) 0%, rgba(30,10,20,.08) 55%, transparent 100%);
}
.rf-card-hero-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
}
.rf-card-hero-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  background: #B8956A; color: #fff;
  padding: 3px 9px; border-radius: 999px;
  margin-bottom: 6px;
}
.rf-card-hero-title {
  font-size: 13.5px; font-weight: 600;
  color: #fff; line-height: 1.3;
  font-style: italic;
  margin: 0;
}
.rf-card-hero-price {
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,.92);
  margin: 5px 0 0;
}

/* Deux mini cartes produit */
.rf-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rf-card-mini {
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(139,69,90,.12);
  background: #fff; cursor: pointer;
  transition: all .15s;
}
.rf-card-mini:hover {
  border-color: #C1526E;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(193,82,110,.14);
}
.rf-card-mini a { display: block; text-decoration: none; color: inherit; }
.rf-card-mini-img {
  height: 70px; overflow: hidden;
  background: #f9f1ee;
}
.rf-card-mini-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .25s;
}
.rf-card-mini:hover .rf-card-mini-img img { transform: scale(1.06); }
.rf-card-mini-body { padding: 8px 10px 10px; }
.rf-card-mini-name {
  font-size: 11px; font-weight: 600;
  color: #2a1a1f; line-height: 1.3; margin: 0;
}
.rf-card-mini-price {
  font-size: 12px; font-weight: 700;
  color: #C1526E; margin: 3px 0 0;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
  .rf-mega-grid { grid-template-columns: 190px 1fr; }
  .rf-panel.is-on { grid-template-columns: 1fr 240px; }
}
@media (max-width: 992px) {
  .astra-full-megamenu-wrapper .ast-mm-custom-content { padding: 0; }
  /* Mobile : empilé, colonne produit masquée */
  .rf-mega-grid { grid-template-columns: 1fr; }
  .rf-panel.is-on { grid-template-columns: 1fr; }
  .rf-panel-product { display: none; }
  .rf-nav-cols { grid-template-columns: 1fr 1fr !important; }

  /* Drawer Astra mobile */
  .ast-mobile-popup-inner .rf-mega-grid {
    position: relative;
    display: block;
    min-height: calc(100dvh - 120px);
  }
  .ast-mobile-popup-inner .rf-rail {
    border-right: 0;
    border-bottom: 1px solid rgba(139,69,90,.12);
    padding: 12px 0;
  }
  .ast-mobile-popup-inner .rf-panels {
    position: absolute; inset: 0;
    background: #fff;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: block !important;
    overflow-y: auto;
  }
  .ast-mobile-popup-inner .rf-mega.is-subopen .rf-panels { transform: translateX(0); }
  .rf-mm-back {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; gap: 10px;
    padding: 12px; border-bottom: 1px solid #eee; background: #fff;
    font-weight: 700; font-size: 16px;
  }
  .rf-mm-back button {
    border: 1px solid #eee; background: #f7f7f7;
    border-radius: 999px; padding: 8px 12px;
    font-size: 14px; cursor: pointer;
  }
}
@media (max-width: 640px) {
  .rf-nav-cols { grid-template-columns: 1fr !important; }
  .rf-inspi-chips { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-panel.is-on { animation: none; }
  .ast-mobile-popup-inner .rf-panels { transition: none; }
}