:root {
  --hauteur-menu: 40px;
}

* {
  margin: 0;
  padding: 0;
  font-family: Montserrat, sans-serif;
}

/* === NAV PRINCIPALE === */
nav {
  width: 90%;
  max-width: 1200px;
  font-size: 16px;
  position: relative; /*sticky;// pour adaptation Android */
  margin: 0 auto; /* pour adaptation Android */
  transform: none;/* pour adaptation Android */
  /* position: absolute; /* pour ordi */
  /* left: 50%; /* pour ordi */
  /* top: 20px; /* règle la hauteur du menu par rapport à la bannière */ /* pour ordi */
  /* transform: translateX(-50%); */
  z-index: 10;
  background-color: transparent;
  box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.2); /* ombre sous le menu */
  border-radius: 5px;
}


nav > ul {
  display: flex;
  width: 100%;
  box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.3);
  height: var(--hauteur-menu);
  list-style-type: none;
  border: 0.5px solid #CCCCCC; /* couleur bleue, change-la si tu veux */
  border-radius: 5px;       /* garde les coins arrondis */
  overflow: visible;         /* important pour laisser s'afficher les sous-menus */
}

nav > ul > li {
  background-color: white;
  flex-grow: 1;
  white-space: nowrap;
  position: relative;
  height: 100%;
  flex: 1;
}

nav > ul > li > a {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-decoration: none;
  color: black;
}

/* === EFFETS DE SURVOL === */
nav > ul > li:hover > a {
  color: #2169EC;
}

/* === FLECHE DES MENUS DEROULANTS === */
.menu-deroulant > a::after {
  content: '❯';
  font-size: 14px;
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.2s linear;
}

.menu-deroulant:hover > a::after {
  transform: rotate(90deg);
}

/* === SOUS-MENU === */
.sous-menu {
  margin-top: var(--hauteur-menu);
  width: 100%;
  text-align: left;
  overflow: hidden;
  max-height: 0;
  border-radius: 2px;
  background-color: white;
  transition: max-height 1s ease;
}

.menu-deroulant:hover > .sous-menu {
  max-height: 50em;
  border-top: 3px solid #2169EC;
  box-shadow: 0px 3px 3px 1px rgba(0, 0, 0, 0.3);
}

/* === ANIMATION D'APPARITION === */
@keyframes rotationFleche {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(45deg);
  }
  100% {
    transform: rotate(90deg);
  }
}

/* === SOUS-MENU HOVER === */
.sous-menu > li:hover {
  background-color: rgba(33, 105, 236, 0.3);
}

.sous-menu > li > a {
  align-items: center;
  display: flex;
  height: 40px;
  padding-left: 20px;
  width: 100%;
  color: black;
  text-decoration: none;
}

.sous-menu > li:hover > a {
  color: white;
}

/* === BANNIERE === */
#images {
  text-align: center;
}

#images .image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  background-color: transparent;
}

/* partie ci-dessous ajoutée pour fluidité sur android */
@media (max-width: 768px) {
  nav > ul {
    flex-direction: column;
    height: auto;
  }

  nav > ul > li {
    text-align: center;
    padding: 10px 0;
  }

  .sous-menu {
    position: static;
  }
}

