/* =============================================================
   ADMIN — Header & menu
   ============================================================= */

.clearfix:after {
  content: "";
  height: 0;
  line-height: 0;
  clear: both;
  display: block;
  zoom: 1;
}

.set-radius-zero {
  border-radius: 0;
  -moz-border-radius: 0;
  -webkit-border-radius: 0;
}

/* --- Barre header --- */

.admin-header {
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  background-color: #f2b705;
  color: #fff;
}

.admin-header.navbar-inverse {
  background-color: #f2b705;
  border-radius: 0;
  border-color: transparent;
}

.admin-header.navbar {
  margin-bottom: 0;
  height: auto;
  min-height: 0;
}

.admin-header .container {
  width: 100%;
  max-width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.admin-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo nav actions";
  align-items: center;
  column-gap: 12px;
  row-gap: 0;
  min-height: 68px;
  padding: 10px 0;
}

.admin-header-logo {
  grid-area: logo;
  justify-self: start;
  flex-shrink: 0;
}

.admin-header-logo-link {
  display: block;
  line-height: 0;
}

.logo_header {
  position: relative;
  width: 130px;
  height: auto;
  margin: 0;
}

.logo_header img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.admin-header-nav {
  grid-area: nav;
  justify-self: stretch;
  align-self: center;
  position: static;
  transform: none;
  left: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible !important;
  border: 0;
  box-shadow: none;
}

.admin-header-actions {
  z-index: 9999;
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 10px;
}

.admin-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  background-color: #58a681;
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
}

.admin-header-icon:hover,
.admin-header-icon:focus {
  color: #fff;
  background-color: #46956e;
}

.admin-header-icon .login-icon {
  height: auto;
  width: auto;
  padding: 0;
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  background: transparent;
  border-radius: 0;
  cursor: inherit;
}

.admin-header-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  color: #fff;
  background-color: #58a681;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}

.admin-header-logout:hover,
.admin-header-logout:focus {
  color: #fff;
  background-color: #46956e;
  text-decoration: none;
}

.admin-header-toggle,
.admin-header .navbar-toggle {
  grid-area: toggle;
  display: none;
  margin: 0;
  border: 1px solid #fff;
  background-color: #58a681;
}

/* --- Navigation principale --- */

.admin-nav {
  position: relative;
  z-index: 99;
  width: 100%;
  font-size: 0;
  text-align: center;
}

.admin-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-nav > ul,
.admin-header .navbar-nav {
  display: block;
  float: none;
  width: 100%;
  margin: 0;
  padding: 10px 0 0 0;
  text-align: center;
  line-height: normal;
}

.admin-nav > ul > li,
.admin-header .navbar-nav > li,
.admin-header .nav > li {
  position: relative;
  float: none;
  display: inline-block;
  vertical-align: top;
  text-align: center;
  border-radius: 5px;
  background-color: #58a681;
  margin: 0 4px 6px;
  font-size: 0.88rem;
}

.admin-nav > ul > li.submenu:after {
  font-family: "FontAwesome";
  content: "\f0d7";
  font-size: 0.85rem;
  display: block;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  pointer-events: none;
}

.admin-nav > ul > li:hover,
.admin-nav > ul > li:focus-within {
  background-color: #58a682b4;
}

.admin-nav > ul > li > a,
#menu-top a {
  padding: 9px 16px;
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
}

.admin-nav > ul > li.submenu > a {
  padding-right: 28px;
}

.admin-header .nav > li > a:hover,
.admin-header .nav > li > a:focus {
  background-color: transparent;
}

.menu-top-active {
  background-color: #f2b705;
  border-radius: 5px;
}

/* --- Sous-menu --- */

