/*
 * Borel Royal — Menu de navigation
 * Charte : bordeaux + vert + blanc (identique au site). Typographie Poppins
 * (heritee du site ; fallback rond si absente). Toutes les classes sont
 * prefixees "brvtc-" et les variables scopees sur .brvtc-header : zero conflit.
 */

.brvtc-header,
.brvtc-header *,
.brvtc-header *::before,
.brvtc-header *::after {
  box-sizing: border-box;
}

.brvtc-header {
  /* Palette Borel Royal */
  --brvtc-wine: #5c0f1a;
  --brvtc-wine-2: #470b12;
  --brvtc-green: #84bd3f;
  --brvtc-green-2: #6a9e2c;
  --brvtc-rose: #f7ebed;
  --brvtc-ink: #2f2b2c;
  --brvtc-muted: #8a8082;
  --brvtc-line: #eee7e8;
  --brvtc-paper: #ffffff;

  --brvtc-font: "Poppins", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --brvtc-maxw: 1280px;

  position: sticky;
  top: 0;
  z-index: 99990;
  width: 100%;
  background: var(--brvtc-paper);
  color: var(--brvtc-ink);
  font-family: var(--brvtc-font);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 1px 0 var(--brvtc-line);
}

.brvtc-header a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Bandeau haut (bordeaux) ---------- */
.brvtc-topbar {
  background: var(--brvtc-wine);
  color: #fff;
}
.brvtc-topbar__inner {
  max-width: var(--brvtc-maxw);
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brvtc-topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff !important;
}
.brvtc-topbar__phone svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  flex: none;
}
.brvtc-socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.brvtc-social {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  opacity: 0.9;
  transition: background 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}
.brvtc-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.brvtc-social:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
  transform: translateY(-1px);
}

/* ---------- Barre principale (blanche) ---------- */
.brvtc-bar {
  position: relative;
  max-width: var(--brvtc-maxw);
  margin: 0 auto;
  min-height: 78px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

/* Marque */
.brvtc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brvtc-brand__img {
  display: block;
  height: 52px !important;
  width: auto !important;
  max-width: 210px;
}
.brvtc-brand__logo {
  font-size: 34px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--brvtc-green);
  letter-spacing: -0.01em;
}
.brvtc-brand__sub {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brvtc-muted);
  font-weight: 600;
}

/* Navigation */
.brvtc-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 14px;
  padding: 0;
  list-style: none;
}
.brvtc-nav__item {
  position: static;
}
.brvtc-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  margin: 0 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--brvtc-wine) !important;
  background: none !important;
  border: 0;
  border-radius: 0 !important;
  cursor: pointer;
  transition: color 0.18s ease;
}
/* Au survol : aucun fond, on garde seulement le soulignement vert (::after). */
.brvtc-nav__link:hover,
.brvtc-nav__link:focus {
  color: var(--brvtc-wine-2) !important;
  background: none !important;
}
.brvtc-nav__link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: var(--brvtc-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.brvtc-nav__item:hover .brvtc-nav__link::after,
.brvtc-nav__item.is-open .brvtc-nav__link::after,
.brvtc-nav__link:focus-visible::after {
  transform: scaleX(1);
}
.brvtc-caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
  flex: none;
}
.brvtc-nav__item:hover .brvtc-caret,
.brvtc-nav__item.is-open .brvtc-caret {
  transform: rotate(-135deg) translateY(-2px);
}

/* ---------- Actions ---------- */
.brvtc-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex: none;
}
.brvtc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.brvtc-btn--primary,
.brvtc-btn--primary:hover,
.brvtc-btn--primary:focus {
  color: #fff !important;
  background: var(--brvtc-wine) !important;
  border: 1px solid var(--brvtc-wine);
  box-shadow: 0 8px 20px rgba(92, 15, 26, 0.22);
}
.brvtc-btn--primary:hover {
  background: var(--brvtc-wine-2) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(92, 15, 26, 0.3);
}
.brvtc-btn--ghost {
  color: var(--brvtc-wine) !important;
  background: transparent !important;
  border: 1.5px solid #e3d3d6;
}
.brvtc-btn--ghost:hover {
  border-color: var(--brvtc-wine);
  background: var(--brvtc-rose) !important;
}

