/* =========================================================
   IFS MEGA MENU
========================================================= */

.et-l--header,
.et-l--header .et_builder_inner_content,
.et-l--header .et_pb_section,
.et-l--header .et_pb_row,
.et-l--header .et_pb_column,
.et-l--header .et_pb_module {
  overflow: visible !important;
}

.et-l--header {
  position: relative;
  z-index: 9999;
}

.ifs-header-nav-wrapper,
.ifs-header-nav-wrapper * {
  box-sizing: border-box;
}

.ifs-header-nav-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ifs-main-nav {
  display: flex;
  gap: 42px;
  align-items: center;
  position: relative;
  z-index: 20;
  padding-bottom: 10px;
}

.ifs-nav-link {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 20px 0;
  transition: color .15s ease, opacity .15s ease;
}

.ifs-nav-link:hover,
.ifs-nav-link.is-active {
  color: #0073aa;
}

.ifs-mega-menu {
  position: fixed;
  top: 175px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%) translateY(10px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.ifs-mega-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.ifs-mega-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f7f9fb;
  border-top: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 35px rgba(0,0,0,.10), 0 35px 80px rgba(0,0,0,.14);
  z-index: -1;
}

.ifs-mega-panel {
  width: min(1180px, calc(100vw - 80px));
  margin: 0 auto;
  display: none;
  grid-template-columns: 1fr 1fr 1fr 280px;
  gap: 48px;
  padding: 38px 0;
  align-items: start;
}

.ifs-mega-panel.is-active {
  display: grid;
}

.ifs-mega-col {
  min-width: 0;
}

.ifs-mega-col-header {
  display: block !important;
  width: 100%;
  padding: 0 !important;
  margin: 0 0 18px !important;
  text-decoration: none;
  color: inherit;
  background: transparent !important;
  border-radius: 16px;
}

.ifs-mega-col-header:hover {
  background: transparent !important;
}

.ifs-mega-col-img {
  display: block;
  width: 100%;
  height: 120px !important;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 0 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.ifs-mega-col-header:hover .ifs-mega-col-img {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.ifs-mega-col h3,
.ifs-mega-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  margin: 0;
  padding: 0;
  position: static;
}

.ifs-mega-col-header:hover h3 {
  color: #0073aa;
  text-decoration: underline;
}

.ifs-mega-col > a:not(.ifs-mega-col-header) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: #222;
  font-size: 15px;
  line-height: 1.4;
  padding: 10px 14px;
  margin-left: -14px;
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}

.ifs-mega-col > a:not(.ifs-mega-col-header):hover {
  background: #edf2f7;
  color: #0073aa;
}

.ifs-link-label {
  display: inline-block;
}

.ifs-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0073aa;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ifs-badge-new { background: #00b67a; }
.ifs-badge-top { background: #ff8a00; }
.ifs-badge-pro { background: #005bbb; }

.ifs-mega-card {
  background: #eef2f5;
  border-radius: 18px;
  padding: 18px;
  align-self: start;
}

.ifs-mega-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  display: block;
}

.ifs-mega-card h3 {
  margin-bottom: 12px;
}

.ifs-mega-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #4a4a4a;
  margin: 0 0 18px;
}

.ifs-mega-button {
  display: inline-block;
  text-decoration: none;
  background: #0073aa;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 999px;
  transition: background .15s ease, transform .15s ease;
}

.ifs-mega-button:hover {
  background: #005f8d;
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .ifs-header-nav-wrapper {
    display: none;
  }
}

/* =========================================================
   FIX PRIORITAIRE — HEADER COLONNE NIVEAU 2
========================================================= */

.ifs-mega-panel .ifs-mega-col > a.ifs-mega-col-header {
  display: block !important;
  flex-direction: unset !important;
  align-items: unset !important;
  justify-content: unset !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 0 18px 0 !important;
  background: transparent !important;
  text-decoration: none !important;
  color: inherit !important;
}

.ifs-mega-panel .ifs-mega-col > a.ifs-mega-col-header img.ifs-mega-col-img {
  display: block !important;
  width: 100% !important;
  height: 120px !important;
  max-width: 100% !important;
  object-fit: cover !important;
  margin: 0 0 14px 0 !important;
  border-radius: 16px !important;
}

.ifs-mega-panel .ifs-mega-col > a.ifs-mega-col-header h3 {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  line-height: 1.25 !important;
}

/* Liens de niveau 3 uniquement */
.ifs-mega-panel .ifs-mega-col > a:not(.ifs-mega-col-header) {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}