/* ================================
   Bastide 1820 — Header
================================ */

/* Header global */
.b1820-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 86px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--b1820-page-padding);
  color: var(--b1820-cream);
  background: transparent;
  border-bottom: 1px solid transparent;
  box-sizing: border-box;
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    height 0.35s ease;
}

.b1820-header.is-scrolled {
  height: 76px;
  color: var(--b1820-green);
  background: rgba(251, 248, 242, 0.96);
  border-bottom: 1px solid rgba(24, 50, 38, 0.12);
  box-shadow: 0 1px 0 rgba(24, 50, 38, 0.12);
  backdrop-filter: blur(10px);
}

/* Logo */
.b1820-brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.b1820-brand:hover,
.b1820-brand:focus,
.b1820-brand:active {
  color: inherit;
  background: transparent;
  text-decoration: none;
  outline: none;
}

.b1820-brand-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 210px;
  height: auto;
  color: inherit;
  text-decoration: none;
}

.b1820-brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.25s ease;
}

.b1820-logo-dark {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.b1820-logo-light {
  opacity: 1;
}

.b1820-header.is-scrolled .b1820-logo-light {
  opacity: 0;
}

.b1820-header.is-scrolled .b1820-logo-dark {
  opacity: 1;
}

/* Navigation desktop */
.b1820-nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.b1820-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.b1820-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s ease;
}

.b1820-nav a:hover,
.b1820-nav a:focus,
.b1820-nav a:active,
.b1820-nav a:visited {
  color: inherit;
  background: transparent;
  text-decoration: none;
  outline: none;
}

.b1820-nav a:hover::after,
.b1820-nav a:focus-visible::after,
.b1820-nav a.is-active::after {
  width: 100%;
}

/* Bouton disponibilités desktop */
.b1820-header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--b1820-cream);
  background: transparent;
  border: 1px solid rgba(251, 248, 242, 0.8);
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.b1820-header-cta:hover,
.b1820-header-cta:focus,
.b1820-header-cta:active {
  color: var(--b1820-green);
  background: var(--b1820-cream);
  border-color: var(--b1820-cream);
  box-shadow: none;
  text-decoration: none;
  outline: none;
  transform: translateY(-1px);
}

.b1820-header.is-scrolled .b1820-header-cta {
  color: var(--b1820-green);
  background: transparent;
  border-color: rgba(24, 50, 38, 0.45);
}

.b1820-header.is-scrolled .b1820-header-cta:hover,
.b1820-header.is-scrolled .b1820-header-cta:focus,
.b1820-header.is-scrolled .b1820-header-cta:active {
  color: var(--b1820-cream);
  background: var(--b1820-green);
  border-color: var(--b1820-green);
}

/* Menu mobile — état fermé */
.b1820-menu-toggle {
  display: none;
}

.b1820-mobile-menu {
  display: none;
}

/* Menu mobile */
@media (max-width: 900px) {
  .b1820-header {
    grid-template-columns: 1fr auto;
    height: 76px;
    padding: 0 24px;
  }

  .b1820-brand-logo {
    width: 185px;
  }

  .b1820-nav,
  .b1820-header-cta {
    display: none;
  }

  /* Bouton hamburger */
  .b1820-menu-toggle {
    appearance: none;
    -webkit-appearance: none;
    justify-self: end;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 7px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .b1820-menu-toggle:hover,
  .b1820-menu-toggle:focus,
  .b1820-menu-toggle:active {
    color: inherit;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
  }

  .b1820-menu-toggle:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 6px;
  }

  .b1820-menu-toggle span {
    display: block;
    width: 28px;
    height: 1px;
    background: currentColor;
    transition:
      transform 0.25s ease,
      opacity 0.25s ease;
  }

  .b1820-menu-toggle.is-open span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .b1820-menu-toggle.is-open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* Panneau du menu mobile */
  .b1820-mobile-menu {
    position: fixed;
    top: 76px;
    left: 0;
    z-index: 49;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 28px 24px 34px;
    background: rgba(251, 248, 242, 0.98);
    border-top: 1px solid rgba(24, 50, 38, 0.12);
    box-shadow: 0 18px 40px rgba(12, 29, 20, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
    box-sizing: border-box;
  }

  .b1820-mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Liens du menu mobile */
  .b1820-mobile-menu a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 72px;
    padding: 0;
    color: var(--b1820-green);
    background: transparent !important;
    border-bottom: 1px solid rgba(24, 50, 38, 0.14);
    box-shadow: none !important;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .b1820-mobile-menu a:visited {
    color: var(--b1820-green);
  }

  .b1820-mobile-menu a span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .b1820-mobile-menu a.is-active span {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
  }

  .b1820-mobile-menu a small {
    display: block;
    margin-top: 7px;
    color: rgba(24, 50, 38, 0.68);
    font-family: var(--b1820-serif);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
  }

  .b1820-mobile-menu a:hover,
  .b1820-mobile-menu a:focus,
  .b1820-mobile-menu a:active {
    color: var(--b1820-clay);
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none;
    outline: none;
  }

  .b1820-mobile-menu a:hover small,
  .b1820-mobile-menu a:focus small,
  .b1820-mobile-menu a:active small {
    color: rgba(173, 107, 70, 0.78);
  }

  .b1820-mobile-menu a:last-child {
    border-bottom: 0;
  }

  /* CTA mobile — Disponibilités */
  .b1820-mobile-menu a.b1820-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 24px;
    padding: 0 18px;
    color: var(--b1820-cream) !important;
    background: var(--b1820-green) !important;
    border: 1px solid var(--b1820-green) !important;
    border-bottom: 1px solid var(--b1820-green) !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  .b1820-mobile-cta{
    display: none !important;
  }

  .b1820-mobile-menu a.b1820-mobile-cta:visited {
    color: var(--b1820-cream) !important;
  }

  .b1820-mobile-menu a.b1820-mobile-cta:hover,
  .b1820-mobile-menu a.b1820-mobile-cta:focus,
  .b1820-mobile-menu a.b1820-mobile-cta:active {
    color: var(--b1820-cream) !important;
    background: var(--b1820-clay) !important;
    border-color: var(--b1820-clay) !important;
    border-bottom-color: var(--b1820-clay) !important;
    box-shadow: none !important;
    text-decoration: none;
    outline: none;
  }

  body.b1820-menu-open {
    overflow: hidden;
  }
}