/* ---------- Méga-menu ---------- */
.brvtc-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 24px;
  right: 24px;
  background: var(--brvtc-paper);
  border-radius: 18px;
  border: 1px solid var(--brvtc-line);
  border-top: 3px solid var(--brvtc-wine);
  box-shadow: 0 30px 70px rgba(47, 20, 24, 0.16);
  padding: 30px 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 30;
}
.brvtc-panel::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.brvtc-nav__item:hover > .brvtc-panel,
.brvtc-nav__item.is-open > .brvtc-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.brvtc-mega {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 34px;
}
.brvtc-mega__aside {
  border-left: 1px solid var(--brvtc-line);
  padding-left: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Libellé de section */
.brvtc-mega__label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brvtc-green-2);
  margin-bottom: 16px;
}
.brvtc-mega__label svg {
  width: 17px;
  height: 17px;
  fill: var(--brvtc-green);
  flex: none;
}

/* Liste de liens */
.brvtc-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
}
.brvtc-links--single {
  grid-template-columns: 1fr;
}
.brvtc-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--brvtc-ink) !important;
  background: none !important;
  transition: background 0.16s ease, color 0.16s ease;
}
.brvtc-link svg {
  width: 15px;
  height: 15px;
  stroke: var(--brvtc-green);
  fill: none;
  stroke-width: 2.4;
  flex: none;
  transition: transform 0.16s ease;
}
.brvtc-link:hover {
  background: var(--brvtc-rose) !important;
  color: var(--brvtc-wine) !important;
}
.brvtc-link:hover svg {
  transform: translateX(3px);
}

/* Carte promo */
.brvtc-promo {
  margin-top: auto;
  background: var(--brvtc-wine);
  color: #fff;
  border-radius: 16px;
  padding: 22px 22px 24px;
}
.brvtc-promo__title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
}
.brvtc-promo__text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 16px;
  line-height: 1.5;
}
.brvtc-promo__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--brvtc-green) !important;
  color: #23340f !important;
  font-weight: 700;
  font-size: 14.5px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.brvtc-promo__btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6;
}
.brvtc-promo__btn:hover {
  background: #93cc4c;
  transform: translateX(2px);
}

/* ---------- Hamburger / mobile ---------- */
.brvtc-burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1.5px solid #e3d3d6;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
  flex: none;
}
.brvtc-burger span {
  display: block;
  width: 21px;
  height: 2px;
  background: var(--brvtc-wine);
  margin: 4px auto;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.brvtc-header.is-menu-open .brvtc-burger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.brvtc-header.is-menu-open .brvtc-burger span:nth-child(2) {
  opacity: 0;
}
.brvtc-header.is-menu-open .brvtc-burger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
/* Le voile n'est pas utilise (le menu mobile se deroule depuis le haut). */
.brvtc-scrim {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  /* Menu mobile : panneau plein-largeur qui se deroule SOUS la barre
     (pas de sidebar laterale). */
  .brvtc-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brvtc-paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 4px 16px 16px;
    border-top: 1px solid var(--brvtc-line);
    box-shadow: 0 26px 50px rgba(47, 20, 24, 0.16);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.34s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.34s;
    z-index: 99992;
  }
  .brvtc-header.is-menu-open .brvtc-nav {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }
  .brvtc-nav__item {
    border-bottom: 1px solid var(--brvtc-line);
  }
  .brvtc-nav__link {
    width: 100%;
    justify-content: space-between;
    margin: 0;
    padding: 16px 8px;
    font-size: 17px;
  }
  .brvtc-nav__link::after {
    display: none;
  }
  .brvtc-caret {
    transform: rotate(45deg);
  }
  .brvtc-nav__item.is-open .brvtc-caret {
    transform: rotate(-135deg);
  }
  .brvtc-burger {
    display: grid;
  }
  .brvtc-actions .brvtc-btn--ghost {
    display: none;
  }
  .brvtc-btn--primary {
    padding: 11px 18px;
    font-size: 14px;
  }

  /* Méga -> accordéon */
  .brvtc-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0 4px;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
  }
  .brvtc-nav__item.is-open > .brvtc-panel {
    max-height: 2200px;
    padding: 6px 4px 18px;
  }
  .brvtc-mega {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .brvtc-mega__aside {
    border-left: 0;
    border-top: 1px solid var(--brvtc-line);
    padding-left: 0;
    padding-top: 20px;
  }
  .brvtc-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brvtc-topbar__phone {
    font-size: 14px;
  }
  .brvtc-bar {
    padding: 10px 16px;
    gap: 12px;
  }
  .brvtc-brand__logo {
    font-size: 28px;
  }
  .brvtc-brand__sub {
    display: none;
  }
  .brvtc-topbar__inner {
    padding: 8px 16px;
  }
}

/* ---------- Accessibilité ---------- */
.brvtc-header a:focus-visible,
.brvtc-header button:focus-visible {
  outline: 2px solid var(--brvtc-green-2);
  outline-offset: 2px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .brvtc-header,
  .brvtc-header * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
.brvtc-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
