/* =============================================================
   GAÉ Finance - styles communs (header, navigation, dropdown,
   boutons header, footer) partagés par toutes les pages.
   Chargé AVANT la feuille de style spécifique à chaque page.
   ============================================================= */

/* Conteneur */
.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Header (topbar clean) ---------- */
.topbar-clean {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 241, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(22, 24, 29, 0.06);
}

.topbar-clean-inner {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
}

.brand-clean {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-clean-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.95rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #16181D;
  white-space: nowrap;
}

/* ---------- Navigation ---------- */
.nav-clean {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  font-size: 0.98rem;
  font-weight: 500;
  color: #313846;
}

.nav-clean a {
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-clean a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
  opacity: 0.7;
}

.nav-clean a:hover::after {
  transform: scaleX(1);
}

/* Bouton d'action du header */
.btn-clean {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 0.96rem;
  font-weight: 600;
  box-shadow: none;
}

/* ---------- Dropdown Expertises ---------- */
.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-item--has-dropdown .nav-link::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 4px;
  margin-top: -2px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.nav-item--has-dropdown:hover .nav-link::after {
  transform: rotate(45deg) translateY(2px);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 260px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(22, 24, 29, 0.08);
  box-shadow: 0 20px 60px rgba(16, 22, 34, 0.12);
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 200;
}

.nav-item--has-dropdown:hover .nav-dropdown,
.nav-item--has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #1F2937;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-dropdown a:hover {
  background: #F5F2EB;
  color: #111827;
  transform: translateX(2px);
}

.nav-dropdown a:not(:last-child) {
  border-bottom: 1px solid rgba(22, 24, 29, 0.04);
}

/* ---------- Logos ---------- */
.brand-mark-img {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-premium__mark-img {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ---------- Footer premium ---------- */
.footer-premium {
  padding: 84px 0 26px;
  background: #10161F;
  color: #F2F6FB;
}

.footer-premium__top {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.95fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-premium__brand-link {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.footer-premium__brand-text {
  min-width: 0;
}

.footer-premium__name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.95rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  margin-bottom: 20px;
}

.footer-premium__tagline {
  margin: 0;
  max-width: 34ch;
  color: rgba(242,246,251,0.72);
  font-size: 0.98rem;
  line-height: 1.8;
}

.footer-premium__nav h3,
.footer-premium__resources h3,
.footer-premium__contact h3 {
  margin: 0 0 18px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-premium__nav ul,
.footer-premium__resources ul,
.footer-premium__contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-premium__nav li,
.footer-premium__resources li,
.footer-premium__contact li {
  margin: 0 0 12px;
}

.footer-premium__nav a,
.footer-premium__resources a,
.footer-premium__contact a,
.footer-premium__contact li {
  color: rgba(242,246,251,0.72);
  text-decoration: none;
  line-height: 1.7;
  transition: color 0.2s ease;
}

.footer-premium__nav a:hover,
.footer-premium__resources a:hover,
.footer-premium__contact a:hover {
  color: #FFFFFF;
}

.footer-premium__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 4px; /* 16A : rayon 4px, plus de pilule (16B-3A) */
  color: #FFFFFF;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-premium__cta:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}

.footer-premium__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
}

.footer-premium__copyright {
  color: rgba(242,246,251,0.56);
  font-size: 0.9rem;
}

.footer-premium__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-premium__legal a {
  color: rgba(242,246,251,0.56);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-premium__legal a:hover {
  color: #FFFFFF;
}

/* ---------- Responsive commun ---------- */
@media (max-width: 1180px) {
  .topbar-clean-inner {
    gap: 24px;
  }

  .nav-clean {
    gap: 22px;
    font-size: 0.95rem;
  }

  .brand-clean-text {
    font-size: 1.7rem;
  }

  .footer-premium__top {
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
  }

  .footer-premium__contact {
    grid-column: 1 / -1;
  }
}

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

  .topbar-clean-inner {
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
  }

  .brand-clean-text {
    font-size: 1.55rem;
  }

  .nav-item--has-dropdown .nav-dropdown {
    display: none;
  }

  .footer-premium {
    padding: 64px 0 24px;
  }

  .footer-premium__top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-premium__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .topbar-clean-inner {
    min-height: 78px;
  }

  .brand-mark-img,
  .footer-premium__mark-img {
    width: 42px;
    height: 42px;
  }

  .brand-clean-text {
    font-size: 1.35rem;
  }

  .btn-clean {
    min-height: 42px;
    padding: 0 18px;
    font-size: 0.92rem;
  }

  .footer-premium__top {
    grid-template-columns: 1fr;
  }

  .footer-premium__name {
    font-size: 1.55rem;
  }
}

/* ---------- Navigation mobile (burger + panneau) ---------- */
.nav-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(22, 56, 103, 0.18);
  background: #ffffff;
  cursor: pointer;
}

.nav-burger__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent, #163867);
}

.nav-burger:focus-visible,
.mobile-nav__close:focus-visible,
.mobile-nav__links a:focus-visible {
  outline: 2px solid #163867;
  outline-offset: 2px;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 31, 0.45);
}

.mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  background: #f7f5f1;
  box-shadow: -18px 0 48px rgba(16, 22, 31, 0.18);
  padding: 18px 20px 30px;
  overflow-y: auto;
}

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-nav__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5d6470;
}

.mobile-nav__close {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(22, 56, 103, 0.18);
  background: #ffffff;
  cursor: pointer;
}

.mobile-nav__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #163867;
}

.mobile-nav__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-nav__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
}

.mobile-nav__links a {
  display: block;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(22, 24, 29, 0.07);
  border-radius: 10px;
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.4;
  color: #16181d;
  text-decoration: none;
}

.mobile-nav__links a:hover {
  background: #ffffff;
  color: #163867;
}

.mobile-nav__group {
  display: block;
  margin: 16px 12px 4px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #163867;
}

.mobile-nav__links a.mobile-nav__sub {
  padding: 10px 12px 10px 26px;
  font-size: 0.97rem;
  font-weight: 500;
  color: #5d6470;
  border-bottom: 1px solid rgba(22, 24, 29, 0.05);
}

.mobile-nav__links a.mobile-nav__sub::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C4A97D;
  margin-right: 9px;
  vertical-align: 2px;
}

@media (max-width: 980px) {
  .nav-burger {
    display: inline-flex;
  }
}
