/* ============================================
   CUSTOM CSS
   ============================================ */

ul.hfe-breadcrumbs li a {
  text-decoration: none !important;
}

/* ============================================
   HEADER + MEGA MENU + MOBILE FULL SCREEN
   SELF ATTITUDE / AGCREATIVE
   ============================================ */

:root {
  --agc-violet-primary: #9810fa;
  --agc-rose-primary: #e60076;
  --agc-orange-primary: #ff6900;
  --agc-text-normal: #4a5565;
  --agc-text-dark: #111827;
  --agc-text-light: #6b7280;
  --agc-bg-white: #ffffff;
  --agc-bg-gray-50: #f9fafb;
  --agc-overlay-dark: rgba(0, 0, 0, 0.5);
  --agc-border-light: rgba(0, 0, 0, 0.1);
}

/* ============================================
   ANIMATION DESKTOP
   ============================================ */

@keyframes agcMegaFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   HEADER DESKTOP
   ============================================ */

.agc-header-nav-wrapper {
  position: relative;
  z-index: 100;
  border-top: 2px solid #ff8c42;
  border-bottom: 2px solid #ff8c42;
  background: #fff;
}

.agc-header-nav-wrapper .agc-header-nav-inner {
  position: relative;
}

.agc-header-nav-wrapper .agc-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  margin: 0;
  padding: 1rem 0;
  list-style: none;
}

.agc-header-nav-wrapper .agc-menu-item {
  position: relative;
  list-style: none;
}

.agc-header-nav-wrapper .agc-menu-item--has-mega::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 32px;
  background: transparent;
  z-index: 300;
}

.agc-header-nav-wrapper .agc-menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  color: #374151;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.2s ease;
  z-index: 301;
}

.agc-header-nav-wrapper .agc-menu-item:hover > .agc-menu-link,
.agc-header-nav-wrapper .agc-menu-item.agc-mega-open > .agc-menu-link {
  color: var(--agc-item-color);
}

/* Lien actif desktop — couleur + gras + soulignement */
.agc-header-nav-wrapper .agc-menu-item.is-active > .agc-menu-link {
  color: var(--agc-item-color);
  font-weight: 700;
}

.agc-header-nav-wrapper .agc-menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.5rem;
  height: 4px;
  border-radius: 9999px;
  background-color: var(--agc-item-color);
  opacity: 0;
  transform: scaleX(0.65);
  transform-origin: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.agc-header-nav-wrapper .agc-menu-item:hover > .agc-menu-link::after,
.agc-header-nav-wrapper .agc-menu-item.is-active > .agc-menu-link::after,
.agc-header-nav-wrapper .agc-menu-item.agc-mega-open > .agc-menu-link::after {
  opacity: 0.5;
  transform: scaleX(1);
}

/* Soulignement plein sur item actif */
.agc-header-nav-wrapper .agc-menu-item.is-active > .agc-menu-link::after {
  opacity: 1;
  transform: scaleX(1);
}

.agc-header-nav-wrapper .agc-menu-item:nth-child(4) {
  margin-right: 1.5rem;
  padding-right: 1.5rem;
}

.agc-header-nav-wrapper .agc-menu-item:nth-child(4)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 24px;
  background-color: #d1d5db;
  transform: translateY(-50%);
}

/* Chevron desktop */
.agc-header-nav-wrapper .agc-menu-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 0.2rem;
  transition: transform 0.25s ease;
  color: currentColor;
}

.agc-header-nav-wrapper .agc-menu-item.agc-mega-open > .agc-menu-link .agc-menu-chevron {
  transform: rotate(180deg);
}

/* ============================================
   MEGA MENU DESKTOP — Contrôlé par JS uniquement
   ============================================ */

.agc-header-nav-wrapper .agc-mega-menu {
  position: fixed;
  left: 0;
  right: 0;
  top: 230px;
  width: 100vw;
  background: #fff;
  border-top: 4px solid var(--agc-item-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 999;
}

.agc-header-nav-wrapper .agc-mega-menu::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 0;
  right: 0;
  height: 28px;
  background: transparent;
}

/* Suppression du hover CSS — géré uniquement par JS */
.agc-header-nav-wrapper .agc-menu-item:hover > .agc-mega-menu,
.agc-header-nav-wrapper .agc-menu-item:focus-within > .agc-mega-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

/* Ouverture uniquement via la classe JS */
.agc-header-nav-wrapper .agc-menu-item.agc-mega-open > .agc-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: agcMegaFade 0.25s ease forwards;
}

.agc-header-nav-wrapper .agc-mega-menu__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 320px;
}

