/* 8UP Media · shared header/footer chrome (nav, mega-menu, icons) */

:root {
  --chrome-orange: #ff6500;
  --chrome-border: #e8e8e8;
  --chrome-bg-warm: #fff6f0;
  --chrome-radius: 16px;
  --chrome-radius-lg: 22px;
  --chrome-radius-pill: 999px;
}

/* Logo */
a.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}
.site-logo-img {
  height: 44px !important;
  width: auto !important;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
.site-logo-img-footer {
  height: 38px !important;
  max-width: 180px;
}
.market-ribbon {
  display: none !important;
}

/* Nav base */
.nav-links > li { position: relative; }
.nav-links > li > a,
.nav-links > li > button {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.dropdown-arrow { display: inline-flex; align-items: center; }
.dropdown-arrow svg { width: 12px; height: 12px; }

/* Standard dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.98);
  background: #fff;
  border: 1px solid var(--chrome-border);
  border-radius: var(--chrome-radius-lg);
  padding: 14px;
  min-width: 260px;
  box-shadow: 0 24px 64px -12px rgba(0,0,0,.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s cubic-bezier(.2,.8,.2,1), transform .22s cubic-bezier(.2,.8,.2,1), visibility .22s;
  z-index: 1000;
}
.dropdown.open,
.nav-links > li:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* Wide menus · Villes & Secteurs (style DRJ Cloud) */
.dropdown.dropdown-wide {
  min-width: min(640px, calc(100vw - 32px));
  width: min(640px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 16px;
  left: 50%;
}
.dropdown-wide .menu-wide-item {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 14px;
  text-decoration: none;
  transition: background .18s ease;
}
.dropdown-wide .menu-wide-item:hover {
  background: var(--chrome-bg-warm) !important;
}
.dropdown-wide .menu-wide-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--chrome-bg-warm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--chrome-orange);
}
.dropdown-wide .menu-wide-icon svg {
  width: 16px !important;
  height: 16px !important;
}
.dropdown-wide .menu-wide-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dropdown-wide .menu-wide-text strong {
  font-size: .9rem;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1.3;
}
.dropdown-wide .menu-wide-text span {
  font-size: .76rem;
  color: #888;
  line-height: 1.35;
}
.dropdown-wide .dropdown-hub-btn {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 18px !important;
  background: var(--chrome-orange) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: var(--chrome-radius-pill) !important;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dropdown-wide .dropdown-hub-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,101,0,.28);
}
.dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dropdown-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--chrome-bg-warm);
}
.dropdown-icon svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}

/* Mega menu */
.mega-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(920px, calc(100vw - 40px));
  transform: translateX(-50%) translateY(8px) scale(0.98);
  padding: 0;
  border-radius: var(--chrome-radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px -12px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05);
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s cubic-bezier(.2,.8,.2,1), visibility .22s ease, transform .22s cubic-bezier(.2,.8,.2,1);
  z-index: 1000;
}
.mega-menu.open,
.nav-links > li:hover > .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.mega-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -40px;
  right: -40px;
  height: 20px;
  background: transparent;
}
.mm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 20px;
  background: #fff;
}
.mm-col { display: flex; flex-direction: column; gap: 2px; }
.mm-col-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--chrome-orange);
  padding: 8px 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 6px;
}
.mm-item {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 10px;
  text-decoration: none;
  background: transparent !important;
}
.mm-item:hover { background: #fff8f2 !important; }
.mm-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #fff8f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chrome-orange);
}
.mm-icon svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}
.mm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-title { font-size: .92rem; font-weight: 600; color: #0a0a0a; line-height: 1.3; }
.mm-sub { font-size: .78rem; color: #888; line-height: 1.35; }
.mm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: #fafafa;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
}
.mm-footer-cta {
  background: var(--chrome-orange);
  color: #fff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--chrome-radius-pill);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mm-footer-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,101,0,.28);
}

/* Card / feature icons (replace emojis) */
.card-icon,
.feature-card-icon,
.section-tag svg {
  flex-shrink: 0;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff0e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--chrome-orange);
}
.card-icon svg,
.feature-card-icon svg {
  width: 22px !important;
  height: 22px !important;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-tag svg {
  width: 16px !important;
  height: 16px !important;
}

/* Global SVG safeguards in nav/content */
nav svg:not(.site-logo-img),
footer svg:not(.site-logo-img) {
  max-width: 24px;
  max-height: 24px;
}
.mm-icon svg,
.dropdown-icon svg,
.card-icon svg,
.feature-card-icon svg,
.icon-inline {
  max-width: none;
  max-height: none;
}

/* Animated icons */
.icon-svg-animated {
  animation: iconPulse 2.4s ease-in-out infinite;
}
@keyframes iconPulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-2px); opacity: .92; }
}

