/* ==========================================================================
   Header inline SCMS — logo gauche, menu droite, sans bannière
   ========================================================================== */

/* Masque la bannière image du thème */
body.afeccav-header-inline .mg-nav-widget-area-back {
  display: none !important;
}

/* Évite un saut de mise en page bref */
body.afeccav-header-inline .mg-menu-full {
  background: #fff;
  border-bottom: 1px solid var(--afeccav-border, #d8e2ef);
  box-shadow: 0 2px 14px rgba(32, 47, 91, 0.06);
}

body.afeccav-header-inline .mg-headwidget .navbar-wp {
  background: #fff !important;
  min-height: 0;
  padding: 0.65rem 0;
}

body.afeccav-header-inline .mg-menu-full .navbar > .container-fluid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1.25rem;
  min-height: 4.5rem;
}

/* Logo à gauche */
body.afeccav-header-inline .afeccav-header-logo {
  flex: 0 1 auto;
  order: 1;
  min-width: 0;
  max-width: min(100%, 12rem);
}

body.afeccav-header-inline .afeccav-header-logo .navbar-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

body.afeccav-header-inline .afeccav-header-logo .afeccav-wordmark {
  flex: 0 0 auto;
}

body.afeccav-header-inline .afeccav-header-logo .custom-logo-link img,
body.afeccav-header-inline .afeccav-header-logo .navbar-brand img,
body.afeccav-header-inline .afeccav-header-logo .afeccav-logo-color {
  display: none;
}

/* Icônes mobile sur fond blanc */
body.afeccav-header-inline .m-header .burger-line {
  background-color: var(--afeccav-blue, #202f5b) !important;
}

body.afeccav-header-inline .m-header .navbar-toggler {
  border: 1px solid var(--afeccav-border, #d8e2ef);
  border-radius: var(--afeccav-radius, 6px);
  background: #fff;
}

body.afeccav-header-inline .m-header .mobilehomebtn {
  color: var(--afeccav-blue, #202f5b) !important;
  background: var(--afeccav-blue-soft, #e8f0fd) !important;
}

body.afeccav-header-inline .m-header .mobilehomebtn:hover,
body.afeccav-header-inline .m-header .mobilehomebtn:focus {
  color: var(--afeccav-blue, #202f5b) !important;
  background: #dce8fc !important;
}

body.afeccav-header-inline .afeccav-header-logo .site-title {
  display: none !important;
}

/* Menu à droite (desktop uniquement — ne pas forcer display sur mobile) */
@media (min-width: 992px) {
  body.afeccav-header-inline .mg-menu-full .navbar-collapse {
    order: 2;
    flex: 1 1 auto;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
  }

  body.afeccav-header-inline .mg-menu-full .navbar-collapse > .d-md-block {
    display: flex !important;
    justify-content: flex-end;
    width: 100%;
  }
}

body.afeccav-header-inline .mg-menu-full .navbar-nav.ml-auto,
body.afeccav-header-inline .mg-menu-full .navbar-nav.mr-auto {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto !important;
  margin-right: 0 !important;
  width: auto;
  max-width: 100%;
}

body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > li > a {
  color: var(--afeccav-blue, #202f5b) !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem !important;
  line-height: 1.35 !important;
  border-bottom: 2px solid transparent;
  background: transparent !important;
}

body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > li > a:hover,
body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > li > a:focus {
  color: var(--afeccav-blue, #202f5b) !important;
  background: transparent !important;
  border-bottom-color: var(--afeccav-blue, #202f5b);
}

body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > .active > a,
body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > .active > a:hover,
body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > .active > a:focus {
  color: var(--afeccav-blue, #202f5b) !important;
  background: transparent !important;
  border-bottom-color: var(--afeccav-blue, #202f5b);
}

body.afeccav-header-inline .mg-search-box .msearch,
body.afeccav-header-inline .btn-bell.btn-theme {
  color: var(--afeccav-muted, #5a6478) !important;
}

body.afeccav-header-inline .mg-search-box .msearch:hover,
body.afeccav-header-inline .btn-bell.btn-theme:hover {
  color: var(--afeccav-blue, #202f5b) !important;
}

body.afeccav-header-inline .mg-menu-full .desk-header {
  order: 3;
  flex: 0 0 auto;
  margin-left: 0.75rem !important;
  padding-left: 0 !important;
}

body.afeccav-header-inline .mg-menu-full .m-header {
  order: 4;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Barre utilitaire au-dessus (date + adhérer) */
body.afeccav-header-inline .mg-headwidget .mg-head-detail {
  border-bottom: 0;
}

/* —— Mobile —— */

@media (max-width: 991px) {
  body.afeccav-header-inline .mg-menu-full .navbar > .container-fluid {
    min-height: 3.75rem;
    gap: 0.35rem 0.75rem;
  }

  body.afeccav-header-inline .afeccav-header-logo {
    order: 1;
    flex: 1 1 auto;
    max-width: calc(100% - 7rem);
  }

  body.afeccav-header-inline .mg-menu-full .m-header {
    order: 2;
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
  }

  /* Bootstrap collapse : fermé par défaut, ouvert au clic burger */
  body.afeccav-header-inline .mg-menu-full .navbar-collapse:not(.show) {
    display: none !important;
  }

  body.afeccav-header-inline .mg-menu-full .navbar-collapse.show {
    display: block !important;
  }

  body.afeccav-header-inline .mg-menu-full .navbar-collapse > .d-md-block {
    display: block !important;
    width: 100%;
  }

  body.afeccav-header-inline .afeccav-header-logo .navbar-header {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  body.afeccav-header-inline .afeccav-header-logo .custom-logo-link img,
  body.afeccav-header-inline .afeccav-header-logo .navbar-brand img {
    display: none;
  }

  body.afeccav-header-inline .afeccav-wordmark-svg {
    height: 1.75rem;
  }

  body.afeccav-header-inline .mg-menu-full .navbar-collapse {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    margin-top: 0.35rem;
  }

  body.afeccav-header-inline .mg-menu-full .navbar-nav.ml-auto,
  body.afeccav-header-inline .mg-menu-full .navbar-nav.mr-auto {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    margin-left: 0 !important;
    padding-top: 0.5rem;
    border-top: 1px solid var(--afeccav-border-soft, #e8edf5);
  }

  body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > li > a {
    border-bottom: 0;
    border-left: 3px solid transparent;
    padding-left: 0.5rem !important;
  }

  body.afeccav-header-inline .mg-headwidget .navbar-wp .navbar-nav > .active > a {
    border-left-color: var(--afeccav-blue, #202f5b);
  }
}

@media (max-width: 480px) {
  body.afeccav-header-inline .afeccav-header-logo .custom-logo-link img,
  body.afeccav-header-inline .afeccav-header-logo .navbar-brand img {
    display: none;
  }

  body.afeccav-header-inline .afeccav-wordmark-svg {
    height: 1.55rem;
  }
}
