@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* BASE */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #F9F9F9;
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #333;
  min-height: 100vh;
  position: relative;
  padding-bottom: 60px;
  padding-top: 140px; /* ajusté pour header compact */
  overflow-x: hidden;

  /* FOND FIXE GLOBAL */
  background-image: url("images/fond-aspm.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* HEADER FIXE ET COMPACT */
.header {
  background: #1f4e79;
  color: white;
  border-bottom: 1px solid #1f4e79;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding-top: 10px;
  padding-bottom: 10px;
  transition: padding 0.25s ease, background-color 0.25s ease;
}

/* HEADER INNER — LOGO IMMOBILE */
.header-inner {
  max-width: 1630px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between; /* logo à gauche, menu à droite */
  align-items: flex-start;
  padding: 0 24px;
}

/* LOGO — TAILLE FIXE */
.logo-img {
  height: 118px;
  width: auto;
  display: block;
}

/* MENU COMPACT */
.nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item > a {
  text-decoration: none;
  color: white;
  text-align: right;
  font-size: 18px;
  font-weight: 500;
  display: block;
  padding: 2px 0;
  line-height: 1.5;
  transition: color 0.25s ease, padding 0.25s ease;
}

.menu-item > a:hover {
  color: #e0e0e0;
}

/* SOUS-MENUS — VERSION LENTE (0.6s) */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.25, 0.1, 0.25, 1),
    max-height 1s ease;
}

.submenu li {
  text-align: right;
}

.submenu a {
  text-decoration: none;
  color: #e6e6e6;
  display: inline-block;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  transition: color 0.3s ease, padding 0.3s ease;
}

.submenu a:hover {
  color: white;
}

.menu-item:hover .submenu {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
}

/* SECTION PRINCIPALE — blocs successifs */
.main {
  margin-top: 0;
}

.hero-image {
  position: relative;
  min-height: auto;
  display: flex;
  justify-content: center;
  padding: 40px 0;
  margin: 50px 0;
  z-index: 0;
}

/* BLOC TEXTE */
.overlay-text {
  background: rgba(255, 255, 255, 0.85);
  width: 66%;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  position: relative;
  z-index: 1;
}

/* TITRES ET TEXTE */
.overlay-text h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.overlay-text p {
  font-size: 18px;
  color: #555;
}

.overlay-text .content {
  margin-top: 24px;
}

.overlay-text .content h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.overlay-text .content p {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
}

/* FOOTER FIXE */
.footer {
  background: #1f4e79;
  color: white;
  height: 60px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  box-sizing: border-box;
}

.footer-search {
  display: flex;
  align-items: center;
}

.loupe-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.loupe-icon:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

.footer-text {
  margin: 0;
  font-size: 16px;
}

/* Ajustement du premier bloc pour visibilité du fond */
.hero-image:first-of-type .overlay-text {
  margin-top: 150px;
  transition: margin-top 0.6s ease-out;
}