.admin-nav-dropdown {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  padding: 6px 0 0;
  margin: 0;
  min-width: 260px;
  z-index: 1100;
  display: none;
  list-style: none;
  text-align: left;
  font-size: 0.88rem;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.admin-nav-dropdown:before {
  content: "";
  display: block;
  height: 6px;
}

.admin-nav-dropdown > li {
  display: block;
  margin: 0 0 4px;
  background-color: #58a681;
  border-radius: 5px;
}

.admin-nav-dropdown > li:hover,
.admin-nav-dropdown > li:focus-within {
  background-color: #f2b705;
}

.admin-nav-dropdown > li > a {
  padding: 10px 14px;
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  white-space: normal;
  line-height: 1.35;
  text-align: left;
}

/* --- Legacy (pages anciennes) --- */

.titre_page_menu {
  position: relative;
  width: 280px;
  left: 50%;
  transform: translateX(-50%);
}

.left-center {
  position: relative;
  width: 60px;
  height: 60px;
  float: none;
  right: auto;
  top: auto;
  display: none;
}

.deconnexion {
  position: relative;
  width: auto;
  min-width: 130px;
  height: auto;
  padding: 5px 16px;
  float: none;
  top: auto;
  left: auto;
  background-color: #58a681;
  border-radius: 50px;
}

.deconnexion li,
.deconnexion a {
  list-style-type: none;
  text-align: center;
  color: white;
}

.navbar-brand {
  position: relative;
  width: 300px;
  padding-top: 30px;
  margin-left: 85px;
}

/* --- Responsive --- */

@media (min-width: 992px) {
  .admin-header-toggle {
    display: none !important;
  }

  .admin-header-nav.collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }

  .admin-nav > ul > li.submenu:hover > .admin-nav-dropdown,
  .admin-nav > ul > li.submenu:focus-within > .admin-nav-dropdown {
    display: block;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .admin-nav > ul > li {
    margin: 0 3px 6px;
  }

  .admin-nav > ul > li > a {
    padding: 8px 11px;
    font-size: 0.8rem;
  }

  .admin-nav > ul > li.submenu > a {
    padding-right: 24px;
  }
}

@media (min-width: 1200px) {
  .admin-header .container {
    max-width: 100%;
    margin: 0 auto;
  }

  .admin-header-inner {
    min-height: 72px;
  }

  .logo_header {
    width: 150px;
    z-index: 9999;
  }
}

@media (min-width: 1200px) and (max-width: 1360px) {
  .admin-nav > ul > li > a {
    padding: 8px 13px;
    font-size: 0.84rem;
  }
}

@media (max-width: 991px) {
  .admin-header-inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "logo actions toggle"
      "nav nav nav";
    align-items: center;
    row-gap: 0;
  }

  .admin-header-toggle {
    display: block;
  }

  .admin-header-nav.collapse:not(.in) {
    display: none !important;
  }

  .admin-header-nav.collapse.in {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin-top: 8px;
    padding-top: 8px;
  }

  .admin-header-logout {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .admin-header-icon {
    width: 36px;
    height: 36px;
  }

  .admin-nav > ul > li {
    margin: 0 3px 6px;
  }

  .admin-nav > ul > li > a {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .admin-nav-dropdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 6px 0 0;
  }

  .admin-nav > ul > li.submenu.is-open > .admin-nav-dropdown {
    display: block;
  }
}

@media (max-width: 768px) {
  .navbar > .container .navbar-brand {
    margin-left: 0;
  }

  .container > .navbar-header {
    margin-top: 10px;
    width: 100%;
  }

  .left-center {
    top: auto;
    left: auto;
  }

  .deconnexion {
    top: auto;
    left: auto;
  }

  .navbar-brand {
    position: absolute;
    left: 200px;
    text-align: center;
    top: -17px;
  }
}

@media (max-width: 575px) {
  .admin-header .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .admin-header-inner {
    column-gap: 10px;
    min-height: 60px;
    padding: 8px 0;
  }

  .logo_header {
    width: 108px;
  }

  .logo_header img {
    max-height: 44px;
  }

  .admin-header-logout {
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .admin-header-actions {
    gap: 8px;
  }

  .admin-nav > ul > li > a {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}