.agc-header-nav-wrapper .agc-mega-menu--no-image .agc-mega-menu__inner {
  display: block;
}

.agc-header-nav-wrapper .agc-mega-menu__content {
  flex: 1;
  padding: 48px 0;
  padding-right: 60px;
}

.agc-header-nav-wrapper .agc-mega-menu__sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 2rem;
}

.agc-header-nav-wrapper .agc-mega-menu__section-title {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--agc-item-color);
}

.agc-header-nav-wrapper .agc-mega-menu__list,
.agc-header-nav-wrapper .agc-mega-menu__simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.agc-header-nav-wrapper .agc-mega-menu__list-item + .agc-mega-menu__list-item {
  margin-top: 0.5rem;
}

.agc-header-nav-wrapper .agc-mega-menu__simple-item + .agc-mega-menu__simple-item {
  margin-top: 0.75rem;
}

.agc-header-nav-wrapper .agc-mega-menu__link,
.agc-header-nav-wrapper .agc-mega-menu__link--standalone {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
}

.agc-header-nav-wrapper .agc-mega-menu__link:hover,
.agc-header-nav-wrapper .agc-mega-menu__link--standalone:hover {
  color: var(--agc-item-color);
}

.agc-header-nav-wrapper .agc-mega-menu__simple-link {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
}

.agc-header-nav-wrapper .agc-mega-menu__simple-link:hover {
  color: var(--agc-item-color);
  background: rgba(147, 51, 234, 0.06);
}

.agc-header-nav-wrapper .agc-mega-menu__media {
  width: 420px;
  position: relative;
  overflow: hidden;
}

.agc-header-nav-wrapper .agc-mega-menu__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.agc-header-nav-wrapper .agc-mega-menu__media:hover .agc-mega-menu__image {
  transform: scale(1.05);
}

.agc-header-nav-wrapper .agc-mega-menu__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.10) 30%,
    rgba(255,255,255,0.45) 58%,
    rgba(255,255,255,0.82) 78%,
    rgba(255,255,255,0.96) 100%
  );
}

/* ============================================
   BURGER / MOBILE PAR DÉFAUT
   ============================================ */

.agc-header-nav-wrapper .agc-mobile-toggle,
.agc-header-nav-wrapper .agc-mobile-menu {
  display: none;
}

/* ============================================
   MOBILE < 1200px
   ============================================ */