/* Section title centering (targeted) */
.section > .container > h2,
.section > .container > h1,
.hero .hero-content h1,
.hero .page-hero h1,
.hero .hero-content h1,
.hero .lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 65ch;
}
.page-hero h1,
.page-hero .lead,
.page-hero .section-tag,
.page-hero .breadcrumb,
.page-hero .hero-cta {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}
.page-hero .hero-cta {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.section > .container > p.lead,
.section > .container > .section-lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 65ch;
}

@media (max-width: 900px) {
  .mega-menu { display: none !important; }
  .site-logo-img { height: 44px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .icon-svg-animated { animation: none !important; }
}

/* Services mega-menu footer · bouton à côté du texte */
.mm-footer-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}
.mm-footer-copy {
  flex: 1 1 320px;
  min-width: 0;
}
.mm-footer-copy strong {
  display: block;
  font-size: .95rem;
  color: #0a0a0a;
  margin-bottom: 4px;
}
.mm-footer-copy p {
  margin: 0;
  font-size: .85rem;
  color: #666;
  line-height: 1.45;
}
.mm-footer-inline .mm-footer-cta {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Menu Secteurs · icônes style Solutions */
.dropdown.dropdown-secteurs {
  min-width: min(720px, calc(100vw - 32px));
  width: min(720px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 16px;
  left: 50%;
}
.dropdown-secteurs .menu-sector-item {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 14px;
  text-decoration: none;
  transition: background .18s ease;
}
.dropdown-secteurs .menu-sector-item:hover {
  background: var(--chrome-bg-warm) !important;
}
.dropdown-secteurs .dropdown-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.dropdown-secteurs .menu-sector-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dropdown-secteurs .menu-sector-text strong {
  font-size: .9rem;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1.3;
}
.dropdown-secteurs .menu-sector-text span {
  font-size: .76rem;
  color: #888;
  line-height: 1.35;
}
.dropdown-secteurs .dropdown-hub-btn {
  grid-column: 1 / -1;
}

/* Hub secteurs cards */
.hub-sector-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff0e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--chrome-orange);
  margin-bottom: 12px;
}
.hub-sector-icon svg {
  width: 22px !important;
  height: 22px !important;
}

/* === FIX 20260711g : hero home gauche + menus desktop style Services === */
#page-home .hero .hero-content h1,
#page-home .hero .hero-content .lead,
#page-home .hero .hero-content .h-display,
#page-home .hero .hero-label,
#page-home .hero .hero-actions,
#page-home .hero .hero-trust-row {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}
#page-home .hero .hero-actions,
#page-home .hero .hero-trust-row {
  justify-content: flex-start !important;
}

@media (min-width: 1025px) {
  /* Solutions · style mm-item compact */
  .dropdown.dropdown-solutions {
    min-width: min(360px, calc(100vw - 40px)) !important;
    width: min(360px, calc(100vw - 40px)) !important;
    padding: 12px !important;
    left: 50% !important;
  }
  .dropdown-solutions .menu-sector-item,
  .dropdown-secteurs .menu-sector-item,
  .dropdown-wide .menu-wide-item {
    border-radius: 14px !important;
  }
  .dropdown-secteurs {
    width: min(680px, calc(100vw - 40px)) !important;
    min-width: min(680px, calc(100vw - 40px)) !important;
  }
  .dropdown-wide {
    width: min(580px, calc(100vw - 40px)) !important;
    min-width: min(580px, calc(100vw - 40px)) !important;
  }
  .dropdown .dropdown-icon,
  .dropdown-secteurs .dropdown-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: var(--chrome-bg-warm) !important;
    color: var(--chrome-orange) !important;
  }
  .dropdown a:hover .dropdown-icon {
    background: #ff6500 !important;
    color: #fff !important;
  }
  .mega-menu,
  .dropdown {
    transition: opacity .28s cubic-bezier(.2,.8,.2,1), transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s !important;
  }
}