@media (max-width: 1199px) {

  .agc-header-nav-wrapper {
    position: relative;
    z-index: 50;
    width: 100%;
    border-top: none;
    border-bottom: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .agc-header-nav-wrapper.agc-menu-open .agc-mobile-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .agc-header-nav-wrapper .agc-header-nav-inner {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .agc-header-nav-wrapper .agc-header-nav {
    display: none !important;
  }

  .agc-header-nav-wrapper .agc-mega-menu,
  .agc-header-nav-wrapper .agc-menu-item--has-mega::after,
  .agc-header-nav-wrapper .agc-menu-item:nth-child(4)::before {
    display: none !important;
  }

  .agc-header-nav-wrapper .agc-menu-item:nth-child(4) {
    margin-right: 0;
    padding-right: 0;
  }

  /* Burger */
  .agc-header-nav-wrapper .agc-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 10001;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .agc-header-nav-wrapper .agc-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
  }

  /* Panel overlay */
  .agc-header-nav-wrapper .agc-mobile-menu {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .agc-header-nav-wrapper .agc-mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .agc-header-nav-wrapper .agc-mobile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .agc-header-nav-wrapper .agc-mobile-menu.is-open .agc-mobile-overlay {
    opacity: 1;
  }

  .agc-header-nav-wrapper .agc-mobile-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    background: linear-gradient(
      90deg,
      rgba(255, 247, 237, 1) 0%,
      rgba(250, 245, 255, 1) 50%,
      rgba(240, 253, 250, 1) 100%
    );
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
  }

  .agc-header-nav-wrapper .agc-mobile-menu.is-open .agc-mobile-panel {
    transform: translateX(0);
  }

  body.agc-mobile-menu-open {
    overflow: hidden;
  }

  body.admin-bar .agc-header-nav-wrapper .agc-mobile-menu {
    top: 46px;
    height: calc(100dvh - 46px);
  }

  /* Header du panel */
  .agc-header-nav-wrapper .agc-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    min-height: 72px;
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .agc-header-nav-wrapper .agc-mobile-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    max-width: calc(100% - 60px);
  }

  .agc-header-nav-wrapper .agc-mobile-logo-image {
    max-height: 42px;
    width: auto;
    display: block;
  }

  .agc-header-nav-wrapper .agc-mobile-logo--text {
    display: none;
  }

  .agc-header-nav-wrapper .agc-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
  }

  .agc-header-nav-wrapper .agc-mobile-close:hover {
    background: rgba(255, 255, 255, 0.6);
  }

  /* Contenu */
  .agc-header-nav-wrapper .agc-mobile-content {
    padding: 1.5rem 1.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .agc-header-nav-wrapper .agc-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  /* ---- Item avec sous-menu : lien + bouton séparés ---- */
  .agc-header-nav-wrapper .agc-mobile-section-row {
    display: flex;
    align-items: center;
    border-left: 4px solid var(--agc-section-color, #9333ea);
    border-radius: 0.75rem;
    background: transparent;
    overflow: hidden;
  }

  /* Lien cliquable vers la page */
  .agc-header-nav-wrapper .agc-mobile-section-link {
    flex: 1;
    padding: 1rem;
    text-decoration: none;
    color: #111827;
    font-size: 1rem;
    font-weight: 400;
  }

  .agc-header-nav-wrapper .agc-mobile-section-link:hover {
    color: var(--agc-section-color, #9333ea);
  }

  /* Bouton "+" pour ouvrir le sous-menu */
  .agc-header-nav-wrapper .agc-mobile-section-toggle {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    background: transparent;
    cursor: pointer;
  }

  /* ---- Item sans sous-menu ---- */
  .agc-header-nav-wrapper .agc-mobile-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    background: transparent;
    text-decoration: none;
    color: #111827;
    border-left: 4px solid var(--agc-section-color, #9333ea);
  }

  .agc-header-nav-wrapper .agc-mobile-link--parent {
    display: none !important;
  }

  .agc-header-nav-wrapper .agc-mobile-section-title {
    font-size: 1rem;
    font-weight: 400;
  }

  .agc-header-nav-wrapper .agc-mobile-section-icon {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--agc-section-color, #9333ea);
    transition: transform 0.3s ease;
    flex-shrink: 0;
  }

  .agc-header-nav-wrapper .agc-mobile-section-toggle[aria-expanded="true"] .agc-mobile-section-icon {
    transform: rotate(45deg);
  }

  /* Sous-menu accordéon */
  .agc-header-nav-wrapper .agc-mobile-submenu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
  }

  .agc-header-nav-wrapper .agc-mobile-submenu.is-open {
    grid-template-rows: 1fr;
  }

  .agc-header-nav-wrapper .agc-mobile-submenu-inner {
    overflow: hidden;
    padding: 0.5rem 0.5rem 0 0.5rem;
  }

  .agc-header-nav-wrapper .agc-mobile-category {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--agc-section-color, #9333ea);
    margin: 1rem 0 0.5rem;
    padding: 0 0.5rem;
  }

  .agc-header-nav-wrapper .agc-mobile-subgroup:first-child .agc-mobile-category {
    margin-top: 0.5rem;
  }

  .agc-header-nav-wrapper .agc-mobile-sublink {
    display: block;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #374151;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .agc-header-nav-wrapper .agc-mobile-sublink:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--agc-section-color, #9333ea);
  }

  /* CTA */
  .agc-header-nav-wrapper .agc-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 2rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, #9810fa, #e60076);
    color: #fff;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }

  /* Footer */
  .agc-header-nav-wrapper .agc-mobile-footer {
    margin-top: 2rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #4b5563;
  }

  .agc-header-nav-wrapper .agc-mobile-footer-divider {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
  }

  .agc-header-nav-wrapper .agc-mobile-footer-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .agc-header-nav-wrapper .agc-mobile-footer-link {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
  }

  .agc-header-nav-wrapper .agc-mobile-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .agc-header-nav-wrapper .agc-mobile-footer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
  }

  .agc-header-nav-wrapper .agc-mobile-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    flex-shrink: 0;
  }
}

@media (max-width: 1199px) and (min-width: 783px) {
  body.admin-bar .agc-header-nav-wrapper .agc-mobile-menu {
    top: 32px;
    height: calc(100dvh - 32px);
  }
}

/* ============================================
   DESKTOP >= 1200px
   ============================================ */

@media (min-width: 1200px) {
  .agc-header-nav-wrapper .agc-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
  }

  .agc-header-nav-wrapper .agc-mobile-toggle,
  .agc-header-nav-wrapper .agc-mobile-menu {
    display: none !important;
  }

  .agc-header-nav-wrapper .agc-mega-menu__inner {
    display: flex;
  }

  .agc-header-nav-wrapper .agc-mega-menu__media {
    display: block;
  }
}